aboutsummaryrefslogtreecommitdiffstats
path: root/include/nvgpu
diff options
context:
space:
mode:
Diffstat (limited to 'include/nvgpu')
-rw-r--r--include/nvgpu/acr/acr_flcnbl.h144
-rw-r--r--include/nvgpu/acr/acr_lsfm.h328
-rw-r--r--include/nvgpu/acr/acr_objflcn.h91
-rw-r--r--include/nvgpu/acr/acr_objlsfm.h97
-rw-r--r--include/nvgpu/acr/nvgpu_acr.h192
-rw-r--r--include/nvgpu/allocator.h331
-rw-r--r--include/nvgpu/as.h54
-rw-r--r--include/nvgpu/atomic.h130
-rw-r--r--include/nvgpu/barrier.h61
-rw-r--r--include/nvgpu/bios.h1123
-rw-r--r--include/nvgpu/bitops.h44
-rw-r--r--include/nvgpu/bsearch.h31
-rw-r--r--include/nvgpu/bug.h51
-rw-r--r--include/nvgpu/channel.h478
-rw-r--r--include/nvgpu/channel_sync.h113
-rw-r--r--include/nvgpu/circ_buf.h31
-rw-r--r--include/nvgpu/clk.h42
-rw-r--r--include/nvgpu/clk_arb.h378
-rw-r--r--include/nvgpu/comptags.h104
-rw-r--r--include/nvgpu/cond.h106
-rw-r--r--include/nvgpu/ctxsw_trace.h94
-rw-r--r--include/nvgpu/debug.h63
-rw-r--r--include/nvgpu/defaults.h33
-rw-r--r--include/nvgpu/dma.h361
-rw-r--r--include/nvgpu/dt.h28
-rw-r--r--include/nvgpu/ecc.h162
-rw-r--r--include/nvgpu/enabled.h221
-rw-r--r--include/nvgpu/errno.h41
-rw-r--r--include/nvgpu/error_notifier.h49
-rw-r--r--include/nvgpu/falcon.h335
-rw-r--r--include/nvgpu/fecs_trace.h60
-rw-r--r--include/nvgpu/firmware.h74
-rw-r--r--include/nvgpu/flcnif_cmn.h121
-rw-r--r--include/nvgpu/fuse.h38
-rw-r--r--include/nvgpu/gk20a.h1807
-rw-r--r--include/nvgpu/gmmu.h369
-rw-r--r--include/nvgpu/hal_init.h33
-rw-r--r--include/nvgpu/hashtable.h29
-rw-r--r--include/nvgpu/hw/gk20a/hw_bus_gk20a.h171
-rw-r--r--include/nvgpu/hw/gk20a/hw_ccsr_gk20a.h163
-rw-r--r--include/nvgpu/hw/gk20a/hw_ce2_gk20a.h87
-rw-r--r--include/nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h447
-rw-r--r--include/nvgpu/hw/gk20a/hw_falcon_gk20a.h559
-rw-r--r--include/nvgpu/hw/gk20a/hw_fb_gk20a.h263
-rw-r--r--include/nvgpu/hw/gk20a/hw_fifo_gk20a.h619
-rw-r--r--include/nvgpu/hw/gk20a/hw_flush_gk20a.h187
-rw-r--r--include/nvgpu/hw/gk20a/hw_gmmu_gk20a.h283
-rw-r--r--include/nvgpu/hw/gk20a/hw_gr_gk20a.h3868
-rw-r--r--include/nvgpu/hw/gk20a/hw_ltc_gk20a.h455
-rw-r--r--include/nvgpu/hw/gk20a/hw_mc_gk20a.h291
-rw-r--r--include/nvgpu/hw/gk20a/hw_pbdma_gk20a.h575
-rw-r--r--include/nvgpu/hw/gk20a/hw_perf_gk20a.h211
-rw-r--r--include/nvgpu/hw/gk20a/hw_pram_gk20a.h63
-rw-r--r--include/nvgpu/hw/gk20a/hw_pri_ringmaster_gk20a.h159
-rw-r--r--include/nvgpu/hw/gk20a/hw_pri_ringstation_fbp_gk20a.h231
-rw-r--r--include/nvgpu/hw/gk20a/hw_pri_ringstation_gpc_gk20a.h79
-rw-r--r--include/nvgpu/hw/gk20a/hw_pri_ringstation_sys_gk20a.h91
-rw-r--r--include/nvgpu/hw/gk20a/hw_proj_gk20a.h167
-rw-r--r--include/nvgpu/hw/gk20a/hw_pwr_gk20a.h827
-rw-r--r--include/nvgpu/hw/gk20a/hw_ram_gk20a.h443
-rw-r--r--include/nvgpu/hw/gk20a/hw_therm_gk20a.h367
-rw-r--r--include/nvgpu/hw/gk20a/hw_timer_gk20a.h127
-rw-r--r--include/nvgpu/hw/gk20a/hw_top_gk20a.h211
-rw-r--r--include/nvgpu/hw/gk20a/hw_trim_gk20a.h315
-rw-r--r--include/nvgpu/hw/gm20b/hw_bus_gm20b.h223
-rw-r--r--include/nvgpu/hw/gm20b/hw_ccsr_gm20b.h163
-rw-r--r--include/nvgpu/hw/gm20b/hw_ce2_gm20b.h87
-rw-r--r--include/nvgpu/hw/gm20b/hw_ctxsw_prog_gm20b.h475
-rw-r--r--include/nvgpu/hw/gm20b/hw_falcon_gm20b.h599
-rw-r--r--include/nvgpu/hw/gm20b/hw_fb_gm20b.h339
-rw-r--r--include/nvgpu/hw/gm20b/hw_fifo_gm20b.h571
-rw-r--r--include/nvgpu/hw/gm20b/hw_flush_gm20b.h187
-rw-r--r--include/nvgpu/hw/gm20b/hw_fuse_gm20b.h147
-rw-r--r--include/nvgpu/hw/gm20b/hw_gmmu_gm20b.h283
-rw-r--r--include/nvgpu/hw/gm20b/hw_gr_gm20b.h3939
-rw-r--r--include/nvgpu/hw/gm20b/hw_ltc_gm20b.h527
-rw-r--r--include/nvgpu/hw/gm20b/hw_mc_gm20b.h287
-rw-r--r--include/nvgpu/hw/gm20b/hw_pbdma_gm20b.h579
-rw-r--r--include/nvgpu/hw/gm20b/hw_perf_gm20b.h219
-rw-r--r--include/nvgpu/hw/gm20b/hw_pram_gm20b.h63
-rw-r--r--include/nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h167
-rw-r--r--include/nvgpu/hw/gm20b/hw_pri_ringstation_gpc_gm20b.h79
-rw-r--r--include/nvgpu/hw/gm20b/hw_pri_ringstation_sys_gm20b.h91
-rw-r--r--include/nvgpu/hw/gm20b/hw_proj_gm20b.h171
-rw-r--r--include/nvgpu/hw/gm20b/hw_pwr_gm20b.h879
-rw-r--r--include/nvgpu/hw/gm20b/hw_ram_gm20b.h459
-rw-r--r--include/nvgpu/hw/gm20b/hw_therm_gm20b.h355
-rw-r--r--include/nvgpu/hw/gm20b/hw_timer_gm20b.h127
-rw-r--r--include/nvgpu/hw/gm20b/hw_top_gm20b.h235
-rw-r--r--include/nvgpu/hw/gm20b/hw_trim_gm20b.h503
-rw-r--r--include/nvgpu/hw/gp106/hw_bus_gp106.h223
-rw-r--r--include/nvgpu/hw/gp106/hw_ccsr_gp106.h163
-rw-r--r--include/nvgpu/hw/gp106/hw_ce_gp106.h87
-rw-r--r--include/nvgpu/hw/gp106/hw_ctxsw_prog_gp106.h295
-rw-r--r--include/nvgpu/hw/gp106/hw_falcon_gp106.h603
-rw-r--r--include/nvgpu/hw/gp106/hw_fb_gp106.h563
-rw-r--r--include/nvgpu/hw/gp106/hw_fbpa_gp106.h67
-rw-r--r--include/nvgpu/hw/gp106/hw_fifo_gp106.h695
-rw-r--r--include/nvgpu/hw/gp106/hw_flush_gp106.h187
-rw-r--r--include/nvgpu/hw/gp106/hw_fuse_gp106.h275
-rw-r--r--include/nvgpu/hw/gp106/hw_gc6_gp106.h62
-rw-r--r--include/nvgpu/hw/gp106/hw_gmmu_gp106.h331
-rw-r--r--include/nvgpu/hw/gp106/hw_gr_gp106.h4167
-rw-r--r--include/nvgpu/hw/gp106/hw_ltc_gp106.h559
-rw-r--r--include/nvgpu/hw/gp106/hw_mc_gp106.h251
-rw-r--r--include/nvgpu/hw/gp106/hw_pbdma_gp106.h535
-rw-r--r--include/nvgpu/hw/gp106/hw_perf_gp106.h219
-rw-r--r--include/nvgpu/hw/gp106/hw_pram_gp106.h63
-rw-r--r--include/nvgpu/hw/gp106/hw_pri_ringmaster_gp106.h151
-rw-r--r--include/nvgpu/hw/gp106/hw_pri_ringstation_gpc_gp106.h79
-rw-r--r--include/nvgpu/hw/gp106/hw_pri_ringstation_sys_gp106.h91
-rw-r--r--include/nvgpu/hw/gp106/hw_proj_gp106.h179
-rw-r--r--include/nvgpu/hw/gp106/hw_psec_gp106.h615
-rw-r--r--include/nvgpu/hw/gp106/hw_pwr_gp106.h895
-rw-r--r--include/nvgpu/hw/gp106/hw_ram_gp106.h507
-rw-r--r--include/nvgpu/hw/gp106/hw_therm_gp106.h183
-rw-r--r--include/nvgpu/hw/gp106/hw_timer_gp106.h115
-rw-r--r--include/nvgpu/hw/gp106/hw_top_gp106.h255
-rw-r--r--include/nvgpu/hw/gp106/hw_trim_gp106.h195
-rw-r--r--include/nvgpu/hw/gp106/hw_xp_gp106.h143
-rw-r--r--include/nvgpu/hw/gp106/hw_xve_gp106.h207
-rw-r--r--include/nvgpu/hw/gp10b/hw_bus_gp10b.h223
-rw-r--r--include/nvgpu/hw/gp10b/hw_ccsr_gp10b.h163
-rw-r--r--include/nvgpu/hw/gp10b/hw_ce_gp10b.h87
-rw-r--r--include/nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h491
-rw-r--r--include/nvgpu/hw/gp10b/hw_falcon_gp10b.h603
-rw-r--r--include/nvgpu/hw/gp10b/hw_fb_gp10b.h463
-rw-r--r--include/nvgpu/hw/gp10b/hw_fifo_gp10b.h699
-rw-r--r--include/nvgpu/hw/gp10b/hw_flush_gp10b.h187
-rw-r--r--include/nvgpu/hw/gp10b/hw_fuse_gp10b.h155
-rw-r--r--include/nvgpu/hw/gp10b/hw_gmmu_gp10b.h331
-rw-r--r--include/nvgpu/hw/gp10b/hw_gr_gp10b.h4419
-rw-r--r--include/nvgpu/hw/gp10b/hw_ltc_gp10b.h587
-rw-r--r--include/nvgpu/hw/gp10b/hw_mc_gp10b.h255
-rw-r--r--include/nvgpu/hw/gp10b/hw_pbdma_gp10b.h615
-rw-r--r--include/nvgpu/hw/gp10b/hw_perf_gp10b.h219
-rw-r--r--include/nvgpu/hw/gp10b/hw_pram_gp10b.h63
-rw-r--r--include/nvgpu/hw/gp10b/hw_pri_ringmaster_gp10b.h167
-rw-r--r--include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h87
-rw-r--r--include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h99
-rw-r--r--include/nvgpu/hw/gp10b/hw_proj_gp10b.h179
-rw-r--r--include/nvgpu/hw/gp10b/hw_pwr_gp10b.h883
-rw-r--r--include/nvgpu/hw/gp10b/hw_ram_gp10b.h519
-rw-r--r--include/nvgpu/hw/gp10b/hw_therm_gp10b.h415
-rw-r--r--include/nvgpu/hw/gp10b/hw_timer_gp10b.h127
-rw-r--r--include/nvgpu/hw/gp10b/hw_top_gp10b.h231
-rw-r--r--include/nvgpu/hw/gv100/hw_bus_gv100.h227
-rw-r--r--include/nvgpu/hw/gv100/hw_ccsr_gv100.h187
-rw-r--r--include/nvgpu/hw/gv100/hw_ce_gv100.h107
-rw-r--r--include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h459
-rw-r--r--include/nvgpu/hw/gv100/hw_falcon_gv100.h603
-rw-r--r--include/nvgpu/hw/gv100/hw_fb_gv100.h1923
-rw-r--r--include/nvgpu/hw/gv100/hw_fifo_gv100.h531
-rw-r--r--include/nvgpu/hw/gv100/hw_flush_gv100.h187
-rw-r--r--include/nvgpu/hw/gv100/hw_fuse_gv100.h147
-rw-r--r--include/nvgpu/hw/gv100/hw_gmmu_gv100.h355
-rw-r--r--include/nvgpu/hw/gv100/hw_gr_gv100.h4123
-rw-r--r--include/nvgpu/hw/gv100/hw_ioctrl_gv100.h331
-rw-r--r--include/nvgpu/hw/gv100/hw_ioctrlmif_gv100.h331
-rw-r--r--include/nvgpu/hw/gv100/hw_ltc_gv100.h631
-rw-r--r--include/nvgpu/hw/gv100/hw_mc_gv100.h259
-rw-r--r--include/nvgpu/hw/gv100/hw_minion_gv100.h943
-rw-r--r--include/nvgpu/hw/gv100/hw_nvl_gv100.h1571
-rw-r--r--include/nvgpu/hw/gv100/hw_nvlinkip_discovery_gv100.h311
-rw-r--r--include/nvgpu/hw/gv100/hw_nvlipt_gv100.h279
-rw-r--r--include/nvgpu/hw/gv100/hw_nvtlc_gv100.h95
-rw-r--r--include/nvgpu/hw/gv100/hw_pbdma_gv100.h651
-rw-r--r--include/nvgpu/hw/gv100/hw_perf_gv100.h263
-rw-r--r--include/nvgpu/hw/gv100/hw_pgsp_gv100.h643
-rw-r--r--include/nvgpu/hw/gv100/hw_pram_gv100.h63
-rw-r--r--include/nvgpu/hw/gv100/hw_pri_ringmaster_gv100.h167
-rw-r--r--include/nvgpu/hw/gv100/hw_pri_ringstation_gpc_gv100.h79
-rw-r--r--include/nvgpu/hw/gv100/hw_pri_ringstation_sys_gv100.h91
-rw-r--r--include/nvgpu/hw/gv100/hw_proj_gv100.h199
-rw-r--r--include/nvgpu/hw/gv100/hw_pwr_gv100.h983
-rw-r--r--include/nvgpu/hw/gv100/hw_ram_gv100.h791
-rw-r--r--include/nvgpu/hw/gv100/hw_therm_gv100.h299
-rw-r--r--include/nvgpu/hw/gv100/hw_timer_gv100.h115
-rw-r--r--include/nvgpu/hw/gv100/hw_top_gv100.h343
-rw-r--r--include/nvgpu/hw/gv100/hw_trim_gv100.h247
-rw-r--r--include/nvgpu/hw/gv100/hw_usermode_gv100.h95
-rw-r--r--include/nvgpu/hw/gv100/hw_xp_gv100.h143
-rw-r--r--include/nvgpu/hw/gv100/hw_xve_gv100.h207
-rw-r--r--include/nvgpu/hw/gv11b/hw_bus_gv11b.h223
-rw-r--r--include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h187
-rw-r--r--include/nvgpu/hw/gv11b/hw_ce_gv11b.h115
-rw-r--r--include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h463
-rw-r--r--include/nvgpu/hw/gv11b/hw_falcon_gv11b.h603
-rw-r--r--include/nvgpu/hw/gv11b/hw_fb_gv11b.h1867
-rw-r--r--include/nvgpu/hw/gv11b/hw_fifo_gv11b.h667
-rw-r--r--include/nvgpu/hw/gv11b/hw_flush_gv11b.h187
-rw-r--r--include/nvgpu/hw/gv11b/hw_fuse_gv11b.h155
-rw-r--r--include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h571
-rw-r--r--include/nvgpu/hw/gv11b/hw_gr_gv11b.h5703
-rw-r--r--include/nvgpu/hw/gv11b/hw_ltc_gv11b.h815
-rw-r--r--include/nvgpu/hw/gv11b/hw_mc_gv11b.h231
-rw-r--r--include/nvgpu/hw/gv11b/hw_pbdma_gv11b.h651
-rw-r--r--include/nvgpu/hw/gv11b/hw_perf_gv11b.h263
-rw-r--r--include/nvgpu/hw/gv11b/hw_pram_gv11b.h63
-rw-r--r--include/nvgpu/hw/gv11b/hw_pri_ringmaster_gv11b.h167
-rw-r--r--include/nvgpu/hw/gv11b/hw_pri_ringstation_gpc_gv11b.h79
-rw-r--r--include/nvgpu/hw/gv11b/hw_pri_ringstation_sys_gv11b.h91
-rw-r--r--include/nvgpu/hw/gv11b/hw_proj_gv11b.h191
-rw-r--r--include/nvgpu/hw/gv11b/hw_pwr_gv11b.h1219
-rw-r--r--include/nvgpu/hw/gv11b/hw_ram_gv11b.h791
-rw-r--r--include/nvgpu/hw/gv11b/hw_therm_gv11b.h487
-rw-r--r--include/nvgpu/hw/gv11b/hw_timer_gv11b.h127
-rw-r--r--include/nvgpu/hw/gv11b/hw_top_gv11b.h235
-rw-r--r--include/nvgpu/hw/gv11b/hw_usermode_gv11b.h95
-rw-r--r--include/nvgpu/hw_sim.h2153
-rw-r--r--include/nvgpu/hw_sim_pci.h2169
-rw-r--r--include/nvgpu/io.h49
-rw-r--r--include/nvgpu/io_usermode.h27
-rw-r--r--include/nvgpu/kmem.h285
-rw-r--r--include/nvgpu/kref.h87
-rw-r--r--include/nvgpu/linux/atomic.h149
-rw-r--r--include/nvgpu/linux/barrier.h37
-rw-r--r--include/nvgpu/linux/cond.h81
-rw-r--r--include/nvgpu/linux/dma.h38
-rw-r--r--include/nvgpu/linux/kmem.h47
-rw-r--r--include/nvgpu/linux/lock.h81
-rw-r--r--include/nvgpu/linux/nvgpu_mem.h89
-rw-r--r--include/nvgpu/linux/nvlink.h31
-rw-r--r--include/nvgpu/linux/os_fence_android.h48
-rw-r--r--include/nvgpu/linux/rwsem.h26
-rw-r--r--include/nvgpu/linux/sim.h38
-rw-r--r--include/nvgpu/linux/sim_pci.h26
-rw-r--r--include/nvgpu/linux/thread.h29
-rw-r--r--include/nvgpu/linux/vm.h92
-rw-r--r--include/nvgpu/list.h104
-rw-r--r--include/nvgpu/lock.h75
-rw-r--r--include/nvgpu/log.h184
-rw-r--r--include/nvgpu/log2.h31
-rw-r--r--include/nvgpu/ltc.h35
-rw-r--r--include/nvgpu/mc.h35
-rw-r--r--include/nvgpu/mm.h223
-rw-r--r--include/nvgpu/nvgpu_common.h36
-rw-r--r--include/nvgpu/nvgpu_err.h359
-rw-r--r--include/nvgpu/nvgpu_mem.h359
-rw-r--r--include/nvgpu/nvhost.h112
-rw-r--r--include/nvgpu/nvlink.h237
-rw-r--r--include/nvgpu/os_fence.h138
-rw-r--r--include/nvgpu/os_sched.h51
-rw-r--r--include/nvgpu/page_allocator.h185
-rw-r--r--include/nvgpu/pci.h39
-rw-r--r--include/nvgpu/pmu.h545
-rw-r--r--include/nvgpu/pmuif/gpmu_super_surf_if.h77
-rw-r--r--include/nvgpu/pmuif/gpmuif_acr.h159
-rw-r--r--include/nvgpu/pmuif/gpmuif_ap.h256
-rw-r--r--include/nvgpu/pmuif/gpmuif_cmn.h142
-rw-r--r--include/nvgpu/pmuif/gpmuif_perfmon.h241
-rw-r--r--include/nvgpu/pmuif/gpmuif_pg.h424
-rw-r--r--include/nvgpu/pmuif/gpmuif_pg_rppg.h110
-rw-r--r--include/nvgpu/pmuif/gpmuif_pmu.h193
-rw-r--r--include/nvgpu/pmuif/gpmuifbios.h50
-rw-r--r--include/nvgpu/pmuif/gpmuifboardobj.h234
-rw-r--r--include/nvgpu/pmuif/gpmuifclk.h573
-rw-r--r--include/nvgpu/pmuif/gpmuifperf.h154
-rw-r--r--include/nvgpu/pmuif/gpmuifperfvfe.h206
-rw-r--r--include/nvgpu/pmuif/gpmuifpmgr.h443
-rw-r--r--include/nvgpu/pmuif/gpmuifseq.h82
-rw-r--r--include/nvgpu/pmuif/gpmuiftherm.h102
-rw-r--r--include/nvgpu/pmuif/gpmuifthermsensor.h105
-rw-r--r--include/nvgpu/pmuif/gpmuifvolt.h402
-rw-r--r--include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h143
-rw-r--r--include/nvgpu/posix/atomic.h191
-rw-r--r--include/nvgpu/posix/barrier.h44
-rw-r--r--include/nvgpu/posix/bitops.h95
-rw-r--r--include/nvgpu/posix/bug.h56
-rw-r--r--include/nvgpu/posix/circ_buf.h44
-rw-r--r--include/nvgpu/posix/cond.h59
-rw-r--r--include/nvgpu/posix/io.h114
-rw-r--r--include/nvgpu/posix/kmem.h36
-rw-r--r--include/nvgpu/posix/lock.h69
-rw-r--r--include/nvgpu/posix/log2.h37
-rw-r--r--include/nvgpu/posix/nvgpu_mem.h32
-rw-r--r--include/nvgpu/posix/nvlink.h24
-rw-r--r--include/nvgpu/posix/pci.h28
-rw-r--r--include/nvgpu/posix/probe.h31
-rw-r--r--include/nvgpu/posix/rwsem.h35
-rw-r--r--include/nvgpu/posix/sizes.h38
-rw-r--r--include/nvgpu/posix/sort.h35
-rw-r--r--include/nvgpu/posix/thread.h51
-rw-r--r--include/nvgpu/posix/types.h221
-rw-r--r--include/nvgpu/posix/vm.h41
-rw-r--r--include/nvgpu/power_features/cg.h57
-rw-r--r--include/nvgpu/power_features/pg.h36
-rw-r--r--include/nvgpu/power_features/power_features.h34
-rw-r--r--include/nvgpu/pramin.h39
-rw-r--r--include/nvgpu/ptimer.h55
-rw-r--r--include/nvgpu/rbtree.h130
-rw-r--r--include/nvgpu/rwsem.h48
-rw-r--r--include/nvgpu/sched.h42
-rw-r--r--include/nvgpu/sec2.h97
-rw-r--r--include/nvgpu/sec2if/sec2_cmd_if.h50
-rw-r--r--include/nvgpu/sec2if/sec2_if_acr.h96
-rw-r--r--include/nvgpu/sec2if/sec2_if_cmn.h73
-rw-r--r--include/nvgpu/sec2if/sec2_if_sec2.h75
-rw-r--r--include/nvgpu/semaphore.h206
-rw-r--r--include/nvgpu/sim.h58
-rw-r--r--include/nvgpu/sizes.h33
-rw-r--r--include/nvgpu/soc.h37
-rw-r--r--include/nvgpu/sort.h33
-rw-r--r--include/nvgpu/therm.h29
-rw-r--r--include/nvgpu/thread.h92
-rw-r--r--include/nvgpu/timers.h116
-rw-r--r--include/nvgpu/tsg.h132
-rw-r--r--include/nvgpu/types.h71
-rw-r--r--include/nvgpu/unit.h41
-rw-r--r--include/nvgpu/utils.h58
-rw-r--r--include/nvgpu/vgpu/tegra_vgpu.h817
-rw-r--r--include/nvgpu/vgpu/vgpu.h110
-rw-r--r--include/nvgpu/vgpu/vgpu_ivc.h45
-rw-r--r--include/nvgpu/vgpu/vgpu_ivm.h37
-rw-r--r--include/nvgpu/vgpu/vm.h31
-rw-r--r--include/nvgpu/vidmem.h148
-rw-r--r--include/nvgpu/vm.h330
-rw-r--r--include/nvgpu/vm_area.h75
-rw-r--r--include/nvgpu/vpr.h30
-rw-r--r--include/nvgpu/xve.h68
320 files changed, 0 insertions, 108448 deletions
diff --git a/include/nvgpu/acr/acr_flcnbl.h b/include/nvgpu/acr/acr_flcnbl.h
deleted file mode 100644
index ad697b2..0000000
--- a/include/nvgpu/acr/acr_flcnbl.h
+++ /dev/null
@@ -1,144 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_ACR_FLCNBL_H
23#define NVGPU_ACR_FLCNBL_H
24
25#include <nvgpu/flcnif_cmn.h>
26
27#ifndef NVGPU_ACR_H
28#warning "acr_flcnbl.h not included from nvgpu_acr.h!" \
29 "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces"
30#endif
31
32/*
33 * Structure used by the boot-loader to load the rest of the code. This has
34 * to be filled by NVGPU and copied into DMEM at offset provided in the
35 * hsflcn_bl_desc.bl_desc_dmem_load_off.
36 */
37struct flcn_bl_dmem_desc {
38 u32 reserved[4]; /*Should be the first element..*/
39 u32 signature[4]; /*Should be the first element..*/
40 u32 ctx_dma;
41 u32 code_dma_base;
42 u32 non_sec_code_off;
43 u32 non_sec_code_size;
44 u32 sec_code_off;
45 u32 sec_code_size;
46 u32 code_entry_point;
47 u32 data_dma_base;
48 u32 data_size;
49 u32 code_dma_base1;
50 u32 data_dma_base1;
51};
52
53struct flcn_bl_dmem_desc_v1 {
54 u32 reserved[4]; /*Should be the first element..*/
55 u32 signature[4]; /*Should be the first element..*/
56 u32 ctx_dma;
57 struct falc_u64 code_dma_base;
58 u32 non_sec_code_off;
59 u32 non_sec_code_size;
60 u32 sec_code_off;
61 u32 sec_code_size;
62 u32 code_entry_point;
63 struct falc_u64 data_dma_base;
64 u32 data_size;
65 u32 argc;
66 u32 argv;
67};
68
69/*
70 * The header used by NVGPU to figure out code and data sections of bootloader
71 *
72 * bl_code_off - Offset of code section in the image
73 * bl_code_size - Size of code section in the image
74 * bl_data_off - Offset of data section in the image
75 * bl_data_size - Size of data section in the image
76 */
77struct flcn_bl_img_hdr {
78 u32 bl_code_off;
79 u32 bl_code_size;
80 u32 bl_data_off;
81 u32 bl_data_size;
82};
83
84/*
85 * The descriptor used by NVGPU to figure out the requirements of bootloader
86 *
87 * bl_start_tag - Starting tag of bootloader
88 * bl_desc_dmem_load_off - Dmem offset where _def_rm_flcn_bl_dmem_desc
89 * to be loaded
90 * bl_img_hdr - Description of the image
91 */
92struct hsflcn_bl_desc {
93 u32 bl_start_tag;
94 u32 bl_desc_dmem_load_off;
95 struct flcn_bl_img_hdr bl_img_hdr;
96};
97
98/*
99 * Legacy structure used by the current PMU/DPU bootloader.
100 */
101struct loader_config {
102 u32 dma_idx;
103 u32 code_dma_base; /* upper 32-bits of 40-bit dma address */
104 u32 code_size_total;
105 u32 code_size_to_load;
106 u32 code_entry_point;
107 u32 data_dma_base; /* upper 32-bits of 40-bit dma address */
108 u32 data_size; /* initialized data of the application */
109 u32 overlay_dma_base; /* upper 32-bits of the 40-bit dma address */
110 u32 argc;
111 u32 argv;
112 u16 code_dma_base1; /* upper 7 bits of 47-bit dma address */
113 u16 data_dma_base1; /* upper 7 bits of 47-bit dma address */
114 u16 overlay_dma_base1; /* upper 7 bits of the 47-bit dma address */
115};
116
117struct loader_config_v1 {
118 u32 reserved;
119 u32 dma_idx;
120 struct falc_u64 code_dma_base;
121 u32 code_size_total;
122 u32 code_size_to_load;
123 u32 code_entry_point;
124 struct falc_u64 data_dma_base;
125 u32 data_size;
126 struct falc_u64 overlay_dma_base;
127 u32 argc;
128 u32 argv;
129};
130
131/*
132 * Union of all supported structures used by bootloaders.
133 */
134union flcn_bl_generic_desc {
135 struct flcn_bl_dmem_desc bl_dmem_desc;
136 struct loader_config loader_cfg;
137};
138
139union flcn_bl_generic_desc_v1 {
140 struct flcn_bl_dmem_desc_v1 bl_dmem_desc_v1;
141 struct loader_config_v1 loader_cfg_v1;
142};
143
144#endif /* NVGPU_ACR_FLCNBL_H */
diff --git a/include/nvgpu/acr/acr_lsfm.h b/include/nvgpu/acr/acr_lsfm.h
deleted file mode 100644
index ed58552..0000000
--- a/include/nvgpu/acr/acr_lsfm.h
+++ /dev/null
@@ -1,328 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_ACR_LSFM_H
23#define NVGPU_ACR_LSFM_H
24
25#ifndef NVGPU_ACR_H
26#warning "acr_lsfm.h not included from nvgpu_acr.h!" \
27 "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces"
28#endif
29
30/*
31 * READ/WRITE masks for WPR region
32 */
33/* Readable only from level 2 and 3 client */
34#define LSF_WPR_REGION_RMASK (0xC)
35/* Writable only from level 2 and 3 client */
36#define LSF_WPR_REGION_WMASK (0xC)
37/* Readable only from level 3 client */
38#define LSF_WPR_REGION_RMASK_SUB_WPR_ENABLED (0x8)
39/* Writable only from level 3 client */
40#define LSF_WPR_REGION_WMASK_SUB_WPR_ENABLED (0x8)
41/* Disallow read mis-match for all clients */
42#define LSF_WPR_REGION_ALLOW_READ_MISMATCH_NO (0x0)
43/* Disallow write mis-match for all clients */
44#define LSF_WPR_REGION_ALLOW_WRITE_MISMATCH_NO (0x0)
45
46/*
47 * Falcon Id Defines
48 * Defines a common Light Secure Falcon identifier.
49 */
50#define LSF_FALCON_ID_PMU (0)
51#define LSF_FALCON_ID_GSPLITE (1)
52#define LSF_FALCON_ID_FECS (2)
53#define LSF_FALCON_ID_GPCCS (3)
54#define LSF_FALCON_ID_SEC2 (7)
55#define LSF_FALCON_ID_END (11)
56#define LSF_FALCON_ID_INVALID (0xFFFFFFFF)
57
58/*
59 * Light Secure Falcon Ucode Description Defines
60 * This structure is prelim and may change as the ucode signing flow evolves.
61 */
62struct lsf_ucode_desc {
63 u8 prd_keys[2][16];
64 u8 dbg_keys[2][16];
65 u32 b_prd_present;
66 u32 b_dbg_present;
67 u32 falcon_id;
68};
69
70struct lsf_ucode_desc_v1 {
71 u8 prd_keys[2][16];
72 u8 dbg_keys[2][16];
73 u32 b_prd_present;
74 u32 b_dbg_present;
75 u32 falcon_id;
76 u32 bsupports_versioning;
77 u32 version;
78 u32 dep_map_count;
79 u8 dep_map[LSF_FALCON_ID_END * 2 * 4];
80 u8 kdf[16];
81};
82
83/*
84 * Light Secure WPR Header
85 * Defines state allowing Light Secure Falcon bootstrapping.
86 */
87struct lsf_wpr_header {
88 u32 falcon_id;
89 u32 lsb_offset;
90 u32 bootstrap_owner;
91 u32 lazy_bootstrap;
92 u32 status;
93};
94
95struct lsf_wpr_header_v1 {
96 u32 falcon_id;
97 u32 lsb_offset;
98 u32 bootstrap_owner;
99 u32 lazy_bootstrap;
100 u32 bin_version;
101 u32 status;
102};
103
104
105/*
106 * LSF shared SubWpr Header
107 *
108 * use_case_id - Shared SubWpr use case ID (updated by nvgpu)
109 * start_addr - start address of subWpr (updated by nvgpu)
110 * size_4K - size of subWpr in 4K (updated by nvgpu)
111 */
112struct lsf_shared_sub_wpr_header {
113 u32 use_case_id;
114 u32 start_addr;
115 u32 size_4K;
116};
117
118/* shared sub_wpr use case IDs */
119enum {
120 LSF_SHARED_DATA_SUB_WPR_USE_CASE_ID_FRTS_VBIOS_TABLES = 1,
121 LSF_SHARED_DATA_SUB_WPR_USE_CASE_ID_PLAYREADY_SHARED_DATA = 2
122};
123
124#define LSF_SHARED_DATA_SUB_WPR_USE_CASE_ID_MAX \
125 LSF_SHARED_DATA_SUB_WPR_USE_CASE_ID_PLAYREADY_SHARED_DATA
126
127#define LSF_SHARED_DATA_SUB_WPR_USE_CASE_ID_INVALID (0xFFFFFFFF)
128
129#define MAX_SUPPORTED_SHARED_SUB_WPR_USE_CASES \
130 LSF_SHARED_DATA_SUB_WPR_USE_CASE_ID_MAX
131
132/* Static sizes of shared subWPRs */
133/* Minimum granularity supported is 4K */
134/* 1MB in 4K */
135#define LSF_SHARED_DATA_SUB_WPR_FRTS_VBIOS_TABLES_SIZE_IN_4K (0x100)
136/* 4K */
137#define LSF_SHARED_DATA_SUB_WPR_PLAYREADY_SHARED_DATA_SIZE_IN_4K (0x1)
138
139/*
140 * Bootstrap Owner Defines
141 */
142#define LSF_BOOTSTRAP_OWNER_DEFAULT (LSF_FALCON_ID_PMU)
143
144/*
145 * Image Status Defines
146 */
147#define LSF_IMAGE_STATUS_NONE (0)
148#define LSF_IMAGE_STATUS_COPY (1)
149#define LSF_IMAGE_STATUS_VALIDATION_CODE_FAILED (2)
150#define LSF_IMAGE_STATUS_VALIDATION_DATA_FAILED (3)
151#define LSF_IMAGE_STATUS_VALIDATION_DONE (4)
152#define LSF_IMAGE_STATUS_VALIDATION_SKIPPED (5)
153#define LSF_IMAGE_STATUS_BOOTSTRAP_READY (6)
154
155/*Light Secure Bootstrap header related defines*/
156#define NV_FLCN_ACR_LSF_FLAG_LOAD_CODE_AT_0_FALSE 0
157#define NV_FLCN_ACR_LSF_FLAG_LOAD_CODE_AT_0_TRUE 1
158#define NV_FLCN_ACR_LSF_FLAG_DMACTL_REQ_CTX_FALSE 0
159#define NV_FLCN_ACR_LSF_FLAG_DMACTL_REQ_CTX_TRUE 4
160#define NV_FLCN_ACR_LSF_FLAG_FORCE_PRIV_LOAD_TRUE 8
161#define NV_FLCN_ACR_LSF_FLAG_FORCE_PRIV_LOAD_FALSE 0
162
163/*
164 * Light Secure Bootstrap Header
165 * Defines state allowing Light Secure Falcon bootstrapping.
166 */
167struct lsf_lsb_header {
168 struct lsf_ucode_desc signature;
169 u32 ucode_off;
170 u32 ucode_size;
171 u32 data_size;
172 u32 bl_code_size;
173 u32 bl_imem_off;
174 u32 bl_data_off;
175 u32 bl_data_size;
176 u32 app_code_off;
177 u32 app_code_size;
178 u32 app_data_off;
179 u32 app_data_size;
180 u32 flags;
181};
182
183struct lsf_lsb_header_v1 {
184 struct lsf_ucode_desc_v1 signature;
185 u32 ucode_off;
186 u32 ucode_size;
187 u32 data_size;
188 u32 bl_code_size;
189 u32 bl_imem_off;
190 u32 bl_data_off;
191 u32 bl_data_size;
192 u32 app_code_off;
193 u32 app_code_size;
194 u32 app_data_off;
195 u32 app_data_size;
196 u32 flags;
197};
198
199/*
200 * Light Secure WPR Content Alignments
201 */
202#define LSF_WPR_HEADER_ALIGNMENT (256U)
203#define LSF_SUB_WPR_HEADER_ALIGNMENT (256U)
204#define LSF_LSB_HEADER_ALIGNMENT (256U)
205#define LSF_BL_DATA_ALIGNMENT (256U)
206#define LSF_BL_DATA_SIZE_ALIGNMENT (256U)
207#define LSF_BL_CODE_SIZE_ALIGNMENT (256U)
208#define LSF_DATA_SIZE_ALIGNMENT (256U)
209#define LSF_CODE_SIZE_ALIGNMENT (256U)
210
211/* MMU excepts sub_wpr sizes in units of 4K */
212#define SUB_WPR_SIZE_ALIGNMENT (4096U)
213
214/*
215 * Maximum WPR Header size
216 */
217#define LSF_WPR_HEADERS_TOTAL_SIZE_MAX \
218 (ALIGN_UP((sizeof(struct lsf_wpr_header_v1) * LSF_FALCON_ID_END), \
219 LSF_WPR_HEADER_ALIGNMENT))
220#define LSF_LSB_HEADER_TOTAL_SIZE_MAX (\
221 ALIGN_UP(sizeof(struct lsf_lsb_header_v1), LSF_LSB_HEADER_ALIGNMENT))
222
223/* Maximum SUB WPR header size */
224#define LSF_SUB_WPR_HEADERS_TOTAL_SIZE_MAX (ALIGN_UP( \
225 (sizeof(struct lsf_shared_sub_wpr_header) * \
226 LSF_SHARED_DATA_SUB_WPR_USE_CASE_ID_MAX), \
227 LSF_SUB_WPR_HEADER_ALIGNMENT))
228
229
230#define LSF_UCODE_DATA_ALIGNMENT 4096
231
232/* Defined for 1MB alignment */
233#define SHIFT_1MB (20)
234#define SHIFT_4KB (12)
235
236/*
237 * Supporting maximum of 2 regions.
238 * This is needed to pre-allocate space in DMEM
239 */
240#define NVGPU_FLCN_ACR_MAX_REGIONS (2)
241#define LSF_BOOTSTRAP_OWNER_RESERVED_DMEM_SIZE (0x200)
242
243/*
244 * start_addr - Starting address of region
245 * end_addr - Ending address of region
246 * region_id - Region ID
247 * read_mask - Read Mask
248 * write_mask - WriteMask
249 * client_mask - Bit map of all clients currently using this region
250 */
251struct flcn_acr_region_prop {
252 u32 start_addr;
253 u32 end_addr;
254 u32 region_id;
255 u32 read_mask;
256 u32 write_mask;
257 u32 client_mask;
258};
259
260struct flcn_acr_region_prop_v1 {
261 u32 start_addr;
262 u32 end_addr;
263 u32 region_id;
264 u32 read_mask;
265 u32 write_mask;
266 u32 client_mask;
267 u32 shadowmMem_startaddress;
268};
269
270/*
271 * no_regions - Number of regions used.
272 * region_props - Region properties
273 */
274struct flcn_acr_regions {
275 u32 no_regions;
276 struct flcn_acr_region_prop region_props[NVGPU_FLCN_ACR_MAX_REGIONS];
277};
278
279struct flcn_acr_regions_v1 {
280 u32 no_regions;
281 struct flcn_acr_region_prop_v1 region_props[NVGPU_FLCN_ACR_MAX_REGIONS];
282};
283/*
284 * reserved_dmem-When the bootstrap owner has done bootstrapping other falcons,
285 * and need to switch into LS mode, it needs to have its own
286 * actual DMEM image copied into DMEM as part of LS setup. If
287 * ACR desc is at location 0, it will definitely get overwritten
288 * causing data corruption. Hence we are reserving 0x200 bytes
289 * to give room for any loading data. NOTE: This has to be the
290 * first member always
291 * signature - Signature of ACR ucode.
292 * wpr_region_id - Region ID holding the WPR header and its details
293 * wpr_offset - Offset from the WPR region holding the wpr header
294 * regions - Region descriptors
295 * nonwpr_ucode_blob_start -stores non-WPR start where kernel stores ucode blob
296 * nonwpr_ucode_blob_end -stores non-WPR end where kernel stores ucode blob
297 */
298struct flcn_acr_desc {
299 union {
300 u32 reserved_dmem[(LSF_BOOTSTRAP_OWNER_RESERVED_DMEM_SIZE/4)];
301 u32 signatures[4];
302 } ucode_reserved_space;
303 /*Always 1st*/
304 u32 wpr_region_id;
305 u32 wpr_offset;
306 u32 mmu_mem_range;
307 struct flcn_acr_regions regions;
308 u32 nonwpr_ucode_blob_size;
309 u64 nonwpr_ucode_blob_start;
310};
311
312struct flcn_acr_desc_v1 {
313 union {
314 u32 reserved_dmem[(LSF_BOOTSTRAP_OWNER_RESERVED_DMEM_SIZE/4)];
315 } ucode_reserved_space;
316 u32 signatures[4];
317 /*Always 1st*/
318 u32 wpr_region_id;
319 u32 wpr_offset;
320 u32 mmu_mem_range;
321 struct flcn_acr_regions_v1 regions;
322 u32 nonwpr_ucode_blob_size;
323 u64 nonwpr_ucode_blob_start;
324 u32 dummy[4]; /* ACR_BSI_VPR_DESC */
325};
326
327
328#endif /* NVGPU_ACR_LSFM_H */
diff --git a/include/nvgpu/acr/acr_objflcn.h b/include/nvgpu/acr/acr_objflcn.h
deleted file mode 100644
index 57b43c8..0000000
--- a/include/nvgpu/acr/acr_objflcn.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_ACR_OBJFLCN_H
23#define NVGPU_ACR_OBJFLCN_H
24
25#ifndef NVGPU_ACR_H
26#warning "acr_objflcn.h not included from nvgpu_acr.h!" \
27 "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces"
28#endif
29
30struct flcn_ucode_img {
31 u32 *header; /* only some falcons have header */
32 u32 *data;
33 struct pmu_ucode_desc *desc; /* only some falcons have descriptor */
34 u32 data_size;
35 void *fw_ver; /* CTRL_GPU_GET_FIRMWARE_VERSION_PARAMS struct */
36 u8 load_entire_os_data; /* load the whole osData section at boot time.*/
37 /* NULL if not a light secure falcon.*/
38 struct lsf_ucode_desc *lsf_desc;
39 /* True if there a resources to freed by the client. */
40 u8 free_res_allocs;
41 u32 flcn_inst;
42};
43
44struct flcn_ucode_img_v1 {
45 u32 *header;
46 u32 *data;
47 struct pmu_ucode_desc_v1 *desc;
48 u32 data_size;
49 void *fw_ver;
50 u8 load_entire_os_data;
51 struct lsf_ucode_desc_v1 *lsf_desc;
52 u8 free_res_allocs;
53 u32 flcn_inst;
54};
55
56/*
57 * Falcon UCODE header index.
58 */
59#define FLCN_NL_UCODE_HDR_OS_CODE_OFF_IND (0)
60#define FLCN_NL_UCODE_HDR_OS_CODE_SIZE_IND (1)
61#define FLCN_NL_UCODE_HDR_OS_DATA_OFF_IND (2)
62#define FLCN_NL_UCODE_HDR_OS_DATA_SIZE_IND (3)
63#define FLCN_NL_UCODE_HDR_NUM_APPS_IND (4)
64
65/*
66 * There are total N number of Apps with code and offset defined in UCODE header
67 * This macro provides the CODE and DATA offset and size of Ath application.
68 */
69#define FLCN_NL_UCODE_HDR_APP_CODE_START_IND (5)
70#define FLCN_NL_UCODE_HDR_APP_CODE_OFF_IND(N, A) \
71 (FLCN_NL_UCODE_HDR_APP_CODE_START_IND + (A*2))
72#define FLCN_NL_UCODE_HDR_APP_CODE_SIZE_IND(N, A) \
73 (FLCN_NL_UCODE_HDR_APP_CODE_START_IND + (A*2) + 1)
74#define FLCN_NL_UCODE_HDR_APP_CODE_END_IND(N) \
75 (FLCN_NL_UCODE_HDR_APP_CODE_START_IND + (N*2) - 1)
76
77#define FLCN_NL_UCODE_HDR_APP_DATA_START_IND(N) \
78 (FLCN_NL_UCODE_HDR_APP_CODE_END_IND(N) + 1)
79#define FLCN_NL_UCODE_HDR_APP_DATA_OFF_IND(N, A) \
80 (FLCN_NL_UCODE_HDR_APP_DATA_START_IND(N) + (A*2))
81#define FLCN_NL_UCODE_HDR_APP_DATA_SIZE_IND(N, A) \
82 (FLCN_NL_UCODE_HDR_APP_DATA_START_IND(N) + (A*2) + 1)
83#define FLCN_NL_UCODE_HDR_APP_DATA_END_IND(N) \
84 (FLCN_NL_UCODE_HDR_APP_DATA_START_IND(N) + (N*2) - 1)
85
86#define FLCN_NL_UCODE_HDR_OS_OVL_OFF_IND(N) \
87 (FLCN_NL_UCODE_HDR_APP_DATA_END_IND(N) + 1)
88#define FLCN_NL_UCODE_HDR_OS_OVL_SIZE_IND(N) \
89 (FLCN_NL_UCODE_HDR_APP_DATA_END_IND(N) + 2)
90
91#endif /* NVGPU_ACR_OBJFLCN_H */
diff --git a/include/nvgpu/acr/acr_objlsfm.h b/include/nvgpu/acr/acr_objlsfm.h
deleted file mode 100644
index e3769bb..0000000
--- a/include/nvgpu/acr/acr_objlsfm.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_ACR_OBJLSFM_H
23#define NVGPU_ACR_OBJLSFM_H
24
25#ifndef NVGPU_ACR_H
26#warning "acr_objlsfm.h not included from nvgpu_acr.h!" \
27 "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces"
28#endif
29
30#include "acr_flcnbl.h"
31#include "acr_objflcn.h"
32
33/*
34 * LSFM Managed Ucode Image
35 * next : Next image the list, NULL if last.
36 * wpr_header : WPR header for this ucode image
37 * lsb_header : LSB header for this ucode image
38 * bl_gen_desc : Bootloader generic desc structure for this ucode image
39 * bl_gen_desc_size : Sizeof bootloader desc structure for this ucode image
40 * full_ucode_size : Surface size required for final ucode image
41 * ucode_img : Ucode image info
42 */
43struct lsfm_managed_ucode_img {
44 struct lsfm_managed_ucode_img *next;
45 struct lsf_wpr_header wpr_header;
46 struct lsf_lsb_header lsb_header;
47 union flcn_bl_generic_desc bl_gen_desc;
48 u32 bl_gen_desc_size;
49 u32 full_ucode_size;
50 struct flcn_ucode_img ucode_img;
51};
52
53struct lsfm_managed_ucode_img_v2 {
54 struct lsfm_managed_ucode_img_v2 *next;
55 struct lsf_wpr_header_v1 wpr_header;
56 struct lsf_lsb_header_v1 lsb_header;
57 union flcn_bl_generic_desc_v1 bl_gen_desc;
58 u32 bl_gen_desc_size;
59 u32 full_ucode_size;
60 struct flcn_ucode_img_v1 ucode_img;
61};
62
63/*
64 * Defines the structure used to contain all generic information related to
65 * the LSFM.
66 * Contains the Light Secure Falcon Manager (LSFM) feature related data.
67 */
68struct ls_flcn_mgr {
69 u16 managed_flcn_cnt;
70 u32 wpr_size;
71 u32 disable_mask;
72 struct lsfm_managed_ucode_img *ucode_img_list;
73 void *wpr_client_req_state;/*PACR_CLIENT_REQUEST_STATE originally*/
74};
75
76/*
77 * LSFM SUB WPRs struct
78 * pnext : Next entry in the list, NULL if last
79 * sub_wpr_header : SubWpr Header struct
80 */
81struct lsfm_sub_wpr {
82 struct lsfm_sub_wpr *pnext;
83 struct lsf_shared_sub_wpr_header sub_wpr_header;
84};
85
86struct ls_flcn_mgr_v1 {
87 u16 managed_flcn_cnt;
88 u32 wpr_size;
89 u32 disable_mask;
90 struct lsfm_managed_ucode_img_v2 *ucode_img_list;
91 void *wpr_client_req_state;/*PACR_CLIENT_REQUEST_STATE originally*/
92 u16 managed_sub_wpr_count;
93 struct lsfm_sub_wpr *psub_wpr_list;
94};
95
96
97#endif /* NVGPU_ACR_OBJLSFM_H */
diff --git a/include/nvgpu/acr/nvgpu_acr.h b/include/nvgpu/acr/nvgpu_acr.h
deleted file mode 100644
index cdb7bb8..0000000
--- a/include/nvgpu/acr/nvgpu_acr.h
+++ /dev/null
@@ -1,192 +0,0 @@
1/*
2 * Copyright (c) 2016-2021, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_ACR_H
24#define NVGPU_ACR_H
25
26#include <nvgpu/falcon.h>
27
28#include "gk20a/mm_gk20a.h"
29
30#include "acr_lsfm.h"
31#include "acr_flcnbl.h"
32#include "acr_objlsfm.h"
33#include "acr_objflcn.h"
34
35struct nvgpu_firmware;
36struct gk20a;
37struct hs_acr_ops;
38struct hs_acr;
39struct nvgpu_acr;
40
41#define HSBIN_ACR_BL_UCODE_IMAGE "pmu_bl.bin"
42#define GM20B_HSBIN_ACR_PROD_UCODE "nv_acr_ucode_prod.bin"
43#define GM20B_HSBIN_ACR_DBG_UCODE "nv_acr_ucode_dbg.bin"
44#define HSBIN_ACR_UCODE_IMAGE "acr_ucode.bin"
45#define HSBIN_ACR_PROD_UCODE "acr_ucode_prod.bin"
46#define HSBIN_ACR_DBG_UCODE "acr_ucode_dbg.bin"
47#define HSBIN_ACR_AHESASC_PROD_UCODE "acr_ahesasc_prod_ucode.bin"
48#define HSBIN_ACR_ASB_PROD_UCODE "acr_asb_prod_ucode.bin"
49#define HSBIN_ACR_AHESASC_DBG_UCODE "acr_ahesasc_dbg_ucode.bin"
50#define HSBIN_ACR_ASB_DBG_UCODE "acr_asb_dbg_ucode.bin"
51
52#define LSF_SEC2_UCODE_IMAGE_BIN "sec2_ucode_image.bin"
53#define LSF_SEC2_UCODE_DESC_BIN "sec2_ucode_desc.bin"
54#define LSF_SEC2_UCODE_SIG_BIN "sec2_sig.bin"
55
56#define MAX_SUPPORTED_LSFM 3 /*PMU, FECS, GPCCS*/
57
58#define ACR_COMPLETION_TIMEOUT_MS 10000 /*in msec */
59
60#define PMU_SECURE_MODE (0x1)
61#define PMU_LSFM_MANAGED (0x2)
62
63struct bin_hdr {
64 /* 0x10de */
65 u32 bin_magic;
66 /* versioning of bin format */
67 u32 bin_ver;
68 /* Entire image size including this header */
69 u32 bin_size;
70 /*
71 * Header offset of executable binary metadata,
72 * start @ offset- 0x100 *
73 */
74 u32 header_offset;
75 /*
76 * Start of executable binary data, start @
77 * offset- 0x200
78 */
79 u32 data_offset;
80 /* Size of executable binary */
81 u32 data_size;
82};
83
84struct acr_fw_header {
85 u32 sig_dbg_offset;
86 u32 sig_dbg_size;
87 u32 sig_prod_offset;
88 u32 sig_prod_size;
89 u32 patch_loc;
90 u32 patch_sig;
91 u32 hdr_offset; /* This header points to acr_ucode_header_t210_load */
92 u32 hdr_size; /* Size of above header */
93};
94
95struct wpr_carveout_info {
96 u64 wpr_base;
97 u64 nonwpr_base;
98 u64 size;
99};
100
101/* ACR interfaces */
102
103struct hs_flcn_bl {
104 char *bl_fw_name;
105 struct nvgpu_firmware *hs_bl_fw;
106 struct hsflcn_bl_desc *hs_bl_desc;
107 struct bin_hdr *hs_bl_bin_hdr;
108 struct nvgpu_mem hs_bl_ucode;
109};
110
111struct hs_acr {
112 u32 acr_type;
113
114 /* HS bootloader to validate & load ACR ucode */
115 struct hs_flcn_bl acr_hs_bl;
116
117 /* ACR ucode */
118 char *acr_fw_name;
119 struct nvgpu_firmware *acr_fw;
120 struct nvgpu_mem acr_ucode;
121
122 union {
123 struct flcn_bl_dmem_desc bl_dmem_desc;
124 struct flcn_bl_dmem_desc_v1 bl_dmem_desc_v1;
125 };
126
127 void *ptr_bl_dmem_desc;
128 u32 bl_dmem_desc_size;
129
130 union{
131 struct flcn_acr_desc *acr_dmem_desc;
132 struct flcn_acr_desc_v1 *acr_dmem_desc_v1;
133 };
134
135 /* Falcon used to execute ACR ucode */
136 struct nvgpu_falcon *acr_flcn;
137
138 int (*acr_flcn_setup_hw_and_bl_bootstrap)(struct gk20a *g,
139 struct hs_acr *acr_desc,
140 struct nvgpu_falcon_bl_info *bl_info);
141};
142
143#define ACR_DEFAULT 0U
144#define ACR_AHESASC 1U
145#define ACR_ASB 2U
146
147struct nvgpu_acr {
148 struct gk20a *g;
149
150 u32 bootstrap_owner;
151 u32 max_supported_lsfm;
152 u32 capabilities;
153
154 /*
155 * non-wpr space to hold LSF ucodes,
156 * ACR does copy ucode from non-wpr to wpr
157 */
158 struct nvgpu_mem ucode_blob;
159 /*
160 * Even though this mem_desc wouldn't be used,
161 * the wpr region needs to be reserved in the
162 * allocator in dGPU case.
163 */
164 struct nvgpu_mem wpr_dummy;
165
166 /* ACR member for different types of ucode */
167 /* For older dgpu/tegra ACR cuode */
168 struct hs_acr acr;
169 /* ACR load split feature support */
170 struct hs_acr acr_ahesasc;
171 struct hs_acr acr_asb;
172
173 u32 pmu_args;
174 struct nvgpu_firmware *pmu_fw;
175 struct nvgpu_firmware *pmu_desc;
176
177 int (*prepare_ucode_blob)(struct gk20a *g, struct nvgpu_acr *acr);
178 void (*get_wpr_info)(struct gk20a *g, struct wpr_carveout_info *inf);
179 int (*alloc_blob_space)(struct gk20a *g, size_t size,
180 struct nvgpu_mem *mem);
181 int (*patch_wpr_info_to_ucode)(struct gk20a *g, struct nvgpu_acr *acr,
182 struct hs_acr *acr_desc, bool is_recovery);
183 int (*acr_fill_bl_dmem_desc)(struct gk20a *g,
184 struct nvgpu_acr *acr, struct hs_acr *acr_desc,
185 u32 *acr_ucode_header);
186 int (*bootstrap_hs_acr)(struct gk20a *g, struct nvgpu_acr *acr,
187 struct hs_acr *acr_desc);
188
189 void (*remove_support)(struct nvgpu_acr *acr);
190};
191#endif /* NVGPU_ACR_H */
192
diff --git a/include/nvgpu/allocator.h b/include/nvgpu/allocator.h
deleted file mode 100644
index c444543..0000000
--- a/include/nvgpu/allocator.h
+++ /dev/null
@@ -1,331 +0,0 @@
1/*
2 * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_ALLOCATOR_H
24#define NVGPU_ALLOCATOR_H
25
26#ifdef __KERNEL__
27/*
28 * The Linux kernel has this notion of seq_files for printing info to userspace.
29 * One of the allocator function pointers takes advantage of this and allows the
30 * debug output to be directed either to nvgpu_log() or a seq_file.
31 */
32#include <linux/seq_file.h>
33#endif
34
35#include <nvgpu/log.h>
36#include <nvgpu/lock.h>
37#include <nvgpu/list.h>
38#include <nvgpu/types.h>
39
40/* #define ALLOCATOR_DEBUG_FINE */
41
42struct nvgpu_allocator;
43struct nvgpu_alloc_carveout;
44struct vm_gk20a;
45struct gk20a;
46
47/*
48 * Operations for an allocator to implement.
49 */
50struct nvgpu_allocator_ops {
51 u64 (*alloc)(struct nvgpu_allocator *allocator, u64 len);
52 u64 (*alloc_pte)(struct nvgpu_allocator *allocator, u64 len,
53 u32 page_size);
54 void (*free)(struct nvgpu_allocator *allocator, u64 addr);
55
56 /*
57 * Special interface to allocate a memory region with a specific
58 * starting address. Yikes. Note: if free() works for freeing both
59 * regular and fixed allocations then free_fixed() does not need to
60 * be implemented. This behavior exists for legacy reasons and should
61 * not be propagated to new allocators.
62 *
63 * For allocators where the @page_size field is not applicable it can
64 * be left as 0. Otherwise a valid page size should be passed (4k or
65 * what the large page size is).
66 */
67 u64 (*alloc_fixed)(struct nvgpu_allocator *allocator,
68 u64 base, u64 len, u32 page_size);
69 void (*free_fixed)(struct nvgpu_allocator *allocator,
70 u64 base, u64 len);
71
72 /*
73 * Allow allocators to reserve space for carveouts.
74 */
75 int (*reserve_carveout)(struct nvgpu_allocator *allocator,
76 struct nvgpu_alloc_carveout *co);
77 void (*release_carveout)(struct nvgpu_allocator *allocator,
78 struct nvgpu_alloc_carveout *co);
79
80 /*
81 * Returns info about the allocator.
82 */
83 u64 (*base)(struct nvgpu_allocator *allocator);
84 u64 (*length)(struct nvgpu_allocator *allocator);
85 u64 (*end)(struct nvgpu_allocator *allocator);
86 bool (*inited)(struct nvgpu_allocator *allocator);
87 u64 (*space)(struct nvgpu_allocator *allocator);
88
89 /* Destructor. */
90 void (*fini)(struct nvgpu_allocator *allocator);
91
92#ifdef __KERNEL__
93 /* Debugging. */
94 void (*print_stats)(struct nvgpu_allocator *allocator,
95 struct seq_file *s, int lock);
96#endif
97};
98
99struct nvgpu_allocator {
100 struct gk20a *g;
101
102 char name[32];
103 struct nvgpu_mutex lock;
104
105 void *priv;
106 const struct nvgpu_allocator_ops *ops;
107
108 struct dentry *debugfs_entry;
109 bool debug; /* Control for debug msgs. */
110};
111
112struct nvgpu_alloc_carveout {
113 const char *name;
114 u64 base;
115 u64 length;
116
117 struct nvgpu_allocator *allocator;
118
119 /*
120 * For usage by the allocator implementation.
121 */
122 struct nvgpu_list_node co_entry;
123};
124
125static inline struct nvgpu_alloc_carveout *
126nvgpu_alloc_carveout_from_co_entry(struct nvgpu_list_node *node)
127{
128 return (struct nvgpu_alloc_carveout *)
129 ((uintptr_t)node - offsetof(struct nvgpu_alloc_carveout, co_entry));
130};
131
132#define NVGPU_CARVEOUT(local_name, local_base, local_length) \
133 { \
134 .name = (local_name), \
135 .base = (local_base), \
136 .length = (local_length) \
137 }
138
139/*
140 * These are the available allocator flags.
141 *
142 * GPU_ALLOC_GVA_SPACE
143 *
144 * This flag makes sense for the buddy allocator only. It specifies that the
145 * allocator will be used for managing a GVA space. When managing GVA spaces
146 * special care has to be taken to ensure that allocations of similar PTE
147 * sizes are placed in the same PDE block. This allows the higher level
148 * code to skip defining both small and large PTE tables for every PDE. That
149 * can save considerable memory for address spaces that have a lot of
150 * allocations.
151 *
152 * GPU_ALLOC_NO_ALLOC_PAGE
153 *
154 * For any allocator that needs to manage a resource in a latency critical
155 * path this flag specifies that the allocator should not use any kmalloc()
156 * or similar functions during normal operation. Initialization routines
157 * may still use kmalloc(). This prevents the possibility of long waits for
158 * pages when using alloc_page(). Currently only the bitmap allocator
159 * implements this functionality.
160 *
161 * Also note that if you accept this flag then you must also define the
162 * free_fixed() function. Since no meta-data is allocated to help free
163 * allocations you need to keep track of the meta-data yourself (in this
164 * case the base and length of the allocation as opposed to just the base
165 * of the allocation).
166 *
167 * GPU_ALLOC_4K_VIDMEM_PAGES
168 *
169 * We manage vidmem pages at a large page granularity for performance
170 * reasons; however, this can lead to wasting memory. For page allocators
171 * setting this flag will tell the allocator to manage pools of 4K pages
172 * inside internally allocated large pages.
173 *
174 * Currently this flag is ignored since the only usage of the page allocator
175 * uses a 4K block size already. However, this flag has been reserved since
176 * it will be necessary in the future.
177 *
178 * GPU_ALLOC_FORCE_CONTIG
179 *
180 * Force allocations to be contiguous. Currently only relevant for page
181 * allocators since all other allocators are naturally contiguous.
182 *
183 * GPU_ALLOC_NO_SCATTER_GATHER
184 *
185 * The page allocator normally returns a scatter gather data structure for
186 * allocations (to handle discontiguous pages). However, at times that can
187 * be annoying so this flag forces the page allocator to return a u64
188 * pointing to the allocation base (requires GPU_ALLOC_FORCE_CONTIG to be
189 * set as well).
190 */
191#define GPU_ALLOC_GVA_SPACE BIT64(0)
192#define GPU_ALLOC_NO_ALLOC_PAGE BIT64(1)
193#define GPU_ALLOC_4K_VIDMEM_PAGES BIT64(2)
194#define GPU_ALLOC_FORCE_CONTIG BIT64(3)
195#define GPU_ALLOC_NO_SCATTER_GATHER BIT64(4)
196
197static inline void alloc_lock(struct nvgpu_allocator *a)
198{
199 nvgpu_mutex_acquire(&a->lock);
200}
201
202static inline void alloc_unlock(struct nvgpu_allocator *a)
203{
204 nvgpu_mutex_release(&a->lock);
205}
206
207/*
208 * Buddy allocator specific initializers.
209 */
210int nvgpu_buddy_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
211 struct vm_gk20a *vm, const char *name,
212 u64 base, u64 size, u64 blk_size,
213 u64 max_order, u64 flags);
214
215/*
216 * Bitmap initializers.
217 */
218int nvgpu_bitmap_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
219 const char *name, u64 base, u64 length,
220 u64 blk_size, u64 flags);
221
222/*
223 * Page allocator initializers.
224 */
225int nvgpu_page_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
226 const char *name, u64 base, u64 length,
227 u64 blk_size, u64 flags);
228
229/*
230 * Lockless allocatior initializers.
231 * Note: This allocator can only allocate fixed-size structures of a
232 * pre-defined size.
233 */
234int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
235 const char *name, u64 base, u64 length,
236 u64 struct_size, u64 flags);
237
238#define GPU_BALLOC_MAX_ORDER 31U
239
240/*
241 * Allocator APIs.
242 */
243u64 nvgpu_alloc(struct nvgpu_allocator *allocator, u64 len);
244u64 nvgpu_alloc_pte(struct nvgpu_allocator *a, u64 len, u32 page_size);
245void nvgpu_free(struct nvgpu_allocator *allocator, u64 addr);
246
247u64 nvgpu_alloc_fixed(struct nvgpu_allocator *allocator, u64 base, u64 len,
248 u32 page_size);
249void nvgpu_free_fixed(struct nvgpu_allocator *allocator, u64 base, u64 len);
250
251int nvgpu_alloc_reserve_carveout(struct nvgpu_allocator *a,
252 struct nvgpu_alloc_carveout *co);
253void nvgpu_alloc_release_carveout(struct nvgpu_allocator *a,
254 struct nvgpu_alloc_carveout *co);
255
256u64 nvgpu_alloc_base(struct nvgpu_allocator *a);
257u64 nvgpu_alloc_length(struct nvgpu_allocator *a);
258u64 nvgpu_alloc_end(struct nvgpu_allocator *a);
259bool nvgpu_alloc_initialized(struct nvgpu_allocator *a);
260u64 nvgpu_alloc_space(struct nvgpu_allocator *a);
261
262void nvgpu_alloc_destroy(struct nvgpu_allocator *allocator);
263
264#ifdef __KERNEL__
265void nvgpu_alloc_print_stats(struct nvgpu_allocator *a,
266 struct seq_file *s, int lock);
267#endif
268
269static inline struct gk20a *nvgpu_alloc_to_gpu(struct nvgpu_allocator *a)
270{
271 return a->g;
272}
273
274#ifdef CONFIG_DEBUG_FS
275/*
276 * Common functionality for the internals of the allocators.
277 */
278void nvgpu_init_alloc_debug(struct gk20a *g, struct nvgpu_allocator *a);
279void nvgpu_fini_alloc_debug(struct nvgpu_allocator *a);
280#endif
281
282int nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g,
283 const char *name, void *priv, bool dbg,
284 const struct nvgpu_allocator_ops *ops);
285
286static inline void nvgpu_alloc_enable_dbg(struct nvgpu_allocator *a)
287{
288 a->debug = true;
289}
290
291static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a)
292{
293 a->debug = false;
294}
295
296/*
297 * Debug stuff.
298 */
299#ifdef __KERNEL__
300#define __alloc_pstat(seq, allocator, fmt, arg...) \
301 do { \
302 if (seq) \
303 seq_printf(seq, fmt "\n", ##arg); \
304 else \
305 alloc_dbg(allocator, fmt, ##arg); \
306 } while (0)
307#endif
308
309#define do_alloc_dbg(a, fmt, arg...) \
310 nvgpu_log((a)->g, gpu_dbg_alloc, "%25s " fmt, (a)->name, ##arg)
311
312/*
313 * This gives finer control over debugging messages. By defining the
314 * ALLOCATOR_DEBUG_FINE macro prints for an allocator will only get made if
315 * that allocator's debug flag is set.
316 *
317 * Otherwise debugging is as normal: debug statements for all allocators
318 * if the GPU debugging mask bit is set. Note: even when ALLOCATOR_DEBUG_FINE
319 * is set gpu_dbg_alloc must still also be set to true.
320 */
321#if defined(ALLOCATOR_DEBUG_FINE)
322#define alloc_dbg(a, fmt, arg...) \
323 do { \
324 if ((a)->debug) \
325 do_alloc_dbg((a), fmt, ##arg); \
326 } while (0)
327#else
328#define alloc_dbg(a, fmt, arg...) do_alloc_dbg(a, fmt, ##arg)
329#endif
330
331#endif /* NVGPU_ALLOCATOR_H */
diff --git a/include/nvgpu/as.h b/include/nvgpu/as.h
deleted file mode 100644
index f2249f9..0000000
--- a/include/nvgpu/as.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * GK20A Address Spaces
3 *
4 * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24#ifndef NVGPU_AS_H
25#define NVGPU_AS_H
26
27#include <nvgpu/types.h>
28
29struct vm_gk20a;
30struct gk20a;
31
32struct gk20a_as {
33 int last_share_id; /* dummy allocator for now */
34};
35
36struct gk20a_as_share {
37 struct gk20a_as *as;
38 struct vm_gk20a *vm;
39 int id;
40};
41
42/*
43 * AS allocation flags.
44 */
45#define NVGPU_AS_ALLOC_USERSPACE_MANAGED (1 << 0)
46
47int gk20a_as_release_share(struct gk20a_as_share *as_share);
48
49/* if big_page_size == 0, the default big page size is used */
50int gk20a_as_alloc_share(struct gk20a *g, u32 big_page_size,
51 u32 flags, struct gk20a_as_share **out);
52
53struct gk20a *gk20a_from_as(struct gk20a_as *as);
54#endif /* NVGPU_AS_H */
diff --git a/include/nvgpu/atomic.h b/include/nvgpu/atomic.h
deleted file mode 100644
index 3edc1fc..0000000
--- a/include/nvgpu/atomic.h
+++ /dev/null
@@ -1,130 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_ATOMIC_H
23#define NVGPU_ATOMIC_H
24
25#ifdef __KERNEL__
26#include <nvgpu/linux/atomic.h>
27#elif defined(__NVGPU_POSIX__)
28#include <nvgpu/posix/atomic.h>
29#else
30#include <nvgpu_rmos/include/atomic.h>
31#endif
32
33#define NVGPU_ATOMIC_INIT(i) __nvgpu_atomic_init(i)
34#define NVGPU_ATOMIC64_INIT(i) __nvgpu_atomic64_init(i)
35
36static inline void nvgpu_atomic_set(nvgpu_atomic_t *v, int i)
37{
38 __nvgpu_atomic_set(v, i);
39}
40static inline int nvgpu_atomic_read(nvgpu_atomic_t *v)
41{
42 return __nvgpu_atomic_read(v);
43}
44static inline void nvgpu_atomic_inc(nvgpu_atomic_t *v)
45{
46 __nvgpu_atomic_inc(v);
47}
48static inline int nvgpu_atomic_inc_return(nvgpu_atomic_t *v)
49{
50 return __nvgpu_atomic_inc_return(v);
51}
52static inline void nvgpu_atomic_dec(nvgpu_atomic_t *v)
53{
54 __nvgpu_atomic_dec(v);
55}
56static inline int nvgpu_atomic_dec_return(nvgpu_atomic_t *v)
57{
58 return __nvgpu_atomic_dec_return(v);
59}
60static inline int nvgpu_atomic_cmpxchg(nvgpu_atomic_t *v, int old, int new)
61{
62 return __nvgpu_atomic_cmpxchg(v, old, new);
63}
64static inline int nvgpu_atomic_xchg(nvgpu_atomic_t *v, int new)
65{
66 return __nvgpu_atomic_xchg(v, new);
67}
68static inline bool nvgpu_atomic_inc_and_test(nvgpu_atomic_t *v)
69{
70 return __nvgpu_atomic_inc_and_test(v);
71}
72static inline bool nvgpu_atomic_dec_and_test(nvgpu_atomic_t *v)
73{
74 return __nvgpu_atomic_dec_and_test(v);
75}
76static inline bool nvgpu_atomic_sub_and_test(int i, nvgpu_atomic_t *v)
77{
78 return __nvgpu_atomic_sub_and_test(i, v);
79}
80static inline int nvgpu_atomic_add_return(int i, nvgpu_atomic_t *v)
81{
82 return __nvgpu_atomic_add_return(i, v);
83}
84static inline int nvgpu_atomic_add_unless(nvgpu_atomic_t *v, int a, int u)
85{
86 return __nvgpu_atomic_add_unless(v, a, u);
87}
88static inline void nvgpu_atomic64_set(nvgpu_atomic64_t *v, long i)
89{
90 return __nvgpu_atomic64_set(v, i);
91}
92static inline long nvgpu_atomic64_read(nvgpu_atomic64_t *v)
93{
94 return __nvgpu_atomic64_read(v);
95}
96static inline void nvgpu_atomic64_add(long x, nvgpu_atomic64_t *v)
97{
98 __nvgpu_atomic64_add(x, v);
99}
100static inline void nvgpu_atomic64_inc(nvgpu_atomic64_t *v)
101{
102 __nvgpu_atomic64_inc(v);
103}
104static inline long nvgpu_atomic64_inc_return(nvgpu_atomic64_t *v)
105{
106 return __nvgpu_atomic64_inc_return(v);
107}
108static inline void nvgpu_atomic64_dec(nvgpu_atomic64_t *v)
109{
110 __nvgpu_atomic64_dec(v);
111}
112static inline void nvgpu_atomic64_dec_return(nvgpu_atomic64_t *v)
113{
114 __nvgpu_atomic64_dec_return(v);
115}
116static inline long nvgpu_atomic64_cmpxchg(nvgpu_atomic64_t *v, long old,
117 long new)
118{
119 return __nvgpu_atomic64_cmpxchg(v, old, new);
120}
121static inline void nvgpu_atomic64_sub(long x, nvgpu_atomic64_t *v)
122{
123 __nvgpu_atomic64_sub(x, v);
124}
125static inline long nvgpu_atomic64_sub_return(long x, nvgpu_atomic64_t *v)
126{
127 return __nvgpu_atomic64_sub_return(x, v);
128}
129
130#endif /* NVGPU_ATOMIC_H */
diff --git a/include/nvgpu/barrier.h b/include/nvgpu/barrier.h
deleted file mode 100644
index f0b6b2b..0000000
--- a/include/nvgpu/barrier.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23/* This file contains NVGPU_* high-level abstractions for various
24 * memor-barrier operations available in linux/kernel. Every OS
25 * should provide their own OS specific calls under this common API
26 */
27
28#ifndef NVGPU_BARRIER_H
29#define NVGPU_BARRIER_H
30
31#ifdef __KERNEL__
32#include <nvgpu/linux/barrier.h>
33#elif defined(__NVGPU_POSIX__)
34#include <nvgpu/posix/barrier.h>
35#else
36#include <nvgpu_rmos/include/barrier.h>
37#endif
38
39#define nvgpu_mb() __nvgpu_mb()
40#define nvgpu_rmb() __nvgpu_rmb()
41#define nvgpu_wmb() __nvgpu_wmb()
42
43#define nvgpu_smp_mb() __nvgpu_smp_mb()
44#define nvgpu_smp_rmb() __nvgpu_smp_rmb()
45#define nvgpu_smp_wmb() __nvgpu_smp_wmb()
46
47#define nvgpu_read_barrier_depends() __nvgpu_read_barrier_depends()
48#define nvgpu_smp_read_barrier_depends() __nvgpu_smp_read_barrier_depends()
49
50#define NV_ACCESS_ONCE(x) __NV_ACCESS_ONCE(x)
51
52/*
53 * Sometimes we want to prevent speculation.
54 */
55#ifdef __NVGPU_PREVENT_UNTRUSTED_SPECULATION
56#define nvgpu_speculation_barrier() __nvgpu_speculation_barrier()
57#else
58#define nvgpu_speculation_barrier()
59#endif
60
61#endif /* NVGPU_BARRIER_H */
diff --git a/include/nvgpu/bios.h b/include/nvgpu/bios.h
deleted file mode 100644
index 7d729b6..0000000
--- a/include/nvgpu/bios.h
+++ /dev/null
@@ -1,1123 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_BIOS_H
24#define NVGPU_BIOS_H
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29
30#define PERF_PTRS_WIDTH 0x4
31#define PERF_PTRS_WIDTH_16 0x2
32
33enum {
34 CLOCKS_TABLE = 2,
35 CLOCK_PROGRAMMING_TABLE,
36 FLL_TABLE,
37 VIN_TABLE,
38 FREQUENCY_CONTROLLER_TABLE
39};
40
41enum {
42 PERFORMANCE_TABLE = 0,
43 MEMORY_CLOCK_TABLE,
44 MEMORY_TWEAK_TABLE,
45 POWER_CONTROL_TABLE,
46 THERMAL_CONTROL_TABLE,
47 THERMAL_DEVICE_TABLE,
48 THERMAL_COOLERS_TABLE,
49 PERFORMANCE_SETTINGS_SCRIPT,
50 CONTINUOUS_VIRTUAL_BINNING_TABLE,
51 POWER_SENSORS_TABLE = 0xA,
52 POWER_CAPPING_TABLE = 0xB,
53 POWER_TOPOLOGY_TABLE = 0xF,
54 THERMAL_CHANNEL_TABLE = 0x12,
55 VOLTAGE_RAIL_TABLE = 26,
56 VOLTAGE_DEVICE_TABLE,
57 VOLTAGE_POLICY_TABLE,
58 LOWPOWER_TABLE,
59 LOWPOWER_GR_TABLE = 32,
60 LOWPOWER_MS_TABLE = 33,
61};
62
63enum {
64 VP_FIELD_TABLE = 0,
65 VP_FIELD_REGISTER,
66 VP_TRANSLATION_TABLE,
67};
68
69struct bit_token {
70 u8 token_id;
71 u8 data_version;
72 u16 data_size;
73 u16 data_ptr;
74} __packed;
75
76#define BIOS_GET_FIELD(value, name) ((value & name##_MASK) >> name##_SHIFT)
77
78struct fll_descriptor_header {
79 u8 version;
80 u8 size;
81} __packed;
82
83#define FLL_DESCRIPTOR_HEADER_10_SIZE_4 4U
84#define FLL_DESCRIPTOR_HEADER_10_SIZE_6 6U
85
86struct fll_descriptor_header_10 {
87 u8 version;
88 u8 header_size;
89 u8 entry_size;
90 u8 entry_count;
91 u16 max_min_freq_mhz;
92} __packed;
93
94#define FLL_DESCRIPTOR_ENTRY_10_SIZE 15U
95
96struct fll_descriptor_entry_10 {
97 u8 fll_device_type;
98 u8 clk_domain;
99 u8 fll_device_id;
100 u16 lut_params;
101 u8 vin_idx_logic;
102 u8 vin_idx_sram;
103 u16 fll_params;
104 u8 min_freq_vfe_idx;
105 u8 freq_ctrl_idx;
106 u16 ref_freq_mhz;
107 u16 ffr_cutoff_freq_mhz;
108} __packed;
109
110#define NV_FLL_DESC_FLL_PARAMS_MDIV_MASK 0x1F
111#define NV_FLL_DESC_FLL_PARAMS_MDIV_SHIFT 0
112
113#define NV_FLL_DESC_FLL_PARAMS_SKIP_PLDIV_BELOW_DVCO_MIN_MASK 0x20
114#define NV_FLL_DESC_FLL_PARAMS_SKIP_PLDIV_BELOW_DVCO_MIN_SHIFT 5
115
116#define NV_FLL_DESC_LUT_PARAMS_VSELECT_MASK 0x3
117#define NV_FLL_DESC_LUT_PARAMS_VSELECT_SHIFT 0
118
119#define NV_FLL_DESC_LUT_PARAMS_HYSTERISIS_THRESHOLD_MASK 0x3C
120#define NV_FLL_DESC_LUT_PARAMS_HYSTERISIS_THRESHOLD_SHIFT 2
121
122struct vin_descriptor_header_10 {
123 u8 version;
124 u8 header_sizee;
125 u8 entry_size;
126 u8 entry_count;
127 u8 flags0;
128 u32 vin_cal;
129} __packed;
130
131struct vin_descriptor_entry_10 {
132 u8 vin_device_type;
133 u8 volt_domain_vbios;
134 u8 vin_device_id;
135} __packed;
136
137#define NV_VIN_DESC_FLAGS0_VIN_CAL_REVISION_MASK 0x7
138#define NV_VIN_DESC_FLAGS0_VIN_CAL_REVISION_SHIFT 0
139
140#define NV_VIN_DESC_FLAGS0_VIN_CAL_TYPE_MASK 0xF0
141#define NV_VIN_DESC_FLAGS0_VIN_CAL_TYPE_SHIFT 4
142
143#define NV_VIN_DESC_FLAGS0_DISABLE_CONTROL_MASK 0x8
144#define NV_VIN_DESC_FLAGS0_DISABLE_CONTROL_SHIFT 3
145
146#define NV_VIN_DESC_VIN_CAL_SLOPE_FRACTION_MASK 0x1FF
147#define NV_VIN_DESC_VIN_CAL_SLOPE_FRACTION_SHIFT 0
148
149#define NV_VIN_DESC_VIN_CAL_SLOPE_INTEGER_MASK 0x3C00
150#define NV_VIN_DESC_VIN_CAL_SLOPE_INTEGER_SHIFT 10
151
152#define NV_VIN_DESC_VIN_CAL_INTERCEPT_FRACTION_MASK 0x3C000
153#define NV_VIN_DESC_VIN_CAL_INTERCEPT_FRACTION_SHIFT 14
154
155#define NV_VIN_DESC_VIN_CAL_INTERCEPT_INTEGER_MASK 0xFFC0000
156#define NV_VIN_DESC_VIN_CAL_INTERCEPT_INTEGER_SHIFT 18
157
158#define NV_VIN_DESC_VIN_CAL_OFFSET_MASK 0x7F
159#define NV_VIN_DESC_VIN_CAL_OFFSET_SHIFT 0
160
161#define NV_VIN_DESC_VIN_CAL_GAIN_MASK 0xF80
162#define NV_VIN_DESC_VIN_CAL_GAIN_SHIFT 7
163
164#define VBIOS_CLOCKS_TABLE_1X_HEADER_SIZE_07 0x07U
165struct vbios_clocks_table_1x_header {
166 u8 version;
167 u8 header_size;
168 u8 entry_size;
169 u8 entry_count;
170 u8 clocks_hal;
171 u16 cntr_sampling_periodms;
172} __packed;
173
174#define VBIOS_CLOCKS_TABLE_35_HEADER_SIZE_09 0x09U
175struct vbios_clocks_table_35_header {
176 u8 version;
177 u8 header_size;
178 u8 entry_size;
179 u8 entry_count;
180 u8 clocks_hal;
181 u16 cntr_sampling_periodms;
182 u16 reference_window;
183} __packed;
184
185#define VBIOS_CLOCKS_TABLE_1X_ENTRY_SIZE_09 0x09U
186struct vbios_clocks_table_1x_entry {
187 u8 flags0;
188 u16 param0;
189 u32 param1;
190 u16 param2;
191} __packed;
192
193#define VBIOS_CLOCKS_TABLE_35_ENTRY_SIZE_11 0x0BU
194struct vbios_clocks_table_35_entry {
195 u8 flags0;
196 u16 param0;
197 u32 param1;
198 u16 param2;
199 u16 param3;
200} __packed;
201
202#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_FLAGS0_USAGE_MASK 0x1F
203#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_FLAGS0_USAGE_SHIFT 0
204#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_FLAGS0_USAGE_FIXED 0x00
205#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_FLAGS0_USAGE_MASTER 0x01
206#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_FLAGS0_USAGE_SLAVE 0x02
207
208#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM0_PROG_CLK_PROG_IDX_FIRST_MASK 0xFF
209#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM0_PROG_CLK_PROG_IDX_FIRST_SHIFT 0
210#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM0_PROG_CLK_PROG_IDX_LAST_MASK 0xFF00
211#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM0_PROG_CLK_PROG_IDX_LAST_SHIFT 0x08
212
213#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_FIXED_FREQUENCY_MHZ_MASK 0xFFFF
214#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_FIXED_FREQUENCY_MHZ_SHIFT 0
215#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_MASTER_FREQ_OC_DELTA_MIN_MHZ_MASK 0xFFFF
216#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_MASTER_FREQ_OC_DELTA_MIN_MHZ_SHIFT 0
217
218#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_MASTER_FREQ_OC_DELTA_MAX_MHZ_MASK 0xFFFF0000
219#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_MASTER_FREQ_OC_DELTA_MAX_MHZ_SHIFT 0
220
221#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_SLAVE_MASTER_DOMAIN_MASK 0xF
222#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM1_SLAVE_MASTER_DOMAIN_SHIFT 0
223
224#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_NOISE_UNAWARE_ORDERING_IDX_MASK 0xF
225#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_NOISE_UNAWARE_ORDERING_IDX_SHIFT 0
226
227#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_NOISE_AWARE_ORDERING_IDX_MASK 0xF0
228#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_NOISE_AWARE_ORDERING_IDX_SHIFT 4
229
230#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_FORCE_NOISE_UNAWARE_ORDERING_MASK 0x100
231#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_FORCE_NOISE_UNAWARE_ORDERING_SHIFT 8
232#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_FORCE_NOISE_UNAWARE_ORDERING_FALSE 0x00
233#define NV_VBIOS_CLOCKS_TABLE_1X_ENTRY_PARAM2_PROG_FORCE_NOISE_UNAWARE_ORDERING_TRUE 0x01
234
235#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM2_PROG_PRE_VOLT_ORDERING_IDX_MASK 0xF
236#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM2_PROG_PRE_VOLT_ORDERING_IDX_SHIFT 0
237
238#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM2_PROG_POST_VOLT_ORDERING_IDX_MASK 0xF0
239#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM2_PROG_POST_VOLT_ORDERING_IDX_SHIFT 4
240
241#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM3_CLK_MONITOR_THRESHOLD_MIN_MASK 0xFF
242#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM3_CLK_MONITOR_THRESHOLD_MIN_SHIFT 0
243#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM3_CLK_MONITOR_THRESHOLD_MAX_MASK 0xFF00
244#define NV_VBIOS_CLOCKS_TABLE_35_ENTRY_PARAM3_CLK_MONITOR_THRESHOLD_MAX_SHIFT 0x08
245
246#define VBIOS_CLOCK_PROGRAMMING_TABLE_1X_HEADER_SIZE_08 0x08U
247struct vbios_clock_programming_table_1x_header {
248 u8 version;
249 u8 header_size;
250 u8 entry_size;
251 u8 entry_count;
252 u8 slave_entry_size;
253 u8 slave_entry_count;
254 u8 vf_entry_size;
255 u8 vf_entry_count;
256} __packed;
257
258#define VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_SIZE_05 0x05U
259#define VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_SIZE_0D 0x0DU
260struct vbios_clock_programming_table_1x_entry {
261 u8 flags0;
262 u16 freq_max_mhz;
263 u8 param0;
264 u8 param1;
265 u32 rsvd;
266 u32 rsvd1;
267} __packed;
268
269#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_TYPE_MASK 0xF
270#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_TYPE_SHIFT 0
271#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_TYPE_MASTER_RATIO 0x00
272#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_TYPE_MASTER_TABLE 0x01
273#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_TYPE_SLAVE 0x02
274
275#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_SOURCE_MASK 0x70
276#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_SOURCE_SHIFT 4
277#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_SOURCE_PLL 0x00
278#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_SOURCE_ONE_SOURCE 0x01
279#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_SOURCE_FLL 0x02
280
281#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_OVOC_ENABLED_MASK 0x80
282#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_OVOC_ENABLED_SHIFT 7
283#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_OVOC_ENABLED_FALSE 0x00
284#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_FLAGS0_OVOC_ENABLED_TRUE 0x01
285
286#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_PARAM0_PLL_PLL_INDEX_MASK 0xFF
287#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_PARAM0_PLL_PLL_INDEX_SHIFT 0
288
289#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_PARAM1_PLL_FREQ_STEP_SIZE_MASK 0xFF
290#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_ENTRY_PARAM1_PLL_FREQ_STEP_SIZE_SHIFT 0
291
292#define VBIOS_CLOCK_PROGRAMMING_TABLE_1X_SLAVE_ENTRY_SIZE_03 0x03U
293struct vbios_clock_programming_table_1x_slave_entry {
294 u8 clk_dom_idx;
295 u16 param0;
296} __packed;
297
298#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_SLAVE_ENTRY_PARAM0_MASTER_RATIO_RATIO_MASK 0xFF
299#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_SLAVE_ENTRY_PARAM0_MASTER_RATIO_RATIO_SHIFT 0
300
301#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_SLAVE_ENTRY_PARAM0_MASTER_TABLE_FREQ_MASK 0x3FFF
302#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_SLAVE_ENTRY_PARAM0_MASTER_TABLE_FREQ_SHIFT 0
303
304#define VBIOS_CLOCK_PROGRAMMING_TABLE_1X_VF_ENTRY_SIZE_02 0x02U
305struct vbios_clock_programming_table_1x_vf_entry {
306 u8 vfe_idx;
307 u8 param0;
308} __packed;
309
310#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_VF_ENTRY_PARAM0_FLL_GAIN_VFE_IDX_MASK 0xFF
311#define NV_VBIOS_CLOCK_PROGRAMMING_TABLE_1X_VF_ENTRY_PARAM0_FLL_GAIN_VFE_IDX_SHIFT 0
312
313struct vbios_vfe_3x_header_struct {
314 u8 version;
315 u8 header_size;
316 u8 vfe_var_entry_size;
317 u8 vfe_var_entry_count;
318 u8 vfe_equ_entry_size;
319 u8 vfe_equ_entry_count;
320 u8 polling_periodms;
321} __packed;
322
323#define VBIOS_VFE_3X_VAR_ENTRY_SIZE_11 0x11U
324#define VBIOS_VFE_3X_VAR_ENTRY_SIZE_19 0x19U
325struct vbios_vfe_3x_var_entry_struct {
326 u8 type;
327 u32 out_range_min;
328 u32 out_range_max;
329 u32 param0;
330 u32 param1;
331 u32 param2;
332 u32 param3;
333} __packed;
334
335#define VBIOS_VFE_3X_VAR_ENTRY_TYPE_DISABLED 0x00U
336#define VBIOS_VFE_3X_VAR_ENTRY_TYPE_SINGLE_FREQUENCY 0x01U
337#define VBIOS_VFE_3X_VAR_ENTRY_TYPE_SINGLE_VOLTAGE 0x02U
338#define VBIOS_VFE_3X_VAR_ENTRY_TYPE_SINGLE_SENSED_TEMP 0x03U
339#define VBIOS_VFE_3X_VAR_ENTRY_TYPE_SINGLE_SENSED_FUSE 0x04U
340#define VBIOS_VFE_3X_VAR_ENTRY_TYPE_DERIVED_PRODUCT 0x05U
341#define VBIOS_VFE_3X_VAR_ENTRY_TYPE_DERIVED_SUM 0x06U
342
343#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSTEMP_TH_CH_IDX_MASK 0xFF
344#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSTEMP_TH_CH_IDX_SHIFT 0
345
346#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSTEMP_HYS_POS_MASK 0xFF00
347#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSTEMP_HYS_POS_SHIFT 8
348
349#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSTEMP_HYS_NEG_MASK 0xFF0000
350#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSTEMP_HYS_NEG_SHIFT 16
351
352#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_VFIELD_ID_MASK 0xFF
353#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_VFIELD_ID_SHIFT 0
354
355#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_VFIELD_ID_VER_MASK 0xFF00
356#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_VFIELD_ID_VER_SHIFT 8
357
358#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_EXPECTED_VER_MASK 0xFF0000
359#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_EXPECTED_VER_SHIFT 16
360
361#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_USE_DEFAULT_ON_VER_CHECK_FAIL_MASK 0x1000000
362#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_USE_DEFAULT_ON_VER_CHECK_FAIL_SHIFT 24
363
364#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_VALUE_SIGNED_INTEGER_MASK 0x2000000
365#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_VALUE_SIGNED_INTEGER_SHIFT 25
366
367#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_USE_DEFAULT_ON_VER_CHECK_FAIL_YES 0x00000001
368#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_SSFUSE_USE_DEFAULT_ON_VER_CHECK_FAIL_NO 0x00000000
369#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DPROD_VFE_VAR_IDX_0_MASK 0xFF
370#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DPROD_VFE_VAR_IDX_0_SHIFT 0
371
372#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DPROD_VFE_VAR_IDX_1_MASK 0xFF00
373#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DPROD_VFE_VAR_IDX_1_SHIFT 8
374
375#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DSUM_VFE_VAR_IDX_0_MASK 0xFF
376#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DSUM_VFE_VAR_IDX_0_SHIFT 0
377
378#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DSUM_VFE_VAR_IDX_1_MASK 0xFF00
379#define VBIOS_VFE_3X_VAR_ENTRY_PAR0_DSUM_VFE_VAR_IDX_1_SHIFT 8
380
381#define VBIOS_VFE_3X_VAR_ENTRY_PAR1_SSFUSE_DEFAULT_VAL_MASK 0xFFFFFFFF
382#define VBIOS_VFE_3X_VAR_ENTRY_PAR1_SSFUSE_DEFAULT_VAL_SHIFT 0
383
384#define VBIOS_VFE_3X_VAR_ENTRY_PAR1_SSFUSE_HW_CORRECTION_SCALE_MASK 0xFFFFFFFF
385#define VBIOS_VFE_3X_VAR_ENTRY_PAR1_SSFUSE_HW_CORRECTION_SCALE_SHIFT 0
386
387#define VBIOS_VFE_3X_VAR_ENTRY_PAR1_SSFUSE_HW_CORRECTION_OFFSET_MASK 0xFFFFFFFF
388#define VBIOS_VFE_3X_VAR_ENTRY_PAR1_SSFUSE_HW_CORRECTION_OFFSET_SHIFT 0
389
390#define VBIOS_VFE_3X_EQU_ENTRY_SIZE_17 0x17U
391#define VBIOS_VFE_3X_EQU_ENTRY_SIZE_18 0x18U
392
393struct vbios_vfe_3x_equ_entry_struct {
394 u8 type;
395 u8 var_idx;
396 u8 equ_idx_next;
397 u32 out_range_min;
398 u32 out_range_max;
399 u32 param0;
400 u32 param1;
401 u32 param2;
402 u8 param3;
403} __packed;
404
405
406#define VBIOS_VFE_3X_EQU_ENTRY_TYPE_DISABLED 0x00U
407#define VBIOS_VFE_3X_EQU_ENTRY_TYPE_QUADRATIC 0x01U
408#define VBIOS_VFE_3X_EQU_ENTRY_TYPE_MINMAX 0x02U
409#define VBIOS_VFE_3X_EQU_ENTRY_TYPE_COMPARE 0x03U
410#define VBIOS_VFE_3X_EQU_ENTRY_TYPE_QUADRATIC_FXP 0x04U
411#define VBIOS_VFE_3X_EQU_ENTRY_TYPE_MINMAX_FXP 0x05U
412
413#define VBIOS_VFE_3X_EQU_ENTRY_IDX_INVALID 0xFFU
414
415#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_QUADRATIC_C0_MASK 0xFFFFFFFF
416#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_QUADRATIC_C0_SHIFT 0
417
418#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_VFE_EQU_IDX_0_MASK 0xFF
419#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_VFE_EQU_IDX_0_SHIFT 0
420
421#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_VFE_EQU_IDX_1_MASK 0xFF00
422#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_VFE_EQU_IDX_1_SHIFT 8
423
424#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_CRIT_MASK 0x10000
425#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_CRIT_SHIFT 16
426#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_CRIT_MIN 0x00000000
427#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_MINMAX_CRIT_MAX 0x00000001
428
429#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_COMPARE_CRIT_MASK 0xFFFFFFFF
430#define VBIOS_VFE_3X_EQU_ENTRY_PAR0_COMPARE_CRIT_SHIFT 0
431
432#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_QUADRATIC_C1_MASK 0xFFFFFFFF
433#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_QUADRATIC_C1_SHIFT 0
434
435#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_VFE_EQU_IDX_TRUE_MASK 0xFF
436#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_VFE_EQU_IDX_TRUE_SHIFT 0
437
438#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_VFE_EQU_IDX_FALSE_MASK 0xFF00
439#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_VFE_EQU_IDX_FALSE_SHIFT 8
440
441#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_FUNCTION_MASK 0x70000
442#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_FUNCTION_SHIFT 16
443#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_FUNCTION_EQUAL 0x00000000
444#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_FUNCTION_GREATER_EQ 0x00000001
445#define VBIOS_VFE_3X_EQU_ENTRY_PAR1_COMPARE_FUNCTION_GREATER 0x00000002
446
447#define VBIOS_VFE_3X_EQU_ENTRY_PAR3_OUTPUT_TYPE_MASK 0xF
448#define VBIOS_VFE_3X_EQU_ENTRY_PAR3_OUTPUT_TYPE_SHIFT 0
449#define VBIOS_VFE_3X_EQU_ENTRY_PAR3_OUTPUT_TYPE_UNITLESS 0x0
450#define VBIOS_VFE_3X_EQU_ENTRY_PAR3_OUTPUT_TYPE_FREQ_MHZ 0x1
451#define VBIOS_VFE_3X_EQU_ENTRY_PAR3_OUTPUT_TYPE_VOLT_UV 0x2
452#define VBIOS_VFE_3X_EQU_ENTRY_PAR3_OUTPUT_TYPE_VF_GAIN 0x3
453#define VBIOS_VFE_3X_EQU_ENTRY_PAR3_OUTPUT_TYPE_VOLT_DELTA_UV 0x4
454
455#define NV_VFIELD_DESC_SIZE_BYTE 0x00000000U
456#define NV_VFIELD_DESC_SIZE_WORD 0x00000001U
457#define NV_VFIELD_DESC_SIZE_DWORD 0x00000002U
458#define VFIELD_SIZE(pvregentry) ((pvregentry->strap_reg_desc & 0x18U) >> 3U)
459
460#define NV_PMU_BIOS_VFIELD_DESC_CODE_INVALID 0x00000000U
461#define NV_PMU_BIOS_VFIELD_DESC_CODE_REG 0x00000001U
462#define NV_PMU_BIOS_VFIELD_DESC_CODE_INDEX_REG 0x00000002U
463
464#define NV_VFIELD_DESC_CODE_INVALID NV_PMU_BIOS_VFIELD_DESC_CODE_INVALID
465#define NV_VFIELD_DESC_CODE_REG NV_PMU_BIOS_VFIELD_DESC_CODE_REG
466#define NV_VFIELD_DESC_CODE_INDEX_REG NV_PMU_BIOS_VFIELD_DESC_CODE_INDEX_REG
467
468#define VFIELD_CODE(pvregentry) ((pvregentry->strap_reg_desc & 0xE0U) >> 5U)
469
470#define VFIELD_ID_STRAP_IDDQ 0x09U
471#define VFIELD_ID_STRAP_IDDQ_1 0x0BU
472
473#define VFIELD_REG_HEADER_SIZE 3U
474struct vfield_reg_header {
475 u8 version;
476 u8 entry_size;
477 u8 count;
478} __packed;
479
480#define VBIOS_VFIELD_REG_TABLE_VERSION_1_0 0x10U
481
482
483#define VFIELD_REG_ENTRY_SIZE 13U
484struct vfield_reg_entry {
485 u8 strap_reg_desc;
486 u32 reg;
487 u32 reg_index;
488 u32 index;
489} __packed;
490
491#define VFIELD_HEADER_SIZE 3U
492
493struct vfield_header {
494 u8 version;
495 u8 entry_size;
496 u8 count;
497} __packed;
498
499#define VBIOS_VFIELD_TABLE_VERSION_1_0 0x10U
500
501#define VFIELD_BIT_START(ventry) (ventry.strap_desc & 0x1FU)
502#define VFIELD_BIT_STOP(ventry) ((ventry.strap_desc & 0x3E0U) >> 5U)
503#define VFIELD_BIT_REG(ventry) ((ventry.strap_desc & 0x3C00U) >> 10U)
504
505#define VFIELD_ENTRY_SIZE 3U
506
507struct vfield_entry {
508 u8 strap_id;
509 u16 strap_desc;
510} __packed;
511
512#define PERF_CLK_DOMAINS_IDX_MAX (32U)
513#define PERF_CLK_DOMAINS_IDX_INVALID PERF_CLK_DOMAINS_IDX_MAX
514
515#define VBIOS_PSTATE_TABLE_VERSION_5X 0x50U
516#define VBIOS_PSTATE_HEADER_5X_SIZE_10 (10U)
517
518struct vbios_pstate_header_5x {
519 u8 version;
520 u8 header_size;
521 u8 base_entry_size;
522 u8 base_entry_count;
523 u8 clock_entry_size;
524 u8 clock_entry_count;
525 u8 flags0;
526 u8 initial_pstate;
527 u8 cpi_support_level;
528u8 cpi_features;
529} __packed;
530
531#define VBIOS_PSTATE_CLOCK_ENTRY_5X_SIZE_6 6U
532
533#define VBIOS_PSTATE_BASE_ENTRY_5X_SIZE_2 0x2U
534#define VBIOS_PSTATE_BASE_ENTRY_5X_SIZE_3 0x3U
535
536struct vbios_pstate_entry_clock_5x {
537 u16 param0;
538 u32 param1;
539} __packed;
540
541struct vbios_pstate_entry_5x {
542 u8 pstate_level;
543 u8 flags0;
544 u8 lpwr_entry_idx;
545 struct vbios_pstate_entry_clock_5x clockEntry[PERF_CLK_DOMAINS_IDX_MAX];
546} __packed;
547
548#define VBIOS_PSTATE_5X_CLOCK_PROG_PARAM0_NOM_FREQ_MHZ_SHIFT 0
549#define VBIOS_PSTATE_5X_CLOCK_PROG_PARAM0_NOM_FREQ_MHZ_MASK 0x00003FFF
550
551#define VBIOS_PSTATE_5X_CLOCK_PROG_PARAM1_MIN_FREQ_MHZ_SHIFT 0
552#define VBIOS_PSTATE_5X_CLOCK_PROG_PARAM1_MIN_FREQ_MHZ_MASK 0x00003FFF
553
554#define VBIOS_PSTATE_5X_CLOCK_PROG_PARAM1_MAX_FREQ_MHZ_SHIFT 14
555#define VBIOS_PSTATE_5X_CLOCK_PROG_PARAM1_MAX_FREQ_MHZ_MASK 0x0FFFC000
556
557#define VBIOS_PERFLEVEL_SKIP_ENTRY 0xFFU
558
559#define VBIOS_MEMORY_CLOCK_HEADER_11_VERSION 0x11U
560
561#define VBIOS_MEMORY_CLOCK_HEADER_11_0_SIZE 16U
562#define VBIOS_MEMORY_CLOCK_HEADER_11_1_SIZE 21U
563#define VBIOS_MEMORY_CLOCK_HEADER_11_2_SIZE 26U
564
565struct vbios_memory_clock_header_1x {
566 u8 version;
567 u8 header_size;
568 u8 base_entry_size;
569 u8 strap_entry_size;
570 u8 strap_entry_count;
571 u8 entry_count;
572 u8 flags;
573 u8 fbvdd_settle_time;
574 u32 cfg_pwrd_val;
575 u16 fbvddq_high;
576 u16 fbvddq_low;
577 u32 script_list_ptr;
578 u8 script_list_count;
579 u32 cmd_script_list_ptr;
580 u8 cmd_script_list_count;
581} __packed;
582
583#define VBIOS_MEMORY_CLOCK_BASE_ENTRY_11_2_SIZE 20U
584
585struct vbios_memory_clock_base_entry_11 {
586 u16 minimum;
587 u16 maximum;
588 u32 script_pointer;
589 u8 flags0;
590 u32 fbpa_config;
591 u32 fbpa_config1;
592 u8 flags1;
593 u8 ref_mpllssf_freq_delta;
594 u8 flags2;
595} __packed;
596
597/* Script Pointer Index */
598/* #define VBIOS_MEMORY_CLOCK_BASE_ENTRY_11_FLAGS1_SCRIPT_INDEX 3:2*/
599#define VBIOS_MEMORY_CLOCK_BASE_ENTRY_11_FLAGS1_SCRIPT_INDEX_MASK \
600 ((u8)0xc)
601#define VBIOS_MEMORY_CLOCK_BASE_ENTRY_11_FLAGS1_SCRIPT_INDEX_SHIFT 2
602/* #define VBIOS_MEMORY_CLOCK_BASE_ENTRY_12_FLAGS2_CMD_SCRIPT_INDEX 1:0*/
603#define VBIOS_MEMORY_CLOCK_BASE_ENTRY_12_FLAGS2_CMD_SCRIPT_INDEX_MASK \
604 ((u8)0x3)
605#define VBIOS_MEMORY_CLOCK_BASE_ENTRY_12_FLAGS2_CMD_SCRIPT_INDEX_SHIFT 0
606
607#define VBIOS_POWER_SENSORS_VERSION_2X 0x20U
608#define VBIOS_POWER_SENSORS_2X_HEADER_SIZE_08 0x00000008U
609
610struct pwr_sensors_2x_header {
611 u8 version;
612 u8 header_size;
613 u8 table_entry_size;
614 u8 num_table_entries;
615 u32 ba_script_pointer;
616} __packed;
617
618#define VBIOS_POWER_SENSORS_2X_ENTRY_SIZE_15 0x00000015U
619
620struct pwr_sensors_2x_entry {
621 u8 flags0;
622 u32 class_param0;
623 u32 sensor_param0;
624 u32 sensor_param1;
625 u32 sensor_param2;
626 u32 sensor_param3;
627} __packed;
628
629#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_FLAGS0_CLASS_MASK 0xF
630#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_FLAGS0_CLASS_SHIFT 0
631#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_FLAGS0_CLASS_I2C 0x00000001U
632
633#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_CLASS_PARAM0_I2C_INDEX_MASK 0xFF
634#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_CLASS_PARAM0_I2C_INDEX_SHIFT 0
635#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_CLASS_PARAM0_I2C_USE_FXP8_8_MASK 0x100
636#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_CLASS_PARAM0_I2C_USE_FXP8_8_SHIFT 8
637
638#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM0_INA3221_RSHUNT0_MOHM_MASK 0xFFFF
639#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM0_INA3221_RSHUNT0_MOHM_SHIFT 0
640#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM0_INA3221_RSHUNT1_MOHM_MASK 0xFFFF0000
641#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM0_INA3221_RSHUNT1_MOHM_SHIFT 16
642#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM1_INA3221_RSHUNT2_MOHM_MASK 0xFFFF
643#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM1_INA3221_RSHUNT2_MOHM_SHIFT 0
644#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM1_INA3221_CONFIGURATION_MASK 0xFFFF0000
645#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM1_INA3221_CONFIGURATION_SHIFT 16
646
647#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM2_INA3221_MASKENABLE_MASK 0xFFFF
648#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM2_INA3221_MASKENABLE_SHIFT 0
649#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM2_INA3221_GPIOFUNCTION_MASK 0xFF0000
650#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM2_INA3221_GPIOFUNCTION_SHIFT 16
651#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM3_INA3221_CURR_CORRECT_M_MASK 0xFFFF
652#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM3_INA3221_CURR_CORRECT_M_SHIFT 0
653#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM3_INA3221_CURR_CORRECT_B_MASK 0xFFFF0000
654#define NV_VBIOS_POWER_SENSORS_2X_ENTRY_SENSOR_PARAM3_INA3221_CURR_CORRECT_B_SHIFT 16
655
656#define VBIOS_POWER_TOPOLOGY_VERSION_2X 0x20U
657#define VBIOS_POWER_TOPOLOGY_2X_HEADER_SIZE_06 0x00000006U
658
659struct pwr_topology_2x_header {
660 u8 version;
661 u8 header_size;
662 u8 table_entry_size;
663 u8 num_table_entries;
664 u8 rel_entry_size;
665 u8 num_rel_entries;
666} __packed;
667
668#define VBIOS_POWER_TOPOLOGY_2X_ENTRY_SIZE_16 0x00000016U
669
670struct pwr_topology_2x_entry {
671 u8 flags0;
672 u8 pwr_rail;
673 u32 param0;
674 u32 curr_corr_slope;
675 u32 curr_corr_offset;
676 u32 param1;
677 u32 param2;
678} __packed;
679
680#define NV_VBIOS_POWER_TOPOLOGY_2X_ENTRY_FLAGS0_CLASS_MASK 0xF
681#define NV_VBIOS_POWER_TOPOLOGY_2X_ENTRY_FLAGS0_CLASS_SHIFT 0
682#define NV_VBIOS_POWER_TOPOLOGY_2X_ENTRY_FLAGS0_CLASS_SENSOR U8(0x00000001)
683
684#define NV_VBIOS_POWER_TOPOLOGY_2X_ENTRY_PARAM1_SENSOR_INDEX_MASK 0xFF
685#define NV_VBIOS_POWER_TOPOLOGY_2X_ENTRY_PARAM1_SENSOR_INDEX_SHIFT 0
686#define NV_VBIOS_POWER_TOPOLOGY_2X_ENTRY_PARAM1_SENSOR_PROVIDER_INDEX_MASK 0xFF00
687#define NV_VBIOS_POWER_TOPOLOGY_2X_ENTRY_PARAM1_SENSOR_PROVIDER_INDEX_SHIFT 8
688
689#define VBIOS_POWER_POLICY_VERSION_3X 0x30U
690#define VBIOS_POWER_POLICY_3X_HEADER_SIZE_25 0x00000025U
691
692struct pwr_policy_3x_header_struct {
693 u8 version;
694 u8 header_size;
695 u8 table_entry_size;
696 u8 num_table_entries;
697 u16 base_sample_period;
698 u16 min_client_sample_period;
699 u8 table_rel_entry_size;
700 u8 num_table_rel_entries;
701 u8 tgp_policy_idx;
702 u8 rtp_policy_idx;
703 u8 mxm_policy_idx;
704 u8 dnotifier_policy_idx;
705 u32 d2_limit;
706 u32 d3_limit;
707 u32 d4_limit;
708 u32 d5_limit;
709 u8 low_sampling_mult;
710 u8 pwr_tgt_policy_idx;
711 u8 pwr_tgt_floor_policy_idx;
712 u8 sm_bus_policy_idx;
713 u8 table_viol_entry_size;
714 u8 num_table_viol_entries;
715} __packed;
716
717#define VBIOS_POWER_POLICY_3X_ENTRY_SIZE_2E 0x0000002EU
718
719struct pwr_policy_3x_entry_struct {
720 u8 flags0;
721 u8 ch_idx;
722 u32 limit_min;
723 u32 limit_rated;
724 u32 limit_max;
725 u32 param0;
726 u32 param1;
727 u32 param2;
728 u32 param3;
729 u32 limit_batt;
730 u8 flags1;
731 u8 past_length;
732 u8 next_length;
733 u16 ratio_min;
734 u16 ratio_max;
735 u8 sample_mult;
736 u32 filter_param;
737} __packed;
738
739#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_CLASS_MASK 0xF
740#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_CLASS_SHIFT 0
741#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_CLASS_HW_THRESHOLD 0x00000005U
742#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_LIMIT_UNIT_MASK 0x10
743#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_LIMIT_UNIT_SHIFT 4
744
745#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS1_FULL_DEFLECTION_LIMIT_MASK 0x1
746#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS1_FULL_DEFLECTION_LIMIT_SHIFT 0
747#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS1_INTEGRAL_CONTROL_MASK 0x2
748#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS1_INTEGRAL_CONTROL_SHIFT 1
749#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS1_FILTER_TYPE_MASK 0x3C
750#define NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS1_FILTER_TYPE_SHIFT 2
751
752#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM0_HW_THRESHOLD_THRES_IDX_MASK 0xFF
753#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM0_HW_THRESHOLD_THRES_IDX_SHIFT 0
754#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM0_HW_THRESHOLD_LOW_THRESHOLD_IDX_MASK 0xFF00
755#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM0_HW_THRESHOLD_LOW_THRESHOLD_IDX_SHIFT 8
756#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM0_HW_THRESHOLD_LOW_THRESHOLD_USE_MASK 0x10000
757#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM0_HW_THRESHOLD_LOW_THRESHOLD_USE_SHIFT 16
758
759#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM1_HW_THRESHOLD_LOW_THRESHOLD_VAL_MASK 0xFFFF
760#define NV_VBIOS_POWER_POLICY_3X_ENTRY_PARAM1_HW_THRESHOLD_LOW_THRESHOLD_VAL_SHIFT 0
761
762/* Voltage Rail Table */
763struct vbios_voltage_rail_table_1x_header {
764 u8 version;
765 u8 header_size;
766 u8 table_entry_size;
767 u8 num_table_entries;
768 u8 volt_domain_hal;
769} __packed;
770
771#define NV_VBIOS_VOLTAGE_RAIL_1X_ENTRY_SIZE_07 0X00000007U
772#define NV_VBIOS_VOLTAGE_RAIL_1X_ENTRY_SIZE_08 0X00000008U
773#define NV_VBIOS_VOLTAGE_RAIL_1X_ENTRY_SIZE_09 0X00000009U
774#define NV_VBIOS_VOLTAGE_RAIL_1X_ENTRY_SIZE_0A 0X0000000AU
775#define NV_VBIOS_VOLTAGE_RAIL_1X_ENTRY_SIZE_0B 0X0000000BU
776#define NV_VBIOS_VOLTAGE_RAIL_1X_ENTRY_SIZE_0C 0X0000000CU
777
778struct vbios_voltage_rail_table_1x_entry {
779 u32 boot_voltage_uv;
780 u8 rel_limit_vfe_equ_idx;
781 u8 alt_rel_limit_vfe_equidx;
782 u8 ov_limit_vfe_equ_idx;
783 u8 pwr_equ_idx;
784 u8 boot_volt_vfe_equ_idx;
785 u8 vmin_limit_vfe_equ_idx;
786 u8 volt_margin_limit_vfe_equ_idx;
787 u8 volt_scale_exp_pwr_equ_idx;
788} __packed;
789
790/* Voltage Device Table */
791struct vbios_voltage_device_table_1x_header {
792 u8 version;
793 u8 header_size;
794 u8 table_entry_size;
795 u8 num_table_entries;
796} __packed;
797
798struct vbios_voltage_device_table_1x_entry {
799 u8 type;
800 u8 volt_domain;
801 u16 settle_time_us;
802 u32 param0;
803 u32 param1;
804 u32 param2;
805 u32 param3;
806 u32 param4;
807} __packed;
808
809#define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_INVALID 0x00U
810#define NV_VBIOS_VOLTAGE_DEVICE_1X_ENTRY_TYPE_PSV 0x02U
811
812#define NV_VBIOS_VDT_1X_ENTRY_PARAM0_PSV_INPUT_FREQUENCY_MASK \
813 GENMASK(23, 0)
814#define NV_VBIOS_VDT_1X_ENTRY_PARAM0_PSV_INPUT_FREQUENCY_SHIFT 0
815#define NV_VBIOS_VDT_1X_ENTRY_PARAM0_PSV_EXT_DEVICE_INDEX_MASK \
816 GENMASK(31, 24)
817#define NV_VBIOS_VDT_1X_ENTRY_PARAM0_PSV_EXT_DEVICE_INDEX_SHIFT 24
818
819#define NV_VBIOS_VDT_1X_ENTRY_PARAM1_PSV_VOLTAGE_MINIMUM_MASK \
820 GENMASK(23, 0)
821#define NV_VBIOS_VDT_1X_ENTRY_PARAM1_PSV_VOLTAGE_MINIMUM_SHIFT 0
822#define NV_VBIOS_VDT_1X_ENTRY_PARAM1_PSV_OPERATION_TYPE_MASK \
823 GENMASK(31, 24)
824#define NV_VBIOS_VDT_1X_ENTRY_PARAM1_PSV_OPERATION_TYPE_SHIFT 24
825#define NV_VBIOS_VDT_1X_ENTRY_PARAM1_PSV_OPERATION_TYPE_DEFAULT 0x00
826#define NV_VBIOS_VDT_1X_ENTRY_PARAM1_PSV_OPERATION_TYPE_LPWR_STEADY_STATE \
827 0x01
828#define NV_VBIOS_VDT_1X_ENTRY_PARAM1_PSV_OPERATION_TYPE_LPWR_SLEEP_STATE \
829 0x02
830#define NV_VBIOS_VDT_1X_ENTRY_PARAM2_PSV_VOLTAGE_MAXIMUM_MASK \
831 GENMASK(23, 0)
832#define NV_VBIOS_VDT_1X_ENTRY_PARAM2_PSV_VOLTAGE_MAXIMUM_SHIFT 0
833#define NV_VBIOS_VDT_1X_ENTRY_PARAM2_PSV_RSVD_MASK \
834 GENMASK(31, 24)
835#define NV_VBIOS_VDT_1X_ENTRY_PARAM2_PSV_RSVD_SHIFT 24
836
837#define NV_VBIOS_VDT_1X_ENTRY_PARAM3_PSV_VOLTAGE_BASE_MASK \
838 GENMASK(23, 0)
839#define NV_VBIOS_VDT_1X_ENTRY_PARAM3_PSV_VOLTAGE_BASE_SHIFT 0
840#define NV_VBIOS_VDT_1X_ENTRY_PARAM3_PSV_VOLTAGE_STEPS_MASK \
841 GENMASK(31, 24)
842#define NV_VBIOS_VDT_1X_ENTRY_PARAM3_PSV_VOLTAGE_STEPS_SHIFT 24
843
844#define NV_VBIOS_VDT_1X_ENTRY_PARAM4_PSV_OFFSET_SCALE_MASK \
845 GENMASK(23, 0)
846#define NV_VBIOS_VDT_1X_ENTRY_PARAM4_PSV_OFFSET_SCALE_SHIFT 0
847#define NV_VBIOS_VDT_1X_ENTRY_PARAM4_PSV_RSVD_MASK \
848 GENMASK(31, 24)
849#define NV_VBIOS_VDT_1X_ENTRY_PARAM4_PSV_RSVD_SHIFT 24
850
851/* Voltage Policy Table */
852struct vbios_voltage_policy_table_1x_header {
853 u8 version;
854 u8 header_size;
855 u8 table_entry_size;
856 u8 num_table_entries;
857 u8 perf_core_vf_seq_policy_idx;
858} __packed;
859
860struct vbios_voltage_policy_table_1x_entry {
861 u8 type;
862 u32 param0;
863 u32 param1;
864 u32 param2;
865 u32 param3;
866} __packed;
867
868#define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_INVALID 0x00U
869#define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_SINGLE_RAIL 0x01U
870#define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_SR_MULTI_STEP 0x02U
871#define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_SR_SINGLE_STEP 0x03U
872#define NV_VBIOS_VOLTAGE_POLICY_1X_ENTRY_TYPE_SINGLE_RAIL_MULTI_STEP 0x04U
873
874#define NV_VBIOS_VPT_ENTRY_PARAM0_SINGLE_RAIL_VOLT_DOMAIN_MASK \
875 GENMASK(7, 0)
876#define NV_VBIOS_VPT_ENTRY_PARAM0_SINGLE_RAIL_VOLT_DOMAIN_SHIFT 0
877#define NV_VBIOS_VPT_ENTRY_PARAM0_RSVD_MASK GENMASK(8, 31)
878#define NV_VBIOS_VPT_ENTRY_PARAM0_RSVD_SHIFT 8
879
880#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_VD_MASTER_MASK \
881 GENMASK(7, 0)
882#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_VD_MASTER_SHIFT 0
883#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_VD_SLAVE_MASK \
884 GENMASK(15, 8)
885#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_VD_SLAVE_SHIFT 8
886#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_DELTA_SM_MIN_MASK \
887 GENMASK(23, 16)
888#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_DELTA_SM_MIN_SHIFT 16
889#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_DELTA_SM_MAX_MASK \
890 GENMASK(31, 24)
891#define NV_VBIOS_VPT_ENTRY_PARAM0_SR_DELTA_SM_MAX_SHIFT 24
892
893#define NV_VBIOS_VPT_ENTRY_PARAM1_SR_SETTLE_TIME_INTERMEDIATE_MASK \
894 GENMASK(15, 0)
895#define NV_VBIOS_VPT_ENTRY_PARAM1_SR_SETTLE_TIME_INTERMEDIATE_SHIFT 0
896#define NV_VBIOS_VPT_ENTRY_PARAM2_SR_RAMP_UP_STEP_SIZE_UV_MASK \
897 GENMASK(31, 0)
898#define NV_VBIOS_VPT_ENTRY_PARAM2_SR_RAMP_UP_STEP_SIZE_UV_SHIFT 0
899#define NV_VBIOS_VPT_ENTRY_PARAM3_SR_RAMP_DOWN_STEP_SIZE_UV_MASK \
900 GENMASK(31, 0)
901#define NV_VBIOS_VPT_ENTRY_PARAM3_SR_RAMP_DOWN_STEP_SIZE_UV_SHIFT 0
902
903/* Type-Specific Parameter DWORD 0 - Type = _SR_MULTI_STEP */
904#define NV_VBIOS_VPT_ENTRY_PARAM1_SR_SETTLE_TIME_INTERMEDIATE_MASK \
905 GENMASK(15, 0)
906#define NV_VBIOS_VPT_ENTRY_PARAM1_SR_SETTLE_TIME_INTERMEDIATE_SHIFT \
907 0
908
909#define VBIOS_THERM_DEVICE_VERSION_1X 0x10U
910
911#define VBIOS_THERM_DEVICE_1X_HEADER_SIZE_04 0x00000004U
912
913struct therm_device_1x_header {
914 u8 version;
915 u8 header_size;
916 u8 table_entry_size;
917 u8 num_table_entries;
918} ;
919
920struct therm_device_1x_entry {
921 u8 class_id;
922 u8 param0;
923 u8 flags;
924} ;
925
926#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_INVALID 0x00U
927#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_GPU 0x01U
928#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_GPU_GPC_TSOSC 0x02U
929#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_GPU_GPC_SCI 0x03U
930#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_HBM2_SITE 0x70U
931#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_HBM2_COMBINED 0x71U
932
933#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_PARAM0_I2C_DEVICE_INDEX_MASK 0xFF
934#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_PARAM0_I2C_DEVICE_INDEX_SHIFT 0
935
936#define VBIOS_THERM_CHANNEL_VERSION_1X 0x10U
937
938#define VBIOS_THERM_CHANNEL_1X_HEADER_SIZE_09 0x00000009U
939
940struct therm_channel_1x_header {
941 u8 version;
942 u8 header_size;
943 u8 table_entry_size;
944 u8 num_table_entries;
945 u8 gpu_avg_pri_ch_idx;
946 u8 gpu_max_pri_ch_idx;
947 u8 board_pri_ch_idx;
948 u8 mem_pri_ch_idx;
949 u8 pwr_supply_pri_ch_idx;
950} __packed;
951
952struct therm_channel_1x_entry {
953 u8 class_id;
954 u8 param0;
955 u8 param1;
956 u8 param2;
957 u8 flags;
958} __packed;
959
960#define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_CLASS_DEVICE 0x01U
961
962#define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_PARAM0_DEVICE_INDEX_MASK 0xFF
963#define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_PARAM0_DEVICE_INDEX_SHIFT 0
964
965#define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_PARAM1_DEVICE_PROVIDER_INDEX_MASK 0xFF
966#define NV_VBIOS_THERM_CHANNEL_1X_ENTRY_PARAM1_DEVICE_PROVIDER_INDEX_SHIFT 0
967
968/* Frequency Controller Table */
969struct vbios_fct_1x_header {
970 u8 version;
971 u8 header_size;
972 u8 entry_size;
973 u8 entry_count;
974 u16 sampling_period_ms;
975} __packed;
976
977struct vbios_fct_1x_entry {
978 u8 flags0;
979 u8 clk_domain_idx;
980 u16 param0;
981 u16 param1;
982 u32 param2;
983 u32 param3;
984 u32 param4;
985 u32 param5;
986 u32 param6;
987 u32 param7;
988 u32 param8;
989} __packed;
990
991#define NV_VBIOS_FCT_1X_ENTRY_FLAGS0_TYPE_MASK GENMASK(3, 0)
992#define NV_VBIOS_FCT_1X_ENTRY_FLAGS0_TYPE_SHIFT 0
993#define NV_VBIOS_FCT_1X_ENTRY_FLAGS0_TYPE_DISABLED 0x0
994#define NV_VBIOS_FCT_1X_ENTRY_FLAGS0_TYPE_PI 0x1
995
996#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_MASK GENMASK(7, 0)
997#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_SHIFT 0
998#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_SYS 0x00
999#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_LTC 0x01
1000#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_XBAR 0x02
1001#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_GPC0 0x03
1002#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_GPC1 0x04
1003#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_GPC2 0x05
1004#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_GPC3 0x06
1005#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_GPC4 0x07
1006#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_GPC5 0x08
1007#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID_GPCS 0x09
1008
1009#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_FREQ_MODE_MASK GENMASK(9, 8)
1010#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_FREQ_MODE_SHIFT 8
1011#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_FREQ_MODE_BCAST 0x0
1012#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_FREQ_MODE_MIN 0x1
1013#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_FREQ_MODE_MAX 0x2
1014#define NV_VBIOS_FCT_1X_ENTRY_PARAM0_FREQ_MODE_AVG 0x3
1015
1016#define NV_VBIOS_FCT_1X_ENTRY_PARAM1_SLOWDOWN_PCT_MIN_MASK GENMASK(7, 0)
1017#define NV_VBIOS_FCT_1X_ENTRY_PARAM1_SLOWDOWN_PCT_MIN_SHIFT 0
1018
1019#define NV_VBIOS_FCT_1X_ENTRY_PARAM1_POISON_MASK GENMASK(8, 8)
1020#define NV_VBIOS_FCT_1X_ENTRY_PARAM1_POISON_SHIFT 8
1021#define NV_VBIOS_FCT_1X_ENTRY_PARAM1_POISON_NO 0x0
1022#define NV_VBIOS_FCT_1X_ENTRY_PARAM1_POISON_YES 0x1
1023
1024#define NV_VBIOS_FCT_1X_ENTRY_PARAM2_PROP_GAIN_MASK GENMASK(31, 0)
1025#define NV_VBIOS_FCT_1X_ENTRY_PARAM2_PROP_GAIN_SHIFT 0
1026
1027#define NV_VBIOS_FCT_1X_ENTRY_PARAM3_INTEG_GAIN_MASK GENMASK(31, 0)
1028#define NV_VBIOS_FCT_1X_ENTRY_PARAM3_INTEG_GAIN_SHIFT 0
1029
1030
1031#define NV_VBIOS_FCT_1X_ENTRY_PARAM4_INTEG_DECAY_MASK GENMASK(31, 0)
1032#define NV_VBIOS_FCT_1X_ENTRY_PARAM4_INTEG_DECAY_SHIFT 0
1033
1034#define NV_VBIOS_FCT_1X_ENTRY_PARAM5_VOLT_DELTA_MIN_MASK GENMASK(31, 0)
1035#define NV_VBIOS_FCT_1X_ENTRY_PARAM5_VOLT_DELTA_MIN_SHIFT 0
1036
1037
1038#define NV_VBIOS_FCT_1X_ENTRY_PARAM6_VOLT_DELTA_MAX_MASK GENMASK(31, 0)
1039#define NV_VBIOS_FCT_1X_ENTRY_PARAM6_VOLT_DELTA_MAX_SHIFT 0
1040
1041#define NV_VBIOS_FCT_1X_ENTRY_PARAM7_FREQ_CAP_VF_MASK GENMASK(15, 0)
1042#define NV_VBIOS_FCT_1X_ENTRY_PARAM7_FREQ_CAP_VF_SHIFT 0
1043#define NV_VBIOS_FCT_1X_ENTRY_PARAM7_FREQ_CAP_VMIN_MASK GENMASK(31, 16)
1044#define NV_VBIOS_FCT_1X_ENTRY_PARAM7_FREQ_CAP_VMIN_SHIFT 16
1045
1046#define NV_VBIOS_FCT_1X_ENTRY_PARAM8_FREQ_HYST_POS_MASK GENMASK(15, 0)
1047#define NV_VBIOS_FCT_1X_ENTRY_PARAM8_FREQ_HYST_POS_SHIFT 0
1048#define NV_VBIOS_FCT_1X_ENTRY_PARAM8_FREQ_HYST_NEG_MASK GENMASK(31, 16)
1049#define NV_VBIOS_FCT_1X_ENTRY_PARAM8_FREQ_HYST_NEG_SHIFT 16
1050
1051/* LPWR Index Table */
1052struct nvgpu_bios_lpwr_idx_table_1x_header {
1053 u8 version;
1054 u8 header_size;
1055 u8 entry_size;
1056 u8 entry_count;
1057 u16 base_sampling_period;
1058} __packed;
1059
1060struct nvgpu_bios_lpwr_idx_table_1x_entry {
1061 u8 pcie_idx;
1062 u8 gr_idx;
1063 u8 ms_idx;
1064 u8 di_idx;
1065 u8 gc6_idx;
1066} __packed;
1067
1068/* LPWR MS Table*/
1069struct nvgpu_bios_lpwr_ms_table_1x_header {
1070 u8 version;
1071 u8 header_size;
1072 u8 entry_size;
1073 u8 entry_count;
1074 u8 default_entry_idx;
1075 u16 idle_threshold_us;
1076} __packed;
1077
1078struct nvgpu_bios_lpwr_ms_table_1x_entry {
1079 u32 feautre_mask;
1080 u16 dynamic_current_logic;
1081 u16 dynamic_current_sram;
1082} __packed;
1083
1084#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_MASK GENMASK(0, 0)
1085#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_SHIFT 0
1086#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_SWASR_MASK GENMASK(2, 2)
1087#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_SWASR_SHIFT 2
1088#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_CLOCK_GATING_MASK \
1089 GENMASK(3, 3)
1090#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_CLOCK_GATING_SHIFT 3
1091#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_RPPG_MASK GENMASK(5, 5)
1092#define NV_VBIOS_LPWR_MS_FEATURE_MASK_MS_RPPG_SHIFT 5
1093
1094/* LPWR GR Table */
1095struct nvgpu_bios_lpwr_gr_table_1x_header {
1096 u8 version;
1097 u8 header_size;
1098 u8 entry_size;
1099 u8 entry_count;
1100 u8 default_entry_idx;
1101 u16 idle_threshold_us;
1102 u8 adaptive_gr_multiplier;
1103} __packed;
1104
1105struct nvgpu_bios_lpwr_gr_table_1x_entry {
1106 u32 feautre_mask;
1107} __packed;
1108
1109#define NV_VBIOS_LPWR_GR_FEATURE_MASK_GR_MASK GENMASK(0, 0)
1110#define NV_VBIOS_LPWR_GR_FEATURE_MASK_GR_SHIFT 0
1111
1112#define NV_VBIOS_LPWR_GR_FEATURE_MASK_GR_RPPG_MASK GENMASK(4, 4)
1113#define NV_VBIOS_LPWR_GR_FEATURE_MASK_GR_RPPG_SHIFT 4
1114int nvgpu_bios_parse_rom(struct gk20a *g);
1115u8 nvgpu_bios_read_u8(struct gk20a *g, u32 offset);
1116s8 nvgpu_bios_read_s8(struct gk20a *g, u32 offset);
1117u16 nvgpu_bios_read_u16(struct gk20a *g, u32 offset);
1118u32 nvgpu_bios_read_u32(struct gk20a *g, u32 offset);
1119void *nvgpu_bios_get_perf_table_ptrs(struct gk20a *g,
1120 struct bit_token *ptoken, u8 table_id);
1121int nvgpu_bios_execute_script(struct gk20a *g, u32 offset);
1122u32 nvgpu_bios_get_nvlink_config_data(struct gk20a *g);
1123#endif
diff --git a/include/nvgpu/bitops.h b/include/nvgpu/bitops.h
deleted file mode 100644
index 00336d0..0000000
--- a/include/nvgpu/bitops.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_BITOPS_H
23#define NVGPU_BITOPS_H
24
25#include <nvgpu/types.h>
26
27/*
28 * Explicit sizes for bit definitions. Please use these instead of BIT().
29 */
30#define BIT8(i) (U8(1) << (i))
31#define BIT16(i) (U16(1) << (i))
32#define BIT32(i) (U32(1) << (i))
33#define BIT64(i) (U64(1) << (i))
34
35#ifdef __KERNEL__
36#include <linux/bitops.h>
37#include <linux/bitmap.h>
38#elif defined(__NVGPU_POSIX__)
39#include <nvgpu/posix/bitops.h>
40#else
41#include <nvgpu_rmos/include/bitops.h>
42#endif
43
44#endif /* NVGPU_BITOPS_H */
diff --git a/include/nvgpu/bsearch.h b/include/nvgpu/bsearch.h
deleted file mode 100644
index 46a2d04..0000000
--- a/include/nvgpu/bsearch.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_BSEARCH_H
23#define NVGPU_BSEARCH_H
24
25#ifdef __KERNEL__
26#include <linux/bsearch.h>
27#elif defined(__NVGPU_POSIX__)
28#include <stdlib.h>
29#endif
30
31#endif /*NVGPU_BSEARCH_H*/
diff --git a/include/nvgpu/bug.h b/include/nvgpu/bug.h
deleted file mode 100644
index 82d641b..0000000
--- a/include/nvgpu/bug.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_BUG_H
23#define NVGPU_BUG_H
24
25#ifdef __KERNEL__
26#include <linux/bug.h>
27/*
28 * Define an assert macro that code within nvgpu can use.
29 *
30 * The goal of this macro is for debugging but what that means varies from OS
31 * to OS. On Linux wee don't want to BUG() for general driver misbehaving. BUG()
32 * is a very heavy handed tool - in fact there's probably no where within the
33 * nvgpu core code where it makes sense to use a BUG() when running under Linux.
34 *
35 * However, on QNX (and POSIX) BUG() will just kill the current process. This
36 * means we can use it for handling bugs in nvgpu.
37 *
38 * As a result this macro varies depending on platform.
39 */
40#define nvgpu_assert(cond) ((void) WARN_ON(!(cond)))
41#define nvgpu_do_assert_print(g, fmt, arg...) \
42 do { \
43 nvgpu_err(g, fmt, ##arg); \
44 } while (false)
45#elif defined(__NVGPU_POSIX__)
46#include <nvgpu/posix/bug.h>
47#else
48#include <nvgpu_rmos/include/bug.h>
49#endif
50
51#endif /* NVGPU_BUG_H */
diff --git a/include/nvgpu/channel.h b/include/nvgpu/channel.h
deleted file mode 100644
index 764d047..0000000
--- a/include/nvgpu/channel.h
+++ /dev/null
@@ -1,478 +0,0 @@
1/*
2 * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_CHANNEL_H
24#define NVGPU_CHANNEL_H
25
26#include <nvgpu/list.h>
27#include <nvgpu/lock.h>
28#include <nvgpu/timers.h>
29#include <nvgpu/cond.h>
30#include <nvgpu/atomic.h>
31#include <nvgpu/nvgpu_mem.h>
32#include <nvgpu/allocator.h>
33
34struct gk20a;
35struct dbg_session_gk20a;
36struct gk20a_fence;
37struct fifo_profile_gk20a;
38struct nvgpu_channel_sync;
39struct nvgpu_gpfifo_userdata;
40
41/* Flags to be passed to nvgpu_channel_setup_bind() */
42#define NVGPU_SETUP_BIND_FLAGS_SUPPORT_VPR (1U << 0U)
43#define NVGPU_SETUP_BIND_FLAGS_SUPPORT_DETERMINISTIC (1U << 1U)
44#define NVGPU_SETUP_BIND_FLAGS_REPLAYABLE_FAULTS_ENABLE (1U << 2U)
45#define NVGPU_SETUP_BIND_FLAGS_USERMODE_SUPPORT (1U << 3U)
46
47/* Flags to be passed to nvgpu_submit_channel_gpfifo() */
48#define NVGPU_SUBMIT_FLAGS_FENCE_WAIT (1U << 0U)
49#define NVGPU_SUBMIT_FLAGS_FENCE_GET (1U << 1U)
50#define NVGPU_SUBMIT_FLAGS_HW_FORMAT (1U << 2U)
51#define NVGPU_SUBMIT_FLAGS_SYNC_FENCE (1U << 3U)
52#define NVGPU_SUBMIT_FLAGS_SUPPRESS_WFI (1U << 4U)
53#define NVGPU_SUBMIT_FLAGS_SKIP_BUFFER_REFCOUNTING (1U << 5U)
54
55/*
56 * The binary format of 'struct nvgpu_channel_fence' introduced here
57 * should match that of 'struct nvgpu_fence' defined in uapi header, since
58 * this struct is intended to be a mirror copy of the uapi struct. This is
59 * not a hard requirement though because of nvgpu_get_fence_args conversion
60 * function.
61 */
62struct nvgpu_channel_fence {
63 u32 id;
64 u32 value;
65};
66
67/*
68 * The binary format of 'struct nvgpu_gpfifo_entry' introduced here
69 * should match that of 'struct nvgpu_gpfifo' defined in uapi header, since
70 * this struct is intended to be a mirror copy of the uapi struct. This is
71 * a rigid requirement because there's no conversion function and there are
72 * memcpy's present between the user gpfifo (of type nvgpu_gpfifo) and the
73 * kern gpfifo (of type nvgpu_gpfifo_entry).
74 */
75struct nvgpu_gpfifo_entry {
76 u32 entry0;
77 u32 entry1;
78};
79
80struct gpfifo_desc {
81 struct nvgpu_mem mem;
82 u32 entry_num;
83
84 u32 get;
85 u32 put;
86
87 bool wrap;
88
89 /* if gpfifo lives in vidmem or is forced to go via PRAMIN, first copy
90 * from userspace to pipe and then from pipe to gpu buffer */
91 void *pipe;
92};
93
94struct nvgpu_setup_bind_args {
95 u32 num_gpfifo_entries;
96 u32 num_inflight_jobs;
97 u32 userd_dmabuf_fd;
98 u64 userd_dmabuf_offset;
99 u32 gpfifo_dmabuf_fd;
100 u64 gpfifo_dmabuf_offset;
101 u32 work_submit_token;
102 u32 flags;
103};
104
105struct notification {
106 struct {
107 u32 nanoseconds[2];
108 } timestamp;
109 u32 info32;
110 u16 info16;
111 u16 status;
112};
113
114struct priv_cmd_queue {
115 struct nvgpu_mem mem;
116 u32 size; /* num of entries in words */
117 u32 put; /* put for priv cmd queue */
118 u32 get; /* get for priv cmd queue */
119};
120
121struct priv_cmd_entry {
122 bool valid;
123 struct nvgpu_mem *mem;
124 u32 off; /* offset in mem, in u32 entries */
125 u64 gva;
126 u32 get; /* start of entry in queue */
127 u32 size; /* in words */
128};
129
130struct channel_gk20a_job {
131 struct nvgpu_mapped_buf **mapped_buffers;
132 int num_mapped_buffers;
133 struct gk20a_fence *post_fence;
134 struct priv_cmd_entry *wait_cmd;
135 struct priv_cmd_entry *incr_cmd;
136 struct nvgpu_list_node list;
137};
138
139static inline struct channel_gk20a_job *
140channel_gk20a_job_from_list(struct nvgpu_list_node *node)
141{
142 return (struct channel_gk20a_job *)
143 ((uintptr_t)node - offsetof(struct channel_gk20a_job, list));
144};
145
146struct channel_gk20a_joblist {
147 struct {
148 bool enabled;
149 unsigned int length;
150 unsigned int put;
151 unsigned int get;
152 struct channel_gk20a_job *jobs;
153 struct nvgpu_mutex read_lock;
154 } pre_alloc;
155
156 struct {
157 struct nvgpu_list_node jobs;
158 struct nvgpu_spinlock lock;
159 } dynamic;
160
161 /*
162 * Synchronize abort cleanup (when closing a channel) and job cleanup
163 * (asynchronously from worker) - protect from concurrent access when
164 * job resources are being freed.
165 */
166 struct nvgpu_mutex cleanup_lock;
167};
168
169struct channel_gk20a_timeout {
170 /* lock protects the running timer state */
171 struct nvgpu_spinlock lock;
172 struct nvgpu_timeout timer;
173 bool running;
174 u32 gp_get;
175 u64 pb_get;
176
177 /* lock not needed */
178 u32 limit_ms;
179 bool enabled;
180 bool debug_dump;
181};
182
183/*
184 * Track refcount actions, saving their stack traces. This number specifies how
185 * many most recent actions are stored in a buffer. Set to 0 to disable. 128
186 * should be enough to track moderately hard problems from the start.
187 */
188#define GK20A_CHANNEL_REFCOUNT_TRACKING 0
189/* Stack depth for the saved actions. */
190#define GK20A_CHANNEL_REFCOUNT_TRACKING_STACKLEN 8
191
192/*
193 * Because the puts and gets are not linked together explicitly (although they
194 * should always come in pairs), it's not possible to tell which ref holder to
195 * delete from the list when doing a put. So, just store some number of most
196 * recent gets and puts in a ring buffer, to obtain a history.
197 *
198 * These are zeroed when a channel is closed, so a new one starts fresh.
199 */
200
201enum channel_gk20a_ref_action_type {
202 channel_gk20a_ref_action_get,
203 channel_gk20a_ref_action_put
204};
205
206#if GK20A_CHANNEL_REFCOUNT_TRACKING
207
208#include <linux/stacktrace.h>
209
210struct channel_gk20a_ref_action {
211 enum channel_gk20a_ref_action_type type;
212 s64 timestamp_ms;
213 /*
214 * Many of these traces will be similar. Simpler to just capture
215 * duplicates than to have a separate database for the entries.
216 */
217 struct stack_trace trace;
218 unsigned long trace_entries[GK20A_CHANNEL_REFCOUNT_TRACKING_STACKLEN];
219};
220#endif
221
222/* this is the priv element of struct nvhost_channel */
223struct channel_gk20a {
224 struct gk20a *g; /* set only when channel is active */
225
226 struct nvgpu_list_node free_chs;
227
228 struct nvgpu_spinlock ref_obtain_lock;
229 nvgpu_atomic_t ref_count;
230 struct nvgpu_cond ref_count_dec_wq;
231#if GK20A_CHANNEL_REFCOUNT_TRACKING
232 /*
233 * Ring buffer for most recent refcount gets and puts. Protected by
234 * ref_actions_lock when getting or putting refs (i.e., adding
235 * entries), and when reading entries.
236 */
237 struct channel_gk20a_ref_action ref_actions[
238 GK20A_CHANNEL_REFCOUNT_TRACKING];
239 size_t ref_actions_put; /* index of next write */
240 struct nvgpu_spinlock ref_actions_lock;
241#endif
242
243 struct nvgpu_semaphore_int *hw_sema;
244
245 nvgpu_atomic_t bound;
246
247 u32 chid;
248 u32 tsgid;
249 pid_t pid;
250 pid_t tgid;
251 struct nvgpu_mutex ioctl_lock;
252
253 struct nvgpu_list_node ch_entry; /* channel's entry in TSG */
254
255 struct channel_gk20a_joblist joblist;
256 struct nvgpu_allocator fence_allocator;
257
258 struct vm_gk20a *vm;
259
260 struct gpfifo_desc gpfifo;
261
262 struct nvgpu_mem usermode_userd; /* Used for Usermode Submission */
263 struct nvgpu_mem usermode_gpfifo;
264 struct nvgpu_mem inst_block;
265
266 u64 userd_iova;
267 u64 userd_gpu_va;
268
269 struct priv_cmd_queue priv_cmd_q;
270
271 struct nvgpu_cond notifier_wq;
272 struct nvgpu_cond semaphore_wq;
273
274 /* kernel watchdog to kill stuck jobs */
275 struct channel_gk20a_timeout timeout;
276
277 /* for job cleanup handling in the background worker */
278 struct nvgpu_list_node worker_item;
279
280#if defined(CONFIG_GK20A_CYCLE_STATS)
281 struct {
282 void *cyclestate_buffer;
283 u32 cyclestate_buffer_size;
284 struct nvgpu_mutex cyclestate_buffer_mutex;
285 } cyclestate;
286
287 struct nvgpu_mutex cs_client_mutex;
288 struct gk20a_cs_snapshot_client *cs_client;
289#endif
290 struct nvgpu_mutex dbg_s_lock;
291 struct nvgpu_list_node dbg_s_list;
292
293 struct nvgpu_mutex sync_lock;
294 struct nvgpu_channel_sync *sync;
295 struct nvgpu_channel_sync *user_sync;
296
297#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
298 u64 virt_ctx;
299#endif
300
301 struct nvgpu_mem ctx_header;
302
303 struct nvgpu_spinlock ch_timedout_lock;
304 bool ch_timedout;
305 /* Any operating system specific data. */
306 void *os_priv;
307
308 u32 obj_class; /* we support only one obj per channel */
309
310 u32 timeout_accumulated_ms;
311 u32 timeout_gpfifo_get;
312
313 u32 subctx_id;
314 u32 runqueue_sel;
315
316 u32 timeout_ms_max;
317 u32 runlist_id;
318
319 bool mmu_nack_handled;
320 bool referenceable;
321 bool vpr;
322 bool deterministic;
323 /* deterministic, but explicitly idle and submits disallowed */
324 bool deterministic_railgate_allowed;
325 bool cde;
326 bool usermode_submit_enabled;
327 bool timeout_debug_dump;
328 bool has_os_fence_framework_support;
329
330 bool is_privileged_channel;
331
332 /**
333 * MMU Debugger Mode is enabled for this channel if refcnt > 0
334 */
335 u32 mmu_debug_mode_refcnt;
336};
337
338static inline struct channel_gk20a *
339channel_gk20a_from_free_chs(struct nvgpu_list_node *node)
340{
341 return (struct channel_gk20a *)
342 ((uintptr_t)node - offsetof(struct channel_gk20a, free_chs));
343};
344
345static inline struct channel_gk20a *
346channel_gk20a_from_ch_entry(struct nvgpu_list_node *node)
347{
348 return (struct channel_gk20a *)
349 ((uintptr_t)node - offsetof(struct channel_gk20a, ch_entry));
350};
351
352static inline struct channel_gk20a *
353channel_gk20a_from_worker_item(struct nvgpu_list_node *node)
354{
355 return (struct channel_gk20a *)
356 ((uintptr_t)node - offsetof(struct channel_gk20a, worker_item));
357};
358
359static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch)
360{
361 return !!ch->vm;
362}
363int channel_gk20a_commit_va(struct channel_gk20a *c);
364int gk20a_init_channel_support(struct gk20a *, u32 chid);
365
366/* must be inside gk20a_busy()..gk20a_idle() */
367void gk20a_channel_close(struct channel_gk20a *ch);
368void __gk20a_channel_kill(struct channel_gk20a *ch);
369
370bool gk20a_channel_update_and_check_timeout(struct channel_gk20a *ch,
371 u32 timeout_delta_ms, bool *progress);
372void gk20a_disable_channel(struct channel_gk20a *ch);
373void gk20a_channel_abort(struct channel_gk20a *ch, bool channel_preempt);
374void gk20a_channel_abort_clean_up(struct channel_gk20a *ch);
375void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events);
376int gk20a_channel_alloc_priv_cmdbuf(struct channel_gk20a *c, u32 size,
377 struct priv_cmd_entry *entry);
378int gk20a_free_priv_cmdbuf(struct channel_gk20a *c, struct priv_cmd_entry *e);
379
380int gk20a_enable_channel_tsg(struct gk20a *g, struct channel_gk20a *ch);
381int gk20a_disable_channel_tsg(struct gk20a *g, struct channel_gk20a *ch);
382
383int gk20a_channel_suspend(struct gk20a *g);
384int gk20a_channel_resume(struct gk20a *g);
385
386void gk20a_channel_deterministic_idle(struct gk20a *g);
387void gk20a_channel_deterministic_unidle(struct gk20a *g);
388
389int nvgpu_channel_worker_init(struct gk20a *g);
390void nvgpu_channel_worker_deinit(struct gk20a *g);
391
392struct channel_gk20a *gk20a_get_channel_from_file(int fd);
393void gk20a_channel_update(struct channel_gk20a *c);
394
395/* returns ch if reference was obtained */
396struct channel_gk20a *__must_check _gk20a_channel_get(struct channel_gk20a *ch,
397 const char *caller);
398#define gk20a_channel_get(ch) _gk20a_channel_get(ch, __func__)
399
400
401void _gk20a_channel_put(struct channel_gk20a *ch, const char *caller);
402#define gk20a_channel_put(ch) _gk20a_channel_put(ch, __func__)
403
404/* returns NULL if could not take a ref to the channel */
405struct channel_gk20a *__must_check _gk20a_channel_from_id(struct gk20a *g,
406 u32 chid, const char *caller);
407#define gk20a_channel_from_id(g, chid) _gk20a_channel_from_id(g, chid, __func__)
408
409int gk20a_wait_channel_idle(struct channel_gk20a *ch);
410
411/* runlist_id -1 is synonym for ENGINE_GR_GK20A runlist id */
412struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
413 s32 runlist_id,
414 bool is_privileged_channel,
415 pid_t pid, pid_t tid);
416
417int nvgpu_channel_setup_bind(struct channel_gk20a *c,
418 struct nvgpu_setup_bind_args *args);
419
420void gk20a_channel_timeout_restart_all_channels(struct gk20a *g);
421
422bool channel_gk20a_is_prealloc_enabled(struct channel_gk20a *c);
423void channel_gk20a_joblist_lock(struct channel_gk20a *c);
424void channel_gk20a_joblist_unlock(struct channel_gk20a *c);
425bool channel_gk20a_joblist_is_empty(struct channel_gk20a *c);
426
427int channel_gk20a_update_runlist(struct channel_gk20a *c, bool add);
428int gk20a_channel_get_timescale_from_timeslice(struct gk20a *g,
429 unsigned int timeslice_period,
430 unsigned int *__timeslice_timeout, unsigned int *__timeslice_scale);
431
432void gk20a_wait_until_counter_is_N(
433 struct channel_gk20a *ch, nvgpu_atomic_t *counter, int wait_value,
434 struct nvgpu_cond *c, const char *caller, const char *counter_name);
435int channel_gk20a_alloc_job(struct channel_gk20a *c,
436 struct channel_gk20a_job **job_out);
437void channel_gk20a_free_job(struct channel_gk20a *c,
438 struct channel_gk20a_job *job);
439u32 nvgpu_get_gp_free_count(struct channel_gk20a *c);
440u32 nvgpu_gp_free_count(struct channel_gk20a *c);
441int gk20a_channel_add_job(struct channel_gk20a *c,
442 struct channel_gk20a_job *job,
443 bool skip_buffer_refcounting);
444void free_priv_cmdbuf(struct channel_gk20a *c,
445 struct priv_cmd_entry *e);
446void gk20a_channel_clean_up_jobs(struct channel_gk20a *c,
447 bool clean_all);
448
449void gk20a_channel_free_usermode_buffers(struct channel_gk20a *c);
450u32 nvgpu_get_gpfifo_entry_size(void);
451
452int nvgpu_submit_channel_gpfifo_user(struct channel_gk20a *c,
453 struct nvgpu_gpfifo_userdata userdata,
454 u32 num_entries,
455 u32 flags,
456 struct nvgpu_channel_fence *fence,
457 struct gk20a_fence **fence_out,
458 struct fifo_profile_gk20a *profile);
459
460int nvgpu_submit_channel_gpfifo_kernel(struct channel_gk20a *c,
461 struct nvgpu_gpfifo_entry *gpfifo,
462 u32 num_entries,
463 u32 flags,
464 struct nvgpu_channel_fence *fence,
465 struct gk20a_fence **fence_out);
466
467#ifdef CONFIG_DEBUG_FS
468void trace_write_pushbuffers(struct channel_gk20a *c, u32 count);
469#else
470static inline void trace_write_pushbuffers(struct channel_gk20a *c, u32 count)
471{
472}
473#endif
474
475void gk20a_channel_set_timedout(struct channel_gk20a *ch);
476bool gk20a_channel_check_timedout(struct channel_gk20a *ch);
477
478#endif
diff --git a/include/nvgpu/channel_sync.h b/include/nvgpu/channel_sync.h
deleted file mode 100644
index f0b2b86..0000000
--- a/include/nvgpu/channel_sync.h
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 *
3 * Nvgpu Channel Synchronization Abstraction
4 *
5 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
24 */
25
26#ifndef NVGPU_CHANNEL_SYNC_H
27#define NVGPU_CHANNEL_SYNC_H
28
29#include <nvgpu/atomic.h>
30
31struct nvgpu_channel_sync;
32struct priv_cmd_entry;
33struct channel_gk20a;
34struct gk20a_fence;
35struct gk20a;
36struct nvgpu_semaphore;
37
38struct nvgpu_channel_sync {
39 nvgpu_atomic_t refcount;
40
41 /* Generate a gpu wait cmdbuf from syncpoint.
42 * Returns a gpu cmdbuf that performs the wait when executed
43 */
44 int (*wait_syncpt)(struct nvgpu_channel_sync *s, u32 id, u32 thresh,
45 struct priv_cmd_entry *entry);
46
47 /* Generate a gpu wait cmdbuf from sync fd.
48 * Returns a gpu cmdbuf that performs the wait when executed
49 */
50 int (*wait_fd)(struct nvgpu_channel_sync *s, int fd,
51 struct priv_cmd_entry *entry, int max_wait_cmds);
52
53 /* Increment syncpoint/semaphore.
54 * Returns
55 * - a gpu cmdbuf that performs the increment when executed,
56 * - a fence that can be passed to wait_cpu() and is_expired().
57 */
58 int (*incr)(struct nvgpu_channel_sync *s,
59 struct priv_cmd_entry *entry,
60 struct gk20a_fence *fence,
61 bool need_sync_fence,
62 bool register_irq);
63
64 /* Increment syncpoint/semaphore, so that the returned fence represents
65 * work completion (may need wfi) and can be returned to user space.
66 * Returns
67 * - a gpu cmdbuf that performs the increment when executed,
68 * - a fence that can be passed to wait_cpu() and is_expired(),
69 * - a gk20a_fence that signals when the incr has happened.
70 */
71 int (*incr_user)(struct nvgpu_channel_sync *s,
72 int wait_fence_fd,
73 struct priv_cmd_entry *entry,
74 struct gk20a_fence *fence,
75 bool wfi,
76 bool need_sync_fence,
77 bool register_irq);
78
79 /* Reset the channel syncpoint/semaphore. */
80 void (*set_min_eq_max)(struct nvgpu_channel_sync *s);
81
82 /*
83 * Set the channel syncpoint/semaphore to safe state
84 * This should be used to reset User managed syncpoint since we don't
85 * track threshold values for those syncpoints
86 */
87 void (*set_safe_state)(struct nvgpu_channel_sync *s);
88
89 /* Returns the sync point id or negative number if no syncpt*/
90 int (*syncpt_id)(struct nvgpu_channel_sync *s);
91
92 /* Returns the sync point address of sync point or 0 if not supported */
93 u64 (*syncpt_address)(struct nvgpu_channel_sync *s);
94
95 /* Free the resources allocated by nvgpu_channel_sync_create. */
96 void (*destroy)(struct nvgpu_channel_sync *s);
97};
98
99void channel_sync_semaphore_gen_wait_cmd(struct channel_gk20a *c,
100 struct nvgpu_semaphore *sema, struct priv_cmd_entry *wait_cmd,
101 u32 wait_cmd_size, u32 pos);
102
103int channel_sync_syncpt_gen_wait_cmd(struct channel_gk20a *c,
104 u32 id, u32 thresh, struct priv_cmd_entry *wait_cmd,
105 u32 wait_cmd_size, u32 pos, bool preallocated);
106
107void nvgpu_channel_sync_destroy(struct nvgpu_channel_sync *sync,
108 bool set_safe_state);
109struct nvgpu_channel_sync *nvgpu_channel_sync_create(struct channel_gk20a *c,
110 bool user_managed);
111bool nvgpu_channel_sync_needs_os_fence_framework(struct gk20a *g);
112
113#endif /* NVGPU_CHANNEL_SYNC_H */
diff --git a/include/nvgpu/circ_buf.h b/include/nvgpu/circ_buf.h
deleted file mode 100644
index 76998ca..0000000
--- a/include/nvgpu/circ_buf.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_CIRC_BUF_H
23#define NVGPU_CIRC_BUF_H
24
25#ifdef __KERNEL__
26#include <linux/circ_buf.h>
27#elif defined(__NVGPU_POSIX__)
28#include <nvgpu/posix/circ_buf.h>
29#endif
30
31#endif /* NVGPU_CIRC_BUF_H */
diff --git a/include/nvgpu/clk.h b/include/nvgpu/clk.h
deleted file mode 100644
index 62bb0f9..0000000
--- a/include/nvgpu/clk.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_CLK_H__
24#define __NVGPU_CLK_H__
25
26#define CLK_NAME_MAX 24
27
28struct namemap_cfg {
29 u32 namemap;
30 u32 is_enable; /* Namemap enabled */
31 u32 is_counter; /* Using cntr */
32 struct gk20a *g;
33 struct {
34 u32 reg_ctrl_addr;
35 u32 reg_ctrl_idx;
36 u32 reg_cntr_addr;
37 } cntr;
38 u32 scale;
39 char name[CLK_NAME_MAX];
40};
41
42#endif
diff --git a/include/nvgpu/clk_arb.h b/include/nvgpu/clk_arb.h
deleted file mode 100644
index 43af631..0000000
--- a/include/nvgpu/clk_arb.h
+++ /dev/null
@@ -1,378 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_CLK_ARB_H
24#define NVGPU_CLK_ARB_H
25
26struct gk20a;
27
28#include <nvgpu/types.h>
29#include <nvgpu/bitops.h>
30#include <nvgpu/lock.h>
31#include <nvgpu/kmem.h>
32#include <nvgpu/atomic.h>
33#include <nvgpu/bug.h>
34#include <nvgpu/kref.h>
35#include <nvgpu/log.h>
36#include <nvgpu/barrier.h>
37#include <nvgpu/cond.h>
38
39#include "clk/clk.h"
40#include "pstate/pstate.h"
41#include "lpwr/lpwr.h"
42#include "volt/volt.h"
43
44#define MAX_F_POINTS 256
45#define DEFAULT_EVENT_NUMBER 32
46
47struct nvgpu_clk_dev;
48struct nvgpu_clk_arb_target;
49struct nvgpu_clk_notification_queue;
50struct nvgpu_clk_session;
51
52#define VF_POINT_INVALID_PSTATE ~0U
53#define VF_POINT_SET_PSTATE_SUPPORTED(a, b) ((a)->pstates |= (1UL << (b)))
54#define VF_POINT_GET_PSTATE(a) (((a)->pstates) ?\
55 __fls((a)->pstates) :\
56 VF_POINT_INVALID_PSTATE)
57#define VF_POINT_COMMON_PSTATE(a, b) (((a)->pstates & (b)->pstates) ?\
58 __fls((a)->pstates & (b)->pstates) :\
59 VF_POINT_INVALID_PSTATE)
60
61/*
62 * These events, defined in common code are the counterparts of the uapi
63 * events. There should be a conversion function to take care to convert
64 * these to the uapi events.
65 */
66/* Event associated to a VF update */
67#define NVGPU_EVENT_VF_UPDATE 0
68
69/* Recoverable alarms (POLLPRI) */
70/* Alarm when target frequency on any session is not possible */
71#define NVGPU_EVENT_ALARM_TARGET_VF_NOT_POSSIBLE 1
72/* Alarm when target frequency on current session is not possible */
73#define NVGPU_EVENT_ALARM_LOCAL_TARGET_VF_NOT_POSSIBLE 2
74/* Alarm when Clock Arbiter failed */
75#define NVGPU_EVENT_ALARM_CLOCK_ARBITER_FAILED 3
76/* Alarm when VF table update failed */
77#define NVGPU_EVENT_ALARM_VF_TABLE_UPDATE_FAILED 4
78/* Alarm on thermal condition */
79#define NVGPU_EVENT_ALARM_THERMAL_ABOVE_THRESHOLD 5
80/* Alarm on power condition */
81#define NVGPU_EVENT_ALARM_POWER_ABOVE_THRESHOLD 6
82
83/* Non recoverable alarm (POLLHUP) */
84/* Alarm on GPU shutdown/fall from bus */
85#define NVGPU_EVENT_ALARM_GPU_LOST 7
86
87#define NVGPU_EVENT_LAST NVGPU_EVENT_ALARM_GPU_LOST
88
89/* Local Alarms */
90#define EVENT(alarm) (0x1UL << NVGPU_EVENT_##alarm)
91
92#define LOCAL_ALARM_MASK (EVENT(ALARM_LOCAL_TARGET_VF_NOT_POSSIBLE) | \
93 EVENT(VF_UPDATE))
94
95#define _WRAPGTEQ(a, b) ((a-b) > 0)
96
97/*
98 * NVGPU_POLL* defines equivalent to the POLL* linux defines
99 */
100#define NVGPU_POLLIN (1 << 0)
101#define NVGPU_POLLPRI (1 << 1)
102#define NVGPU_POLLOUT (1 << 2)
103#define NVGPU_POLLRDNORM (1 << 3)
104#define NVGPU_POLLHUP (1 << 4)
105
106/* NVGPU_CLK_DOMAIN_* defines equivalent to NVGPU_GPU_CLK_DOMAIN_*
107 * defines in uapi header
108 */
109/* Memory clock */
110#define NVGPU_CLK_DOMAIN_MCLK (0)
111/* Main graphics core clock */
112#define NVGPU_CLK_DOMAIN_GPCCLK (1)
113
114#define NVGPU_CLK_DOMAIN_MAX (NVGPU_CLK_DOMAIN_GPCCLK)
115
116#define clk_arb_dbg(g, fmt, args...) \
117 do { \
118 nvgpu_log(g, gpu_dbg_clk_arb, \
119 fmt, ##args); \
120 } while (0)
121
122struct nvgpu_clk_notification {
123 u32 notification;
124 u64 timestamp;
125};
126
127struct nvgpu_clk_notification_queue {
128 u32 size;
129 nvgpu_atomic_t head;
130 nvgpu_atomic_t tail;
131 struct nvgpu_clk_notification *notifications;
132};
133
134struct nvgpu_clk_vf_point {
135 u16 pstates;
136 union {
137 struct {
138 u16 gpc_mhz;
139 u16 sys_mhz;
140 u16 xbar_mhz;
141 };
142 u16 mem_mhz;
143 };
144 u32 uvolt;
145 u32 uvolt_sram;
146};
147
148struct nvgpu_clk_vf_table {
149 u32 mclk_num_points;
150 struct nvgpu_clk_vf_point *mclk_points;
151 u32 gpc2clk_num_points;
152 struct nvgpu_clk_vf_point *gpc2clk_points;
153};
154#ifdef CONFIG_DEBUG_FS
155struct nvgpu_clk_arb_debug {
156 s64 switch_max;
157 s64 switch_min;
158 u64 switch_num;
159 s64 switch_avg;
160 s64 switch_std;
161};
162#endif
163
164struct nvgpu_clk_arb_target {
165 u16 mclk;
166 u16 gpc2clk;
167 u32 pstate;
168};
169
170enum clk_arb_work_item_type {
171 CLK_ARB_WORK_UPDATE_VF_TABLE,
172 CLK_ARB_WORK_UPDATE_ARB
173};
174
175struct nvgpu_clk_arb_work_item {
176 enum clk_arb_work_item_type item_type;
177 struct nvgpu_clk_arb *arb;
178 struct nvgpu_list_node worker_item;
179};
180
181struct nvgpu_clk_arb {
182 struct nvgpu_spinlock sessions_lock;
183 struct nvgpu_spinlock users_lock;
184 struct nvgpu_spinlock requests_lock;
185
186 struct nvgpu_mutex pstate_lock;
187 struct nvgpu_list_node users;
188 struct nvgpu_list_node sessions;
189 struct nvgpu_list_node requests;
190
191 struct gk20a *g;
192 int status;
193
194 struct nvgpu_clk_arb_target actual_pool[2];
195 struct nvgpu_clk_arb_target *actual;
196
197 u16 gpc2clk_default_mhz;
198 u16 mclk_default_mhz;
199 u32 voltuv_actual;
200
201 u16 gpc2clk_min, gpc2clk_max;
202 u16 mclk_min, mclk_max;
203
204 struct nvgpu_clk_arb_work_item update_vf_table_work_item;
205 struct nvgpu_clk_arb_work_item update_arb_work_item;
206
207 struct nvgpu_cond request_wq;
208
209 struct nvgpu_clk_vf_table *current_vf_table;
210 struct nvgpu_clk_vf_table vf_table_pool[2];
211 u32 vf_table_index;
212
213 u16 *mclk_f_points;
214 nvgpu_atomic_t req_nr;
215
216 u32 mclk_f_numpoints;
217 u16 *gpc2clk_f_points;
218 u32 gpc2clk_f_numpoints;
219
220 bool clk_arb_events_supported;
221
222 nvgpu_atomic64_t alarm_mask;
223 struct nvgpu_clk_notification_queue notification_queue;
224
225#ifdef CONFIG_DEBUG_FS
226 struct nvgpu_clk_arb_debug debug_pool[2];
227 struct nvgpu_clk_arb_debug *debug;
228 bool debugfs_set;
229#endif
230};
231
232struct nvgpu_clk_dev {
233 struct nvgpu_clk_session *session;
234 union {
235 struct nvgpu_list_node link;
236 struct nvgpu_list_node node;
237 };
238 struct nvgpu_cond readout_wq;
239 nvgpu_atomic_t poll_mask;
240 u16 gpc2clk_target_mhz;
241 u16 mclk_target_mhz;
242 u32 alarms_reported;
243 nvgpu_atomic_t enabled_mask;
244 struct nvgpu_clk_notification_queue queue;
245 u32 arb_queue_head;
246 struct nvgpu_ref refcount;
247};
248
249struct nvgpu_clk_session {
250 bool zombie;
251 struct gk20a *g;
252 struct nvgpu_ref refcount;
253 struct nvgpu_list_node link;
254 struct nvgpu_list_node targets;
255
256 struct nvgpu_spinlock session_lock;
257 struct nvgpu_clk_arb_target target_pool[2];
258 struct nvgpu_clk_arb_target *target;
259};
260
261static inline struct nvgpu_clk_session *
262nvgpu_clk_session_from_link(struct nvgpu_list_node *node)
263{
264 return (struct nvgpu_clk_session *)
265 ((uintptr_t)node - offsetof(struct nvgpu_clk_session, link));
266};
267
268static inline struct nvgpu_clk_dev *
269nvgpu_clk_dev_from_node(struct nvgpu_list_node *node)
270{
271 return (struct nvgpu_clk_dev *)
272 ((uintptr_t)node - offsetof(struct nvgpu_clk_dev, node));
273};
274
275static inline struct nvgpu_clk_dev *
276nvgpu_clk_dev_from_link(struct nvgpu_list_node *node)
277{
278 return (struct nvgpu_clk_dev *)
279 ((uintptr_t)node - offsetof(struct nvgpu_clk_dev, link));
280};
281
282static inline struct nvgpu_clk_arb_work_item *
283nvgpu_clk_arb_work_item_from_worker_item(struct nvgpu_list_node *node)
284{
285 return (struct nvgpu_clk_arb_work_item *)
286 ((uintptr_t)node - offsetof(struct nvgpu_clk_arb_work_item, worker_item));
287};
288
289void nvgpu_clk_arb_worker_enqueue(struct gk20a *g,
290 struct nvgpu_clk_arb_work_item *work_item);
291
292int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb);
293
294int nvgpu_clk_arb_worker_init(struct gk20a *g);
295
296int nvgpu_clk_arb_init_arbiter(struct gk20a *g);
297
298bool nvgpu_clk_arb_has_active_req(struct gk20a *g);
299
300int nvgpu_clk_arb_get_arbiter_clk_range(struct gk20a *g, u32 api_domain,
301 u16 *min_mhz, u16 *max_mhz);
302
303int nvgpu_clk_arb_get_arbiter_actual_mhz(struct gk20a *g,
304 u32 api_domain, u16 *actual_mhz);
305
306int nvgpu_clk_arb_get_arbiter_effective_mhz(struct gk20a *g,
307 u32 api_domain, u16 *effective_mhz);
308
309int nvgpu_clk_arb_get_arbiter_clk_f_points(struct gk20a *g,
310 u32 api_domain, u32 *max_points, u16 *fpoints);
311
312u32 nvgpu_clk_arb_get_arbiter_clk_domains(struct gk20a *g);
313bool nvgpu_clk_arb_is_valid_domain(struct gk20a *g, u32 api_domain);
314
315void nvgpu_clk_arb_cleanup_arbiter(struct gk20a *g);
316
317int nvgpu_clk_arb_install_session_fd(struct gk20a *g,
318 struct nvgpu_clk_session *session);
319
320int nvgpu_clk_arb_init_session(struct gk20a *g,
321 struct nvgpu_clk_session **_session);
322
323void nvgpu_clk_arb_release_session(struct gk20a *g,
324 struct nvgpu_clk_session *session);
325
326int nvgpu_clk_arb_commit_request_fd(struct gk20a *g,
327 struct nvgpu_clk_session *session, int request_fd);
328
329int nvgpu_clk_arb_set_session_target_mhz(struct nvgpu_clk_session *session,
330 int fd, u32 api_domain, u16 target_mhz);
331
332int nvgpu_clk_arb_get_session_target_mhz(struct nvgpu_clk_session *session,
333 u32 api_domain, u16 *target_mhz);
334
335int nvgpu_clk_arb_install_event_fd(struct gk20a *g,
336 struct nvgpu_clk_session *session, int *event_fd, u32 alarm_mask);
337
338int nvgpu_clk_arb_install_request_fd(struct gk20a *g,
339 struct nvgpu_clk_session *session, int *event_fd);
340
341void nvgpu_clk_arb_schedule_vf_table_update(struct gk20a *g);
342
343int nvgpu_clk_arb_get_current_pstate(struct gk20a *g);
344
345void nvgpu_clk_arb_pstate_change_lock(struct gk20a *g, bool lock);
346
347void nvgpu_clk_arb_send_thermal_alarm(struct gk20a *g);
348
349void nvgpu_clk_arb_set_global_alarm(struct gk20a *g, u32 alarm);
350
351void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm);
352
353void nvgpu_clk_arb_clear_global_alarm(struct gk20a *g, u32 alarm);
354
355void nvgpu_clk_arb_free_session(struct nvgpu_ref *refcount);
356
357void nvgpu_clk_arb_free_fd(struct nvgpu_ref *refcount);
358
359u32 nvgpu_clk_arb_notify(struct nvgpu_clk_dev *dev,
360 struct nvgpu_clk_arb_target *target,
361 u32 alarm);
362
363int nvgpu_clk_notification_queue_alloc(struct gk20a *g,
364 struct nvgpu_clk_notification_queue *queue,
365 size_t events_number);
366
367void nvgpu_clk_notification_queue_free(struct gk20a *g,
368 struct nvgpu_clk_notification_queue *queue);
369
370void nvgpu_clk_arb_event_post_event(struct nvgpu_clk_dev *dev);
371
372unsigned long nvgpu_clk_measure_freq(struct gk20a *g, u32 api_domain);
373
374#ifdef CONFIG_DEBUG_FS
375int nvgpu_clk_arb_debugfs_init(struct gk20a *g);
376#endif
377#endif /* NVGPU_CLK_ARB_H */
378
diff --git a/include/nvgpu/comptags.h b/include/nvgpu/comptags.h
deleted file mode 100644
index 3df1b6f..0000000
--- a/include/nvgpu/comptags.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_COMPTAGS_H
24#define NVGPU_COMPTAGS_H
25
26#include <nvgpu/lock.h>
27#include <nvgpu/types.h>
28
29struct gk20a;
30struct nvgpu_os_buffer;
31
32struct gk20a_comptags {
33 u32 offset;
34 u32 lines;
35
36 /*
37 * This signals whether allocation has been attempted. Observe 'lines'
38 * to see whether the comptags were actually allocated. We try alloc
39 * only once per buffer in order not to break multiple compressible-kind
40 * mappings.
41 */
42 bool allocated;
43
44 /*
45 * Do comptags need to be cleared before mapping?
46 */
47 bool needs_clear;
48};
49
50struct gk20a_comptag_allocator {
51 struct gk20a *g;
52
53 struct nvgpu_mutex lock;
54
55 /* This bitmap starts at ctag 1. 0th cannot be taken. */
56 unsigned long *bitmap;
57
58 /* Size of bitmap, not max ctags, so one less. */
59 unsigned long size;
60};
61
62/* real size here, but first (ctag 0) isn't used */
63int gk20a_comptag_allocator_init(struct gk20a *g,
64 struct gk20a_comptag_allocator *allocator,
65 unsigned long size);
66void gk20a_comptag_allocator_destroy(struct gk20a *g,
67 struct gk20a_comptag_allocator *allocator);
68
69int gk20a_comptaglines_alloc(struct gk20a_comptag_allocator *allocator,
70 u32 *offset, u32 len);
71void gk20a_comptaglines_free(struct gk20a_comptag_allocator *allocator,
72 u32 offset, u32 len);
73
74/*
75 * Defined by OS specific code since comptags are stored in a highly OS specific
76 * way.
77 */
78int gk20a_alloc_or_get_comptags(struct gk20a *g,
79 struct nvgpu_os_buffer *buf,
80 struct gk20a_comptag_allocator *allocator,
81 struct gk20a_comptags *comptags);
82void gk20a_get_comptags(struct nvgpu_os_buffer *buf,
83 struct gk20a_comptags *comptags);
84
85/*
86 * These functions must be used to synchronize comptags clear. The usage:
87 *
88 * if (gk20a_comptags_start_clear(os_buf)) {
89 * // we now hold the buffer lock for clearing
90 *
91 * bool successful = hw_clear_comptags();
92 *
93 * // mark the buf cleared (or not) and release the buffer lock
94 * gk20a_comptags_finish_clear(os_buf, successful);
95 * }
96 *
97 * If gk20a_start_comptags_clear() returns false, another caller has
98 * already cleared the comptags.
99 */
100bool gk20a_comptags_start_clear(struct nvgpu_os_buffer *buf);
101void gk20a_comptags_finish_clear(struct nvgpu_os_buffer *buf,
102 bool clear_successful);
103
104#endif /* NVGPU_COMPTAGS_H */
diff --git a/include/nvgpu/cond.h b/include/nvgpu/cond.h
deleted file mode 100644
index 49e9d1f..0000000
--- a/include/nvgpu/cond.h
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_COND_H
24#define NVGPU_COND_H
25
26#ifdef __KERNEL__
27#include <nvgpu/linux/cond.h>
28#elif defined(__NVGPU_POSIX__)
29#include <nvgpu/posix/cond.h>
30#else
31#include <nvgpu_rmos/include/cond.h>
32#endif
33
34/*
35 * struct nvgpu_cond
36 *
37 * Should be implemented per-OS in a separate library
38 */
39struct nvgpu_cond;
40
41/**
42 * nvgpu_cond_init - Initialize a condition variable
43 *
44 * @cond - The condition variable to initialize
45 *
46 * Initialize a condition variable before using it.
47 */
48int nvgpu_cond_init(struct nvgpu_cond *cond);
49
50/**
51 * nvgpu_cond_signal - Signal a condition variable
52 *
53 * @cond - The condition variable to signal
54 *
55 * Wake up a waiter for a condition variable to check if its condition has been
56 * satisfied.
57 *
58 * The waiter is using an uninterruptible wait.
59 */
60int nvgpu_cond_signal(struct nvgpu_cond *cond);
61
62/**
63 * nvgpu_cond_signal_interruptible - Signal a condition variable
64 *
65 * @cond - The condition variable to signal
66 *
67 * Wake up a waiter for a condition variable to check if its condition has been
68 * satisfied.
69 *
70 * The waiter is using an interruptible wait.
71 */
72int nvgpu_cond_signal_interruptible(struct nvgpu_cond *cond);
73
74/**
75 * nvgpu_cond_broadcast - Signal all waiters of a condition variable
76 *
77 * @cond - The condition variable to signal
78 *
79 * Wake up all waiters for a condition variable to check if their conditions
80 * have been satisfied.
81 *
82 * The waiters are using an uninterruptible wait.
83 */
84int nvgpu_cond_broadcast(struct nvgpu_cond *cond);
85
86/**
87 * nvgpu_cond_broadcast_interruptible - Signal all waiters of a condition
88 * variable
89 *
90 * @cond - The condition variable to signal
91 *
92 * Wake up all waiters for a condition variable to check if their conditions
93 * have been satisfied.
94 *
95 * The waiters are using an interruptible wait.
96 */
97int nvgpu_cond_broadcast_interruptible(struct nvgpu_cond *cond);
98
99/**
100 * nvgpu_cond_destroy - Destroy a condition variable
101 *
102 * @cond - The condition variable to destroy
103 */
104void nvgpu_cond_destroy(struct nvgpu_cond *cond);
105
106#endif /* NVGPU_COND_H */
diff --git a/include/nvgpu/ctxsw_trace.h b/include/nvgpu/ctxsw_trace.h
deleted file mode 100644
index 033e020..0000000
--- a/include/nvgpu/ctxsw_trace.h
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_CTXSW_TRACE_H
24#define NVGPU_CTXSW_TRACE_H
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29struct tsg_gk20a;
30struct channel_gk20a;
31
32#define NVGPU_GPU_CTXSW_TAG_SOF 0x00
33#define NVGPU_GPU_CTXSW_TAG_CTXSW_REQ_BY_HOST 0x01
34#define NVGPU_GPU_CTXSW_TAG_FE_ACK 0x02
35#define NVGPU_GPU_CTXSW_TAG_FE_ACK_WFI 0x0a
36#define NVGPU_GPU_CTXSW_TAG_FE_ACK_GFXP 0x0b
37#define NVGPU_GPU_CTXSW_TAG_FE_ACK_CTAP 0x0c
38#define NVGPU_GPU_CTXSW_TAG_FE_ACK_CILP 0x0d
39#define NVGPU_GPU_CTXSW_TAG_SAVE_END 0x03
40#define NVGPU_GPU_CTXSW_TAG_RESTORE_START 0x04
41#define NVGPU_GPU_CTXSW_TAG_CONTEXT_START 0x05
42#define NVGPU_GPU_CTXSW_TAG_ENGINE_RESET 0xfe
43#define NVGPU_GPU_CTXSW_TAG_INVALID_TIMESTAMP 0xff
44#define NVGPU_GPU_CTXSW_TAG_LAST \
45 NVGPU_GPU_CTXSW_TAG_INVALID_TIMESTAMP
46
47#define NVGPU_GPU_CTXSW_FILTER_ISSET(n, p) \
48 ((p)->tag_bits[(n) / 64] & (1 << ((n) & 63)))
49
50#define NVGPU_GPU_CTXSW_FILTER_SIZE (NVGPU_GPU_CTXSW_TAG_LAST + 1)
51#define NVGPU_FECS_TRACE_FEATURE_CONTROL_BIT 31
52
53struct nvgpu_gpu_ctxsw_trace_filter {
54 u64 tag_bits[(NVGPU_GPU_CTXSW_FILTER_SIZE + 63) / 64];
55};
56
57/*
58 * The binary format of 'struct nvgpu_gpu_ctxsw_trace_entry' introduced here
59 * should match that of 'struct nvgpu_ctxsw_trace_entry' defined in uapi
60 * header, since this struct is intended to be a mirror copy of the uapi
61 * struct.
62 */
63struct nvgpu_gpu_ctxsw_trace_entry {
64 u8 tag;
65 u8 vmid;
66 u16 seqno; /* sequence number to detect drops */
67 u32 context_id; /* context_id as allocated by FECS */
68 u64 pid; /* 64-bit is max bits of different OS pid */
69 u64 timestamp; /* 64-bit time */
70};
71
72int gk20a_ctxsw_trace_init(struct gk20a *g);
73
74void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch);
75void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg);
76
77void gk20a_ctxsw_trace_cleanup(struct gk20a *g);
78int gk20a_ctxsw_trace_write(struct gk20a *g,
79 struct nvgpu_gpu_ctxsw_trace_entry *entry);
80void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid);
81
82#ifdef CONFIG_GK20A_CTXSW_TRACE
83struct file;
84struct vm_area_struct;
85
86int gk20a_ctxsw_dev_mmap(struct file *filp, struct vm_area_struct *vma);
87int gk20a_ctxsw_dev_ring_alloc(struct gk20a *g, void **buf, size_t *size);
88int gk20a_ctxsw_dev_ring_free(struct gk20a *g);
89int gk20a_ctxsw_dev_mmap_buffer(struct gk20a *g, struct vm_area_struct *vma);
90#endif
91
92u8 nvgpu_gpu_ctxsw_tags_to_common_tags(u8 tags);
93
94#endif /*NVGPU_CTXSW_TRACE_H */
diff --git a/include/nvgpu/debug.h b/include/nvgpu/debug.h
deleted file mode 100644
index 33bf621..0000000
--- a/include/nvgpu/debug.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * GK20A Debug functionality
3 *
4 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef NVGPU_DEBUG_H
26#define NVGPU_DEBUG_H
27
28#include <nvgpu/types.h>
29
30struct gk20a;
31struct gpu_ops;
32
33struct gk20a_debug_output {
34 void (*fn)(void *ctx, const char *str, size_t len);
35 void *ctx;
36 char buf[256];
37};
38
39#ifdef CONFIG_DEBUG_FS
40extern unsigned int gk20a_debug_trace_cmdbuf;
41
42void gk20a_debug_output(struct gk20a_debug_output *o,
43 const char *fmt, ...);
44
45void gk20a_debug_dump(struct gk20a *g);
46void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o);
47int gk20a_gr_debug_dump(struct gk20a *g);
48void gk20a_init_debug_ops(struct gpu_ops *gops);
49
50void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink);
51void gk20a_debug_deinit(struct gk20a *g);
52#else
53static inline void gk20a_debug_output(struct gk20a_debug_output *o,
54 const char *fmt, ...) {}
55
56static inline void gk20a_debug_dump(struct gk20a *g) {}
57static inline void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o) {}
58static inline int gk20a_gr_debug_dump(struct gk20a *g) { return 0;}
59static inline void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) {}
60static inline void gk20a_debug_deinit(struct gk20a *g) {}
61#endif
62
63#endif /* NVGPU_DEBUG_H */
diff --git a/include/nvgpu/defaults.h b/include/nvgpu/defaults.h
deleted file mode 100644
index cae380a..0000000
--- a/include/nvgpu/defaults.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_DEFAULTS_H__
24#define __NVGPU_DEFAULTS_H__
25
26/*
27 * Default timeout used for channel watchdog and ctxsw timeout.
28 */
29#define NVGPU_DEFAULT_GR_IDLE_TIMEOUT 3000
30
31#define NVGPU_DEFAULT_RAILGATE_IDLE_TIMEOUT 500
32
33#endif
diff --git a/include/nvgpu/dma.h b/include/nvgpu/dma.h
deleted file mode 100644
index cbb829b..0000000
--- a/include/nvgpu/dma.h
+++ /dev/null
@@ -1,361 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_DMA_H
24#define NVGPU_DMA_H
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29struct vm_gk20a;
30struct nvgpu_mem;
31
32/*
33 * Flags for the below nvgpu_dma_{alloc,alloc_map}_flags*
34 */
35
36/*
37 * Don't create a virtual kernel mapping for the buffer but only allocate it;
38 * this may save some resources. The buffer can be mapped later explicitly.
39 */
40#define NVGPU_DMA_NO_KERNEL_MAPPING BIT32(0)
41
42/*
43 * Don't allow building the buffer from individual pages but require a
44 * physically contiguous block.
45 */
46#define NVGPU_DMA_FORCE_CONTIGUOUS BIT32(1)
47
48/*
49 * Make the mapping read-only.
50 */
51#define NVGPU_DMA_READ_ONLY BIT32(2)
52
53/**
54 * nvgpu_iommuable - Check if GPU is behind IOMMU
55 *
56 * @g - The GPU.
57 *
58 * Returns true if the passed GPU is behind an IOMMU; false otherwise. If the
59 * GPU is iommuable then the DMA address in nvgpu_mem_sgl is valid.
60 *
61 * Note that even if a GPU is behind an IOMMU that does not necessarily mean the
62 * GPU _must_ use DMA addresses. GPUs may still use physical addresses if it
63 * makes sense.
64 */
65bool nvgpu_iommuable(struct gk20a *g);
66
67/**
68 * nvgpu_dma_alloc - Allocate DMA memory
69 *
70 * @g - The GPU.
71 * @size - Size of the allocation in bytes.
72 * @mem - Struct for storing the allocation information.
73 *
74 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
75 * Returns 0 on success and a suitable error code when there's an error. This
76 * memory can be either placed in VIDMEM or SYSMEM, which ever is more
77 * convenient for the driver.
78 */
79int nvgpu_dma_alloc(struct gk20a *g, size_t size, struct nvgpu_mem *mem);
80
81/**
82 * nvgpu_dma_alloc_flags - Allocate DMA memory
83 *
84 * @g - The GPU.
85 * @flags - Flags modifying the operation of the DMA allocation.
86 * @size - Size of the allocation in bytes.
87 * @mem - Struct for storing the allocation information.
88 *
89 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
90 * Returns 0 on success and a suitable error code when there's an error. This
91 * memory can be either placed in VIDMEM or SYSMEM, which ever is more
92 * convenient for the driver.
93 *
94 * The following flags are accepted:
95 *
96 * %NVGPU_DMA_NO_KERNEL_MAPPING
97 * %NVGPU_DMA_FORCE_CONTIGUOUS
98 * %NVGPU_DMA_READ_ONLY
99 */
100int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size,
101 struct nvgpu_mem *mem);
102
103/**
104 * nvgpu_dma_alloc_sys - Allocate DMA memory
105 *
106 * @g - The GPU.
107 * @size - Size of the allocation in bytes.
108 * @mem - Struct for storing the allocation information.
109 *
110 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
111 * Returns 0 on success and a suitable error code when there's an error. This
112 * allocates memory specifically in SYSMEM.
113 */
114int nvgpu_dma_alloc_sys(struct gk20a *g, size_t size, struct nvgpu_mem *mem);
115
116/**
117 * nvgpu_dma_alloc_flags_sys - Allocate DMA memory
118 *
119 * @g - The GPU.
120 * @flags - Flags modifying the operation of the DMA allocation.
121 * @size - Size of the allocation in bytes.
122 * @mem - Struct for storing the allocation information.
123 *
124 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
125 * Returns 0 on success and a suitable error code when there's an error. This
126 * allocates memory specifically in SYSMEM.
127 *
128 * The following flags are accepted:
129 *
130 * %NVGPU_DMA_NO_KERNEL_MAPPING
131 * %NVGPU_DMA_FORCE_CONTIGUOUS
132 * %NVGPU_DMA_READ_ONLY
133 */
134int nvgpu_dma_alloc_flags_sys(struct gk20a *g, unsigned long flags,
135 size_t size, struct nvgpu_mem *mem);
136
137/**
138 * nvgpu_dma_alloc_vid - Allocate DMA memory
139 *
140 * @g - The GPU.
141 * @size - Size of the allocation in bytes.
142 * @mem - Struct for storing the allocation information.
143 *
144 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
145 * Returns 0 on success and a suitable error code when there's an error. This
146 * allocates memory specifically in VIDMEM.
147 */
148int nvgpu_dma_alloc_vid(struct gk20a *g, size_t size, struct nvgpu_mem *mem);
149
150/**
151 * nvgpu_dma_alloc_flags_vid - Allocate DMA memory
152 *
153 * @g - The GPU.
154 * @flags - Flags modifying the operation of the DMA allocation.
155 * @size - Size of the allocation in bytes.
156 * @mem - Struct for storing the allocation information.
157 *
158 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
159 * Returns 0 on success and a suitable error code when there's an error. This
160 * allocates memory specifically in VIDMEM.
161 *
162 * Only the following flags are accepted:
163 *
164 * %NVGPU_DMA_NO_KERNEL_MAPPING
165 *
166 */
167int nvgpu_dma_alloc_flags_vid(struct gk20a *g, unsigned long flags,
168 size_t size, struct nvgpu_mem *mem);
169
170
171/**
172 * nvgpu_dma_alloc_flags_vid_at - Allocate DMA memory
173 *
174 * @g - The GPU.
175 * @size - Size of the allocation in bytes.
176 * @mem - Struct for storing the allocation information.
177 * @at - A specific location to attempt to allocate memory from or 0 if the
178 * caller does not care what the address is.
179 *
180 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
181 * Returns 0 on success and a suitable error code when there's an error. This
182 * allocates memory specifically in VIDMEM.
183 *
184 */
185int nvgpu_dma_alloc_vid_at(struct gk20a *g,
186 size_t size, struct nvgpu_mem *mem, u64 at);
187
188/**
189 * nvgpu_dma_alloc_flags_vid_at - Allocate DMA memory
190 *
191 * @g - The GPU.
192 * @flags - Flags modifying the operation of the DMA allocation.
193 * @size - Size of the allocation in bytes.
194 * @mem - Struct for storing the allocation information.
195 * @at - A specific location to attempt to allocate memory from or 0 if the
196 * caller does not care what the address is.
197 *
198 * Allocate memory suitable for doing DMA. Store the allocation info in @mem.
199 * Returns 0 on success and a suitable error code when there's an error. This
200 * allocates memory specifically in VIDMEM.
201 *
202 * Only the following flags are accepted:
203 *
204 * %NVGPU_DMA_NO_KERNEL_MAPPING
205 */
206int nvgpu_dma_alloc_flags_vid_at(struct gk20a *g, unsigned long flags,
207 size_t size, struct nvgpu_mem *mem, u64 at);
208
209/**
210 * nvgpu_dma_free - Free a DMA allocation
211 *
212 * @g - The GPU.
213 * @mem - An allocation to free.
214 *
215 * Free memory created with any of:
216 *
217 * nvgpu_dma_alloc()
218 * nvgpu_dma_alloc_flags()
219 * nvgpu_dma_alloc_sys()
220 * nvgpu_dma_alloc_flags_sys()
221 * nvgpu_dma_alloc_vid()
222 * nvgpu_dma_alloc_flags_vid()
223 * nvgpu_dma_alloc_flags_vid_at()
224 */
225void nvgpu_dma_free(struct gk20a *g, struct nvgpu_mem *mem);
226
227/**
228 * nvgpu_dma_alloc_map - Allocate DMA memory and map into GMMU.
229 *
230 * @vm - VM context for GMMU mapping.
231 * @size - Size of the allocation in bytes.
232 * @mem - Struct for storing the allocation information.
233 *
234 * Allocate memory suitable for doing DMA and map that memory into the GMMU.
235 * Note this is different than mapping it into the CPU. This memory can be
236 * either placed in VIDMEM or SYSMEM, which ever is more convenient for the
237 * driver.
238 *
239 * Note: currently a bug exists in the nvgpu_dma_alloc_map*() routines: you
240 * cannot use nvgpu_gmmu_map() on said buffer - it will overwrite the necessary
241 * information for the DMA unmap routines to actually unmap the buffer. You
242 * will either leak mappings or see GMMU faults.
243 */
244int nvgpu_dma_alloc_map(struct vm_gk20a *vm, size_t size,
245 struct nvgpu_mem *mem);
246
247/**
248 * nvgpu_dma_alloc_map_flags - Allocate DMA memory and map into GMMU.
249 *
250 * @vm - VM context for GMMU mapping.
251 * @flags - Flags modifying the operation of the DMA allocation.
252 * @size - Size of the allocation in bytes.
253 * @mem - Struct for storing the allocation information.
254 *
255 * Allocate memory suitable for doing DMA and map that memory into the GMMU.
256 * Note this is different than mapping it into the CPU. This memory can be
257 * either placed in VIDMEM or SYSMEM, which ever is more convenient for the
258 * driver.
259 *
260 * This version passes @flags on to the underlying DMA allocation. The accepted
261 * flags are:
262 *
263 * %NVGPU_DMA_NO_KERNEL_MAPPING
264 * %NVGPU_DMA_FORCE_CONTIGUOUS
265 * %NVGPU_DMA_READ_ONLY
266 */
267int nvgpu_dma_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags,
268 size_t size, struct nvgpu_mem *mem);
269
270/**
271 * nvgpu_dma_alloc_map_sys - Allocate DMA memory and map into GMMU.
272 *
273 * @vm - VM context for GMMU mapping.
274 * @size - Size of the allocation in bytes.
275 * @mem - Struct for storing the allocation information.
276 *
277 * Allocate memory suitable for doing DMA and map that memory into the GMMU.
278 * This memory will be placed in SYSMEM.
279 */
280int nvgpu_dma_alloc_map_sys(struct vm_gk20a *vm, size_t size,
281 struct nvgpu_mem *mem);
282
283/**
284 * nvgpu_dma_alloc_map_flags_sys - Allocate DMA memory and map into GMMU.
285 *
286 * @vm - VM context for GMMU mapping.
287 * @flags - Flags modifying the operation of the DMA allocation.
288 * @size - Size of the allocation in bytes.
289 * @mem - Struct for storing the allocation information.
290 *
291 * Allocate memory suitable for doing DMA and map that memory into the GMMU.
292 * This memory will be placed in SYSMEM.
293 *
294 * This version passes @flags on to the underlying DMA allocation. The accepted
295 * flags are:
296 *
297 * %NVGPU_DMA_NO_KERNEL_MAPPING
298 * %NVGPU_DMA_FORCE_CONTIGUOUS
299 * %NVGPU_DMA_READ_ONLY
300 */
301int nvgpu_dma_alloc_map_flags_sys(struct vm_gk20a *vm, unsigned long flags,
302 size_t size, struct nvgpu_mem *mem);
303
304/**
305 * nvgpu_dma_alloc_map_vid - Allocate DMA memory and map into GMMU.
306 *
307 * @vm - VM context for GMMU mapping.
308 * @size - Size of the allocation in bytes.
309 * @mem - Struct for storing the allocation information.
310 *
311 * Allocate memory suitable for doing DMA and map that memory into the GMMU.
312 * This memory will be placed in VIDMEM.
313 */
314int nvgpu_dma_alloc_map_vid(struct vm_gk20a *vm, size_t size,
315 struct nvgpu_mem *mem);
316
317/**
318 * nvgpu_dma_alloc_map_flags_vid - Allocate DMA memory and map into GMMU.
319 *
320 * @vm - VM context for GMMU mapping.
321 * @flags - Flags modifying the operation of the DMA allocation.
322 * @size - Size of the allocation in bytes.
323 * @mem - Struct for storing the allocation information.
324 *
325 * Allocate memory suitable for doing DMA and map that memory into the GMMU.
326 * This memory will be placed in VIDMEM.
327 *
328 * This version passes @flags on to the underlying DMA allocation. The accepted
329 * flags are:
330 *
331 * %NVGPU_DMA_NO_KERNEL_MAPPING
332 * %NVGPU_DMA_FORCE_CONTIGUOUS
333 * %NVGPU_DMA_READ_ONLY
334 */
335int nvgpu_dma_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags,
336 size_t size, struct nvgpu_mem *mem);
337
338/**
339 * nvgpu_dma_unmap_free - Free a DMA allocation
340 *
341 * @g - The GPU.
342 * @mem - An allocation to free.
343 *
344 * Free memory created with any of:
345 *
346 * nvgpu_dma_alloc_map()
347 * nvgpu_dma_alloc_map_flags()
348 * nvgpu_dma_alloc_map_sys()
349 * nvgpu_dma_alloc_map_flags_sys()
350 * nvgpu_dma_alloc_map_vid()
351 * nvgpu_dma_alloc_map_flags_vid()
352 */
353void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem);
354
355/*
356 * Don't use these directly. Instead use nvgpu_dma_free().
357 */
358void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem);
359void nvgpu_dma_free_vid(struct gk20a *g, struct nvgpu_mem *mem);
360
361#endif /* NVGPU_DMA_H */
diff --git a/include/nvgpu/dt.h b/include/nvgpu/dt.h
deleted file mode 100644
index b5fdbfc..0000000
--- a/include/nvgpu/dt.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#include <nvgpu/types.h>
24
25struct gk20a;
26
27int nvgpu_dt_read_u32_index(struct gk20a *g, const char *name,
28 u32 index, u32 *value);
diff --git a/include/nvgpu/ecc.h b/include/nvgpu/ecc.h
deleted file mode 100644
index 9b211ef..0000000
--- a/include/nvgpu/ecc.h
+++ /dev/null
@@ -1,162 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_ECC_H
24#define NVGPU_ECC_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/list.h>
28
29#define NVGPU_ECC_STAT_NAME_MAX_SIZE 100
30
31struct gk20a;
32
33struct nvgpu_ecc_stat {
34 char name[NVGPU_ECC_STAT_NAME_MAX_SIZE];
35 u32 counter;
36 struct nvgpu_list_node node;
37};
38
39static inline struct nvgpu_ecc_stat *nvgpu_ecc_stat_from_node(
40 struct nvgpu_list_node *node)
41{
42 return (struct nvgpu_ecc_stat *)(
43 (uintptr_t)node - offsetof(struct nvgpu_ecc_stat, node)
44 );
45}
46
47struct nvgpu_ecc {
48 struct {
49 /* stats per tpc */
50
51 struct nvgpu_ecc_stat **sm_lrf_ecc_single_err_count;
52 struct nvgpu_ecc_stat **sm_lrf_ecc_double_err_count;
53
54 struct nvgpu_ecc_stat **sm_shm_ecc_sec_count;
55 struct nvgpu_ecc_stat **sm_shm_ecc_sed_count;
56 struct nvgpu_ecc_stat **sm_shm_ecc_ded_count;
57
58 struct nvgpu_ecc_stat **tex_ecc_total_sec_pipe0_count;
59 struct nvgpu_ecc_stat **tex_ecc_total_ded_pipe0_count;
60 struct nvgpu_ecc_stat **tex_unique_ecc_sec_pipe0_count;
61 struct nvgpu_ecc_stat **tex_unique_ecc_ded_pipe0_count;
62 struct nvgpu_ecc_stat **tex_ecc_total_sec_pipe1_count;
63 struct nvgpu_ecc_stat **tex_ecc_total_ded_pipe1_count;
64 struct nvgpu_ecc_stat **tex_unique_ecc_sec_pipe1_count;
65 struct nvgpu_ecc_stat **tex_unique_ecc_ded_pipe1_count;
66
67 struct nvgpu_ecc_stat **sm_l1_tag_ecc_corrected_err_count;
68 struct nvgpu_ecc_stat **sm_l1_tag_ecc_uncorrected_err_count;
69 struct nvgpu_ecc_stat **sm_cbu_ecc_corrected_err_count;
70 struct nvgpu_ecc_stat **sm_cbu_ecc_uncorrected_err_count;
71 struct nvgpu_ecc_stat **sm_l1_data_ecc_corrected_err_count;
72 struct nvgpu_ecc_stat **sm_l1_data_ecc_uncorrected_err_count;
73 struct nvgpu_ecc_stat **sm_icache_ecc_corrected_err_count;
74 struct nvgpu_ecc_stat **sm_icache_ecc_uncorrected_err_count;
75
76 /* stats per gpc */
77
78 struct nvgpu_ecc_stat *gcc_l15_ecc_corrected_err_count;
79 struct nvgpu_ecc_stat *gcc_l15_ecc_uncorrected_err_count;
80
81 struct nvgpu_ecc_stat *gpccs_ecc_corrected_err_count;
82 struct nvgpu_ecc_stat *gpccs_ecc_uncorrected_err_count;
83 struct nvgpu_ecc_stat *mmu_l1tlb_ecc_corrected_err_count;
84 struct nvgpu_ecc_stat *mmu_l1tlb_ecc_uncorrected_err_count;
85
86 /* stats per device */
87 struct nvgpu_ecc_stat *fecs_ecc_corrected_err_count;
88 struct nvgpu_ecc_stat *fecs_ecc_uncorrected_err_count;
89 } gr;
90
91 struct {
92 /* stats per lts */
93 struct nvgpu_ecc_stat **ecc_sec_count;
94 struct nvgpu_ecc_stat **ecc_ded_count;
95 } ltc;
96
97 struct {
98 /* stats per device */
99 struct nvgpu_ecc_stat *mmu_l2tlb_ecc_corrected_err_count;
100 struct nvgpu_ecc_stat *mmu_l2tlb_ecc_uncorrected_err_count;
101 struct nvgpu_ecc_stat *mmu_hubtlb_ecc_corrected_err_count;
102 struct nvgpu_ecc_stat *mmu_hubtlb_ecc_uncorrected_err_count;
103 struct nvgpu_ecc_stat *mmu_fillunit_ecc_corrected_err_count;
104 struct nvgpu_ecc_stat *mmu_fillunit_ecc_uncorrected_err_count;
105 } fb;
106
107 struct {
108 /* stats per device */
109 struct nvgpu_ecc_stat *pmu_ecc_corrected_err_count;
110 struct nvgpu_ecc_stat *pmu_ecc_uncorrected_err_count;
111 } pmu;
112
113 struct {
114 /* stats per fbpa */
115 struct nvgpu_ecc_stat *fbpa_ecc_sec_err_count;
116 struct nvgpu_ecc_stat *fbpa_ecc_ded_err_count;
117 } fbpa;
118
119 struct nvgpu_list_node stats_list;
120 int stats_count;
121};
122
123int nvgpu_ecc_counter_init_per_tpc(struct gk20a *g,
124 struct nvgpu_ecc_stat ***stat, const char *name);
125#define NVGPU_ECC_COUNTER_INIT_PER_TPC(stat) \
126 nvgpu_ecc_counter_init_per_tpc(g, &g->ecc.gr.stat, #stat)
127
128int nvgpu_ecc_counter_init_per_gpc(struct gk20a *g,
129 struct nvgpu_ecc_stat **stat, const char *name);
130#define NVGPU_ECC_COUNTER_INIT_PER_GPC(stat) \
131 nvgpu_ecc_counter_init_per_gpc(g, &g->ecc.gr.stat, #stat)
132
133int nvgpu_ecc_counter_init(struct gk20a *g,
134 struct nvgpu_ecc_stat **stat, const char *name);
135#define NVGPU_ECC_COUNTER_INIT_GR(stat) \
136 nvgpu_ecc_counter_init(g, &g->ecc.gr.stat, #stat)
137#define NVGPU_ECC_COUNTER_INIT_FB(stat) \
138 nvgpu_ecc_counter_init(g, &g->ecc.fb.stat, #stat)
139#define NVGPU_ECC_COUNTER_INIT_PMU(stat) \
140 nvgpu_ecc_counter_init(g, &g->ecc.pmu.stat, #stat)
141
142int nvgpu_ecc_counter_init_per_lts(struct gk20a *g,
143 struct nvgpu_ecc_stat ***stat, const char *name);
144#define NVGPU_ECC_COUNTER_INIT_PER_LTS(stat) \
145 nvgpu_ecc_counter_init_per_lts(g, &g->ecc.ltc.stat, #stat)
146
147int nvgpu_ecc_counter_init_per_fbpa(struct gk20a *g,
148 struct nvgpu_ecc_stat **stat, const char *name);
149#define NVGPU_ECC_COUNTER_INIT_PER_FBPA(stat) \
150 nvgpu_ecc_counter_init_per_fbpa(g, &g->ecc.fbpa.stat, #stat)
151
152void nvgpu_ecc_free(struct gk20a *g);
153
154int nvgpu_ecc_init_support(struct gk20a *g);
155void nvgpu_ecc_remove_support(struct gk20a *g);
156
157/* OSes to implement */
158
159int nvgpu_ecc_sysfs_init(struct gk20a *g);
160void nvgpu_ecc_sysfs_remove(struct gk20a *g);
161
162#endif
diff --git a/include/nvgpu/enabled.h b/include/nvgpu/enabled.h
deleted file mode 100644
index 51e9358..0000000
--- a/include/nvgpu/enabled.h
+++ /dev/null
@@ -1,221 +0,0 @@
1/*
2 * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_ENABLED_H
24#define NVGPU_ENABLED_H
25
26struct gk20a;
27
28#include <nvgpu/types.h>
29
30/*
31 * Available flags that describe what's enabled and what's not in the GPU. Each
32 * flag here is defined by it's offset in a bitmap.
33 */
34#define NVGPU_IS_FMODEL 1
35#define NVGPU_DRIVER_IS_DYING 2
36#define NVGPU_GR_USE_DMA_FOR_FW_BOOTSTRAP 3
37#define NVGPU_FECS_TRACE_VA 4
38#define NVGPU_CAN_RAILGATE 5
39#define NVGPU_KERNEL_IS_DYING 6
40#define NVGPU_FECS_TRACE_FEATURE_CONTROL 7
41
42/*
43 * ECC flags
44 */
45/* SM LRF ECC is enabled */
46#define NVGPU_ECC_ENABLED_SM_LRF 8
47/* SM SHM ECC is enabled */
48#define NVGPU_ECC_ENABLED_SM_SHM 9
49/* TEX ECC is enabled */
50#define NVGPU_ECC_ENABLED_TEX 10
51/* L2 ECC is enabled */
52#define NVGPU_ECC_ENABLED_LTC 11
53/* SM L1 DATA ECC is enabled */
54#define NVGPU_ECC_ENABLED_SM_L1_DATA 12
55/* SM L1 TAG ECC is enabled */
56#define NVGPU_ECC_ENABLED_SM_L1_TAG 13
57/* SM CBU ECC is enabled */
58#define NVGPU_ECC_ENABLED_SM_CBU 14
59/* SM ICAHE ECC is enabled */
60#define NVGPU_ECC_ENABLED_SM_ICACHE 15
61
62/*
63 * MM flags.
64 */
65#define NVGPU_MM_UNIFY_ADDRESS_SPACES 16
66/* false if vidmem aperture actually points to sysmem */
67#define NVGPU_MM_HONORS_APERTURE 17
68/* unified or split memory with separate vidmem? */
69#define NVGPU_MM_UNIFIED_MEMORY 18
70/* User-space managed address spaces support */
71#define NVGPU_SUPPORT_USERSPACE_MANAGED_AS 20
72/* IO coherence support is available */
73#define NVGPU_SUPPORT_IO_COHERENCE 21
74/* MAP_BUFFER_EX with partial mappings */
75#define NVGPU_SUPPORT_PARTIAL_MAPPINGS 22
76/* MAP_BUFFER_EX with sparse allocations */
77#define NVGPU_SUPPORT_SPARSE_ALLOCS 23
78/* Direct PTE kind control is supported (map_buffer_ex) */
79#define NVGPU_SUPPORT_MAP_DIRECT_KIND_CTRL 24
80/* Support batch mapping */
81#define NVGPU_SUPPORT_MAP_BUFFER_BATCH 25
82/* Use coherent aperture for sysmem. */
83#define NVGPU_USE_COHERENT_SYSMEM 26
84/* Use physical scatter tables instead of IOMMU */
85#define NVGPU_MM_USE_PHYSICAL_SG 27
86/* WAR for gm20b chips. */
87#define NVGPU_MM_FORCE_128K_PMU_VM 28
88/* SW ERRATA to disable L3 alloc Bit of the physical address.
89 * Bit number varies between SOCs.
90 * E.g. 64GB physical RAM support for gv11b requires this SW errata
91 * to be enabled.
92 */
93#define NVGPU_DISABLE_L3_SUPPORT 29
94/*
95 * Host flags
96 */
97#define NVGPU_HAS_SYNCPOINTS 30
98/* sync fence FDs are available in, e.g., submit_gpfifo */
99#define NVGPU_SUPPORT_SYNC_FENCE_FDS 31
100/* NVGPU_DBG_GPU_IOCTL_CYCLE_STATS is available */
101#define NVGPU_SUPPORT_CYCLE_STATS 32
102/* NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT is available */
103#define NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT 33
104/* Both gpu driver and device support TSG */
105#define NVGPU_SUPPORT_TSG 34
106/* Fast deterministic submits with no job tracking are supported */
107#define NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING 35
108/* Deterministic submits are supported even with job tracking */
109#define NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_FULL 36
110/* NVGPU_IOCTL_CHANNEL_RESCHEDULE_RUNLIST is available */
111#define NVGPU_SUPPORT_RESCHEDULE_RUNLIST 37
112
113/* NVGPU_GPU_IOCTL_GET_EVENT_FD is available */
114#define NVGPU_SUPPORT_DEVICE_EVENTS 38
115/* FECS context switch tracing is available */
116#define NVGPU_SUPPORT_FECS_CTXSW_TRACE 39
117
118/* NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS is available */
119#define NVGPU_SUPPORT_DETERMINISTIC_OPTS 40
120
121/*
122 * Security flags
123 */
124
125#define NVGPU_SEC_SECUREGPCCS 41
126#define NVGPU_SEC_PRIVSECURITY 42
127/* VPR is supported */
128#define NVGPU_SUPPORT_VPR 43
129
130/*
131 * Nvlink flags
132 */
133
134#define NVGPU_SUPPORT_NVLINK 45
135/*
136 * PMU flags.
137 */
138/* perfmon enabled or disabled for PMU */
139#define NVGPU_PMU_PERFMON 48
140#define NVGPU_PMU_PSTATE 49
141#define NVGPU_PMU_ZBC_SAVE 50
142#define NVGPU_PMU_FECS_BOOTSTRAP_DONE 51
143#define NVGPU_GPU_CAN_BLCG 52
144#define NVGPU_GPU_CAN_SLCG 53
145#define NVGPU_GPU_CAN_ELCG 54
146/* Clock control support */
147#define NVGPU_SUPPORT_CLOCK_CONTROLS 55
148/* NVGPU_GPU_IOCTL_GET_VOLTAGE is available */
149#define NVGPU_SUPPORT_GET_VOLTAGE 56
150/* NVGPU_GPU_IOCTL_GET_CURRENT is available */
151#define NVGPU_SUPPORT_GET_CURRENT 57
152/* NVGPU_GPU_IOCTL_GET_POWER is available */
153#define NVGPU_SUPPORT_GET_POWER 58
154/* NVGPU_GPU_IOCTL_GET_TEMPERATURE is available */
155#define NVGPU_SUPPORT_GET_TEMPERATURE 59
156/* NVGPU_GPU_IOCTL_SET_THERM_ALERT_LIMIT is available */
157#define NVGPU_SUPPORT_SET_THERM_ALERT_LIMIT 60
158
159/* whether to run PREOS binary on dGPUs */
160#define NVGPU_PMU_RUN_PREOS 61
161
162/* set if ASPM is enabled; only makes sense for PCI */
163#define NVGPU_SUPPORT_ASPM 62
164/* subcontexts are available */
165#define NVGPU_SUPPORT_TSG_SUBCONTEXTS 63
166/* Simultaneous Compute and Graphics (SCG) is available */
167#define NVGPU_SUPPORT_SCG 64
168
169/* GPU_VA address of a syncpoint is supported */
170#define NVGPU_SUPPORT_SYNCPOINT_ADDRESS 65
171/* Allocating per-channel syncpoint in user space is supported */
172#define NVGPU_SUPPORT_USER_SYNCPOINT 66
173
174/* USERMODE enable bit */
175#define NVGPU_SUPPORT_USERMODE_SUBMIT 67
176
177/* Multiple WPR support */
178#define NVGPU_SUPPORT_MULTIPLE_WPR 68
179
180/* SEC2 RTOS support*/
181#define NVGPU_SUPPORT_SEC2_RTOS 69
182
183/* NVGPU_GPU_IOCTL_GET_GPU_LOAD is available */
184#define NVGPU_SUPPORT_GET_GPU_LOAD 70
185
186/* PLATFORM_ATOMIC support */
187#define NVGPU_SUPPORT_PLATFORM_ATOMIC 71
188
189/* NVGPU_GPU_IOCTL_SET_MMU_DEBUG_MODE is available */
190#define NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE 72
191
192/*
193 * Must be greater than the largest bit offset in the above list.
194 */
195#define NVGPU_MAX_ENABLED_BITS 73U
196
197/**
198 * nvgpu_is_enabled - Check if the passed flag is enabled.
199 *
200 * @g - The GPU.
201 * @flag - Which flag to check.
202 *
203 * Returns true if the passed @flag is true; false otherwise.
204 */
205bool nvgpu_is_enabled(struct gk20a *g, int flag);
206
207/**
208 * __nvgpu_set_enabled - Set the state of a flag.
209 *
210 * @g - The GPU.
211 * @flag - Which flag to modify.
212 * @state - The state to set the flag to.
213 *
214 * Set the state of the passed @flag to @state.
215 */
216void __nvgpu_set_enabled(struct gk20a *g, int flag, bool state);
217
218int nvgpu_init_enabled_flags(struct gk20a *g);
219void nvgpu_free_enabled_flags(struct gk20a *g);
220
221#endif /* NVGPU_ENABLED_H */
diff --git a/include/nvgpu/errno.h b/include/nvgpu/errno.h
deleted file mode 100644
index 7e8b110..0000000
--- a/include/nvgpu/errno.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_ERRNO_H
24#define NVGPU_ERRNO_H
25
26/*
27 * Explicit include to get all the -E* error messages. Useful for header files
28 * with static inlines that return error messages. In actual C code normally
29 * enough Linux/QNX headers bleed in to get the error messages but header files
30 * with sparse includes do not have this luxury.
31 */
32
33#ifdef __KERNEL__
34#include <linux/errno.h>
35#endif
36
37/*
38 * TODO: add else path above for QNX.
39 */
40
41#endif /* NVGPU_ERRNO_H */
diff --git a/include/nvgpu/error_notifier.h b/include/nvgpu/error_notifier.h
deleted file mode 100644
index 7ba01e9..0000000
--- a/include/nvgpu/error_notifier.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_ERROR_NOTIFIER_H
24#define NVGPU_ERROR_NOTIFIER_H
25
26#include <nvgpu/types.h>
27
28struct channel_gk20a;
29
30enum {
31 NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT = 0,
32 NVGPU_ERR_NOTIFIER_GR_ERROR_SW_METHOD,
33 NVGPU_ERR_NOTIFIER_GR_ERROR_SW_NOTIFY,
34 NVGPU_ERR_NOTIFIER_GR_EXCEPTION,
35 NVGPU_ERR_NOTIFIER_GR_SEMAPHORE_TIMEOUT,
36 NVGPU_ERR_NOTIFIER_GR_ILLEGAL_NOTIFY,
37 NVGPU_ERR_NOTIFIER_FIFO_ERROR_MMU_ERR_FLT,
38 NVGPU_ERR_NOTIFIER_PBDMA_ERROR,
39 NVGPU_ERR_NOTIFIER_FECS_ERR_UNIMP_FIRMWARE_METHOD,
40 NVGPU_ERR_NOTIFIER_RESETCHANNEL_VERIF_ERROR,
41 NVGPU_ERR_NOTIFIER_PBDMA_PUSHBUFFER_CRC_MISMATCH,
42};
43
44void nvgpu_set_error_notifier_locked(struct channel_gk20a *ch, u32 error);
45void nvgpu_set_error_notifier(struct channel_gk20a *ch, u32 error);
46void nvgpu_set_error_notifier_if_empty(struct channel_gk20a *ch, u32 error);
47bool nvgpu_is_error_notifier_set(struct channel_gk20a *ch, u32 error_notifier);
48
49#endif /* NVGPU_ERROR_NOTIFIER_H */
diff --git a/include/nvgpu/falcon.h b/include/nvgpu/falcon.h
deleted file mode 100644
index 4fc97ee..0000000
--- a/include/nvgpu/falcon.h
+++ /dev/null
@@ -1,335 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_FALCON_H
24#define NVGPU_FALCON_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/lock.h>
28
29/*
30 * Falcon Id Defines
31 */
32#define FALCON_ID_PMU (0U)
33#define FALCON_ID_GSPLITE (1U)
34#define FALCON_ID_FECS (2U)
35#define FALCON_ID_GPCCS (3U)
36#define FALCON_ID_NVDEC (4U)
37#define FALCON_ID_SEC2 (7U)
38#define FALCON_ID_MINION (10U)
39
40/*
41 * Falcon Base address Defines
42 */
43#define FALCON_NVDEC_BASE 0x00084000
44#define FALCON_PWR_BASE 0x0010a000
45#define FALCON_SEC_BASE 0x00087000
46#define FALCON_FECS_BASE 0x00409000
47#define FALCON_GPCCS_BASE 0x0041a000
48
49/* Falcon Register index */
50#define FALCON_REG_R0 (0)
51#define FALCON_REG_R1 (1)
52#define FALCON_REG_R2 (2)
53#define FALCON_REG_R3 (3)
54#define FALCON_REG_R4 (4)
55#define FALCON_REG_R5 (5)
56#define FALCON_REG_R6 (6)
57#define FALCON_REG_R7 (7)
58#define FALCON_REG_R8 (8)
59#define FALCON_REG_R9 (9)
60#define FALCON_REG_R10 (10)
61#define FALCON_REG_R11 (11)
62#define FALCON_REG_R12 (12)
63#define FALCON_REG_R13 (13)
64#define FALCON_REG_R14 (14)
65#define FALCON_REG_R15 (15)
66#define FALCON_REG_IV0 (16)
67#define FALCON_REG_IV1 (17)
68#define FALCON_REG_UNDEFINED (18)
69#define FALCON_REG_EV (19)
70#define FALCON_REG_SP (20)
71#define FALCON_REG_PC (21)
72#define FALCON_REG_IMB (22)
73#define FALCON_REG_DMB (23)
74#define FALCON_REG_CSW (24)
75#define FALCON_REG_CCR (25)
76#define FALCON_REG_SEC (26)
77#define FALCON_REG_CTX (27)
78#define FALCON_REG_EXCI (28)
79#define FALCON_REG_RSVD0 (29)
80#define FALCON_REG_RSVD1 (30)
81#define FALCON_REG_RSVD2 (31)
82#define FALCON_REG_SIZE (32)
83
84#define FALCON_MAILBOX_0 0x0
85#define FALCON_MAILBOX_1 0x1
86#define FALCON_MAILBOX_COUNT 0x02
87#define FALCON_BLOCK_SIZE 0x100U
88
89#define GET_IMEM_TAG(IMEM_ADDR) (IMEM_ADDR >> 8)
90
91#define GET_NEXT_BLOCK(ADDR) \
92 ((((ADDR + (FALCON_BLOCK_SIZE - 1)) & ~(FALCON_BLOCK_SIZE-1)) \
93 / FALCON_BLOCK_SIZE) << 8)
94
95/*
96 * Falcon HWCFG request read types defines
97 */
98enum flcn_hwcfg_read {
99 FALCON_IMEM_SIZE = 0,
100 FALCON_DMEM_SIZE,
101 FALCON_CORE_REV,
102 FALCON_SECURITY_MODEL,
103 FLACON_MAILBOX_COUNT
104};
105
106/*
107 * Falcon HWCFG request write types defines
108 */
109enum flcn_hwcfg_write {
110 FALCON_STARTCPU = 0,
111 FALCON_STARTCPU_SECURE,
112 FALCON_BOOTVEC,
113 FALCON_ITF_EN
114};
115
116#define FALCON_MEM_SCRUBBING_TIMEOUT_MAX 1000
117#define FALCON_MEM_SCRUBBING_TIMEOUT_DEFAULT 10
118
119enum flcn_dma_dir {
120 DMA_TO_FB = 0,
121 DMA_FROM_FB
122};
123
124enum flcn_mem_type {
125 MEM_DMEM = 0,
126 MEM_IMEM
127};
128
129/* Falcon ucode header format
130 * OS Code Offset
131 * OS Code Size
132 * OS Data Offset
133 * OS Data Size
134 * NumApps (N)
135 * App 0 Code Offset
136 * App 0 Code Size
137 * . . . .
138 * App N - 1 Code Offset
139 * App N - 1 Code Size
140 * App 0 Data Offset
141 * App 0 Data Size
142 * . . . .
143 * App N - 1 Data Offset
144 * App N - 1 Data Size
145 * OS Ovl Offset
146 * OS Ovl Size
147*/
148#define OS_CODE_OFFSET 0x0
149#define OS_CODE_SIZE 0x1
150#define OS_DATA_OFFSET 0x2
151#define OS_DATA_SIZE 0x3
152#define NUM_APPS 0x4
153#define APP_0_CODE_OFFSET 0x5
154#define APP_0_CODE_SIZE 0x6
155
156struct nvgpu_falcon_dma_info {
157 u32 fb_base;
158 u32 fb_off;
159 u32 flcn_mem_off;
160 u32 size_in_bytes;
161 enum flcn_dma_dir dir;
162 u32 ctx_dma;
163 enum flcn_mem_type flcn_mem;
164 u32 is_wait_complete;
165};
166
167struct gk20a;
168struct nvgpu_falcon;
169struct nvgpu_falcon_bl_info;
170
171/* Queue Type */
172#define QUEUE_TYPE_DMEM 0x0U
173#define QUEUE_TYPE_EMEM 0x1U
174
175struct nvgpu_falcon_queue {
176
177 /* Queue Type (queue_type) */
178 u8 queue_type;
179
180 /* used by nvgpu, for command LPQ/HPQ */
181 struct nvgpu_mutex mutex;
182
183 /* current write position */
184 u32 position;
185 /* physical dmem offset where this queue begins */
186 u32 offset;
187 /* logical queue identifier */
188 u32 id;
189 /* physical queue index */
190 u32 index;
191 /* in bytes */
192 u32 size;
193 /* open-flag */
194 u32 oflag;
195
196 /* queue type(DMEM-Q/FB-Q) specific ops */
197 int (*rewind)(struct nvgpu_falcon *flcn,
198 struct nvgpu_falcon_queue *queue);
199 int (*pop)(struct nvgpu_falcon *flcn,
200 struct nvgpu_falcon_queue *queue, void *data, u32 size,
201 u32 *bytes_read);
202 int (*push)(struct nvgpu_falcon *flcn,
203 struct nvgpu_falcon_queue *queue, void *data, u32 size);
204 bool (*has_room)(struct nvgpu_falcon *flcn,
205 struct nvgpu_falcon_queue *queue, u32 size,
206 bool *need_rewind);
207 int (*tail)(struct nvgpu_falcon *flcn,
208 struct nvgpu_falcon_queue *queue, u32 *tail, bool set);
209 int (*head)(struct nvgpu_falcon *flcn,
210 struct nvgpu_falcon_queue *queue, u32 *head, bool set);
211};
212
213struct nvgpu_falcon_version_ops {
214 void (*start_cpu_secure)(struct nvgpu_falcon *flcn);
215 void (*write_dmatrfbase)(struct nvgpu_falcon *flcn, u32 addr);
216};
217
218/* ops which are falcon engine specific */
219struct nvgpu_falcon_engine_dependency_ops {
220 int (*reset_eng)(struct gk20a *g);
221 int (*queue_head)(struct gk20a *g, struct nvgpu_falcon_queue *queue,
222 u32 *head, bool set);
223 int (*queue_tail)(struct gk20a *g, struct nvgpu_falcon_queue *queue,
224 u32 *tail, bool set);
225 void (*msgq_tail)(struct gk20a *g, u32 *tail, bool set);
226 int (*copy_from_emem)(struct nvgpu_falcon *flcn, u32 src, u8 *dst,
227 u32 size, u8 port);
228 int (*copy_to_emem)(struct nvgpu_falcon *flcn, u32 dst, u8 *src,
229 u32 size, u8 port);
230};
231
232struct nvgpu_falcon_ops {
233 int (*reset)(struct nvgpu_falcon *flcn);
234 void (*set_irq)(struct nvgpu_falcon *flcn, bool enable);
235 bool (*clear_halt_interrupt_status)(struct nvgpu_falcon *flcn);
236 bool (*is_falcon_cpu_halted)(struct nvgpu_falcon *flcn);
237 bool (*is_falcon_idle)(struct nvgpu_falcon *flcn);
238 bool (*is_falcon_scrubbing_done)(struct nvgpu_falcon *flcn);
239 int (*copy_from_dmem)(struct nvgpu_falcon *flcn, u32 src, u8 *dst,
240 u32 size, u8 port);
241 int (*copy_to_dmem)(struct nvgpu_falcon *flcn, u32 dst, u8 *src,
242 u32 size, u8 port);
243 int (*copy_from_imem)(struct nvgpu_falcon *flcn, u32 src, u8 *dst,
244 u32 size, u8 port);
245 int (*copy_to_imem)(struct nvgpu_falcon *flcn, u32 dst, u8 *src,
246 u32 size, u8 port, bool sec, u32 tag);
247 int (*dma_copy)(struct nvgpu_falcon *flcn,
248 struct nvgpu_falcon_dma_info *dma_info);
249 u32 (*mailbox_read)(struct nvgpu_falcon *flcn, u32 mailbox_index);
250 void (*mailbox_write)(struct nvgpu_falcon *flcn, u32 mailbox_index,
251 u32 data);
252 int (*bootstrap)(struct nvgpu_falcon *flcn, u32 boot_vector);
253 void (*dump_falcon_stats)(struct nvgpu_falcon *flcn);
254 int (*bl_bootstrap)(struct nvgpu_falcon *flcn,
255 struct nvgpu_falcon_bl_info *bl_info);
256};
257
258struct nvgpu_falcon_bl_info {
259 void *bl_src;
260 u8 *bl_desc;
261 u32 bl_desc_size;
262 u32 bl_size;
263 u32 bl_start_tag;
264};
265
266struct nvgpu_falcon {
267 struct gk20a *g;
268 u32 flcn_id;
269 u32 flcn_base;
270 u32 flcn_core_rev;
271 bool is_falcon_supported;
272 bool is_interrupt_enabled;
273 u32 intr_mask;
274 u32 intr_dest;
275 bool isr_enabled;
276 struct nvgpu_mutex isr_mutex;
277 struct nvgpu_mutex copy_lock;
278 struct nvgpu_falcon_ops flcn_ops;
279 struct nvgpu_falcon_version_ops flcn_vops;
280 struct nvgpu_falcon_engine_dependency_ops flcn_engine_dep_ops;
281};
282
283int nvgpu_flcn_wait_idle(struct nvgpu_falcon *flcn);
284int nvgpu_flcn_wait_for_halt(struct nvgpu_falcon *flcn, unsigned int timeout);
285int nvgpu_flcn_clear_halt_intr_status(struct nvgpu_falcon *flcn,
286 unsigned int timeout);
287int nvgpu_flcn_reset(struct nvgpu_falcon *flcn);
288void nvgpu_flcn_set_irq(struct nvgpu_falcon *flcn, bool enable,
289 u32 intr_mask, u32 intr_dest);
290bool nvgpu_flcn_get_mem_scrubbing_status(struct nvgpu_falcon *flcn);
291int nvgpu_flcn_mem_scrub_wait(struct nvgpu_falcon *flcn);
292bool nvgpu_flcn_get_cpu_halted_status(struct nvgpu_falcon *flcn);
293bool nvgpu_flcn_get_idle_status(struct nvgpu_falcon *flcn);
294int nvgpu_flcn_copy_from_emem(struct nvgpu_falcon *flcn,
295 u32 src, u8 *dst, u32 size, u8 port);
296int nvgpu_flcn_copy_to_emem(struct nvgpu_falcon *flcn,
297 u32 dst, u8 *src, u32 size, u8 port);
298int nvgpu_flcn_copy_from_dmem(struct nvgpu_falcon *flcn,
299 u32 src, u8 *dst, u32 size, u8 port);
300int nvgpu_flcn_copy_to_dmem(struct nvgpu_falcon *flcn,
301 u32 dst, u8 *src, u32 size, u8 port);
302int nvgpu_flcn_copy_to_imem(struct nvgpu_falcon *flcn,
303 u32 dst, u8 *src, u32 size, u8 port, bool sec, u32 tag);
304int nvgpu_flcn_copy_from_imem(struct nvgpu_falcon *flcn,
305 u32 src, u8 *dst, u32 size, u8 port);
306int nvgpu_flcn_dma_copy(struct nvgpu_falcon *flcn,
307 struct nvgpu_falcon_dma_info *dma_info);
308u32 nvgpu_flcn_mailbox_read(struct nvgpu_falcon *flcn, u32 mailbox_index);
309void nvgpu_flcn_mailbox_write(struct nvgpu_falcon *flcn, u32 mailbox_index,
310 u32 data);
311int nvgpu_flcn_bootstrap(struct nvgpu_falcon *flcn, u32 boot_vector);
312void nvgpu_flcn_print_dmem(struct nvgpu_falcon *flcn, u32 src, u32 size);
313void nvgpu_flcn_print_imem(struct nvgpu_falcon *flcn, u32 src, u32 size);
314void nvgpu_flcn_dump_stats(struct nvgpu_falcon *flcn);
315int nvgpu_flcn_bl_bootstrap(struct nvgpu_falcon *flcn,
316 struct nvgpu_falcon_bl_info *bl_info);
317
318/* queue public functions */
319int nvgpu_flcn_queue_init(struct nvgpu_falcon *flcn,
320 struct nvgpu_falcon_queue *queue);
321bool nvgpu_flcn_queue_is_empty(struct nvgpu_falcon *flcn,
322 struct nvgpu_falcon_queue *queue);
323int nvgpu_flcn_queue_rewind(struct nvgpu_falcon *flcn,
324 struct nvgpu_falcon_queue *queue);
325int nvgpu_flcn_queue_pop(struct nvgpu_falcon *flcn,
326 struct nvgpu_falcon_queue *queue, void *data, u32 size,
327 u32 *bytes_read);
328int nvgpu_flcn_queue_push(struct nvgpu_falcon *flcn,
329 struct nvgpu_falcon_queue *queue, void *data, u32 size);
330void nvgpu_flcn_queue_free(struct nvgpu_falcon *flcn,
331 struct nvgpu_falcon_queue *queue);
332
333int nvgpu_flcn_sw_init(struct gk20a *g, u32 flcn_id);
334
335#endif /* NVGPU_FALCON_H */
diff --git a/include/nvgpu/fecs_trace.h b/include/nvgpu/fecs_trace.h
deleted file mode 100644
index 5dc3530..0000000
--- a/include/nvgpu/fecs_trace.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_FECS_TRACE_H
24#define NVGPU_FECS_TRACE_H
25
26struct gk20a;
27
28/*
29 * If HW circular buffer is getting too many "buffer full" conditions,
30 * increasing this constant should help (it drives Linux' internal buffer size).
31 */
32#define GK20A_FECS_TRACE_NUM_RECORDS (1 << 10)
33#define GK20A_FECS_TRACE_HASH_BITS 8 /* 2^8 */
34#define GK20A_FECS_TRACE_FRAME_PERIOD_US (1000000ULL/60ULL)
35#define GK20A_FECS_TRACE_PTIMER_SHIFT 5
36
37struct gk20a_fecs_trace_record {
38 u32 magic_lo;
39 u32 magic_hi;
40 u32 context_id;
41 u32 context_ptr;
42 u32 new_context_id;
43 u32 new_context_ptr;
44 u64 ts[];
45};
46
47#ifdef CONFIG_GK20A_CTXSW_TRACE
48u32 gk20a_fecs_trace_record_ts_tag_invalid_ts_v(void);
49u32 gk20a_fecs_trace_record_ts_tag_v(u64 ts);
50u64 gk20a_fecs_trace_record_ts_timestamp_v(u64 ts);
51int gk20a_fecs_trace_num_ts(void);
52struct gk20a_fecs_trace_record *gk20a_fecs_trace_get_record(struct gk20a *g,
53 int idx);
54bool gk20a_fecs_trace_is_valid_record(struct gk20a_fecs_trace_record *r);
55int gk20a_fecs_trace_get_read_index(struct gk20a *g);
56int gk20a_fecs_trace_get_write_index(struct gk20a *g);
57
58#endif /* CONFIG_GK20A_CTXSW_TRACE */
59
60#endif
diff --git a/include/nvgpu/firmware.h b/include/nvgpu/firmware.h
deleted file mode 100644
index 54d6795..0000000
--- a/include/nvgpu/firmware.h
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_FIRMWARE_H
24#define NVGPU_FIRMWARE_H
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29
30#define NVGPU_REQUEST_FIRMWARE_NO_WARN (1UL << 0)
31#define NVGPU_REQUEST_FIRMWARE_NO_SOC (1UL << 1)
32
33struct nvgpu_firmware {
34 u8 *data;
35 size_t size;
36};
37
38/**
39 * nvgpu_request_firmware - load a firmware blob from filesystem.
40 *
41 * @g The GPU driver struct for device to load firmware for
42 * @fw_name The base name of the firmware file.
43 * @flags Flags for loading;
44 *
45 * NVGPU_REQUEST_FIRMWARE_NO_WARN: Do not display warning on
46 * failed load.
47 *
48 * NVGPU_REQUEST_FIRMWARE_NO_SOC: Do not attempt loading from
49 * path <SOC_NAME>.
50 *
51 * nvgpu_request_firmware() will load firmware from:
52 *
53 * <system firmware load path>/<GPU name>/<fw_name>
54 *
55 * If that fails and NO_SOC is not enabled, it'll try next from:
56 *
57 * <system firmware load path>/<SOC name>/<fw_name>
58 *
59 * It'll allocate a nvgpu_firmware structure and initializes it and returns
60 * it to caller.
61 */
62struct nvgpu_firmware *nvgpu_request_firmware(struct gk20a *g,
63 const char *fw_name,
64 int flags);
65
66/**
67 * nvgpu_release_firmware - free firmware and associated nvgpu_firmware blob
68 *
69 * @g The GPU driver struct for device to free firmware for
70 * @fw The firmware to free. fw blob will also be freed.
71 */
72void nvgpu_release_firmware(struct gk20a *g, struct nvgpu_firmware *fw);
73
74#endif /* NVGPU_FIRMWARE_H */
diff --git a/include/nvgpu/flcnif_cmn.h b/include/nvgpu/flcnif_cmn.h
deleted file mode 100644
index 273da1e..0000000
--- a/include/nvgpu/flcnif_cmn.h
+++ /dev/null
@@ -1,121 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_FLCNIF_CMN_H
24#define NVGPU_FLCNIF_CMN_H
25
26#define PMU_CMD_SUBMIT_PAYLOAD_PARAMS_FB_SIZE_UNUSED 0
27
28struct falc_u64 {
29 u32 lo;
30 u32 hi;
31};
32
33struct falc_dma_addr {
34 u32 dma_base;
35 /*
36 * dma_base1 is 9-bit MSB for FB Base
37 * address for the transfer in FB after
38 * address using 49b FB address
39 */
40 u16 dma_base1;
41 u8 dma_offset;
42};
43
44struct pmu_mem_v1 {
45 u32 dma_base;
46 u8 dma_offset;
47 u8 dma_idx;
48 u16 fb_size;
49};
50
51struct pmu_mem_desc_v0 {
52 struct falc_u64 dma_addr;
53 u16 dma_sizemax;
54 u8 dma_idx;
55};
56
57struct pmu_dmem {
58 u16 size;
59 u32 offset;
60};
61
62struct flcn_mem_desc_v0 {
63 struct falc_u64 address;
64 u32 params;
65};
66
67#define nv_flcn_mem_desc flcn_mem_desc_v0
68
69struct pmu_allocation_v1 {
70 struct {
71 struct pmu_dmem dmem;
72 struct pmu_mem_v1 fb;
73 } alloc;
74};
75
76struct pmu_allocation_v2 {
77 struct {
78 struct pmu_dmem dmem;
79 struct pmu_mem_desc_v0 fb;
80 } alloc;
81};
82
83struct pmu_allocation_v3 {
84 struct {
85 struct pmu_dmem dmem;
86 struct flcn_mem_desc_v0 fb;
87 } alloc;
88};
89
90#define nv_pmu_allocation pmu_allocation_v3
91
92struct pmu_hdr {
93 u8 unit_id;
94 u8 size;
95 u8 ctrl_flags;
96 u8 seq_id;
97};
98
99#define NV_FLCN_UNIT_ID_REWIND (0x00U)
100
101#define PMU_MSG_HDR_SIZE sizeof(struct pmu_hdr)
102#define PMU_CMD_HDR_SIZE sizeof(struct pmu_hdr)
103
104#define nv_pmu_hdr pmu_hdr
105typedef u8 flcn_status;
106
107#define PMU_DMEM_ALLOC_ALIGNMENT (32)
108#define PMU_DMEM_ALIGNMENT (4)
109
110#define PMU_CMD_FLAGS_PMU_MASK (0xF0)
111
112#define PMU_CMD_FLAGS_STATUS BIT(0)
113#define PMU_CMD_FLAGS_INTR BIT(1)
114#define PMU_CMD_FLAGS_EVENT BIT(2)
115#define PMU_CMD_FLAGS_WATERMARK BIT(3)
116
117#define ALIGN_UP(v, gran) (((v) + ((gran) - 1)) & ~((gran)-1))
118
119#define NV_UNSIGNED_ROUNDED_DIV(a, b) (((a) + ((b) / 2)) / (b))
120
121#endif /* NVGPU_FLCNIF_CMN_H */
diff --git a/include/nvgpu/fuse.h b/include/nvgpu/fuse.h
deleted file mode 100644
index 1d459a9..0000000
--- a/include/nvgpu/fuse.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_FUSE_H
23#define NVGPU_FUSE_H
24
25struct gk20a;
26
27#include <nvgpu/types.h>
28
29int nvgpu_tegra_get_gpu_speedo_id(struct gk20a *g);
30
31void nvgpu_tegra_fuse_write_bypass(struct gk20a *g, u32 val);
32void nvgpu_tegra_fuse_write_access_sw(struct gk20a *g, u32 val);
33void nvgpu_tegra_fuse_write_opt_gpu_tpc0_disable(struct gk20a *g, u32 val);
34void nvgpu_tegra_fuse_write_opt_gpu_tpc1_disable(struct gk20a *g, u32 val);
35int nvgpu_tegra_fuse_read_gcplex_config_fuse(struct gk20a *g, u32 *val);
36int nvgpu_tegra_fuse_read_reserved_calib(struct gk20a *g, u32 *val);
37
38#endif /* NVGPU_FUSE_H */
diff --git a/include/nvgpu/gk20a.h b/include/nvgpu/gk20a.h
deleted file mode 100644
index 19bfaee..0000000
--- a/include/nvgpu/gk20a.h
+++ /dev/null
@@ -1,1807 +0,0 @@
1/*
2 * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved.
3 *
4 * GK20A Graphics
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24#ifndef GK20A_H
25#define GK20A_H
26
27struct gk20a;
28struct fifo_gk20a;
29struct channel_gk20a;
30struct gr_gk20a;
31struct sim_nvgpu;
32struct gk20a_ctxsw_ucode_segments;
33struct gk20a_fecs_trace;
34struct gk20a_ctxsw_trace;
35struct acr_desc;
36struct nvgpu_mem_alloc_tracker;
37struct dbg_profiler_object_data;
38struct gk20a_debug_output;
39struct nvgpu_clk_pll_debug_data;
40struct nvgpu_nvhost_dev;
41struct nvgpu_cpu_time_correlation_sample;
42struct nvgpu_mem_sgt;
43struct nvgpu_warpstate;
44struct nvgpu_clk_session;
45struct nvgpu_clk_arb;
46#ifdef CONFIG_GK20A_CTXSW_TRACE
47struct nvgpu_gpu_ctxsw_trace_filter;
48#endif
49struct priv_cmd_entry;
50struct nvgpu_setup_bind_args;
51
52#ifdef __KERNEL__
53#include <linux/notifier.h>
54#endif
55#include <nvgpu/lock.h>
56#include <nvgpu/thread.h>
57
58#include <nvgpu/mm.h>
59#include <nvgpu/as.h>
60#include <nvgpu/log.h>
61#include <nvgpu/pramin.h>
62#include <nvgpu/acr/nvgpu_acr.h>
63#include <nvgpu/kref.h>
64#include <nvgpu/falcon.h>
65#include <nvgpu/pmu.h>
66#include <nvgpu/atomic.h>
67#include <nvgpu/barrier.h>
68#include <nvgpu/rwsem.h>
69#include <nvgpu/nvlink.h>
70#include <nvgpu/sim.h>
71#include <nvgpu/ecc.h>
72#include <nvgpu/tsg.h>
73#include <nvgpu/sec2.h>
74#include <nvgpu/sched.h>
75
76#include "gk20a/clk_gk20a.h"
77#include "gk20a/ce2_gk20a.h"
78#include "gk20a/fifo_gk20a.h"
79#include "clk/clk.h"
80#include "pmu_perf/pmu_perf.h"
81#include "pmgr/pmgr.h"
82#include "therm/thrm.h"
83
84#ifdef CONFIG_DEBUG_FS
85struct railgate_stats {
86 unsigned long last_rail_gate_start;
87 unsigned long last_rail_gate_complete;
88 unsigned long last_rail_ungate_start;
89 unsigned long last_rail_ungate_complete;
90 unsigned long total_rail_gate_time_ms;
91 unsigned long total_rail_ungate_time_ms;
92 unsigned long railgating_cycle_count;
93};
94#endif
95
96enum gk20a_cbc_op {
97 gk20a_cbc_op_clear,
98 gk20a_cbc_op_clean,
99 gk20a_cbc_op_invalidate,
100};
101
102#define MC_INTR_UNIT_DISABLE false
103#define MC_INTR_UNIT_ENABLE true
104
105#define GPU_LIT_NUM_GPCS 0
106#define GPU_LIT_NUM_PES_PER_GPC 1
107#define GPU_LIT_NUM_ZCULL_BANKS 2
108#define GPU_LIT_NUM_TPC_PER_GPC 3
109#define GPU_LIT_NUM_SM_PER_TPC 4
110#define GPU_LIT_NUM_FBPS 5
111#define GPU_LIT_GPC_BASE 6
112#define GPU_LIT_GPC_STRIDE 7
113#define GPU_LIT_GPC_SHARED_BASE 8
114#define GPU_LIT_TPC_IN_GPC_BASE 9
115#define GPU_LIT_TPC_IN_GPC_STRIDE 10
116#define GPU_LIT_TPC_IN_GPC_SHARED_BASE 11
117#define GPU_LIT_PPC_IN_GPC_BASE 12
118#define GPU_LIT_PPC_IN_GPC_STRIDE 13
119#define GPU_LIT_PPC_IN_GPC_SHARED_BASE 14
120#define GPU_LIT_ROP_BASE 15
121#define GPU_LIT_ROP_STRIDE 16
122#define GPU_LIT_ROP_SHARED_BASE 17
123#define GPU_LIT_HOST_NUM_ENGINES 18
124#define GPU_LIT_HOST_NUM_PBDMA 19
125#define GPU_LIT_LTC_STRIDE 20
126#define GPU_LIT_LTS_STRIDE 21
127#define GPU_LIT_NUM_FBPAS 22
128#define GPU_LIT_FBPA_STRIDE 23
129#define GPU_LIT_FBPA_BASE 24
130#define GPU_LIT_FBPA_SHARED_BASE 25
131#define GPU_LIT_SM_PRI_STRIDE 26
132#define GPU_LIT_SMPC_PRI_BASE 27
133#define GPU_LIT_SMPC_PRI_SHARED_BASE 28
134#define GPU_LIT_SMPC_PRI_UNIQUE_BASE 29
135#define GPU_LIT_SMPC_PRI_STRIDE 30
136#define GPU_LIT_TWOD_CLASS 31
137#define GPU_LIT_THREED_CLASS 32
138#define GPU_LIT_COMPUTE_CLASS 33
139#define GPU_LIT_GPFIFO_CLASS 34
140#define GPU_LIT_I2M_CLASS 35
141#define GPU_LIT_DMA_COPY_CLASS 36
142#define GPU_LIT_GPC_PRIV_STRIDE 37
143#define GPU_LIT_PERFMON_PMMGPCTPCA_DOMAIN_START 38
144#define GPU_LIT_PERFMON_PMMGPCTPCB_DOMAIN_START 39
145#define GPU_LIT_PERFMON_PMMGPCTPC_DOMAIN_COUNT 40
146#define GPU_LIT_PERFMON_PMMFBP_LTC_DOMAIN_START 41
147#define GPU_LIT_PERFMON_PMMFBP_LTC_DOMAIN_COUNT 42
148#define GPU_LIT_PERFMON_PMMFBP_ROP_DOMAIN_START 43
149#define GPU_LIT_PERFMON_PMMFBP_ROP_DOMAIN_COUNT 44
150
151#define nvgpu_get_litter_value(g, v) (g)->ops.get_litter_value((g), v)
152
153#define MAX_TPC_PG_CONFIGS 9
154
155enum nvgpu_unit;
156
157enum nvgpu_flush_op;
158enum gk20a_mem_rw_flag;
159
160struct _resmgr_context;
161struct nvgpu_gpfifo_entry;
162
163struct nvgpu_gpfifo_userdata {
164 struct nvgpu_gpfifo_entry __user *entries;
165 struct _resmgr_context *context;
166};
167
168/*
169 * gpu_ops should only contain function pointers! Non-function pointer members
170 * should go in struct gk20a or be implemented with the boolean flag API defined
171 * in nvgpu/enabled.h
172 */
173
174/* index for FB fault buffer functions */
175#define NVGPU_FB_MMU_FAULT_NONREPLAY_REG_INDEX 0U
176#define NVGPU_FB_MMU_FAULT_REPLAY_REG_INDEX 1U
177#define NVGPU_FB_MMU_FAULT_BUF_DISABLED 0U
178#define NVGPU_FB_MMU_FAULT_BUF_ENABLED 1U
179
180/* Parameters for init_elcg_mode/init_blcg_mode */
181enum {
182 ELCG_RUN, /* clk always run, i.e. disable elcg */
183 ELCG_STOP, /* clk is stopped */
184 ELCG_AUTO /* clk will run when non-idle, standard elcg mode */
185};
186
187enum {
188 BLCG_RUN, /* clk always run, i.e. disable blcg */
189 BLCG_AUTO /* clk will run when non-idle, standard blcg mode */
190};
191
192struct gpu_ops {
193 struct {
194 int (*determine_L2_size_bytes)(struct gk20a *gk20a);
195 u64 (*get_cbc_base_divisor)(struct gk20a *g);
196 int (*init_comptags)(struct gk20a *g, struct gr_gk20a *gr);
197 int (*cbc_ctrl)(struct gk20a *g, enum gk20a_cbc_op op,
198 u32 min, u32 max);
199 void (*set_zbc_color_entry)(struct gk20a *g,
200 struct zbc_entry *color_val,
201 u32 index);
202 void (*set_zbc_depth_entry)(struct gk20a *g,
203 struct zbc_entry *depth_val,
204 u32 index);
205 void (*set_zbc_s_entry)(struct gk20a *g,
206 struct zbc_entry *s_val,
207 u32 index);
208 void (*init_cbc)(struct gk20a *g, struct gr_gk20a *gr);
209 void (*set_enabled)(struct gk20a *g, bool enabled);
210 void (*init_fs_state)(struct gk20a *g);
211 void (*isr)(struct gk20a *g);
212 u32 (*cbc_fix_config)(struct gk20a *g, int base);
213 void (*flush)(struct gk20a *g);
214 void (*intr_en_illegal_compstat)(struct gk20a *g, bool enable);
215 bool (*pri_is_ltc_addr)(struct gk20a *g, u32 addr);
216 bool (*is_ltcs_ltss_addr)(struct gk20a *g, u32 addr);
217 bool (*is_ltcn_ltss_addr)(struct gk20a *g, u32 addr);
218 void (*split_lts_broadcast_addr)(struct gk20a *g, u32 addr,
219 u32 *priv_addr_table,
220 u32 *priv_addr_table_index);
221 void (*split_ltc_broadcast_addr)(struct gk20a *g, u32 addr,
222 u32 *priv_addr_table,
223 u32 *priv_addr_table_index);
224 } ltc;
225 struct {
226 void (*isr_stall)(struct gk20a *g, u32 inst_id, u32 pri_base);
227 u32 (*isr_nonstall)(struct gk20a *g, u32 inst_id, u32 pri_base);
228 u32 (*get_num_pce)(struct gk20a *g);
229 void (*init_prod_values)(struct gk20a *g);
230 } ce2;
231 struct {
232 u32 (*get_patch_slots)(struct gk20a *g);
233 int (*init_fs_state)(struct gk20a *g);
234 int (*init_preemption_state)(struct gk20a *g);
235 void (*access_smpc_reg)(struct gk20a *g, u32 quad, u32 offset);
236 void (*bundle_cb_defaults)(struct gk20a *g);
237 void (*cb_size_default)(struct gk20a *g);
238 int (*calc_global_ctx_buffer_size)(struct gk20a *g);
239 void (*commit_global_attrib_cb)(struct gk20a *g,
240 struct nvgpu_gr_ctx *ch_ctx,
241 u64 addr, bool patch);
242 void (*commit_global_bundle_cb)(struct gk20a *g,
243 struct nvgpu_gr_ctx *ch_ctx,
244 u64 addr, u64 size, bool patch);
245 int (*commit_global_cb_manager)(struct gk20a *g,
246 struct channel_gk20a *ch,
247 bool patch);
248 void (*commit_global_pagepool)(struct gk20a *g,
249 struct nvgpu_gr_ctx *ch_ctx,
250 u64 addr, u32 size, bool patch);
251 void (*init_gpc_mmu)(struct gk20a *g);
252 int (*handle_sw_method)(struct gk20a *g, u32 addr,
253 u32 class_num, u32 offset, u32 data);
254 void (*set_alpha_circular_buffer_size)(struct gk20a *g,
255 u32 data);
256 void (*set_circular_buffer_size)(struct gk20a *g, u32 data);
257 void (*set_bes_crop_debug3)(struct gk20a *g, u32 data);
258 void (*set_bes_crop_debug4)(struct gk20a *g, u32 data);
259 void (*enable_hww_exceptions)(struct gk20a *g);
260 bool (*is_valid_class)(struct gk20a *g, u32 class_num);
261 bool (*is_valid_gfx_class)(struct gk20a *g, u32 class_num);
262 bool (*is_valid_compute_class)(struct gk20a *g, u32 class_num);
263 void (*get_sm_dsm_perf_regs)(struct gk20a *g,
264 u32 *num_sm_dsm_perf_regs,
265 u32 **sm_dsm_perf_regs,
266 u32 *perf_register_stride);
267 void (*get_sm_dsm_perf_ctrl_regs)(struct gk20a *g,
268 u32 *num_sm_dsm_perf_regs,
269 u32 **sm_dsm_perf_regs,
270 u32 *perf_register_stride);
271 void (*get_ovr_perf_regs)(struct gk20a *g,
272 u32 *num_ovr_perf_regs,
273 u32 **ovr_perf_regsr);
274 void (*set_hww_esr_report_mask)(struct gk20a *g);
275 int (*setup_alpha_beta_tables)(struct gk20a *g,
276 struct gr_gk20a *gr);
277 int (*falcon_load_ucode)(struct gk20a *g,
278 u64 addr_base,
279 struct gk20a_ctxsw_ucode_segments *segments,
280 u32 reg_offset);
281 int (*load_ctxsw_ucode)(struct gk20a *g);
282 u32 (*get_gpc_mask)(struct gk20a *g);
283 u32 (*get_gpc_tpc_mask)(struct gk20a *g, u32 gpc_index);
284 void (*set_gpc_tpc_mask)(struct gk20a *g, u32 gpc_index);
285 int (*alloc_obj_ctx)(struct channel_gk20a *c,
286 u32 class_num, u32 flags);
287 int (*bind_ctxsw_zcull)(struct gk20a *g, struct gr_gk20a *gr,
288 struct channel_gk20a *c, u64 zcull_va,
289 u32 mode);
290 int (*get_zcull_info)(struct gk20a *g, struct gr_gk20a *gr,
291 struct gr_zcull_info *zcull_params);
292 int (*decode_egpc_addr)(struct gk20a *g,
293 u32 addr, enum ctxsw_addr_type *addr_type,
294 u32 *gpc_num, u32 *tpc_num, u32 *broadcast_flags);
295 void (*egpc_etpc_priv_addr_table)(struct gk20a *g, u32 addr,
296 u32 gpc, u32 tpc, u32 broadcast_flags,
297 u32 *priv_addr_table,
298 u32 *priv_addr_table_index);
299 bool (*is_tpc_addr)(struct gk20a *g, u32 addr);
300 bool (*is_egpc_addr)(struct gk20a *g, u32 addr);
301 bool (*is_etpc_addr)(struct gk20a *g, u32 addr);
302 void (*get_egpc_etpc_num)(struct gk20a *g, u32 addr,
303 u32 *gpc_num, u32 *tpc_num);
304 u32 (*get_tpc_num)(struct gk20a *g, u32 addr);
305 u32 (*get_egpc_base)(struct gk20a *g);
306 void (*detect_sm_arch)(struct gk20a *g);
307 int (*add_zbc_color)(struct gk20a *g, struct gr_gk20a *gr,
308 struct zbc_entry *color_val, u32 index);
309 int (*add_zbc_depth)(struct gk20a *g, struct gr_gk20a *gr,
310 struct zbc_entry *depth_val, u32 index);
311 int (*add_zbc_s)(struct gk20a *g, struct gr_gk20a *gr,
312 struct zbc_entry *s_val, u32 index);
313 int (*zbc_set_table)(struct gk20a *g, struct gr_gk20a *gr,
314 struct zbc_entry *zbc_val);
315 int (*zbc_query_table)(struct gk20a *g, struct gr_gk20a *gr,
316 struct zbc_query_params *query_params);
317 int (*zbc_s_query_table)(struct gk20a *g, struct gr_gk20a *gr,
318 struct zbc_query_params *query_params);
319 int (*load_zbc_s_default_tbl)(struct gk20a *g,
320 struct gr_gk20a *gr);
321 int (*load_zbc_s_tbl)(struct gk20a *g,
322 struct gr_gk20a *gr);
323 void (*pmu_save_zbc)(struct gk20a *g, u32 entries);
324 int (*add_zbc)(struct gk20a *g, struct gr_gk20a *gr,
325 struct zbc_entry *zbc_val);
326 bool (*add_zbc_type_s)(struct gk20a *g, struct gr_gk20a *gr,
327 struct zbc_entry *zbc_val, int *ret_val);
328 u32 (*pagepool_default_size)(struct gk20a *g);
329 int (*init_ctx_state)(struct gk20a *g);
330 int (*alloc_gr_ctx)(struct gk20a *g,
331 struct nvgpu_gr_ctx *gr_ctx, struct vm_gk20a *vm,
332 u32 class, u32 padding);
333 void (*free_gr_ctx)(struct gk20a *g,
334 struct vm_gk20a *vm, struct nvgpu_gr_ctx *gr_ctx);
335 void (*powergate_tpc)(struct gk20a *g);
336 void (*update_ctxsw_preemption_mode)(struct gk20a *g,
337 struct channel_gk20a *c,
338 struct nvgpu_mem *mem);
339 int (*update_smpc_ctxsw_mode)(struct gk20a *g,
340 struct channel_gk20a *c,
341 bool enable);
342 u32 (*get_hw_accessor_stream_out_mode)(void);
343 int (*update_hwpm_ctxsw_mode)(struct gk20a *g,
344 struct channel_gk20a *c,
345 u64 gpu_va,
346 u32 mode);
347 void (*init_hwpm_pmm_register)(struct gk20a *g);
348 void (*get_num_hwpm_perfmon)(struct gk20a *g, u32 *num_sys_perfmon,
349 u32 *num_fbp_perfmon, u32 *num_gpc_perfmon);
350 void (*set_pmm_register)(struct gk20a *g, u32 offset, u32 val,
351 u32 num_chiplets, u32 num_perfmons);
352 int (*dump_gr_regs)(struct gk20a *g,
353 struct gk20a_debug_output *o);
354 int (*update_pc_sampling)(struct channel_gk20a *ch,
355 bool enable);
356 u32 (*get_max_fbps_count)(struct gk20a *g);
357 u32 (*get_fbp_en_mask)(struct gk20a *g);
358 u32 (*get_max_ltc_per_fbp)(struct gk20a *g);
359 u32 (*get_max_lts_per_ltc)(struct gk20a *g);
360 u32* (*get_rop_l2_en_mask)(struct gk20a *g);
361 void (*init_sm_dsm_reg_info)(void);
362 void (*init_ovr_sm_dsm_perf)(void);
363 int (*wait_empty)(struct gk20a *g, unsigned long duration_ms,
364 u32 expect_delay);
365 void (*init_cyclestats)(struct gk20a *g);
366 void (*enable_cde_in_fecs)(struct gk20a *g,
367 struct nvgpu_mem *mem);
368 int (*set_sm_debug_mode)(struct gk20a *g, struct channel_gk20a *ch,
369 u64 sms, bool enable);
370 void (*bpt_reg_info)(struct gk20a *g,
371 struct nvgpu_warpstate *w_state);
372 void (*get_access_map)(struct gk20a *g,
373 u32 **whitelist, int *num_entries);
374 int (*handle_fecs_error)(struct gk20a *g,
375 struct channel_gk20a *ch,
376 struct gr_gk20a_isr_data *isr_data);
377 int (*pre_process_sm_exception)(struct gk20a *g,
378 u32 gpc, u32 tpc, u32 sm, u32 global_esr, u32 warp_esr,
379 bool sm_debugger_attached,
380 struct channel_gk20a *fault_ch,
381 bool *early_exit, bool *ignore_debugger);
382 u32 (*get_sm_hww_warp_esr)(struct gk20a *g,
383 u32 gpc, u32 tpc, u32 sm);
384 u32 (*get_sm_hww_global_esr)(struct gk20a *g,
385 u32 gpc, u32 tpc, u32 sm);
386 u32 (*get_sm_no_lock_down_hww_global_esr_mask)(struct gk20a *g);
387 int (*lock_down_sm)(struct gk20a *g, u32 gpc, u32 tpc, u32 sm,
388 u32 global_esr_mask, bool check_errors);
389 int (*wait_for_sm_lock_down)(struct gk20a *g, u32 gpc, u32 tpc,
390 u32 sm, u32 global_esr_mask, bool check_errors);
391 void (*clear_sm_hww)(struct gk20a *g, u32 gpc, u32 tpc, u32 sm,
392 u32 global_esr);
393 void (*get_esr_sm_sel)(struct gk20a *g, u32 gpc, u32 tpc,
394 u32 *esr_sm_sel);
395 int (*handle_tpc_sm_ecc_exception)(struct gk20a *g,
396 u32 gpc, u32 tpc,
397 bool *post_event, struct channel_gk20a *fault_ch,
398 u32 *hww_global_esr);
399 int (*handle_sm_exception)(struct gk20a *g,
400 u32 gpc, u32 tpc, u32 sm,
401 bool *post_event, struct channel_gk20a *fault_ch,
402 u32 *hww_global_esr);
403 int (*handle_gcc_exception)(struct gk20a *g, u32 gpc, u32 tpc,
404 bool *post_event, struct channel_gk20a *fault_ch,
405 u32 *hww_global_esr);
406 int (*handle_tex_exception)(struct gk20a *g, u32 gpc, u32 tpc,
407 bool *post_event);
408 int (*handle_tpc_mpc_exception)(struct gk20a *g,
409 u32 gpc, u32 tpc, bool *post_event);
410 int (*handle_gpc_gpccs_exception)(struct gk20a *g, u32 gpc,
411 u32 gpc_exception);
412 int (*handle_gpc_gpcmmu_exception)(struct gk20a *g, u32 gpc,
413 u32 gpc_exception);
414 void (*enable_gpc_exceptions)(struct gk20a *g);
415 void (*enable_exceptions)(struct gk20a *g);
416 int (*init_ecc)(struct gk20a *g);
417 u32 (*get_lrf_tex_ltc_dram_override)(struct gk20a *g);
418 int (*record_sm_error_state)(struct gk20a *g, u32 gpc, u32 tpc,
419 u32 sm, struct channel_gk20a *fault_ch);
420 int (*clear_sm_error_state)(struct gk20a *g,
421 struct channel_gk20a *ch, u32 sm_id);
422 int (*suspend_contexts)(struct gk20a *g,
423 struct dbg_session_gk20a *dbg_s,
424 int *ctx_resident_ch_fd);
425 int (*resume_contexts)(struct gk20a *g,
426 struct dbg_session_gk20a *dbg_s,
427 int *ctx_resident_ch_fd);
428 int (*set_preemption_mode)(struct channel_gk20a *ch,
429 u32 graphics_preempt_mode,
430 u32 compute_preempt_mode);
431 int (*get_preemption_mode_flags)(struct gk20a *g,
432 struct nvgpu_preemption_modes_rec *preemption_modes_rec);
433 int (*set_ctxsw_preemption_mode)(struct gk20a *g,
434 struct nvgpu_gr_ctx *gr_ctx,
435 struct vm_gk20a *vm, u32 class,
436 u32 graphics_preempt_mode,
437 u32 compute_preempt_mode);
438 int (*set_boosted_ctx)(struct channel_gk20a *ch, bool boost);
439 void (*update_boosted_ctx)(struct gk20a *g,
440 struct nvgpu_mem *mem,
441 struct nvgpu_gr_ctx *gr_ctx);
442 int (*init_sm_id_table)(struct gk20a *g);
443 int (*load_smid_config)(struct gk20a *g);
444 void (*program_sm_id_numbering)(struct gk20a *g,
445 u32 gpc, u32 tpc, u32 smid);
446 void (*program_active_tpc_counts)(struct gk20a *g, u32 gpc);
447 int (*setup_rop_mapping)(struct gk20a *g, struct gr_gk20a *gr);
448 int (*init_sw_veid_bundle)(struct gk20a *g);
449 void (*program_zcull_mapping)(struct gk20a *g,
450 u32 zcull_alloc_num, u32 *zcull_map_tiles);
451 int (*commit_global_timeslice)(struct gk20a *g,
452 struct channel_gk20a *c);
453 int (*commit_inst)(struct channel_gk20a *c, u64 gpu_va);
454 void (*write_zcull_ptr)(struct gk20a *g,
455 struct nvgpu_mem *mem, u64 gpu_va);
456 void (*write_pm_ptr)(struct gk20a *g,
457 struct nvgpu_mem *mem, u64 gpu_va);
458 void (*set_preemption_buffer_va)(struct gk20a *g,
459 struct nvgpu_mem *mem, u64 gpu_va);
460 void (*load_tpc_mask)(struct gk20a *g);
461 int (*trigger_suspend)(struct gk20a *g);
462 int (*wait_for_pause)(struct gk20a *g, struct nvgpu_warpstate *w_state);
463 int (*resume_from_pause)(struct gk20a *g);
464 int (*clear_sm_errors)(struct gk20a *g);
465 u32 (*tpc_enabled_exceptions)(struct gk20a *g);
466 int (*set_czf_bypass)(struct gk20a *g,
467 struct channel_gk20a *ch);
468 void (*init_czf_bypass)(struct gk20a *g);
469 bool (*sm_debugger_attached)(struct gk20a *g);
470 void (*suspend_single_sm)(struct gk20a *g,
471 u32 gpc, u32 tpc, u32 sm,
472 u32 global_esr_mask, bool check_errors);
473 void (*suspend_all_sms)(struct gk20a *g,
474 u32 global_esr_mask, bool check_errors);
475 void (*resume_single_sm)(struct gk20a *g,
476 u32 gpc, u32 tpc, u32 sm);
477 void (*resume_all_sms)(struct gk20a *g);
478 void (*disable_rd_coalesce)(struct gk20a *g);
479 void (*init_ctxsw_hdr_data)(struct gk20a *g,
480 struct nvgpu_mem *mem);
481 void (*init_gfxp_wfi_timeout_count)(struct gk20a *g);
482 unsigned long (*get_max_gfxp_wfi_timeout_count)
483 (struct gk20a *g);
484 void (*ecc_init_scrub_reg)(struct gk20a *g);
485 u32 (*get_gpcs_swdx_dss_zbc_c_format_reg)(struct gk20a *g);
486 u32 (*get_gpcs_swdx_dss_zbc_z_format_reg)(struct gk20a *g);
487 void (*dump_ctxsw_stats)(struct gk20a *g, struct vm_gk20a *vm,
488 struct nvgpu_gr_ctx *gr_ctx);
489 void (*fecs_host_int_enable)(struct gk20a *g);
490 int (*handle_ssync_hww)(struct gk20a *g);
491 int (*handle_notify_pending)(struct gk20a *g,
492 struct gr_gk20a_isr_data *isr_data);
493 int (*handle_semaphore_pending)(struct gk20a *g,
494 struct gr_gk20a_isr_data *isr_data);
495 int (*add_ctxsw_reg_pm_fbpa)(struct gk20a *g,
496 struct ctxsw_buf_offset_map_entry *map,
497 struct aiv_list_gk20a *regs,
498 u32 *count, u32 *offset,
499 u32 max_cnt, u32 base,
500 u32 num_fbpas, u32 stride, u32 mask);
501 int (*add_ctxsw_reg_perf_pma)(struct ctxsw_buf_offset_map_entry *map,
502 struct aiv_list_gk20a *regs,
503 u32 *count, u32 *offset,
504 u32 max_cnt, u32 base, u32 mask);
505 int (*decode_priv_addr)(struct gk20a *g, u32 addr,
506 enum ctxsw_addr_type *addr_type,
507 u32 *gpc_num, u32 *tpc_num,
508 u32 *ppc_num, u32 *be_num,
509 u32 *broadcast_flags);
510 int (*create_priv_addr_table)(struct gk20a *g,
511 u32 addr,
512 u32 *priv_addr_table,
513 u32 *num_registers);
514 u32 (*get_pmm_per_chiplet_offset)(void);
515 void (*split_fbpa_broadcast_addr)(struct gk20a *g, u32 addr,
516 u32 num_fbpas,
517 u32 *priv_addr_table,
518 u32 *priv_addr_table_index);
519 u32 (*fecs_ctxsw_mailbox_size)(void);
520 u32 (*gpc0_gpccs_ctxsw_mailbox_size)(void);
521 int (*init_sw_bundle64)(struct gk20a *g);
522 int (*alloc_global_ctx_buffers)(struct gk20a *g);
523 int (*map_global_ctx_buffers)(struct gk20a *g,
524 struct channel_gk20a *c);
525 int (*commit_global_ctx_buffers)(struct gk20a *g,
526 struct channel_gk20a *c, bool patch);
527 u32 (*get_nonpes_aware_tpc)(struct gk20a *g, u32 gpc, u32 tpc);
528 int (*get_offset_in_gpccs_segment)(struct gk20a *g,
529 enum ctxsw_addr_type addr_type, u32 num_tpcs,
530 u32 num_ppcs, u32 reg_list_ppc_count,
531 u32 *__offset_in_segment);
532 void (*set_debug_mode)(struct gk20a *g, bool enable);
533 int (*set_mmu_debug_mode)(struct gk20a *g,
534 struct channel_gk20a *ch, bool enable);
535 int (*set_fecs_watchdog_timeout)(struct gk20a *g);
536 } gr;
537 struct {
538 void (*init_hw)(struct gk20a *g);
539 void (*init_cbc)(struct gk20a *g, struct gr_gk20a *gr);
540 void (*init_fs_state)(struct gk20a *g);
541 void (*init_uncompressed_kind_map)(struct gk20a *g);
542 void (*init_kind_attr)(struct gk20a *g);
543 void (*set_mmu_page_size)(struct gk20a *g);
544 bool (*set_use_full_comp_tag_line)(struct gk20a *g);
545 u32 (*mmu_ctrl)(struct gk20a *g);
546 u32 (*mmu_debug_ctrl)(struct gk20a *g);
547 u32 (*mmu_debug_wr)(struct gk20a *g);
548 u32 (*mmu_debug_rd)(struct gk20a *g);
549
550 /*
551 * Compression tag line coverage. When mapping a compressible
552 * buffer, ctagline is increased when the virtual address
553 * crosses over the compression page boundary.
554 */
555 unsigned int (*compression_page_size)(struct gk20a *g);
556
557 /*
558 * Minimum page size that can be used for compressible kinds.
559 */
560 unsigned int (*compressible_page_size)(struct gk20a *g);
561
562 /*
563 * Compressible kind mappings: Mask for the virtual and physical
564 * address bits that must match.
565 */
566 u32 (*compression_align_mask)(struct gk20a *g);
567
568 void (*dump_vpr_info)(struct gk20a *g);
569 void (*dump_wpr_info)(struct gk20a *g);
570 int (*vpr_info_fetch)(struct gk20a *g);
571 void (*read_wpr_info)(struct gk20a *g,
572 struct wpr_carveout_info *inf);
573 bool (*is_debug_mode_enabled)(struct gk20a *g);
574 void (*set_debug_mode)(struct gk20a *g, bool enable);
575 void (*set_mmu_debug_mode)(struct gk20a *g, bool enable);
576 int (*tlb_invalidate)(struct gk20a *g, struct nvgpu_mem *pdb);
577 void (*hub_isr)(struct gk20a *g);
578 void (*handle_replayable_fault)(struct gk20a *g);
579 int (*mem_unlock)(struct gk20a *g);
580 int (*init_nvlink)(struct gk20a *g);
581 int (*enable_nvlink)(struct gk20a *g);
582 void (*enable_hub_intr)(struct gk20a *g);
583 void (*disable_hub_intr)(struct gk20a *g);
584 int (*init_fbpa)(struct gk20a *g);
585 void (*handle_fbpa_intr)(struct gk20a *g, u32 fbpa_id);
586 void (*write_mmu_fault_buffer_lo_hi)(struct gk20a *g, u32 index,
587 u32 addr_lo, u32 addr_hi);
588 void (*write_mmu_fault_buffer_get)(struct gk20a *g, u32 index,
589 u32 reg_val);
590 void (*write_mmu_fault_buffer_size)(struct gk20a *g, u32 index,
591 u32 reg_val);
592 void (*write_mmu_fault_status)(struct gk20a *g, u32 reg_val);
593 u32 (*read_mmu_fault_buffer_get)(struct gk20a *g, u32 index);
594 u32 (*read_mmu_fault_buffer_put)(struct gk20a *g, u32 index);
595 u32 (*read_mmu_fault_buffer_size)(struct gk20a *g, u32 index);
596 void (*read_mmu_fault_addr_lo_hi)(struct gk20a *g,
597 u32 *addr_lo, u32 *addr_hi);
598 void (*read_mmu_fault_inst_lo_hi)(struct gk20a *g,
599 u32 *inst_lo, u32 *inst_hi);
600 u32 (*read_mmu_fault_info)(struct gk20a *g);
601 u32 (*read_mmu_fault_status)(struct gk20a *g);
602 int (*mmu_invalidate_replay)(struct gk20a *g,
603 u32 invalidate_replay_val);
604 bool (*mmu_fault_pending)(struct gk20a *g);
605 bool (*is_fault_buf_enabled)(struct gk20a *g, u32 index);
606 void (*fault_buf_set_state_hw)(struct gk20a *g,
607 u32 index, u32 state);
608 void (*fault_buf_configure_hw)(struct gk20a *g, u32 index);
609 size_t (*get_vidmem_size)(struct gk20a *g);
610 int (*apply_pdb_cache_war)(struct gk20a *g);
611 } fb;
612 struct {
613 void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod);
614 void (*slcg_ce2_load_gating_prod)(struct gk20a *g, bool prod);
615 void (*slcg_chiplet_load_gating_prod)(struct gk20a *g, bool prod);
616 void (*slcg_ctxsw_firmware_load_gating_prod)(struct gk20a *g, bool prod);
617 void (*slcg_fb_load_gating_prod)(struct gk20a *g, bool prod);
618 void (*slcg_fifo_load_gating_prod)(struct gk20a *g, bool prod);
619 void (*slcg_gr_load_gating_prod)(struct gk20a *g, bool prod);
620 void (*slcg_ltc_load_gating_prod)(struct gk20a *g, bool prod);
621 void (*slcg_perf_load_gating_prod)(struct gk20a *g, bool prod);
622 void (*slcg_priring_load_gating_prod)(struct gk20a *g, bool prod);
623 void (*slcg_pmu_load_gating_prod)(struct gk20a *g, bool prod);
624 void (*slcg_therm_load_gating_prod)(struct gk20a *g, bool prod);
625 void (*slcg_xbar_load_gating_prod)(struct gk20a *g, bool prod);
626 void (*slcg_hshub_load_gating_prod)(struct gk20a *g, bool prod);
627 void (*slcg_acb_load_gating_prod)(struct gk20a *g, bool prod);
628 void (*blcg_bus_load_gating_prod)(struct gk20a *g, bool prod);
629 void (*blcg_ce_load_gating_prod)(struct gk20a *g, bool prod);
630 void (*blcg_ctxsw_firmware_load_gating_prod)(struct gk20a *g, bool prod);
631 void (*blcg_fb_load_gating_prod)(struct gk20a *g, bool prod);
632 void (*blcg_fifo_load_gating_prod)(struct gk20a *g, bool prod);
633 void (*blcg_gr_load_gating_prod)(struct gk20a *g, bool prod);
634 void (*blcg_ltc_load_gating_prod)(struct gk20a *g, bool prod);
635 void (*blcg_pwr_csb_load_gating_prod)(struct gk20a *g, bool prod);
636 void (*blcg_pmu_load_gating_prod)(struct gk20a *g, bool prod);
637 void (*blcg_xbar_load_gating_prod)(struct gk20a *g, bool prod);
638 void (*blcg_hshub_load_gating_prod)(struct gk20a *g, bool prod);
639 void (*pg_gr_load_gating_prod)(struct gk20a *g, bool prod);
640 } clock_gating;
641 struct {
642 void (*post_events)(struct channel_gk20a *ch);
643 } debugger;
644 struct {
645 int (*setup_sw)(struct gk20a *g);
646 int (*init_fifo_setup_hw)(struct gk20a *g);
647 void (*bind_channel)(struct channel_gk20a *ch_gk20a);
648 void (*unbind_channel)(struct channel_gk20a *ch_gk20a);
649 void (*disable_channel)(struct channel_gk20a *ch);
650 void (*enable_channel)(struct channel_gk20a *ch);
651 int (*alloc_inst)(struct gk20a *g, struct channel_gk20a *ch);
652 void (*free_inst)(struct gk20a *g, struct channel_gk20a *ch);
653 int (*setup_ramfc)(struct channel_gk20a *c, u64 gpfifo_base,
654 u32 gpfifo_entries,
655 unsigned long acquire_timeout,
656 u32 flags);
657 int (*resetup_ramfc)(struct channel_gk20a *c);
658 int (*preempt_channel)(struct gk20a *g, struct channel_gk20a *ch);
659 int (*preempt_tsg)(struct gk20a *g, struct tsg_gk20a *tsg);
660 int (*enable_tsg)(struct tsg_gk20a *tsg);
661 int (*disable_tsg)(struct tsg_gk20a *tsg);
662 int (*tsg_verify_channel_status)(struct channel_gk20a *ch);
663 void (*tsg_verify_status_ctx_reload)(struct channel_gk20a *ch);
664 void (*tsg_verify_status_faulted)(struct channel_gk20a *ch);
665 int (*reschedule_runlist)(struct channel_gk20a *ch,
666 bool preempt_next);
667 int (*update_runlist)(struct gk20a *g, u32 runlist_id,
668 u32 chid, bool add,
669 bool wait_for_finish);
670 void (*trigger_mmu_fault)(struct gk20a *g,
671 unsigned long engine_ids);
672 void (*get_mmu_fault_info)(struct gk20a *g, u32 mmu_fault_id,
673 struct mmu_fault_info *mmfault);
674 void (*get_mmu_fault_desc)(struct mmu_fault_info *mmfault);
675 void (*get_mmu_fault_client_desc)(
676 struct mmu_fault_info *mmfault);
677 void (*get_mmu_fault_gpc_desc)(struct mmu_fault_info *mmfault);
678 void (*apply_pb_timeout)(struct gk20a *g);
679 void (*apply_ctxsw_timeout_intr)(struct gk20a *g);
680 int (*wait_engine_idle)(struct gk20a *g);
681 u32 (*get_num_fifos)(struct gk20a *g);
682 u32 (*get_pbdma_signature)(struct gk20a *g);
683 int (*set_runlist_interleave)(struct gk20a *g, u32 id,
684 u32 runlist_id,
685 u32 new_level);
686 int (*tsg_set_timeslice)(struct tsg_gk20a *tsg, u32 timeslice);
687 u32 (*default_timeslice_us)(struct gk20a *);
688 int (*force_reset_ch)(struct channel_gk20a *ch,
689 u32 err_code, bool verbose);
690 int (*engine_enum_from_type)(struct gk20a *g, u32 engine_type,
691 u32 *inst_id);
692 void (*device_info_data_parse)(struct gk20a *g,
693 u32 table_entry, u32 *inst_id,
694 u32 *pri_base, u32 *fault_id);
695 u32 (*device_info_fault_id)(u32 table_entry);
696 int (*tsg_bind_channel)(struct tsg_gk20a *tsg,
697 struct channel_gk20a *ch);
698 int (*tsg_unbind_channel)(struct channel_gk20a *ch);
699 int (*tsg_open)(struct tsg_gk20a *tsg);
700 void (*tsg_release)(struct tsg_gk20a *tsg);
701 u32 (*eng_runlist_base_size)(void);
702 int (*init_engine_info)(struct fifo_gk20a *f);
703 u32 (*runlist_entry_size)(void);
704 void (*get_tsg_runlist_entry)(struct tsg_gk20a *tsg,
705 u32 *runlist);
706 void (*get_ch_runlist_entry)(struct channel_gk20a *ch,
707 u32 *runlist);
708 u32 (*userd_gp_get)(struct gk20a *g, struct channel_gk20a *ch);
709 void (*userd_gp_put)(struct gk20a *g, struct channel_gk20a *ch);
710 u64 (*userd_pb_get)(struct gk20a *g, struct channel_gk20a *ch);
711 void (*free_channel_ctx_header)(struct channel_gk20a *ch);
712 bool (*is_fault_engine_subid_gpc)(struct gk20a *g,
713 u32 engine_subid);
714 void (*dump_pbdma_status)(struct gk20a *g,
715 struct gk20a_debug_output *o);
716 void (*dump_eng_status)(struct gk20a *g,
717 struct gk20a_debug_output *o);
718 void (*dump_channel_status_ramfc)(struct gk20a *g,
719 struct gk20a_debug_output *o, u32 chid,
720 struct ch_state *ch_state);
721 u32 (*intr_0_error_mask)(struct gk20a *g);
722 int (*is_preempt_pending)(struct gk20a *g, u32 id,
723 unsigned int id_type, bool preempt_retries_left);
724 void (*init_pbdma_intr_descs)(struct fifo_gk20a *f);
725 int (*reset_enable_hw)(struct gk20a *g);
726 int (*setup_userd)(struct channel_gk20a *c);
727 u32 (*pbdma_acquire_val)(u64 timeout);
728 void (*teardown_ch_tsg)(struct gk20a *g, u32 act_eng_bitmask,
729 u32 id, unsigned int id_type, unsigned int rc_type,
730 struct mmu_fault_info *mmfault);
731 void (*teardown_mask_intr)(struct gk20a *g);
732 void (*teardown_unmask_intr)(struct gk20a *g);
733 bool (*handle_sched_error)(struct gk20a *g);
734 bool (*handle_ctxsw_timeout)(struct gk20a *g, u32 fifo_intr);
735 unsigned int (*handle_pbdma_intr_0)(struct gk20a *g,
736 u32 pbdma_id, u32 pbdma_intr_0,
737 u32 *handled, u32 *error_notifier);
738 unsigned int (*handle_pbdma_intr_1)(struct gk20a *g,
739 u32 pbdma_id, u32 pbdma_intr_1,
740 u32 *handled, u32 *error_notifier);
741 void (*init_eng_method_buffers)(struct gk20a *g,
742 struct tsg_gk20a *tsg);
743 void (*deinit_eng_method_buffers)(struct gk20a *g,
744 struct tsg_gk20a *tsg);
745 u32 (*get_preempt_timeout)(struct gk20a *g);
746 void (*post_event_id)(struct tsg_gk20a *tsg, int event_id);
747 void (*ch_abort_clean_up)(struct channel_gk20a *ch);
748 bool (*check_tsg_ctxsw_timeout)(struct tsg_gk20a *tsg,
749 bool *verbose, u32 *ms);
750 bool (*check_ch_ctxsw_timeout)(struct channel_gk20a *ch,
751 bool *verbose, u32 *ms);
752 int (*channel_suspend)(struct gk20a *g);
753 int (*channel_resume)(struct gk20a *g);
754 void (*set_error_notifier)(struct channel_gk20a *ch, u32 error);
755#ifdef CONFIG_TEGRA_GK20A_NVHOST
756 int (*alloc_syncpt_buf)(struct channel_gk20a *c,
757 u32 syncpt_id, struct nvgpu_mem *syncpt_buf);
758 void (*free_syncpt_buf)(struct channel_gk20a *c,
759 struct nvgpu_mem *syncpt_buf);
760 void (*add_syncpt_wait_cmd)(struct gk20a *g,
761 struct priv_cmd_entry *cmd, u32 off,
762 u32 id, u32 thresh, u64 gpu_va);
763 u32 (*get_syncpt_wait_cmd_size)(void);
764 void (*add_syncpt_incr_cmd)(struct gk20a *g,
765 bool wfi_cmd, struct priv_cmd_entry *cmd,
766 u32 id, u64 gpu_va);
767 u32 (*get_syncpt_incr_cmd_size)(bool wfi_cmd);
768 int (*get_sync_ro_map)(struct vm_gk20a *vm,
769 u64 *base_gpuva, u32 *sync_size);
770 u32 (*get_syncpt_incr_per_release)(void);
771#endif
772 void (*runlist_hw_submit)(struct gk20a *g, u32 runlist_id,
773 u32 count, u32 buffer_index);
774 int (*runlist_wait_pending)(struct gk20a *g, u32 runlist_id);
775 void (*ring_channel_doorbell)(struct channel_gk20a *c);
776 u64 (*usermode_base)(struct gk20a *g);
777 u32 (*get_sema_wait_cmd_size)(void);
778 u32 (*get_sema_incr_cmd_size)(void);
779 void (*add_sema_cmd)(struct gk20a *g,
780 struct nvgpu_semaphore *s, u64 sema_va,
781 struct priv_cmd_entry *cmd,
782 u32 off, bool acquire, bool wfi);
783 int (*init_pdb_cache_war)(struct gk20a *g);
784 void (*deinit_pdb_cache_war)(struct gk20a *g);
785 } fifo;
786 struct pmu_v {
787 u32 (*get_pmu_cmdline_args_size)(struct nvgpu_pmu *pmu);
788 void (*set_pmu_cmdline_args_cpu_freq)(struct nvgpu_pmu *pmu,
789 u32 freq);
790 void (*set_pmu_cmdline_args_trace_size)(struct nvgpu_pmu *pmu,
791 u32 size);
792 void (*set_pmu_cmdline_args_trace_dma_base)(
793 struct nvgpu_pmu *pmu);
794 void (*config_pmu_cmdline_args_super_surface)(
795 struct nvgpu_pmu *pmu);
796 void (*set_pmu_cmdline_args_trace_dma_idx)(
797 struct nvgpu_pmu *pmu, u32 idx);
798 void * (*get_pmu_cmdline_args_ptr)(struct nvgpu_pmu *pmu);
799 u32 (*get_pmu_allocation_struct_size)(struct nvgpu_pmu *pmu);
800 void (*set_pmu_allocation_ptr)(struct nvgpu_pmu *pmu,
801 void **pmu_alloc_ptr, void *assign_ptr);
802 void (*pmu_allocation_set_dmem_size)(struct nvgpu_pmu *pmu,
803 void *pmu_alloc_ptr, u16 size);
804 u16 (*pmu_allocation_get_dmem_size)(struct nvgpu_pmu *pmu,
805 void *pmu_alloc_ptr);
806 u32 (*pmu_allocation_get_dmem_offset)(struct nvgpu_pmu *pmu,
807 void *pmu_alloc_ptr);
808 u32 * (*pmu_allocation_get_dmem_offset_addr)(
809 struct nvgpu_pmu *pmu, void *pmu_alloc_ptr);
810 void (*pmu_allocation_set_dmem_offset)(struct nvgpu_pmu *pmu,
811 void *pmu_alloc_ptr, u32 offset);
812 void * (*pmu_allocation_get_fb_addr)(
813 struct nvgpu_pmu *pmu, void *pmu_alloc_ptr);
814 u32 (*pmu_allocation_get_fb_size)(
815 struct nvgpu_pmu *pmu, void *pmu_alloc_ptr);
816 void (*get_pmu_init_msg_pmu_queue_params)(
817 struct nvgpu_falcon_queue *queue, u32 id,
818 void *pmu_init_msg);
819 void *(*get_pmu_msg_pmu_init_msg_ptr)(
820 struct pmu_init_msg *init);
821 u16 (*get_pmu_init_msg_pmu_sw_mg_off)(
822 union pmu_init_msg_pmu *init_msg);
823 u16 (*get_pmu_init_msg_pmu_sw_mg_size)(
824 union pmu_init_msg_pmu *init_msg);
825 u32 (*get_pmu_perfmon_cmd_start_size)(void);
826 int (*get_perfmon_cmd_start_offsetofvar)(
827 enum pmu_perfmon_cmd_start_fields field);
828 void (*perfmon_start_set_cmd_type)(struct pmu_perfmon_cmd *pc,
829 u8 value);
830 void (*perfmon_start_set_group_id)(struct pmu_perfmon_cmd *pc,
831 u8 value);
832 void (*perfmon_start_set_state_id)(struct pmu_perfmon_cmd *pc,
833 u8 value);
834 void (*perfmon_start_set_flags)(struct pmu_perfmon_cmd *pc,
835 u8 value);
836 u8 (*perfmon_start_get_flags)(struct pmu_perfmon_cmd *pc);
837 u32 (*get_pmu_perfmon_cmd_init_size)(void);
838 int (*get_perfmon_cmd_init_offsetofvar)(
839 enum pmu_perfmon_cmd_start_fields field);
840 void (*perfmon_cmd_init_set_sample_buffer)(
841 struct pmu_perfmon_cmd *pc, u16 value);
842 void (*perfmon_cmd_init_set_dec_cnt)(
843 struct pmu_perfmon_cmd *pc, u8 value);
844 void (*perfmon_cmd_init_set_base_cnt_id)(
845 struct pmu_perfmon_cmd *pc, u8 value);
846 void (*perfmon_cmd_init_set_samp_period_us)(
847 struct pmu_perfmon_cmd *pc, u32 value);
848 void (*perfmon_cmd_init_set_num_cnt)(struct pmu_perfmon_cmd *pc,
849 u8 value);
850 void (*perfmon_cmd_init_set_mov_avg)(struct pmu_perfmon_cmd *pc,
851 u8 value);
852 void *(*get_pmu_seq_in_a_ptr)(
853 struct pmu_sequence *seq);
854 void *(*get_pmu_seq_out_a_ptr)(
855 struct pmu_sequence *seq);
856 void (*set_pmu_cmdline_args_secure_mode)(struct nvgpu_pmu *pmu,
857 u32 val);
858 u32 (*get_perfmon_cntr_sz)(struct nvgpu_pmu *pmu);
859 void * (*get_perfmon_cntr_ptr)(struct nvgpu_pmu *pmu);
860 void (*set_perfmon_cntr_ut)(struct nvgpu_pmu *pmu, u16 ut);
861 void (*set_perfmon_cntr_lt)(struct nvgpu_pmu *pmu, u16 lt);
862 void (*set_perfmon_cntr_valid)(struct nvgpu_pmu *pmu, u8 val);
863 void (*set_perfmon_cntr_index)(struct nvgpu_pmu *pmu, u8 val);
864 void (*set_perfmon_cntr_group_id)(struct nvgpu_pmu *pmu,
865 u8 gid);
866
867 u8 (*pg_cmd_eng_buf_load_size)(struct pmu_pg_cmd *pg);
868 void (*pg_cmd_eng_buf_load_set_cmd_type)(struct pmu_pg_cmd *pg,
869 u8 value);
870 void (*pg_cmd_eng_buf_load_set_engine_id)(struct pmu_pg_cmd *pg,
871 u8 value);
872 void (*pg_cmd_eng_buf_load_set_buf_idx)(struct pmu_pg_cmd *pg,
873 u8 value);
874 void (*pg_cmd_eng_buf_load_set_pad)(struct pmu_pg_cmd *pg,
875 u8 value);
876 void (*pg_cmd_eng_buf_load_set_buf_size)(struct pmu_pg_cmd *pg,
877 u16 value);
878 void (*pg_cmd_eng_buf_load_set_dma_base)(struct pmu_pg_cmd *pg,
879 u32 value);
880 void (*pg_cmd_eng_buf_load_set_dma_offset)(struct pmu_pg_cmd *pg,
881 u8 value);
882 void (*pg_cmd_eng_buf_load_set_dma_idx)(struct pmu_pg_cmd *pg,
883 u8 value);
884 struct {
885 int (*boardobjgrp_pmucmd_construct_impl)
886 (struct gk20a *g,
887 struct boardobjgrp *pboardobjgrp,
888 struct boardobjgrp_pmu_cmd *cmd, u8 id, u8 msgid,
889 u16 hdrsize, u16 entrysize, u16 fbsize, u32 ss_offset,
890 u8 rpc_func_id);
891 int (*boardobjgrp_pmuset_impl)(struct gk20a *g,
892 struct boardobjgrp *pboardobjgrp);
893 int (*boardobjgrp_pmugetstatus_impl)(struct gk20a *g,
894 struct boardobjgrp *pboardobjgrp,
895 struct boardobjgrpmask *mask);
896 int (*is_boardobjgrp_pmucmd_id_valid)(struct gk20a *g,
897 struct boardobjgrp *pboardobjgrp,
898 struct boardobjgrp_pmu_cmd *cmd);
899 } boardobj;
900 struct {
901 u32 (*volt_set_voltage)(struct gk20a *g,
902 u32 logic_voltage_uv, u32 sram_voltage_uv);
903 u32 (*volt_get_voltage)(struct gk20a *g,
904 u8 volt_domain, u32 *pvoltage_uv);
905 u32 (*volt_send_load_cmd_to_pmu)(struct gk20a *g);
906 } volt;
907 struct {
908 u32 (*get_vbios_clk_domain)(u32 vbios_domain);
909 u32 (*clk_avfs_get_vin_cal_data)(struct gk20a *g,
910 struct avfsvinobjs *pvinobjs,
911 struct vin_device_v20 *pvindev);
912 u32 (*clk_vf_change_inject_data_fill)(struct gk20a *g,
913 struct nv_pmu_clk_rpc *rpccall,
914 struct set_fll_clk *setfllclk);
915 u32 (*clk_set_boot_clk)(struct gk20a *g);
916 }clk;
917 } pmu_ver;
918 struct {
919 int (*get_netlist_name)(struct gk20a *g, int index, char *name);
920 bool (*is_fw_defined)(void);
921 } gr_ctx;
922#ifdef CONFIG_GK20A_CTXSW_TRACE
923 /*
924 * Currently only supported on Linux due to the extremely tight
925 * integration with Linux device driver structure (in particular
926 * mmap).
927 */
928 struct {
929 int (*init)(struct gk20a *g);
930 int (*max_entries)(struct gk20a *,
931 struct nvgpu_gpu_ctxsw_trace_filter *filter);
932 int (*flush)(struct gk20a *g);
933 int (*poll)(struct gk20a *g);
934 int (*enable)(struct gk20a *g);
935 int (*disable)(struct gk20a *g);
936 bool (*is_enabled)(struct gk20a *g);
937 int (*reset)(struct gk20a *g);
938 int (*bind_channel)(struct gk20a *g, struct channel_gk20a *ch);
939 int (*unbind_channel)(struct gk20a *g,
940 struct channel_gk20a *ch);
941 int (*deinit)(struct gk20a *g);
942 int (*alloc_user_buffer)(struct gk20a *g,
943 void **buf, size_t *size);
944 int (*free_user_buffer)(struct gk20a *g);
945 int (*mmap_user_buffer)(struct gk20a *g,
946 struct vm_area_struct *vma);
947 int (*set_filter)(struct gk20a *g,
948 struct nvgpu_gpu_ctxsw_trace_filter *filter);
949 } fecs_trace;
950#endif
951 struct {
952 bool (*support_sparse)(struct gk20a *g);
953 u64 (*gmmu_map)(struct vm_gk20a *vm,
954 u64 map_offset,
955 struct nvgpu_sgt *sgt,
956 u64 buffer_offset,
957 u64 size,
958 u32 pgsz_idx,
959 u8 kind_v,
960 u32 ctag_offset,
961 u32 flags,
962 enum gk20a_mem_rw_flag rw_flag,
963 bool clear_ctags,
964 bool sparse,
965 bool priv,
966 struct vm_gk20a_mapping_batch *batch,
967 enum nvgpu_aperture aperture);
968 void (*gmmu_unmap)(struct vm_gk20a *vm,
969 u64 vaddr,
970 u64 size,
971 u32 pgsz_idx,
972 bool va_allocated,
973 enum gk20a_mem_rw_flag rw_flag,
974 bool sparse,
975 struct vm_gk20a_mapping_batch *batch);
976 int (*vm_bind_channel)(struct vm_gk20a *vm,
977 struct channel_gk20a *ch);
978 int (*fb_flush)(struct gk20a *g);
979 void (*l2_invalidate)(struct gk20a *g);
980 void (*l2_flush)(struct gk20a *g, bool invalidate);
981 void (*cbc_clean)(struct gk20a *g);
982 void (*set_big_page_size)(struct gk20a *g,
983 struct nvgpu_mem *mem, int size);
984 u32 (*get_big_page_sizes)(void);
985 u32 (*get_default_big_page_size)(void);
986 u32 (*get_iommu_bit)(struct gk20a *g);
987 int (*init_mm_setup_hw)(struct gk20a *g);
988 bool (*is_bar1_supported)(struct gk20a *g);
989 int (*init_bar2_vm)(struct gk20a *g);
990 void (*remove_bar2_vm)(struct gk20a *g);
991 const struct gk20a_mmu_level *
992 (*get_mmu_levels)(struct gk20a *g, u32 big_page_size);
993 void (*init_pdb)(struct gk20a *g, struct nvgpu_mem *inst_block,
994 struct vm_gk20a *vm);
995 u64 (*gpu_phys_addr)(struct gk20a *g,
996 struct nvgpu_gmmu_attrs *attrs, u64 phys);
997 int (*alloc_inst_block)(struct gk20a *g,
998 struct nvgpu_mem *inst_block);
999 void (*init_inst_block)(struct nvgpu_mem *inst_block,
1000 struct vm_gk20a *vm, u32 big_page_size);
1001 bool (*mmu_fault_pending)(struct gk20a *g);
1002 void (*fault_info_mem_destroy)(struct gk20a *g);
1003 void (*mmu_fault_disable_hw)(struct gk20a *g);
1004 u32 (*get_kind_invalid)(void);
1005 u32 (*get_kind_pitch)(void);
1006 u32 (*get_flush_retries)(struct gk20a *g,
1007 enum nvgpu_flush_op op);
1008 } mm;
1009 /*
1010 * This function is called to allocate secure memory (memory
1011 * that the CPU cannot see). The function should fill the
1012 * context buffer descriptor (especially fields destroy, sgt,
1013 * size).
1014 */
1015 int (*secure_alloc)(struct gk20a *g,
1016 struct gr_ctx_buffer_desc *desc,
1017 size_t size);
1018 struct {
1019 void (*exit)(struct gk20a *g, struct nvgpu_mem *mem,
1020 struct nvgpu_sgl *sgl);
1021 u32 (*data032_r)(u32 i);
1022 } pramin;
1023 struct {
1024 int (*init_therm_setup_hw)(struct gk20a *g);
1025 void (*init_elcg_mode)(struct gk20a *g, u32 mode, u32 engine);
1026 void (*init_blcg_mode)(struct gk20a *g, u32 mode, u32 engine);
1027 int (*elcg_init_idle_filters)(struct gk20a *g);
1028#ifdef CONFIG_DEBUG_FS
1029 void (*therm_debugfs_init)(struct gk20a *g);
1030#endif
1031 int (*get_internal_sensor_curr_temp)(struct gk20a *g, u32 *temp_f24_8);
1032 void (*get_internal_sensor_limits)(s32 *max_24_8,
1033 s32 *min_24_8);
1034 u32 (*configure_therm_alert)(struct gk20a *g, s32 curr_warn_temp);
1035 } therm;
1036 struct {
1037 bool (*is_pmu_supported)(struct gk20a *g);
1038 int (*prepare_ucode)(struct gk20a *g);
1039 int (*pmu_setup_hw_and_bootstrap)(struct gk20a *g);
1040 int (*pmu_nsbootstrap)(struct nvgpu_pmu *pmu);
1041 int (*pmu_init_perfmon)(struct nvgpu_pmu *pmu);
1042 int (*pmu_perfmon_start_sampling)(struct nvgpu_pmu *pmu);
1043 int (*pmu_perfmon_stop_sampling)(struct nvgpu_pmu *pmu);
1044 int (*pmu_perfmon_get_samples_rpc)(struct nvgpu_pmu *pmu);
1045 int (*pmu_setup_elpg)(struct gk20a *g);
1046 u32 (*pmu_get_queue_head)(u32 i);
1047 u32 (*pmu_get_queue_head_size)(void);
1048 u32 (*pmu_get_queue_tail_size)(void);
1049 u32 (*pmu_get_queue_tail)(u32 i);
1050 int (*pmu_queue_head)(struct gk20a *g,
1051 struct nvgpu_falcon_queue *queue, u32 *head, bool set);
1052 int (*pmu_queue_tail)(struct gk20a *g,
1053 struct nvgpu_falcon_queue *queue, u32 *tail, bool set);
1054 void (*pmu_msgq_tail)(struct nvgpu_pmu *pmu,
1055 u32 *tail, bool set);
1056 u32 (*pmu_mutex_size)(void);
1057 int (*pmu_mutex_acquire)(struct nvgpu_pmu *pmu,
1058 u32 id, u32 *token);
1059 int (*pmu_mutex_release)(struct nvgpu_pmu *pmu,
1060 u32 id, u32 *token);
1061 bool (*pmu_is_interrupted)(struct nvgpu_pmu *pmu);
1062 void (*pmu_isr)(struct gk20a *g);
1063 void (*pmu_init_perfmon_counter)(struct gk20a *g);
1064 void (*pmu_pg_idle_counter_config)(struct gk20a *g, u32 pg_engine_id);
1065 u32 (*pmu_read_idle_counter)(struct gk20a *g, u32 counter_id);
1066 u32 (*pmu_read_idle_intr_status)(struct gk20a *g);
1067 void (*pmu_clear_idle_intr_status)(struct gk20a *g);
1068 void (*pmu_reset_idle_counter)(struct gk20a *g, u32 counter_id);
1069 void (*pmu_dump_elpg_stats)(struct nvgpu_pmu *pmu);
1070 void (*pmu_dump_falcon_stats)(struct nvgpu_pmu *pmu);
1071 void (*pmu_enable_irq)(struct nvgpu_pmu *pmu, bool enable);
1072 int (*init_wpr_region)(struct gk20a *g);
1073 int (*load_lsfalcon_ucode)(struct gk20a *g, u32 falconidmask);
1074 void (*write_dmatrfbase)(struct gk20a *g, u32 addr);
1075 void (*pmu_elpg_statistics)(struct gk20a *g, u32 pg_engine_id,
1076 struct pmu_pg_stats_data *pg_stat_data);
1077 int (*pmu_pg_init_param)(struct gk20a *g, u32 pg_engine_id);
1078 int (*pmu_pg_set_sub_feature_mask)(struct gk20a *g,
1079 u32 pg_engine_id);
1080 u32 (*pmu_pg_supported_engines_list)(struct gk20a *g);
1081 u32 (*pmu_pg_engines_feature_list)(struct gk20a *g,
1082 u32 pg_engine_id);
1083 int (*pmu_process_pg_event)(struct gk20a *g, void *pmumsg);
1084 bool (*pmu_is_lpwr_feature_supported)(struct gk20a *g,
1085 u32 feature_id);
1086 int (*pmu_lpwr_enable_pg)(struct gk20a *g, bool pstate_lock);
1087 int (*pmu_lpwr_disable_pg)(struct gk20a *g, bool pstate_lock);
1088 u32 (*pmu_pg_param_post_init)(struct gk20a *g);
1089 void (*dump_secure_fuses)(struct gk20a *g);
1090 int (*reset_engine)(struct gk20a *g, bool do_reset);
1091 bool (*is_engine_in_reset)(struct gk20a *g);
1092 bool (*is_lazy_bootstrap)(u32 falcon_id);
1093 bool (*is_priv_load)(u32 falcon_id);
1094 int (*pmu_populate_loader_cfg)(struct gk20a *g,
1095 void *lsfm, u32 *p_bl_gen_desc_size);
1096 int (*flcn_populate_bl_dmem_desc)(struct gk20a *g,
1097 void *lsfm, u32 *p_bl_gen_desc_size, u32 falconid);
1098 void (*handle_ext_irq)(struct gk20a *g, u32 intr);
1099 void (*set_irqmask)(struct gk20a *g);
1100 void (*update_lspmu_cmdline_args)(struct gk20a *g);
1101 void (*setup_apertures)(struct gk20a *g);
1102 u32 (*get_irqdest)(struct gk20a *g);
1103 int (*alloc_super_surface)(struct gk20a *g,
1104 struct nvgpu_mem *super_surface, u32 size);
1105 bool (*is_debug_mode_enabled)(struct gk20a *g);
1106 void (*secured_pmu_start)(struct gk20a *g);
1107 } pmu;
1108 struct {
1109 int (*init_debugfs)(struct gk20a *g);
1110 void (*disable_slowboot)(struct gk20a *g);
1111 int (*init_clk_support)(struct gk20a *g);
1112 int (*suspend_clk_support)(struct gk20a *g);
1113 u32 (*get_crystal_clk_hz)(struct gk20a *g);
1114 int (*clk_domain_get_f_points)(struct gk20a *g,
1115 u32 clkapidomain, u32 *pfpointscount,
1116 u16 *pfreqpointsinmhz);
1117 int (*clk_get_round_rate)(struct gk20a *g, u32 api_domain,
1118 unsigned long rate_target, unsigned long *rounded_rate);
1119 int (*get_clk_range)(struct gk20a *g, u32 api_domain,
1120 u16 *min_mhz, u16 *max_mhz);
1121 unsigned long (*measure_freq)(struct gk20a *g, u32 api_domain);
1122 u32 (*get_rate_cntr)(struct gk20a *g, struct namemap_cfg *c);
1123 unsigned long (*get_rate)(struct gk20a *g, u32 api_domain);
1124 int (*set_rate)(struct gk20a *g, u32 api_domain, unsigned long rate);
1125 unsigned long (*get_fmax_at_vmin_safe)(struct gk20a *g);
1126 u32 (*get_ref_clock_rate)(struct gk20a *g);
1127 int (*predict_mv_at_hz_cur_tfloor)(struct clk_gk20a *clk,
1128 unsigned long rate);
1129 unsigned long (*get_maxrate)(struct gk20a *g, u32 api_domain);
1130 int (*prepare_enable)(struct clk_gk20a *clk);
1131 void (*disable_unprepare)(struct clk_gk20a *clk);
1132 int (*get_voltage)(struct clk_gk20a *clk, u64 *val);
1133 int (*get_gpcclk_clock_counter)(struct clk_gk20a *clk, u64 *val);
1134 int (*pll_reg_write)(struct gk20a *g, u32 reg, u32 val);
1135 int (*get_pll_debug_data)(struct gk20a *g,
1136 struct nvgpu_clk_pll_debug_data *d);
1137 int (*mclk_init)(struct gk20a *g);
1138 void (*mclk_deinit)(struct gk20a *g);
1139 int (*mclk_change)(struct gk20a *g, u16 val);
1140 bool split_rail_support;
1141 bool support_clk_freq_controller;
1142 bool support_pmgr_domain;
1143 bool support_lpwr_pg;
1144 u32 (*perf_pmu_vfe_load)(struct gk20a *g);
1145 u32 lut_num_entries;
1146 } clk;
1147 struct {
1148 int (*arbiter_clk_init)(struct gk20a *g);
1149 u32 (*get_arbiter_clk_domains)(struct gk20a *g);
1150 int (*get_arbiter_f_points)(struct gk20a *g,u32 api_domain,
1151 u32 *num_points, u16 *freqs_in_mhz);
1152 int (*get_arbiter_clk_range)(struct gk20a *g, u32 api_domain,
1153 u16 *min_mhz, u16 *max_mhz);
1154 int (*get_arbiter_clk_default)(struct gk20a *g, u32 api_domain,
1155 u16 *default_mhz);
1156 void (*clk_arb_run_arbiter_cb)(struct nvgpu_clk_arb *arb);
1157 /* This function is inherently unsafe to call while
1158 * arbiter is running arbiter must be blocked
1159 * before calling this function */
1160 int (*get_current_pstate)(struct gk20a *g);
1161 void (*clk_arb_cleanup)(struct nvgpu_clk_arb *arb);
1162 } clk_arb;
1163 struct {
1164 int (*handle_pmu_perf_event)(struct gk20a *g, void *pmu_msg);
1165 } pmu_perf;
1166 struct {
1167 int (*exec_regops)(struct dbg_session_gk20a *dbg_s,
1168 struct nvgpu_dbg_reg_op *ops,
1169 u64 num_ops,
1170 bool *is_current_ctx);
1171 const struct regop_offset_range* (
1172 *get_global_whitelist_ranges)(void);
1173 u64 (*get_global_whitelist_ranges_count)(void);
1174 const struct regop_offset_range* (
1175 *get_context_whitelist_ranges)(void);
1176 u64 (*get_context_whitelist_ranges_count)(void);
1177 const u32* (*get_runcontrol_whitelist)(void);
1178 u64 (*get_runcontrol_whitelist_count)(void);
1179 const u32* (*get_qctl_whitelist)(void);
1180 u64 (*get_qctl_whitelist_count)(void);
1181 } regops;
1182 struct {
1183 void (*intr_mask)(struct gk20a *g);
1184 void (*intr_enable)(struct gk20a *g);
1185 void (*intr_unit_config)(struct gk20a *g,
1186 bool enable, bool is_stalling, u32 mask);
1187 void (*isr_stall)(struct gk20a *g);
1188 bool (*is_intr_hub_pending)(struct gk20a *g, u32 mc_intr);
1189 bool (*is_intr_nvlink_pending)(struct gk20a *g, u32 mc_intr);
1190 bool (*is_stall_and_eng_intr_pending)(struct gk20a *g,
1191 u32 act_eng_id, u32 *eng_intr_pending);
1192 u32 (*intr_stall)(struct gk20a *g);
1193 void (*intr_stall_pause)(struct gk20a *g);
1194 void (*intr_stall_resume)(struct gk20a *g);
1195 u32 (*intr_nonstall)(struct gk20a *g);
1196 void (*intr_nonstall_pause)(struct gk20a *g);
1197 void (*intr_nonstall_resume)(struct gk20a *g);
1198 u32 (*isr_nonstall)(struct gk20a *g);
1199 void (*enable)(struct gk20a *g, u32 units);
1200 void (*disable)(struct gk20a *g, u32 units);
1201 void (*reset)(struct gk20a *g, u32 units);
1202 bool (*is_enabled)(struct gk20a *g, enum nvgpu_unit unit);
1203 bool (*is_intr1_pending)(struct gk20a *g, enum nvgpu_unit unit, u32 mc_intr_1);
1204 void (*log_pending_intrs)(struct gk20a *g);
1205 void (*fbpa_isr)(struct gk20a *g);
1206 u32 (*reset_mask)(struct gk20a *g, enum nvgpu_unit unit);
1207 void (*fb_reset)(struct gk20a *g);
1208 } mc;
1209 struct {
1210 void (*show_dump)(struct gk20a *g,
1211 struct gk20a_debug_output *o);
1212 } debug;
1213 struct {
1214 int (*dbg_set_powergate)(struct dbg_session_gk20a *dbg_s,
1215 bool disable_powergate);
1216 bool (*check_and_set_global_reservation)(
1217 struct dbg_session_gk20a *dbg_s,
1218 struct dbg_profiler_object_data *prof_obj);
1219 bool (*check_and_set_context_reservation)(
1220 struct dbg_session_gk20a *dbg_s,
1221 struct dbg_profiler_object_data *prof_obj);
1222 void (*release_profiler_reservation)(
1223 struct dbg_session_gk20a *dbg_s,
1224 struct dbg_profiler_object_data *prof_obj);
1225 int (*perfbuffer_enable)(struct gk20a *g, u64 offset, u32 size);
1226 int (*perfbuffer_disable)(struct gk20a *g);
1227 } dbg_session_ops;
1228
1229 u32 (*get_litter_value)(struct gk20a *g, int value);
1230 int (*chip_init_gpu_characteristics)(struct gk20a *g);
1231
1232 struct {
1233 void (*init_hw)(struct gk20a *g);
1234 void (*isr)(struct gk20a *g);
1235 int (*bar1_bind)(struct gk20a *g, struct nvgpu_mem *bar1_inst);
1236 int (*bar2_bind)(struct gk20a *g, struct nvgpu_mem *bar1_inst);
1237 u32 (*set_bar0_window)(struct gk20a *g, struct nvgpu_mem *mem,
1238 struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl,
1239 u32 w);
1240 u32 (*read_sw_scratch)(struct gk20a *g, u32 index);
1241 void (*write_sw_scratch)(struct gk20a *g, u32 index, u32 val);
1242 } bus;
1243
1244 struct {
1245 void (*isr)(struct gk20a *g);
1246 int (*read_ptimer)(struct gk20a *g, u64 *value);
1247 int (*get_timestamps_zipper)(struct gk20a *g,
1248 u32 source_id, u32 count,
1249 struct nvgpu_cpu_time_correlation_sample *);
1250 } ptimer;
1251
1252 struct {
1253 int (*init)(struct gk20a *g);
1254 int (*preos_wait_for_halt)(struct gk20a *g);
1255 void (*preos_reload_check)(struct gk20a *g);
1256 int (*devinit)(struct gk20a *g);
1257 int (*preos)(struct gk20a *g);
1258 int (*verify_devinit)(struct gk20a *g);
1259 } bios;
1260
1261#if defined(CONFIG_GK20A_CYCLE_STATS)
1262 struct {
1263 int (*enable_snapshot)(struct channel_gk20a *ch,
1264 struct gk20a_cs_snapshot_client *client);
1265 void (*disable_snapshot)(struct gr_gk20a *gr);
1266 int (*check_data_available)(struct channel_gk20a *ch,
1267 u32 *pending,
1268 bool *hw_overflow);
1269 void (*set_handled_snapshots)(struct gk20a *g, u32 num);
1270 u32 (*allocate_perfmon_ids)(struct gk20a_cs_snapshot *data,
1271 u32 count);
1272 u32 (*release_perfmon_ids)(struct gk20a_cs_snapshot *data,
1273 u32 start,
1274 u32 count);
1275 int (*detach_snapshot)(struct channel_gk20a *ch,
1276 struct gk20a_cs_snapshot_client *client);
1277 bool (*get_overflow_status)(struct gk20a *g);
1278 u32 (*get_pending_snapshots)(struct gk20a *g);
1279 } css;
1280#endif
1281 struct {
1282 int (*get_speed)(struct gk20a *g, u32 *xve_link_speed);
1283 int (*set_speed)(struct gk20a *g, u32 xve_link_speed);
1284 void (*available_speeds)(struct gk20a *g, u32 *speed_mask);
1285 u32 (*xve_readl)(struct gk20a *g, u32 reg);
1286 void (*xve_writel)(struct gk20a *g, u32 reg, u32 val);
1287 void (*disable_aspm)(struct gk20a *g);
1288 void (*reset_gpu)(struct gk20a *g);
1289#if defined(CONFIG_PCI_MSI)
1290 void (*rearm_msi)(struct gk20a *g);
1291#endif
1292 void (*enable_shadow_rom)(struct gk20a *g);
1293 void (*disable_shadow_rom)(struct gk20a *g);
1294 u32 (*get_link_control_status)(struct gk20a *g);
1295 } xve;
1296 struct {
1297 int (*falcon_hal_sw_init)(struct nvgpu_falcon *flcn);
1298 } falcon;
1299 struct {
1300 void (*enable_priv_ring)(struct gk20a *g);
1301 void (*isr)(struct gk20a *g);
1302 void (*decode_error_code)(struct gk20a *g, u32 error_code);
1303 void (*set_ppriv_timeout_settings)(struct gk20a *g);
1304 u32 (*enum_ltc)(struct gk20a *g);
1305 } priv_ring;
1306 struct {
1307 int (*check_priv_security)(struct gk20a *g);
1308 bool (*is_opt_ecc_enable)(struct gk20a *g);
1309 bool (*is_opt_feature_override_disable)(struct gk20a *g);
1310 u32 (*fuse_status_opt_fbio)(struct gk20a *g);
1311 u32 (*fuse_status_opt_fbp)(struct gk20a *g);
1312 u32 (*fuse_status_opt_rop_l2_fbp)(struct gk20a *g, u32 fbp);
1313 u32 (*fuse_status_opt_gpc)(struct gk20a *g);
1314 u32 (*fuse_status_opt_tpc_gpc)(struct gk20a *g, u32 gpc);
1315 void (*fuse_ctrl_opt_tpc_gpc)(struct gk20a *g, u32 gpc, u32 val);
1316 u32 (*fuse_opt_sec_debug_en)(struct gk20a *g);
1317 u32 (*fuse_opt_priv_sec_en)(struct gk20a *g);
1318 u32 (*read_vin_cal_fuse_rev)(struct gk20a *g);
1319 u32 (*read_vin_cal_slope_intercept_fuse)(struct gk20a *g,
1320 u32 vin_id, u32 *slope,
1321 u32 *intercept);
1322 u32 (*read_vin_cal_gain_offset_fuse)(struct gk20a *g,
1323 u32 vin_id, s8 *gain,
1324 s8 *offset);
1325 } fuse;
1326 struct {
1327 int (*init)(struct gk20a *g);
1328 int (*discover_ioctrl)(struct gk20a *g);
1329 int (*discover_link)(struct gk20a *g);
1330 int (*isr)(struct gk20a *g);
1331 int (*rxdet)(struct gk20a *g, u32 link_id);
1332 int (*setup_pll)(struct gk20a *g, unsigned long link_mask);
1333 int (*minion_data_ready_en)(struct gk20a *g,
1334 unsigned long link_mask, bool sync);
1335 void (*get_connected_link_mask)(u32 *link_mask);
1336 void (*set_sw_war)(struct gk20a *g, u32 link_id);
1337 /* API */
1338 int (*link_early_init)(struct gk20a *g, unsigned long mask);
1339 u32 (*link_get_mode)(struct gk20a *g, u32 link_id);
1340 u32 (*link_get_state)(struct gk20a *g, u32 link_id);
1341 int (*link_set_mode)(struct gk20a *g, u32 link_id, u32 mode);
1342 u32 (*get_sublink_mode)(struct gk20a *g, u32 link_id,
1343 bool is_rx_sublink);
1344 u32 (*get_rx_sublink_state)(struct gk20a *g, u32 link_id);
1345 u32 (*get_tx_sublink_state)(struct gk20a *g, u32 link_id);
1346 int (*set_sublink_mode)(struct gk20a *g, u32 link_id,
1347 bool is_rx_sublink, u32 mode);
1348 int (*interface_init)(struct gk20a *g);
1349 int (*interface_disable)(struct gk20a *g);
1350 int (*reg_init)(struct gk20a *g);
1351 int (*shutdown)(struct gk20a *g);
1352 int (*early_init)(struct gk20a *g);
1353 } nvlink;
1354 struct {
1355 u32 (*get_nvhsclk_ctrl_e_clk_nvl)(struct gk20a *g);
1356 void (*set_nvhsclk_ctrl_e_clk_nvl)(struct gk20a *g, u32 val);
1357 u32 (*get_nvhsclk_ctrl_swap_clk_nvl)(struct gk20a *g);
1358 void (*set_nvhsclk_ctrl_swap_clk_nvl)(struct gk20a *g, u32 val);
1359 } top;
1360 struct {
1361 void (*acr_sw_init)(struct gk20a *g, struct nvgpu_acr *acr);
1362 } acr;
1363 struct {
1364 int (*tpc_powergate)(struct gk20a *g, u32 fuse_status);
1365 } tpc;
1366 void (*semaphore_wakeup)(struct gk20a *g, bool post_events);
1367};
1368
1369struct nvgpu_bios_ucode {
1370 u8 *bootloader;
1371 u32 bootloader_phys_base;
1372 u32 bootloader_size;
1373 u8 *ucode;
1374 u32 phys_base;
1375 u32 size;
1376 u8 *dmem;
1377 u32 dmem_phys_base;
1378 u32 dmem_size;
1379 u32 code_entry_point;
1380};
1381
1382struct nvgpu_bios {
1383 u32 vbios_version;
1384 u8 vbios_oem_version;
1385
1386 u8 *data;
1387 size_t size;
1388
1389 struct nvgpu_bios_ucode devinit;
1390 struct nvgpu_bios_ucode preos;
1391
1392 u8 *devinit_tables;
1393 u32 devinit_tables_size;
1394 u8 *bootscripts;
1395 u32 bootscripts_size;
1396
1397 u8 mem_strap_data_count;
1398 u16 mem_strap_xlat_tbl_ptr;
1399
1400 u32 condition_table_ptr;
1401
1402 u32 devinit_tables_phys_base;
1403 u32 devinit_script_phys_base;
1404
1405 struct bit_token *perf_token;
1406 struct bit_token *clock_token;
1407 struct bit_token *virt_token;
1408 u32 expansion_rom_offset;
1409
1410 u32 nvlink_config_data_offset;
1411};
1412
1413struct nvgpu_gpu_params {
1414 /* GPU architecture ID */
1415 u32 gpu_arch;
1416 /* GPU implementation ID */
1417 u32 gpu_impl;
1418 /* GPU revision ID */
1419 u32 gpu_rev;
1420 /* sm version */
1421 u32 sm_arch_sm_version;
1422 /* sm instruction set */
1423 u32 sm_arch_spa_version;
1424 u32 sm_arch_warp_count;
1425};
1426
1427struct gk20a {
1428 void (*free)(struct gk20a *g);
1429 struct nvgpu_nvhost_dev *nvhost_dev;
1430
1431 /*
1432 * Used by <nvgpu/enabled.h>. Do not access directly!
1433 */
1434 unsigned long *enabled_flags;
1435
1436#ifdef __KERNEL__
1437 struct notifier_block nvgpu_reboot_nb;
1438#endif
1439
1440 nvgpu_atomic_t usage_count;
1441
1442 struct nvgpu_mutex ctxsw_disable_lock;
1443 int ctxsw_disable_count;
1444
1445 struct nvgpu_ref refcount;
1446
1447 const char *name;
1448
1449 bool gpu_reset_done;
1450 bool power_on;
1451 bool suspended;
1452 bool sw_ready;
1453
1454 u64 log_mask;
1455 u32 log_trace;
1456
1457 struct nvgpu_mutex tpc_pg_lock;
1458
1459 struct nvgpu_gpu_params params;
1460
1461 /*
1462 * Guards access to hardware when usual gk20a_{busy,idle} are skipped
1463 * for submits and held for channel lifetime but dropped for an ongoing
1464 * gk20a_do_idle().
1465 */
1466 struct nvgpu_rwsem deterministic_busy;
1467
1468 struct nvgpu_falcon pmu_flcn;
1469 struct nvgpu_falcon sec2_flcn;
1470 struct nvgpu_falcon fecs_flcn;
1471 struct nvgpu_falcon gpccs_flcn;
1472 struct nvgpu_falcon nvdec_flcn;
1473 struct nvgpu_falcon minion_flcn;
1474 struct nvgpu_falcon gsp_flcn;
1475 struct clk_gk20a clk;
1476 struct fifo_gk20a fifo;
1477 struct nvgpu_nvlink_dev nvlink;
1478 struct gr_gk20a gr;
1479 struct sim_nvgpu *sim;
1480 struct mm_gk20a mm;
1481 struct nvgpu_pmu pmu;
1482 struct nvgpu_acr acr;
1483 struct nvgpu_ecc ecc;
1484 struct clk_pmupstate clk_pmu;
1485 struct perf_pmupstate perf_pmu;
1486 struct pmgr_pmupstate pmgr_pmu;
1487 struct therm_pmupstate therm_pmu;
1488 struct nvgpu_sec2 sec2;
1489 struct nvgpu_sched_ctrl sched_ctrl;
1490
1491#ifdef CONFIG_DEBUG_FS
1492 struct railgate_stats pstats;
1493#endif
1494 u32 gr_idle_timeout_default;
1495 bool timeouts_disabled_by_user;
1496 unsigned int ch_wdt_timeout_ms;
1497 u32 fifo_eng_timeout_us;
1498
1499 struct nvgpu_mutex power_lock;
1500
1501 /* Channel priorities */
1502 u32 timeslice_low_priority_us;
1503 u32 timeslice_medium_priority_us;
1504 u32 timeslice_high_priority_us;
1505 u32 min_timeslice_us;
1506 u32 max_timeslice_us;
1507 bool runlist_interleave;
1508
1509 struct nvgpu_mutex cg_pg_lock;
1510 bool slcg_enabled;
1511 bool blcg_enabled;
1512 bool elcg_enabled;
1513 bool elpg_enabled;
1514 bool aelpg_enabled;
1515 bool can_elpg;
1516 bool mscg_enabled;
1517 bool forced_idle;
1518 bool forced_reset;
1519 bool allow_all;
1520
1521 u32 ptimer_src_freq;
1522
1523 int railgate_delay;
1524 u8 ldiv_slowdown_factor;
1525 unsigned int aggressive_sync_destroy_thresh;
1526 bool aggressive_sync_destroy;
1527
1528 /* Debugfs knob for forcing syncpt support off in runtime. */
1529 u32 disable_syncpoints;
1530
1531 bool support_pmu;
1532
1533 bool is_virtual;
1534
1535 bool has_cde;
1536
1537 u32 emc3d_ratio;
1538
1539 struct nvgpu_spinlock ltc_enabled_lock;
1540
1541 struct gk20a_ctxsw_ucode_info ctxsw_ucode_info;
1542
1543 /*
1544 * A group of semaphore pools. One for each channel.
1545 */
1546 struct nvgpu_semaphore_sea *sema_sea;
1547
1548 /* held while manipulating # of debug/profiler sessions present */
1549 /* also prevents debug sessions from attaching until released */
1550 struct nvgpu_mutex dbg_sessions_lock;
1551 int dbg_powergating_disabled_refcount; /*refcount for pg disable */
1552 /*refcount for timeout disable */
1553 nvgpu_atomic_t timeouts_disabled_refcount;
1554
1555 /* must have dbg_sessions_lock before use */
1556 struct nvgpu_dbg_reg_op *dbg_regops_tmp_buf;
1557 u32 dbg_regops_tmp_buf_ops;
1558
1559 /* For perfbuf mapping */
1560 struct {
1561 struct dbg_session_gk20a *owner;
1562 u64 offset;
1563 } perfbuf;
1564
1565 /* For profiler reservations */
1566 struct nvgpu_list_node profiler_objects;
1567 bool global_profiler_reservation_held;
1568 int profiler_reservation_count;
1569
1570 void (*remove_support)(struct gk20a *);
1571
1572 u64 pg_ingating_time_us;
1573 u64 pg_ungating_time_us;
1574 u32 pg_gating_cnt;
1575
1576 struct nvgpu_spinlock mc_enable_lock;
1577
1578 struct gk20a_as as;
1579
1580 struct nvgpu_mutex client_lock;
1581 int client_refcount; /* open channels and ctrl nodes */
1582
1583 struct gpu_ops ops;
1584 u32 mc_intr_mask_restore[4];
1585 /*used for change of enum zbc update cmd id from ver 0 to ver1*/
1586 u32 pmu_ver_cmd_id_zbc_table_update;
1587 u32 pmu_lsf_pmu_wpr_init_done;
1588 u32 pmu_lsf_loaded_falcon_id;
1589
1590 int irqs_enabled;
1591 int irq_stall; /* can be same as irq_nonstall in case of PCI */
1592 int irq_nonstall;
1593 u32 max_ltc_count;
1594 u32 ltc_count;
1595 u32 ltc_streamid;
1596
1597 struct gk20a_worker {
1598 struct nvgpu_thread poll_task;
1599 nvgpu_atomic_t put;
1600 struct nvgpu_cond wq;
1601 struct nvgpu_list_node items;
1602 struct nvgpu_spinlock items_lock;
1603 struct nvgpu_mutex start_lock;
1604 } channel_worker, clk_arb_worker;
1605
1606 struct {
1607 void (*open)(struct channel_gk20a *ch);
1608 void (*close)(struct channel_gk20a *ch);
1609 void (*work_completion_signal)(struct channel_gk20a *ch);
1610 void (*work_completion_cancel_sync)(struct channel_gk20a *ch);
1611 bool (*os_fence_framework_inst_exists)(struct channel_gk20a *ch);
1612 int (*init_os_fence_framework)(
1613 struct channel_gk20a *ch, const char *fmt, ...);
1614 void (*signal_os_fence_framework)(struct channel_gk20a *ch);
1615 void (*destroy_os_fence_framework)(struct channel_gk20a *ch);
1616 int (*copy_user_gpfifo)(struct nvgpu_gpfifo_entry *dest,
1617 struct nvgpu_gpfifo_userdata userdata,
1618 u32 start, u32 length);
1619 int (*alloc_usermode_buffers)(struct channel_gk20a *c,
1620 struct nvgpu_setup_bind_args *args);
1621 void (*free_usermode_buffers)(struct channel_gk20a *c);
1622 } os_channel;
1623
1624 struct gk20a_scale_profile *scale_profile;
1625 unsigned long last_freq;
1626
1627 struct gk20a_ctxsw_trace *ctxsw_trace;
1628 struct gk20a_fecs_trace *fecs_trace;
1629
1630 bool mmu_debug_ctrl;
1631 u32 mmu_debug_mode_refcnt;
1632
1633 u32 tpc_fs_mask_user;
1634
1635 u32 tpc_pg_mask;
1636 u32 tpc_count;
1637 bool can_tpc_powergate;
1638
1639 u32 valid_tpc_mask[MAX_TPC_PG_CONFIGS];
1640
1641 struct nvgpu_bios bios;
1642 bool bios_is_init;
1643
1644 struct nvgpu_clk_arb *clk_arb;
1645
1646 struct nvgpu_mutex clk_arb_enable_lock;
1647
1648 nvgpu_atomic_t clk_arb_global_nr;
1649
1650 struct gk20a_ce_app ce_app;
1651
1652 bool ltc_intr_en_illegal_compstat;
1653
1654 /* PCI device identifier */
1655 u16 pci_vendor_id, pci_device_id;
1656 u16 pci_subsystem_vendor_id, pci_subsystem_device_id;
1657 u16 pci_class;
1658 u8 pci_revision;
1659
1660 /*
1661 * PCI power management: i2c device index, port and address for
1662 * INA3221.
1663 */
1664 u32 ina3221_dcb_index;
1665 u32 ina3221_i2c_address;
1666 u32 ina3221_i2c_port;
1667 bool hardcode_sw_threshold;
1668
1669 /* PCIe power states. */
1670 bool xve_l0s;
1671 bool xve_l1;
1672
1673 /* Current warning temp in sfxp24.8 */
1674 s32 curr_warn_temp;
1675
1676#if defined(CONFIG_PCI_MSI)
1677 /* Check if msi is enabled */
1678 bool msi_enabled;
1679#endif
1680#ifdef CONFIG_NVGPU_TRACK_MEM_USAGE
1681 struct nvgpu_mem_alloc_tracker *vmallocs;
1682 struct nvgpu_mem_alloc_tracker *kmallocs;
1683#endif
1684
1685 /* The minimum VBIOS version supported */
1686 u32 vbios_min_version;
1687
1688 /* memory training sequence and mclk switch scripts */
1689 u32 mem_config_idx;
1690
1691 u64 dma_memory_used;
1692
1693#if defined(CONFIG_TEGRA_GK20A_NVHOST)
1694 u64 syncpt_unit_base;
1695 size_t syncpt_unit_size;
1696 u32 syncpt_size;
1697#endif
1698 struct nvgpu_mem syncpt_mem;
1699
1700 struct nvgpu_list_node boardobj_head;
1701 struct nvgpu_list_node boardobjgrp_head;
1702
1703 struct nvgpu_mem pdb_cache_war_mem;
1704};
1705
1706static inline bool nvgpu_is_timeouts_enabled(struct gk20a *g)
1707{
1708 return nvgpu_atomic_read(&g->timeouts_disabled_refcount) == 0;
1709}
1710
1711static inline u32 gk20a_get_gr_idle_timeout(struct gk20a *g)
1712{
1713 return nvgpu_is_timeouts_enabled(g) ?
1714 g->gr_idle_timeout_default : UINT_MAX;
1715}
1716
1717#define MULTICHAR_TAG(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
1718enum BAR0_DEBUG_OPERATION {
1719 BARO_ZERO_NOP = 0,
1720 OP_END = MULTICHAR_TAG('D', 'O', 'N', 'E'),
1721 BAR0_READ32 = MULTICHAR_TAG('0', 'R', '3', '2'),
1722 BAR0_WRITE32 = MULTICHAR_TAG('0', 'W', '3', '2'),
1723};
1724
1725struct share_buffer_head {
1726 enum BAR0_DEBUG_OPERATION operation;
1727/* size of the operation item */
1728 u32 size;
1729 u32 completed;
1730 u32 failed;
1731 u64 context;
1732 u64 completion_callback;
1733};
1734
1735struct gk20a_cyclestate_buffer_elem {
1736 struct share_buffer_head head;
1737/* in */
1738 u64 p_data;
1739 u64 p_done;
1740 u32 offset_bar0;
1741 u16 first_bit;
1742 u16 last_bit;
1743/* out */
1744/* keep 64 bits to be consistent */
1745 u64 data;
1746};
1747
1748/* operations that will need to be executed on non stall workqueue */
1749#define GK20A_NONSTALL_OPS_WAKEUP_SEMAPHORE BIT32(0)
1750#define GK20A_NONSTALL_OPS_POST_EVENTS BIT32(1)
1751
1752/* register accessors */
1753void __nvgpu_check_gpu_state(struct gk20a *g);
1754void __gk20a_warn_on_no_regs(void);
1755
1756/* classes that the device supports */
1757/* TBD: get these from an open-sourced SDK? */
1758enum {
1759 FERMI_TWOD_A = 0x902D,
1760 KEPLER_INLINE_TO_MEMORY_A = 0xA040,
1761 KEPLER_DMA_COPY_A = 0xA0B5,
1762};
1763
1764#define GK20A_BAR0_IORESOURCE_MEM 0
1765#define GK20A_BAR1_IORESOURCE_MEM 1
1766#define GK20A_SIM_IORESOURCE_MEM 2
1767
1768void gk20a_busy_noresume(struct gk20a *g);
1769void gk20a_idle_nosuspend(struct gk20a *g);
1770int __must_check gk20a_busy(struct gk20a *g);
1771void gk20a_idle(struct gk20a *g);
1772int __gk20a_do_idle(struct gk20a *g, bool force_reset);
1773int __gk20a_do_unidle(struct gk20a *g);
1774
1775int gk20a_wait_for_idle(struct gk20a *g);
1776
1777#define NVGPU_GPU_ARCHITECTURE_SHIFT 4
1778
1779/* constructs unique and compact GPUID from nvgpu_gpu_characteristics
1780 * arch/impl fields */
1781#define GK20A_GPUID(arch, impl) ((u32) ((arch) | (impl)))
1782
1783#define GK20A_GPUID_GK20A 0x000000EA
1784#define GK20A_GPUID_GM20B 0x0000012B
1785#define GK20A_GPUID_GM20B_B 0x0000012E
1786#define NVGPU_GPUID_GP10B 0x0000013B
1787#define NVGPU_GPUID_GP104 0x00000134
1788#define NVGPU_GPUID_GP106 0x00000136
1789#define NVGPU_GPUID_GV11B 0x0000015B
1790#define NVGPU_GPUID_GV100 0x00000140
1791
1792int gk20a_init_gpu_characteristics(struct gk20a *g);
1793
1794bool gk20a_check_poweron(struct gk20a *g);
1795int gk20a_prepare_poweroff(struct gk20a *g);
1796int gk20a_finalize_poweron(struct gk20a *g);
1797
1798int nvgpu_wait_for_stall_interrupts(struct gk20a *g, u32 timeout);
1799int nvgpu_wait_for_nonstall_interrupts(struct gk20a *g, u32 timeout);
1800void nvgpu_wait_for_deferred_interrupts(struct gk20a *g);
1801
1802struct gk20a * __must_check gk20a_get(struct gk20a *g);
1803void gk20a_put(struct gk20a *g);
1804
1805bool nvgpu_has_syncpoints(struct gk20a *g);
1806
1807#endif /* GK20A_H */
diff --git a/include/nvgpu/gmmu.h b/include/nvgpu/gmmu.h
deleted file mode 100644
index 2fc0d44..0000000
--- a/include/nvgpu/gmmu.h
+++ /dev/null
@@ -1,369 +0,0 @@
1/*
2 * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_GMMU_H
24#define NVGPU_GMMU_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/nvgpu_mem.h>
28#include <nvgpu/list.h>
29#include <nvgpu/rbtree.h>
30#include <nvgpu/lock.h>
31#include <nvgpu/bitops.h>
32#include <nvgpu/mm.h>
33
34/*
35 * This is the GMMU API visible to blocks outside of the GMMU. Basically this
36 * API supports all the different types of mappings that might be done in the
37 * GMMU.
38 */
39
40struct vm_gk20a;
41struct nvgpu_mem;
42
43#define GMMU_PAGE_SIZE_SMALL 0U
44#define GMMU_PAGE_SIZE_BIG 1U
45#define GMMU_PAGE_SIZE_KERNEL 2U
46#define GMMU_NR_PAGE_SIZES 3U
47
48enum gk20a_mem_rw_flag {
49 gk20a_mem_flag_none = 0, /* RW */
50 gk20a_mem_flag_read_only = 1, /* RO */
51 gk20a_mem_flag_write_only = 2, /* WO */
52};
53
54/*
55 * Minimum size of a cache. The number of different caches in the nvgpu_pd_cache
56 * structure is of course depending on this. The MIN_SHIFT define is the right
57 * number of bits to shift to determine which list to use in the array of lists.
58 *
59 * For Linux, limit the use of the cache to entries less than the page size, to
60 * avoid potential problems with running out of CMA memory when allocating large,
61 * contiguous slabs, as would be required for non-iommmuable chips.
62 */
63#define NVGPU_PD_CACHE_MIN 256U
64#define NVGPU_PD_CACHE_MIN_SHIFT 9U
65
66#ifdef __KERNEL__
67
68#if PAGE_SIZE == 4096
69#define NVGPU_PD_CACHE_COUNT 4U
70#elif PAGE_SIZE == 65536
71#define NVGPU_PD_CACHE_COUNT 8U
72#else
73#error "Unsupported page size."
74#endif
75
76#else
77#define NVGPU_PD_CACHE_COUNT 8U
78#endif
79
80#define NVGPU_PD_CACHE_SIZE (NVGPU_PD_CACHE_MIN * (1U << NVGPU_PD_CACHE_COUNT))
81
82struct nvgpu_pd_mem_entry {
83 struct nvgpu_mem mem;
84
85 /*
86 * Size of the page directories (not the mem). alloc_map is a bitmap
87 * showing which PDs have been allocated.
88 *
89 * The size of mem will be NVGPU_PD_CACHE_SIZE
90 * and pd_size will always be a power of 2.
91 *
92 */
93 u32 pd_size;
94 DECLARE_BITMAP(alloc_map, NVGPU_PD_CACHE_SIZE / NVGPU_PD_CACHE_MIN);
95
96 /* Total number of allocations in this PD. */
97 u32 allocs;
98
99 struct nvgpu_list_node list_entry;
100 struct nvgpu_rbtree_node tree_entry;
101};
102
103static inline struct nvgpu_pd_mem_entry *
104nvgpu_pd_mem_entry_from_list_entry(struct nvgpu_list_node *node)
105{
106 return (struct nvgpu_pd_mem_entry *)
107 ((uintptr_t)node -
108 offsetof(struct nvgpu_pd_mem_entry, list_entry));
109};
110
111static inline struct nvgpu_pd_mem_entry *
112nvgpu_pd_mem_entry_from_tree_entry(struct nvgpu_rbtree_node *node)
113{
114 return (struct nvgpu_pd_mem_entry *)
115 ((uintptr_t)node -
116 offsetof(struct nvgpu_pd_mem_entry, tree_entry));
117};
118
119/*
120 * A cache for allocating PD memory from. This enables smaller PDs to be packed
121 * into single pages.
122 *
123 * This is fairly complex so see the documentation in pd_cache.c for a full
124 * description of how this is organized.
125 */
126struct nvgpu_pd_cache {
127 /*
128 * Array of lists of full nvgpu_pd_mem_entries and partially full (or
129 * empty) nvgpu_pd_mem_entries.
130 */
131 struct nvgpu_list_node full[NVGPU_PD_CACHE_COUNT];
132 struct nvgpu_list_node partial[NVGPU_PD_CACHE_COUNT];
133
134 /*
135 * Tree of all allocated struct nvgpu_mem's for fast look up.
136 */
137 struct nvgpu_rbtree_node *mem_tree;
138
139 /*
140 * All access to the cache much be locked. This protects the lists and
141 * the rb tree.
142 */
143 struct nvgpu_mutex lock;
144};
145
146/*
147 * GMMU page directory. This is the kernel's tracking of a list of PDEs or PTEs
148 * in the GMMU.
149 */
150struct nvgpu_gmmu_pd {
151 /*
152 * DMA memory describing the PTEs or PDEs. @mem_offs describes the
153 * offset of the PDE table in @mem. @cached specifies if this PD is
154 * using pd_cache memory.
155 */
156 struct nvgpu_mem *mem;
157 u32 mem_offs;
158 bool cached;
159
160 /*
161 * List of pointers to the next level of page tables. Does not
162 * need to be populated when this PD is pointing to PTEs.
163 */
164 struct nvgpu_gmmu_pd *entries;
165 int num_entries;
166};
167
168/*
169 * Reduce the number of arguments getting passed through the various levels of
170 * GMMU mapping functions.
171 *
172 * The following fields are set statically and do not change throughout the
173 * mapping call:
174 *
175 * pgsz: Index into the page size table.
176 * kind_v: Kind attributes for mapping.
177 * cacheable: Cacheability of the mapping.
178 * rw_flag: Flag from enum gk20a_mem_rw_flag
179 * sparse: Set if the mapping should be sparse.
180 * priv: Privilidged mapping.
181 * coherent: Set if the mapping should be IO coherent.
182 * valid: Set if the PTE should be marked valid.
183 * aperture: VIDMEM or SYSMEM.
184 * debug: When set print debugging info.
185 * platform_atomic: True if platform_atomic flag is valid.
186 *
187 * These fields are dynamically updated as necessary during the map:
188 *
189 * ctag: Comptag line in the comptag cache;
190 * updated every time we write a PTE.
191 */
192struct nvgpu_gmmu_attrs {
193 u32 pgsz;
194 u32 kind_v;
195 u64 ctag;
196 bool cacheable;
197 enum gk20a_mem_rw_flag rw_flag;
198 bool sparse;
199 bool priv;
200 bool valid;
201 enum nvgpu_aperture aperture;
202 bool debug;
203 bool l3_alloc;
204 bool platform_atomic;
205};
206
207struct gk20a_mmu_level {
208 int hi_bit[2];
209 int lo_bit[2];
210
211 /*
212 * Build map from virt_addr -> phys_addr.
213 */
214 void (*update_entry)(struct vm_gk20a *vm,
215 const struct gk20a_mmu_level *l,
216 struct nvgpu_gmmu_pd *pd,
217 u32 pd_idx,
218 u64 phys_addr,
219 u64 virt_addr,
220 struct nvgpu_gmmu_attrs *attrs);
221 u32 entry_size;
222 /*
223 * Get pde page size
224 */
225 u32 (*get_pgsz)(struct gk20a *g, const struct gk20a_mmu_level *l,
226 struct nvgpu_gmmu_pd *pd, u32 pd_idx);
227};
228
229static inline const char *nvgpu_gmmu_perm_str(enum gk20a_mem_rw_flag p)
230{
231 switch (p) {
232 case gk20a_mem_flag_none:
233 return "RW";
234 case gk20a_mem_flag_write_only:
235 return "WO";
236 case gk20a_mem_flag_read_only:
237 return "RO";
238 default:
239 return "??";
240 }
241}
242
243int nvgpu_gmmu_init_page_table(struct vm_gk20a *vm);
244
245/**
246 * nvgpu_gmmu_map - Map memory into the GMMU.
247 *
248 * Kernel space.
249 */
250u64 nvgpu_gmmu_map(struct vm_gk20a *vm,
251 struct nvgpu_mem *mem,
252 u64 size,
253 u32 flags,
254 enum gk20a_mem_rw_flag rw_flag,
255 bool priv,
256 enum nvgpu_aperture aperture);
257
258/**
259 * nvgpu_gmmu_map_fixed - Map memory into the GMMU.
260 *
261 * Kernel space.
262 */
263u64 nvgpu_gmmu_map_fixed(struct vm_gk20a *vm,
264 struct nvgpu_mem *mem,
265 u64 addr,
266 u64 size,
267 u32 flags,
268 enum gk20a_mem_rw_flag rw_flag,
269 bool priv,
270 enum nvgpu_aperture aperture);
271
272/**
273 * nvgpu_gmmu_unmap - Unmap a buffer.
274 *
275 * Kernel space.
276 */
277void nvgpu_gmmu_unmap(struct vm_gk20a *vm,
278 struct nvgpu_mem *mem,
279 u64 gpu_va);
280
281int nvgpu_pd_alloc(struct vm_gk20a *vm,
282 struct nvgpu_gmmu_pd *pd,
283 u32 bytes);
284
285void nvgpu_pd_free(struct vm_gk20a *vm, struct nvgpu_gmmu_pd *pd);
286int nvgpu_pd_cache_alloc_direct(struct gk20a *g,
287 struct nvgpu_gmmu_pd *pd, u32 bytes);
288void nvgpu_pd_cache_free_direct(struct gk20a *g, struct nvgpu_gmmu_pd *pd);
289int nvgpu_pd_cache_init(struct gk20a *g);
290void nvgpu_pd_cache_fini(struct gk20a *g);
291
292/*
293 * Some useful routines that are shared across chips.
294 */
295static inline u32 pd_offset_from_index(const struct gk20a_mmu_level *l,
296 u32 pd_idx)
297{
298 return (pd_idx * l->entry_size) / sizeof(u32);
299}
300
301static inline void pd_write(struct gk20a *g, struct nvgpu_gmmu_pd *pd,
302 size_t w, size_t data)
303{
304 nvgpu_mem_wr32(g, pd->mem, (pd->mem_offs / sizeof(u32)) + w, data);
305}
306
307/**
308 * __nvgpu_pte_words - Compute number of words in a PTE.
309 *
310 * @g - The GPU.
311 *
312 * This computes and returns the size of a PTE for the passed chip.
313 */
314u32 __nvgpu_pte_words(struct gk20a *g);
315
316/**
317 * __nvgpu_get_pte - Get the contents of a PTE by virtual address
318 *
319 * @g - The GPU.
320 * @vm - VM to look in.
321 * @vaddr - GPU virtual address.
322 * @pte - [out] Set to the contents of the PTE.
323 *
324 * Find a PTE in the passed VM based on the passed GPU virtual address. This
325 * will @pte with a copy of the contents of the PTE. @pte must be an array of
326 * u32s large enough to contain the PTE. This can be computed using
327 * __nvgpu_pte_words().
328 *
329 * If you wish to write to this PTE then you may modify @pte and then use the
330 * __nvgpu_set_pte().
331 *
332 * This function returns 0 if the PTE is found and -EINVAL otherwise.
333 */
334int __nvgpu_get_pte(struct gk20a *g, struct vm_gk20a *vm, u64 vaddr, u32 *pte);
335
336/**
337 * __nvgpu_set_pte - Set a PTE based on virtual address
338 *
339 * @g - The GPU.
340 * @vm - VM to look in.
341 * @vaddr - GPU virtual address.
342 * @pte - The contents of the PTE to write.
343 *
344 * Find a PTE and overwrite the contents of that PTE with the passed in data
345 * located in @pte. If the PTE does not exist then no writing will happen. That
346 * is this function will not fill out the page tables for you. The expectation
347 * is that the passed @vaddr has already been mapped and this is just modifying
348 * the mapping (for instance changing invalid to valid).
349 *
350 * @pte must contain at least the required words for the PTE. See
351 * __nvgpu_pte_words().
352 *
353 * This function returns 0 on success and -EINVAL otherwise.
354 */
355int __nvgpu_set_pte(struct gk20a *g, struct vm_gk20a *vm, u64 vaddr, u32 *pte);
356
357
358/*
359 * Internal debugging routines. Probably not something you want to use.
360 */
361#define pte_dbg(g, attrs, fmt, args...) \
362 do { \
363 if ((attrs != NULL) && (attrs->debug)) \
364 nvgpu_info(g, fmt, ##args); \
365 else \
366 nvgpu_log(g, gpu_dbg_pte, fmt, ##args); \
367 } while (0)
368
369#endif /* NVGPU_GMMU_H */
diff --git a/include/nvgpu/hal_init.h b/include/nvgpu/hal_init.h
deleted file mode 100644
index 06e58e7..0000000
--- a/include/nvgpu/hal_init.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * NVIDIA GPU Hardware Abstraction Layer functions definitions.
3 *
4 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef NVGPU_HAL_INIT_H
26#define NVGPU_HAL_INIT_H
27
28struct gk20a;
29
30int nvgpu_init_hal(struct gk20a *g);
31int nvgpu_detect_chip(struct gk20a *g);
32
33#endif /* NVGPU_HAL_INIT_H */
diff --git a/include/nvgpu/hashtable.h b/include/nvgpu/hashtable.h
deleted file mode 100644
index 5ce56f0..0000000
--- a/include/nvgpu/hashtable.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef __NVGPU_SORT_H__
23#define __NVGPU_SORT_H__
24
25#ifdef __KERNEL__
26#include <linux/hashtable.h>
27#endif
28
29#endif
diff --git a/include/nvgpu/hw/gk20a/hw_bus_gk20a.h b/include/nvgpu/hw/gk20a/hw_bus_gk20a.h
deleted file mode 100644
index d3bb9e9..0000000
--- a/include/nvgpu/hw/gk20a/hw_bus_gk20a.h
+++ /dev/null
@@ -1,171 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_bus_gk20a_h_
57#define _hw_bus_gk20a_h_
58
59static inline u32 bus_bar0_window_r(void)
60{
61 return 0x00001700U;
62}
63static inline u32 bus_bar0_window_base_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 bus_bar0_window_target_vid_mem_f(void)
68{
69 return 0x0U;
70}
71static inline u32 bus_bar0_window_target_sys_mem_coherent_f(void)
72{
73 return 0x2000000U;
74}
75static inline u32 bus_bar0_window_target_sys_mem_noncoherent_f(void)
76{
77 return 0x3000000U;
78}
79static inline u32 bus_bar0_window_target_bar0_window_base_shift_v(void)
80{
81 return 0x00000010U;
82}
83static inline u32 bus_bar1_block_r(void)
84{
85 return 0x00001704U;
86}
87static inline u32 bus_bar1_block_ptr_f(u32 v)
88{
89 return (v & 0xfffffffU) << 0U;
90}
91static inline u32 bus_bar1_block_target_vid_mem_f(void)
92{
93 return 0x0U;
94}
95static inline u32 bus_bar1_block_target_sys_mem_coh_f(void)
96{
97 return 0x20000000U;
98}
99static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void)
100{
101 return 0x30000000U;
102}
103static inline u32 bus_bar1_block_mode_virtual_f(void)
104{
105 return 0x80000000U;
106}
107static inline u32 bus_bar2_block_r(void)
108{
109 return 0x00001714U;
110}
111static inline u32 bus_bar2_block_ptr_f(u32 v)
112{
113 return (v & 0xfffffffU) << 0U;
114}
115static inline u32 bus_bar2_block_target_vid_mem_f(void)
116{
117 return 0x0U;
118}
119static inline u32 bus_bar2_block_target_sys_mem_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void)
124{
125 return 0x30000000U;
126}
127static inline u32 bus_bar2_block_mode_virtual_f(void)
128{
129 return 0x80000000U;
130}
131static inline u32 bus_bar1_block_ptr_shift_v(void)
132{
133 return 0x0000000cU;
134}
135static inline u32 bus_bar2_block_ptr_shift_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 bus_intr_0_r(void)
140{
141 return 0x00001100U;
142}
143static inline u32 bus_intr_0_pri_squash_m(void)
144{
145 return 0x1U << 1U;
146}
147static inline u32 bus_intr_0_pri_fecserr_m(void)
148{
149 return 0x1U << 2U;
150}
151static inline u32 bus_intr_0_pri_timeout_m(void)
152{
153 return 0x1U << 3U;
154}
155static inline u32 bus_intr_en_0_r(void)
156{
157 return 0x00001140U;
158}
159static inline u32 bus_intr_en_0_pri_squash_m(void)
160{
161 return 0x1U << 1U;
162}
163static inline u32 bus_intr_en_0_pri_fecserr_m(void)
164{
165 return 0x1U << 2U;
166}
167static inline u32 bus_intr_en_0_pri_timeout_m(void)
168{
169 return 0x1U << 3U;
170}
171#endif
diff --git a/include/nvgpu/hw/gk20a/hw_ccsr_gk20a.h b/include/nvgpu/hw/gk20a/hw_ccsr_gk20a.h
deleted file mode 100644
index 95151f6..0000000
--- a/include/nvgpu/hw/gk20a/hw_ccsr_gk20a.h
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ccsr_gk20a_h_
57#define _hw_ccsr_gk20a_h_
58
59static inline u32 ccsr_channel_inst_r(u32 i)
60{
61 return 0x00800000U + i*8U;
62}
63static inline u32 ccsr_channel_inst__size_1_v(void)
64{
65 return 0x00000080U;
66}
67static inline u32 ccsr_channel_inst_ptr_f(u32 v)
68{
69 return (v & 0xfffffffU) << 0U;
70}
71static inline u32 ccsr_channel_inst_target_vid_mem_f(void)
72{
73 return 0x0U;
74}
75static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void)
76{
77 return 0x20000000U;
78}
79static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void)
80{
81 return 0x30000000U;
82}
83static inline u32 ccsr_channel_inst_bind_false_f(void)
84{
85 return 0x0U;
86}
87static inline u32 ccsr_channel_inst_bind_true_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 ccsr_channel_r(u32 i)
92{
93 return 0x00800004U + i*8U;
94}
95static inline u32 ccsr_channel__size_1_v(void)
96{
97 return 0x00000080U;
98}
99static inline u32 ccsr_channel_enable_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 ccsr_channel_enable_set_f(u32 v)
104{
105 return (v & 0x1U) << 10U;
106}
107static inline u32 ccsr_channel_enable_set_true_f(void)
108{
109 return 0x400U;
110}
111static inline u32 ccsr_channel_enable_clr_true_f(void)
112{
113 return 0x800U;
114}
115static inline u32 ccsr_channel_runlist_f(u32 v)
116{
117 return (v & 0xfU) << 16U;
118}
119static inline u32 ccsr_channel_status_v(u32 r)
120{
121 return (r >> 24U) & 0xfU;
122}
123static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
124{
125 return 0x00000002U;
126}
127static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
128{
129 return 0x00000004U;
130}
131static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
132{
133 return 0x0000000aU;
134}
135static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
136{
137 return 0x0000000bU;
138}
139static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
140{
141 return 0x0000000cU;
142}
143static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
144{
145 return 0x0000000dU;
146}
147static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
148{
149 return 0x0000000eU;
150}
151static inline u32 ccsr_channel_next_v(u32 r)
152{
153 return (r >> 1U) & 0x1U;
154}
155static inline u32 ccsr_channel_next_true_v(void)
156{
157 return 0x00000001U;
158}
159static inline u32 ccsr_channel_busy_v(u32 r)
160{
161 return (r >> 28U) & 0x1U;
162}
163#endif
diff --git a/include/nvgpu/hw/gk20a/hw_ce2_gk20a.h b/include/nvgpu/hw/gk20a/hw_ce2_gk20a.h
deleted file mode 100644
index 87481cd..0000000
--- a/include/nvgpu/hw/gk20a/hw_ce2_gk20a.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ce2_gk20a_h_
57#define _hw_ce2_gk20a_h_
58
59static inline u32 ce2_intr_status_r(void)
60{
61 return 0x00106908U;
62}
63static inline u32 ce2_intr_status_blockpipe_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 ce2_intr_status_blockpipe_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 ce2_intr_status_nonblockpipe_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 ce2_intr_status_nonblockpipe_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 ce2_intr_status_launcherr_pending_f(void)
80{
81 return 0x4U;
82}
83static inline u32 ce2_intr_status_launcherr_reset_f(void)
84{
85 return 0x4U;
86}
87#endif
diff --git a/include/nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h b/include/nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h
deleted file mode 100644
index 131fd12..0000000
--- a/include/nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h
+++ /dev/null
@@ -1,447 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ctxsw_prog_gk20a_h_
57#define _hw_ctxsw_prog_gk20a_h_
58
59static inline u32 ctxsw_prog_fecs_header_v(void)
60{
61 return 0x00000100U;
62}
63static inline u32 ctxsw_prog_main_image_num_gpcs_o(void)
64{
65 return 0x00000008U;
66}
67static inline u32 ctxsw_prog_main_image_patch_count_o(void)
68{
69 return 0x00000010U;
70}
71static inline u32 ctxsw_prog_main_image_context_id_o(void)
72{
73 return 0x000000f0U;
74}
75static inline u32 ctxsw_prog_main_image_patch_adr_lo_o(void)
76{
77 return 0x00000014U;
78}
79static inline u32 ctxsw_prog_main_image_patch_adr_hi_o(void)
80{
81 return 0x00000018U;
82}
83static inline u32 ctxsw_prog_main_image_zcull_o(void)
84{
85 return 0x0000001cU;
86}
87static inline u32 ctxsw_prog_main_image_zcull_mode_no_ctxsw_v(void)
88{
89 return 0x00000001U;
90}
91static inline u32 ctxsw_prog_main_image_zcull_mode_separate_buffer_v(void)
92{
93 return 0x00000002U;
94}
95static inline u32 ctxsw_prog_main_image_zcull_ptr_o(void)
96{
97 return 0x00000020U;
98}
99static inline u32 ctxsw_prog_main_image_pm_o(void)
100{
101 return 0x00000028U;
102}
103static inline u32 ctxsw_prog_main_image_pm_mode_m(void)
104{
105 return 0x7U << 0U;
106}
107static inline u32 ctxsw_prog_main_image_pm_mode_ctxsw_f(void)
108{
109 return 0x1U;
110}
111static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void)
112{
113 return 0x0U;
114}
115static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void)
116{
117 return 0x7U << 3U;
118}
119static inline u32 ctxsw_prog_main_image_pm_smpc_mode_ctxsw_f(void)
120{
121 return 0x8U;
122}
123static inline u32 ctxsw_prog_main_image_pm_smpc_mode_no_ctxsw_f(void)
124{
125 return 0x0U;
126}
127static inline u32 ctxsw_prog_main_image_pm_ptr_o(void)
128{
129 return 0x0000002cU;
130}
131static inline u32 ctxsw_prog_main_image_num_save_ops_o(void)
132{
133 return 0x000000f4U;
134}
135static inline u32 ctxsw_prog_main_image_num_restore_ops_o(void)
136{
137 return 0x000000f8U;
138}
139static inline u32 ctxsw_prog_main_image_magic_value_o(void)
140{
141 return 0x000000fcU;
142}
143static inline u32 ctxsw_prog_main_image_magic_value_v_value_v(void)
144{
145 return 0x600dc0deU;
146}
147static inline u32 ctxsw_prog_local_priv_register_ctl_o(void)
148{
149 return 0x0000000cU;
150}
151static inline u32 ctxsw_prog_local_priv_register_ctl_offset_v(u32 r)
152{
153 return (r >> 0U) & 0xffffU;
154}
155static inline u32 ctxsw_prog_local_image_ppc_info_o(void)
156{
157 return 0x000000f4U;
158}
159static inline u32 ctxsw_prog_local_image_ppc_info_num_ppcs_v(u32 r)
160{
161 return (r >> 0U) & 0xffffU;
162}
163static inline u32 ctxsw_prog_local_image_ppc_info_ppc_mask_v(u32 r)
164{
165 return (r >> 16U) & 0xffffU;
166}
167static inline u32 ctxsw_prog_local_image_num_tpcs_o(void)
168{
169 return 0x000000f8U;
170}
171static inline u32 ctxsw_prog_local_magic_value_o(void)
172{
173 return 0x000000fcU;
174}
175static inline u32 ctxsw_prog_local_magic_value_v_value_v(void)
176{
177 return 0xad0becabU;
178}
179static inline u32 ctxsw_prog_main_extended_buffer_ctl_o(void)
180{
181 return 0x000000ecU;
182}
183static inline u32 ctxsw_prog_main_extended_buffer_ctl_offset_v(u32 r)
184{
185 return (r >> 0U) & 0xffffU;
186}
187static inline u32 ctxsw_prog_main_extended_buffer_ctl_size_v(u32 r)
188{
189 return (r >> 16U) & 0xffU;
190}
191static inline u32 ctxsw_prog_extended_buffer_segments_size_in_bytes_v(void)
192{
193 return 0x00000100U;
194}
195static inline u32 ctxsw_prog_extended_marker_size_in_bytes_v(void)
196{
197 return 0x00000004U;
198}
199static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_register_stride_v(void)
200{
201 return 0x00000005U;
202}
203static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_control_register_stride_v(void)
204{
205 return 0x00000004U;
206}
207static inline u32 ctxsw_prog_extended_num_smpc_quadrants_v(void)
208{
209 return 0x00000004U;
210}
211static inline u32 ctxsw_prog_main_image_priv_access_map_config_o(void)
212{
213 return 0x000000a0U;
214}
215static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_s(void)
216{
217 return 2U;
218}
219static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_f(u32 v)
220{
221 return (v & 0x3U) << 0U;
222}
223static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_m(void)
224{
225 return 0x3U << 0U;
226}
227static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_v(u32 r)
228{
229 return (r >> 0U) & 0x3U;
230}
231static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_allow_all_f(void)
232{
233 return 0x0U;
234}
235static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f(void)
236{
237 return 0x2U;
238}
239static inline u32 ctxsw_prog_main_image_priv_access_map_addr_lo_o(void)
240{
241 return 0x000000a4U;
242}
243static inline u32 ctxsw_prog_main_image_priv_access_map_addr_hi_o(void)
244{
245 return 0x000000a8U;
246}
247static inline u32 ctxsw_prog_main_image_misc_options_o(void)
248{
249 return 0x0000003cU;
250}
251static inline u32 ctxsw_prog_main_image_misc_options_verif_features_m(void)
252{
253 return 0x1U << 3U;
254}
255static inline u32 ctxsw_prog_main_image_misc_options_verif_features_disabled_f(void)
256{
257 return 0x0U;
258}
259static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_o(void)
260{
261 return 0x000000acU;
262}
263static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_num_records_f(u32 v)
264{
265 return (v & 0xffffU) << 0U;
266}
267static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_o(void)
268{
269 return 0x000000b0U;
270}
271static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_v_m(void)
272{
273 return 0xfffffffU << 0U;
274}
275static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_m(void)
276{
277 return 0x3U << 28U;
278}
279static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_vid_mem_f(void)
280{
281 return 0x0U;
282}
283static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_coherent_f(void)
284{
285 return 0x20000000U;
286}
287static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_noncoherent_f(void)
288{
289 return 0x30000000U;
290}
291static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(void)
292{
293 return 0x000000b4U;
294}
295static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_v_f(u32 v)
296{
297 return (v & 0xffffffffU) << 0U;
298}
299static inline u32 ctxsw_prog_record_timestamp_record_size_in_bytes_v(void)
300{
301 return 0x00000080U;
302}
303static inline u32 ctxsw_prog_record_timestamp_record_size_in_words_v(void)
304{
305 return 0x00000020U;
306}
307static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_o(void)
308{
309 return 0x00000000U;
310}
311static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_v_value_v(void)
312{
313 return 0x00000000U;
314}
315static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_o(void)
316{
317 return 0x00000004U;
318}
319static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_v_value_v(void)
320{
321 return 0x600dbeefU;
322}
323static inline u32 ctxsw_prog_record_timestamp_context_id_o(void)
324{
325 return 0x00000008U;
326}
327static inline u32 ctxsw_prog_record_timestamp_context_ptr_o(void)
328{
329 return 0x0000000cU;
330}
331static inline u32 ctxsw_prog_record_timestamp_new_context_id_o(void)
332{
333 return 0x00000010U;
334}
335static inline u32 ctxsw_prog_record_timestamp_new_context_ptr_o(void)
336{
337 return 0x00000014U;
338}
339static inline u32 ctxsw_prog_record_timestamp_timestamp_lo_o(void)
340{
341 return 0x00000018U;
342}
343static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_o(void)
344{
345 return 0x0000001cU;
346}
347static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_f(u32 v)
348{
349 return (v & 0xffffffU) << 0U;
350}
351static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_v(u32 r)
352{
353 return (r >> 0U) & 0xffffffU;
354}
355static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_f(u32 v)
356{
357 return (v & 0xffU) << 24U;
358}
359static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_m(void)
360{
361 return 0xffU << 24U;
362}
363static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_v(u32 r)
364{
365 return (r >> 24U) & 0xffU;
366}
367static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_v(void)
368{
369 return 0x00000001U;
370}
371static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_f(void)
372{
373 return 0x1000000U;
374}
375static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_v(void)
376{
377 return 0x00000002U;
378}
379static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_f(void)
380{
381 return 0x2000000U;
382}
383static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_v(void)
384{
385 return 0x0000000aU;
386}
387static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_f(void)
388{
389 return 0xa000000U;
390}
391static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_v(void)
392{
393 return 0x0000000bU;
394}
395static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_f(void)
396{
397 return 0xb000000U;
398}
399static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_v(void)
400{
401 return 0x0000000cU;
402}
403static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_f(void)
404{
405 return 0xc000000U;
406}
407static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_v(void)
408{
409 return 0x0000000dU;
410}
411static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_f(void)
412{
413 return 0xd000000U;
414}
415static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_v(void)
416{
417 return 0x00000003U;
418}
419static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_f(void)
420{
421 return 0x3000000U;
422}
423static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_v(void)
424{
425 return 0x00000004U;
426}
427static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_f(void)
428{
429 return 0x4000000U;
430}
431static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_v(void)
432{
433 return 0x00000005U;
434}
435static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_f(void)
436{
437 return 0x5000000U;
438}
439static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_v(void)
440{
441 return 0x000000ffU;
442}
443static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_f(void)
444{
445 return 0xff000000U;
446}
447#endif
diff --git a/include/nvgpu/hw/gk20a/hw_falcon_gk20a.h b/include/nvgpu/hw/gk20a/hw_falcon_gk20a.h
deleted file mode 100644
index 7b4d87b..0000000
--- a/include/nvgpu/hw/gk20a/hw_falcon_gk20a.h
+++ /dev/null
@@ -1,559 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_falcon_gk20a_h_
57#define _hw_falcon_gk20a_h_
58
59static inline u32 falcon_falcon_irqsset_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 falcon_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 falcon_falcon_irqsclr_r(void)
68{
69 return 0x00000004U;
70}
71static inline u32 falcon_falcon_irqstat_r(void)
72{
73 return 0x00000008U;
74}
75static inline u32 falcon_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 falcon_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 falcon_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 falcon_falcon_irqmode_r(void)
88{
89 return 0x0000000cU;
90}
91static inline u32 falcon_falcon_irqmset_r(void)
92{
93 return 0x00000010U;
94}
95static inline u32 falcon_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 falcon_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 falcon_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 falcon_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 falcon_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 falcon_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 falcon_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 falcon_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 falcon_falcon_irqmclr_r(void)
128{
129 return 0x00000014U;
130}
131static inline u32 falcon_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 falcon_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 falcon_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 falcon_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 falcon_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 falcon_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 falcon_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 falcon_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 falcon_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 falcon_falcon_irqmask_r(void)
168{
169 return 0x00000018U;
170}
171static inline u32 falcon_falcon_irqdest_r(void)
172{
173 return 0x0000001cU;
174}
175static inline u32 falcon_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 falcon_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 falcon_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 falcon_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 falcon_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 falcon_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 falcon_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 falcon_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 falcon_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 falcon_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 falcon_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 falcon_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 falcon_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 falcon_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 falcon_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 falcon_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 falcon_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 falcon_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 falcon_falcon_curctx_r(void)
248{
249 return 0x00000050U;
250}
251static inline u32 falcon_falcon_nxtctx_r(void)
252{
253 return 0x00000054U;
254}
255static inline u32 falcon_falcon_mailbox0_r(void)
256{
257 return 0x00000040U;
258}
259static inline u32 falcon_falcon_mailbox1_r(void)
260{
261 return 0x00000044U;
262}
263static inline u32 falcon_falcon_itfen_r(void)
264{
265 return 0x00000048U;
266}
267static inline u32 falcon_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 falcon_falcon_idlestate_r(void)
272{
273 return 0x0000004cU;
274}
275static inline u32 falcon_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 falcon_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 falcon_falcon_os_r(void)
284{
285 return 0x00000080U;
286}
287static inline u32 falcon_falcon_engctl_r(void)
288{
289 return 0x000000a4U;
290}
291static inline u32 falcon_falcon_cpuctl_r(void)
292{
293 return 0x00000100U;
294}
295static inline u32 falcon_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 falcon_falcon_cpuctl_sreset_f(u32 v)
300{
301 return (v & 0x1U) << 2U;
302}
303static inline u32 falcon_falcon_cpuctl_hreset_f(u32 v)
304{
305 return (v & 0x1U) << 3U;
306}
307static inline u32 falcon_falcon_cpuctl_halt_intr_f(u32 v)
308{
309 return (v & 0x1U) << 4U;
310}
311static inline u32 falcon_falcon_cpuctl_halt_intr_m(void)
312{
313 return 0x1U << 4U;
314}
315static inline u32 falcon_falcon_cpuctl_halt_intr_v(u32 r)
316{
317 return (r >> 4U) & 0x1U;
318}
319static inline u32 falcon_falcon_cpuctl_stopped_m(void)
320{
321 return 0x1U << 5U;
322}
323static inline u32 falcon_falcon_imemc_r(u32 i)
324{
325 return 0x00000180U + i*16U;
326}
327static inline u32 falcon_falcon_imemc_offs_f(u32 v)
328{
329 return (v & 0x3fU) << 2U;
330}
331static inline u32 falcon_falcon_imemc_blk_f(u32 v)
332{
333 return (v & 0xffU) << 8U;
334}
335static inline u32 falcon_falcon_imemc_aincw_f(u32 v)
336{
337 return (v & 0x1U) << 24U;
338}
339static inline u32 falcon_falcon_imemc_secure_f(u32 v)
340{
341 return (v & 0x1U) << 28U;
342}
343static inline u32 falcon_falcon_imemd_r(u32 i)
344{
345 return 0x00000184U + i*16U;
346}
347static inline u32 falcon_falcon_imemt_r(u32 i)
348{
349 return 0x00000188U + i*16U;
350}
351static inline u32 falcon_falcon_bootvec_r(void)
352{
353 return 0x00000104U;
354}
355static inline u32 falcon_falcon_bootvec_vec_f(u32 v)
356{
357 return (v & 0xffffffffU) << 0U;
358}
359static inline u32 falcon_falcon_dmactl_r(void)
360{
361 return 0x0000010cU;
362}
363static inline u32 falcon_falcon_dmactl_dmem_scrubbing_m(void)
364{
365 return 0x1U << 1U;
366}
367static inline u32 falcon_falcon_dmactl_imem_scrubbing_m(void)
368{
369 return 0x1U << 2U;
370}
371static inline u32 falcon_falcon_dmactl_require_ctx_f(u32 v)
372{
373 return (v & 0x1U) << 0U;
374}
375static inline u32 falcon_falcon_hwcfg_r(void)
376{
377 return 0x00000108U;
378}
379static inline u32 falcon_falcon_hwcfg_imem_size_v(u32 r)
380{
381 return (r >> 0U) & 0x1ffU;
382}
383static inline u32 falcon_falcon_hwcfg_dmem_size_v(u32 r)
384{
385 return (r >> 9U) & 0x1ffU;
386}
387static inline u32 falcon_falcon_dmatrfbase_r(void)
388{
389 return 0x00000110U;
390}
391static inline u32 falcon_falcon_dmatrfmoffs_r(void)
392{
393 return 0x00000114U;
394}
395static inline u32 falcon_falcon_dmatrfcmd_r(void)
396{
397 return 0x00000118U;
398}
399static inline u32 falcon_falcon_dmatrfcmd_imem_f(u32 v)
400{
401 return (v & 0x1U) << 4U;
402}
403static inline u32 falcon_falcon_dmatrfcmd_write_f(u32 v)
404{
405 return (v & 0x1U) << 5U;
406}
407static inline u32 falcon_falcon_dmatrfcmd_size_f(u32 v)
408{
409 return (v & 0x7U) << 8U;
410}
411static inline u32 falcon_falcon_dmatrfcmd_ctxdma_f(u32 v)
412{
413 return (v & 0x7U) << 12U;
414}
415static inline u32 falcon_falcon_dmatrffboffs_r(void)
416{
417 return 0x0000011cU;
418}
419static inline u32 falcon_falcon_imstat_r(void)
420{
421 return 0x00000144U;
422}
423static inline u32 falcon_falcon_traceidx_r(void)
424{
425 return 0x00000148U;
426}
427static inline u32 falcon_falcon_traceidx_maxidx_v(u32 r)
428{
429 return (r >> 16U) & 0xffU;
430}
431static inline u32 falcon_falcon_traceidx_idx_v(u32 r)
432{
433 return (r >> 0U) & 0xffU;
434}
435static inline u32 falcon_falcon_tracepc_r(void)
436{
437 return 0x0000014cU;
438}
439static inline u32 falcon_falcon_tracepc_pc_v(u32 r)
440{
441 return (r >> 0U) & 0xffffffU;
442}
443static inline u32 falcon_falcon_exterraddr_r(void)
444{
445 return 0x00000168U;
446}
447static inline u32 falcon_falcon_exterrstat_r(void)
448{
449 return 0x0000016cU;
450}
451static inline u32 falcon_falcon_exterrstat_valid_m(void)
452{
453 return 0x1U << 31U;
454}
455static inline u32 falcon_falcon_exterrstat_valid_v(u32 r)
456{
457 return (r >> 31U) & 0x1U;
458}
459static inline u32 falcon_falcon_exterrstat_valid_true_v(void)
460{
461 return 0x00000001U;
462}
463static inline u32 falcon_falcon_icd_cmd_r(void)
464{
465 return 0x00000200U;
466}
467static inline u32 falcon_falcon_icd_cmd_opc_s(void)
468{
469 return 4U;
470}
471static inline u32 falcon_falcon_icd_cmd_opc_f(u32 v)
472{
473 return (v & 0xfU) << 0U;
474}
475static inline u32 falcon_falcon_icd_cmd_opc_m(void)
476{
477 return 0xfU << 0U;
478}
479static inline u32 falcon_falcon_icd_cmd_opc_v(u32 r)
480{
481 return (r >> 0U) & 0xfU;
482}
483static inline u32 falcon_falcon_icd_cmd_opc_rreg_f(void)
484{
485 return 0x8U;
486}
487static inline u32 falcon_falcon_icd_cmd_opc_rstat_f(void)
488{
489 return 0xeU;
490}
491static inline u32 falcon_falcon_icd_cmd_idx_f(u32 v)
492{
493 return (v & 0x1fU) << 8U;
494}
495static inline u32 falcon_falcon_icd_rdata_r(void)
496{
497 return 0x0000020cU;
498}
499static inline u32 falcon_falcon_dmemc_r(u32 i)
500{
501 return 0x000001c0U + i*8U;
502}
503static inline u32 falcon_falcon_dmemc_offs_f(u32 v)
504{
505 return (v & 0x3fU) << 2U;
506}
507static inline u32 falcon_falcon_dmemc_offs_m(void)
508{
509 return 0x3fU << 2U;
510}
511static inline u32 falcon_falcon_dmemc_blk_f(u32 v)
512{
513 return (v & 0xffU) << 8U;
514}
515static inline u32 falcon_falcon_dmemc_blk_m(void)
516{
517 return 0xffU << 8U;
518}
519static inline u32 falcon_falcon_dmemc_aincw_f(u32 v)
520{
521 return (v & 0x1U) << 24U;
522}
523static inline u32 falcon_falcon_dmemc_aincr_f(u32 v)
524{
525 return (v & 0x1U) << 25U;
526}
527static inline u32 falcon_falcon_dmemd_r(u32 i)
528{
529 return 0x000001c4U + i*8U;
530}
531static inline u32 falcon_falcon_debug1_r(void)
532{
533 return 0x00000090U;
534}
535static inline u32 falcon_falcon_debug1_ctxsw_mode_s(void)
536{
537 return 1U;
538}
539static inline u32 falcon_falcon_debug1_ctxsw_mode_f(u32 v)
540{
541 return (v & 0x1U) << 16U;
542}
543static inline u32 falcon_falcon_debug1_ctxsw_mode_m(void)
544{
545 return 0x1U << 16U;
546}
547static inline u32 falcon_falcon_debug1_ctxsw_mode_v(u32 r)
548{
549 return (r >> 16U) & 0x1U;
550}
551static inline u32 falcon_falcon_debug1_ctxsw_mode_init_f(void)
552{
553 return 0x0U;
554}
555static inline u32 falcon_falcon_debuginfo_r(void)
556{
557 return 0x00000094U;
558}
559#endif
diff --git a/include/nvgpu/hw/gk20a/hw_fb_gk20a.h b/include/nvgpu/hw/gk20a/hw_fb_gk20a.h
deleted file mode 100644
index 42df4f5..0000000
--- a/include/nvgpu/hw/gk20a/hw_fb_gk20a.h
+++ /dev/null
@@ -1,263 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fb_gk20a_h_
57#define _hw_fb_gk20a_h_
58
59static inline u32 fb_mmu_ctrl_r(void)
60{
61 return 0x00100c80U;
62}
63static inline u32 fb_mmu_ctrl_vm_pg_size_f(u32 v)
64{
65 return (v & 0x1U) << 0U;
66}
67static inline u32 fb_mmu_ctrl_vm_pg_size_128kb_f(void)
68{
69 return 0x0U;
70}
71static inline u32 fb_mmu_ctrl_vm_pg_size_64kb_f(void)
72{
73 return 0x1U;
74}
75static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r)
76{
77 return (r >> 15U) & 0x1U;
78}
79static inline u32 fb_mmu_ctrl_pri_fifo_empty_false_f(void)
80{
81 return 0x0U;
82}
83static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r)
84{
85 return (r >> 16U) & 0xffU;
86}
87static inline u32 fb_mmu_invalidate_pdb_r(void)
88{
89 return 0x00100cb8U;
90}
91static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void)
92{
93 return 0x0U;
94}
95static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void)
96{
97 return 0x2U;
98}
99static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v)
100{
101 return (v & 0xfffffffU) << 4U;
102}
103static inline u32 fb_mmu_invalidate_r(void)
104{
105 return 0x00100cbcU;
106}
107static inline u32 fb_mmu_invalidate_all_va_true_f(void)
108{
109 return 0x1U;
110}
111static inline u32 fb_mmu_invalidate_all_pdb_true_f(void)
112{
113 return 0x2U;
114}
115static inline u32 fb_mmu_invalidate_trigger_s(void)
116{
117 return 1U;
118}
119static inline u32 fb_mmu_invalidate_trigger_f(u32 v)
120{
121 return (v & 0x1U) << 31U;
122}
123static inline u32 fb_mmu_invalidate_trigger_m(void)
124{
125 return 0x1U << 31U;
126}
127static inline u32 fb_mmu_invalidate_trigger_v(u32 r)
128{
129 return (r >> 31U) & 0x1U;
130}
131static inline u32 fb_mmu_invalidate_trigger_true_f(void)
132{
133 return 0x80000000U;
134}
135static inline u32 fb_mmu_debug_wr_r(void)
136{
137 return 0x00100cc8U;
138}
139static inline u32 fb_mmu_debug_wr_aperture_s(void)
140{
141 return 2U;
142}
143static inline u32 fb_mmu_debug_wr_aperture_f(u32 v)
144{
145 return (v & 0x3U) << 0U;
146}
147static inline u32 fb_mmu_debug_wr_aperture_m(void)
148{
149 return 0x3U << 0U;
150}
151static inline u32 fb_mmu_debug_wr_aperture_v(u32 r)
152{
153 return (r >> 0U) & 0x3U;
154}
155static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void)
156{
157 return 0x0U;
158}
159static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void)
160{
161 return 0x2U;
162}
163static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void)
164{
165 return 0x3U;
166}
167static inline u32 fb_mmu_debug_wr_vol_false_f(void)
168{
169 return 0x0U;
170}
171static inline u32 fb_mmu_debug_wr_vol_true_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 fb_mmu_debug_wr_vol_true_f(void)
176{
177 return 0x4U;
178}
179static inline u32 fb_mmu_debug_wr_addr_f(u32 v)
180{
181 return (v & 0xfffffffU) << 4U;
182}
183static inline u32 fb_mmu_debug_wr_addr_alignment_v(void)
184{
185 return 0x0000000cU;
186}
187static inline u32 fb_mmu_debug_rd_r(void)
188{
189 return 0x00100cccU;
190}
191static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void)
192{
193 return 0x0U;
194}
195static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void)
196{
197 return 0x2U;
198}
199static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void)
200{
201 return 0x3U;
202}
203static inline u32 fb_mmu_debug_rd_vol_false_f(void)
204{
205 return 0x0U;
206}
207static inline u32 fb_mmu_debug_rd_addr_f(u32 v)
208{
209 return (v & 0xfffffffU) << 4U;
210}
211static inline u32 fb_mmu_debug_rd_addr_alignment_v(void)
212{
213 return 0x0000000cU;
214}
215static inline u32 fb_mmu_debug_ctrl_r(void)
216{
217 return 0x00100cc4U;
218}
219static inline u32 fb_mmu_debug_ctrl_debug_v(u32 r)
220{
221 return (r >> 16U) & 0x1U;
222}
223static inline u32 fb_mmu_debug_ctrl_debug_m(void)
224{
225 return 0x1U << 16U;
226}
227static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void)
228{
229 return 0x00000001U;
230}
231static inline u32 fb_mmu_debug_ctrl_debug_enabled_f(void)
232{
233 return 0x10000U;
234}
235static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void)
236{
237 return 0x00000000U;
238}
239static inline u32 fb_mmu_debug_ctrl_debug_disabled_f(void)
240{
241 return 0x0U;
242}
243static inline u32 fb_mmu_vpr_info_r(void)
244{
245 return 0x00100cd0U;
246}
247static inline u32 fb_mmu_vpr_info_fetch_v(u32 r)
248{
249 return (r >> 2U) & 0x1U;
250}
251static inline u32 fb_mmu_vpr_info_fetch_false_v(void)
252{
253 return 0x00000000U;
254}
255static inline u32 fb_mmu_vpr_info_fetch_true_v(void)
256{
257 return 0x00000001U;
258}
259static inline u32 fb_niso_flush_sysmem_addr_r(void)
260{
261 return 0x00100c10U;
262}
263#endif
diff --git a/include/nvgpu/hw/gk20a/hw_fifo_gk20a.h b/include/nvgpu/hw/gk20a/hw_fifo_gk20a.h
deleted file mode 100644
index e61e386..0000000
--- a/include/nvgpu/hw/gk20a/hw_fifo_gk20a.h
+++ /dev/null
@@ -1,619 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fifo_gk20a_h_
57#define _hw_fifo_gk20a_h_
58
59static inline u32 fifo_bar1_base_r(void)
60{
61 return 0x00002254U;
62}
63static inline u32 fifo_bar1_base_ptr_f(u32 v)
64{
65 return (v & 0xfffffffU) << 0U;
66}
67static inline u32 fifo_bar1_base_ptr_align_shift_v(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 fifo_bar1_base_valid_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fifo_bar1_base_valid_true_f(void)
76{
77 return 0x10000000U;
78}
79static inline u32 fifo_runlist_base_r(void)
80{
81 return 0x00002270U;
82}
83static inline u32 fifo_runlist_base_ptr_f(u32 v)
84{
85 return (v & 0xfffffffU) << 0U;
86}
87static inline u32 fifo_runlist_base_target_vid_mem_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void)
92{
93 return 0x20000000U;
94}
95static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void)
96{
97 return 0x30000000U;
98}
99static inline u32 fifo_runlist_r(void)
100{
101 return 0x00002274U;
102}
103static inline u32 fifo_runlist_engine_f(u32 v)
104{
105 return (v & 0xfU) << 20U;
106}
107static inline u32 fifo_eng_runlist_base_r(u32 i)
108{
109 return 0x00002280U + i*8U;
110}
111static inline u32 fifo_eng_runlist_base__size_1_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 fifo_eng_runlist_r(u32 i)
116{
117 return 0x00002284U + i*8U;
118}
119static inline u32 fifo_eng_runlist__size_1_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 fifo_eng_runlist_length_f(u32 v)
124{
125 return (v & 0xffffU) << 0U;
126}
127static inline u32 fifo_eng_runlist_length_max_v(void)
128{
129 return 0x0000ffffU;
130}
131static inline u32 fifo_eng_runlist_pending_true_f(void)
132{
133 return 0x100000U;
134}
135static inline u32 fifo_runlist_timeslice_r(u32 i)
136{
137 return 0x00002310U + i*4U;
138}
139static inline u32 fifo_runlist_timeslice_timeout_128_f(void)
140{
141 return 0x80U;
142}
143static inline u32 fifo_runlist_timeslice_timescale_3_f(void)
144{
145 return 0x3000U;
146}
147static inline u32 fifo_runlist_timeslice_enable_true_f(void)
148{
149 return 0x10000000U;
150}
151static inline u32 fifo_eng_timeout_r(void)
152{
153 return 0x00002a0cU;
154}
155static inline u32 fifo_eng_timeout_period_max_f(void)
156{
157 return 0x7fffffffU;
158}
159static inline u32 fifo_eng_timeout_detection_enabled_f(void)
160{
161 return 0x80000000U;
162}
163static inline u32 fifo_eng_timeout_detection_disabled_f(void)
164{
165 return 0x0U;
166}
167static inline u32 fifo_pb_timeslice_r(u32 i)
168{
169 return 0x00002350U + i*4U;
170}
171static inline u32 fifo_pb_timeslice_timeout_16_f(void)
172{
173 return 0x10U;
174}
175static inline u32 fifo_pb_timeslice_timescale_0_f(void)
176{
177 return 0x0U;
178}
179static inline u32 fifo_pb_timeslice_enable_true_f(void)
180{
181 return 0x10000000U;
182}
183static inline u32 fifo_pbdma_map_r(u32 i)
184{
185 return 0x00002390U + i*4U;
186}
187static inline u32 fifo_intr_0_r(void)
188{
189 return 0x00002100U;
190}
191static inline u32 fifo_intr_0_bind_error_pending_f(void)
192{
193 return 0x1U;
194}
195static inline u32 fifo_intr_0_bind_error_reset_f(void)
196{
197 return 0x1U;
198}
199static inline u32 fifo_intr_0_pio_error_pending_f(void)
200{
201 return 0x10U;
202}
203static inline u32 fifo_intr_0_pio_error_reset_f(void)
204{
205 return 0x10U;
206}
207static inline u32 fifo_intr_0_sched_error_pending_f(void)
208{
209 return 0x100U;
210}
211static inline u32 fifo_intr_0_sched_error_reset_f(void)
212{
213 return 0x100U;
214}
215static inline u32 fifo_intr_0_chsw_error_pending_f(void)
216{
217 return 0x10000U;
218}
219static inline u32 fifo_intr_0_chsw_error_reset_f(void)
220{
221 return 0x10000U;
222}
223static inline u32 fifo_intr_0_fb_flush_timeout_pending_f(void)
224{
225 return 0x800000U;
226}
227static inline u32 fifo_intr_0_fb_flush_timeout_reset_f(void)
228{
229 return 0x800000U;
230}
231static inline u32 fifo_intr_0_lb_error_pending_f(void)
232{
233 return 0x1000000U;
234}
235static inline u32 fifo_intr_0_lb_error_reset_f(void)
236{
237 return 0x1000000U;
238}
239static inline u32 fifo_intr_0_dropped_mmu_fault_pending_f(void)
240{
241 return 0x8000000U;
242}
243static inline u32 fifo_intr_0_dropped_mmu_fault_reset_f(void)
244{
245 return 0x8000000U;
246}
247static inline u32 fifo_intr_0_mmu_fault_pending_f(void)
248{
249 return 0x10000000U;
250}
251static inline u32 fifo_intr_0_pbdma_intr_pending_f(void)
252{
253 return 0x20000000U;
254}
255static inline u32 fifo_intr_0_runlist_event_pending_f(void)
256{
257 return 0x40000000U;
258}
259static inline u32 fifo_intr_0_channel_intr_pending_f(void)
260{
261 return 0x80000000U;
262}
263static inline u32 fifo_intr_en_0_r(void)
264{
265 return 0x00002140U;
266}
267static inline u32 fifo_intr_en_0_sched_error_f(u32 v)
268{
269 return (v & 0x1U) << 8U;
270}
271static inline u32 fifo_intr_en_0_sched_error_m(void)
272{
273 return 0x1U << 8U;
274}
275static inline u32 fifo_intr_en_0_mmu_fault_f(u32 v)
276{
277 return (v & 0x1U) << 28U;
278}
279static inline u32 fifo_intr_en_0_mmu_fault_m(void)
280{
281 return 0x1U << 28U;
282}
283static inline u32 fifo_intr_en_1_r(void)
284{
285 return 0x00002528U;
286}
287static inline u32 fifo_intr_bind_error_r(void)
288{
289 return 0x0000252cU;
290}
291static inline u32 fifo_intr_sched_error_r(void)
292{
293 return 0x0000254cU;
294}
295static inline u32 fifo_intr_sched_error_code_f(u32 v)
296{
297 return (v & 0xffU) << 0U;
298}
299static inline u32 fifo_intr_sched_error_code_ctxsw_timeout_v(void)
300{
301 return 0x0000000aU;
302}
303static inline u32 fifo_intr_chsw_error_r(void)
304{
305 return 0x0000256cU;
306}
307static inline u32 fifo_intr_mmu_fault_id_r(void)
308{
309 return 0x0000259cU;
310}
311static inline u32 fifo_intr_mmu_fault_eng_id_graphics_v(void)
312{
313 return 0x00000000U;
314}
315static inline u32 fifo_intr_mmu_fault_eng_id_graphics_f(void)
316{
317 return 0x0U;
318}
319static inline u32 fifo_intr_mmu_fault_inst_r(u32 i)
320{
321 return 0x00002800U + i*16U;
322}
323static inline u32 fifo_intr_mmu_fault_inst_ptr_v(u32 r)
324{
325 return (r >> 0U) & 0xfffffffU;
326}
327static inline u32 fifo_intr_mmu_fault_inst_ptr_align_shift_v(void)
328{
329 return 0x0000000cU;
330}
331static inline u32 fifo_intr_mmu_fault_lo_r(u32 i)
332{
333 return 0x00002804U + i*16U;
334}
335static inline u32 fifo_intr_mmu_fault_hi_r(u32 i)
336{
337 return 0x00002808U + i*16U;
338}
339static inline u32 fifo_intr_mmu_fault_info_r(u32 i)
340{
341 return 0x0000280cU + i*16U;
342}
343static inline u32 fifo_intr_mmu_fault_info_type_v(u32 r)
344{
345 return (r >> 0U) & 0xfU;
346}
347static inline u32 fifo_intr_mmu_fault_info_write_v(u32 r)
348{
349 return (r >> 7U) & 0x1U;
350}
351static inline u32 fifo_intr_mmu_fault_info_engine_subid_v(u32 r)
352{
353 return (r >> 6U) & 0x1U;
354}
355static inline u32 fifo_intr_mmu_fault_info_engine_subid_gpc_v(void)
356{
357 return 0x00000000U;
358}
359static inline u32 fifo_intr_mmu_fault_info_engine_subid_hub_v(void)
360{
361 return 0x00000001U;
362}
363static inline u32 fifo_intr_mmu_fault_info_client_v(u32 r)
364{
365 return (r >> 8U) & 0x1fU;
366}
367static inline u32 fifo_intr_pbdma_id_r(void)
368{
369 return 0x000025a0U;
370}
371static inline u32 fifo_intr_pbdma_id_status_f(u32 v, u32 i)
372{
373 return (v & 0x1U) << (0U + i*1U);
374}
375static inline u32 fifo_intr_pbdma_id_status_v(u32 r, u32 i)
376{
377 return (r >> (0U + i*1U)) & 0x1U;
378}
379static inline u32 fifo_intr_pbdma_id_status__size_1_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 fifo_intr_runlist_r(void)
384{
385 return 0x00002a00U;
386}
387static inline u32 fifo_fb_timeout_r(void)
388{
389 return 0x00002a04U;
390}
391static inline u32 fifo_fb_timeout_period_m(void)
392{
393 return 0x3fffffffU << 0U;
394}
395static inline u32 fifo_fb_timeout_period_max_f(void)
396{
397 return 0x3fffffffU;
398}
399static inline u32 fifo_pb_timeout_r(void)
400{
401 return 0x00002a08U;
402}
403static inline u32 fifo_pb_timeout_detection_enabled_f(void)
404{
405 return 0x80000000U;
406}
407static inline u32 fifo_error_sched_disable_r(void)
408{
409 return 0x0000262cU;
410}
411static inline u32 fifo_sched_disable_r(void)
412{
413 return 0x00002630U;
414}
415static inline u32 fifo_sched_disable_runlist_f(u32 v, u32 i)
416{
417 return (v & 0x1U) << (0U + i*1U);
418}
419static inline u32 fifo_sched_disable_runlist_m(u32 i)
420{
421 return 0x1U << (0U + i*1U);
422}
423static inline u32 fifo_sched_disable_true_v(void)
424{
425 return 0x00000001U;
426}
427static inline u32 fifo_preempt_r(void)
428{
429 return 0x00002634U;
430}
431static inline u32 fifo_preempt_pending_true_f(void)
432{
433 return 0x100000U;
434}
435static inline u32 fifo_preempt_type_channel_f(void)
436{
437 return 0x0U;
438}
439static inline u32 fifo_preempt_type_tsg_f(void)
440{
441 return 0x1000000U;
442}
443static inline u32 fifo_preempt_chid_f(u32 v)
444{
445 return (v & 0xfffU) << 0U;
446}
447static inline u32 fifo_preempt_id_f(u32 v)
448{
449 return (v & 0xfffU) << 0U;
450}
451static inline u32 fifo_trigger_mmu_fault_r(u32 i)
452{
453 return 0x00002a30U + i*4U;
454}
455static inline u32 fifo_trigger_mmu_fault_id_f(u32 v)
456{
457 return (v & 0x1fU) << 0U;
458}
459static inline u32 fifo_trigger_mmu_fault_enable_f(u32 v)
460{
461 return (v & 0x1U) << 8U;
462}
463static inline u32 fifo_engine_status_r(u32 i)
464{
465 return 0x00002640U + i*8U;
466}
467static inline u32 fifo_engine_status__size_1_v(void)
468{
469 return 0x00000002U;
470}
471static inline u32 fifo_engine_status_id_v(u32 r)
472{
473 return (r >> 0U) & 0xfffU;
474}
475static inline u32 fifo_engine_status_id_type_v(u32 r)
476{
477 return (r >> 12U) & 0x1U;
478}
479static inline u32 fifo_engine_status_id_type_chid_v(void)
480{
481 return 0x00000000U;
482}
483static inline u32 fifo_engine_status_id_type_tsgid_v(void)
484{
485 return 0x00000001U;
486}
487static inline u32 fifo_engine_status_ctx_status_v(u32 r)
488{
489 return (r >> 13U) & 0x7U;
490}
491static inline u32 fifo_engine_status_ctx_status_invalid_v(void)
492{
493 return 0x00000000U;
494}
495static inline u32 fifo_engine_status_ctx_status_valid_v(void)
496{
497 return 0x00000001U;
498}
499static inline u32 fifo_engine_status_ctx_status_ctxsw_load_v(void)
500{
501 return 0x00000005U;
502}
503static inline u32 fifo_engine_status_ctx_status_ctxsw_save_v(void)
504{
505 return 0x00000006U;
506}
507static inline u32 fifo_engine_status_ctx_status_ctxsw_switch_v(void)
508{
509 return 0x00000007U;
510}
511static inline u32 fifo_engine_status_next_id_v(u32 r)
512{
513 return (r >> 16U) & 0xfffU;
514}
515static inline u32 fifo_engine_status_next_id_type_v(u32 r)
516{
517 return (r >> 28U) & 0x1U;
518}
519static inline u32 fifo_engine_status_next_id_type_chid_v(void)
520{
521 return 0x00000000U;
522}
523static inline u32 fifo_engine_status_faulted_v(u32 r)
524{
525 return (r >> 30U) & 0x1U;
526}
527static inline u32 fifo_engine_status_faulted_true_v(void)
528{
529 return 0x00000001U;
530}
531static inline u32 fifo_engine_status_engine_v(u32 r)
532{
533 return (r >> 31U) & 0x1U;
534}
535static inline u32 fifo_engine_status_engine_idle_v(void)
536{
537 return 0x00000000U;
538}
539static inline u32 fifo_engine_status_engine_busy_v(void)
540{
541 return 0x00000001U;
542}
543static inline u32 fifo_engine_status_ctxsw_v(u32 r)
544{
545 return (r >> 15U) & 0x1U;
546}
547static inline u32 fifo_engine_status_ctxsw_in_progress_v(void)
548{
549 return 0x00000001U;
550}
551static inline u32 fifo_engine_status_ctxsw_in_progress_f(void)
552{
553 return 0x8000U;
554}
555static inline u32 fifo_pbdma_status_r(u32 i)
556{
557 return 0x00003080U + i*4U;
558}
559static inline u32 fifo_pbdma_status__size_1_v(void)
560{
561 return 0x00000001U;
562}
563static inline u32 fifo_pbdma_status_id_v(u32 r)
564{
565 return (r >> 0U) & 0xfffU;
566}
567static inline u32 fifo_pbdma_status_id_type_v(u32 r)
568{
569 return (r >> 12U) & 0x1U;
570}
571static inline u32 fifo_pbdma_status_id_type_chid_v(void)
572{
573 return 0x00000000U;
574}
575static inline u32 fifo_pbdma_status_id_type_tsgid_v(void)
576{
577 return 0x00000001U;
578}
579static inline u32 fifo_pbdma_status_chan_status_v(u32 r)
580{
581 return (r >> 13U) & 0x7U;
582}
583static inline u32 fifo_pbdma_status_chan_status_valid_v(void)
584{
585 return 0x00000001U;
586}
587static inline u32 fifo_pbdma_status_chan_status_chsw_load_v(void)
588{
589 return 0x00000005U;
590}
591static inline u32 fifo_pbdma_status_chan_status_chsw_save_v(void)
592{
593 return 0x00000006U;
594}
595static inline u32 fifo_pbdma_status_chan_status_chsw_switch_v(void)
596{
597 return 0x00000007U;
598}
599static inline u32 fifo_pbdma_status_next_id_v(u32 r)
600{
601 return (r >> 16U) & 0xfffU;
602}
603static inline u32 fifo_pbdma_status_next_id_type_v(u32 r)
604{
605 return (r >> 28U) & 0x1U;
606}
607static inline u32 fifo_pbdma_status_next_id_type_chid_v(void)
608{
609 return 0x00000000U;
610}
611static inline u32 fifo_pbdma_status_chsw_v(u32 r)
612{
613 return (r >> 15U) & 0x1U;
614}
615static inline u32 fifo_pbdma_status_chsw_in_progress_v(void)
616{
617 return 0x00000001U;
618}
619#endif
diff --git a/include/nvgpu/hw/gk20a/hw_flush_gk20a.h b/include/nvgpu/hw/gk20a/hw_flush_gk20a.h
deleted file mode 100644
index d270b5f..0000000
--- a/include/nvgpu/hw/gk20a/hw_flush_gk20a.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_flush_gk20a_h_
57#define _hw_flush_gk20a_h_
58
59static inline u32 flush_l2_system_invalidate_r(void)
60{
61 return 0x00070004U;
62}
63static inline u32 flush_l2_system_invalidate_pending_v(u32 r)
64{
65 return (r >> 0U) & 0x1U;
66}
67static inline u32 flush_l2_system_invalidate_pending_busy_v(void)
68{
69 return 0x00000001U;
70}
71static inline u32 flush_l2_system_invalidate_pending_busy_f(void)
72{
73 return 0x1U;
74}
75static inline u32 flush_l2_system_invalidate_outstanding_v(u32 r)
76{
77 return (r >> 1U) & 0x1U;
78}
79static inline u32 flush_l2_system_invalidate_outstanding_true_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 flush_l2_flush_dirty_r(void)
84{
85 return 0x00070010U;
86}
87static inline u32 flush_l2_flush_dirty_pending_v(u32 r)
88{
89 return (r >> 0U) & 0x1U;
90}
91static inline u32 flush_l2_flush_dirty_pending_empty_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 flush_l2_flush_dirty_pending_empty_f(void)
96{
97 return 0x0U;
98}
99static inline u32 flush_l2_flush_dirty_pending_busy_v(void)
100{
101 return 0x00000001U;
102}
103static inline u32 flush_l2_flush_dirty_pending_busy_f(void)
104{
105 return 0x1U;
106}
107static inline u32 flush_l2_flush_dirty_outstanding_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 flush_l2_flush_dirty_outstanding_false_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 flush_l2_flush_dirty_outstanding_false_f(void)
116{
117 return 0x0U;
118}
119static inline u32 flush_l2_flush_dirty_outstanding_true_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 flush_l2_clean_comptags_r(void)
124{
125 return 0x0007000cU;
126}
127static inline u32 flush_l2_clean_comptags_pending_v(u32 r)
128{
129 return (r >> 0U) & 0x1U;
130}
131static inline u32 flush_l2_clean_comptags_pending_empty_v(void)
132{
133 return 0x00000000U;
134}
135static inline u32 flush_l2_clean_comptags_pending_empty_f(void)
136{
137 return 0x0U;
138}
139static inline u32 flush_l2_clean_comptags_pending_busy_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 flush_l2_clean_comptags_pending_busy_f(void)
144{
145 return 0x1U;
146}
147static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 flush_l2_clean_comptags_outstanding_false_v(void)
152{
153 return 0x00000000U;
154}
155static inline u32 flush_l2_clean_comptags_outstanding_false_f(void)
156{
157 return 0x0U;
158}
159static inline u32 flush_l2_clean_comptags_outstanding_true_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 flush_fb_flush_r(void)
164{
165 return 0x00070000U;
166}
167static inline u32 flush_fb_flush_pending_v(u32 r)
168{
169 return (r >> 0U) & 0x1U;
170}
171static inline u32 flush_fb_flush_pending_busy_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 flush_fb_flush_pending_busy_f(void)
176{
177 return 0x1U;
178}
179static inline u32 flush_fb_flush_outstanding_v(u32 r)
180{
181 return (r >> 1U) & 0x1U;
182}
183static inline u32 flush_fb_flush_outstanding_true_v(void)
184{
185 return 0x00000001U;
186}
187#endif
diff --git a/include/nvgpu/hw/gk20a/hw_gmmu_gk20a.h b/include/nvgpu/hw/gk20a/hw_gmmu_gk20a.h
deleted file mode 100644
index a788d1d..0000000
--- a/include/nvgpu/hw/gk20a/hw_gmmu_gk20a.h
+++ /dev/null
@@ -1,283 +0,0 @@
1/*
2 * Copyright (c) 2012-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gmmu_gk20a_h_
57#define _hw_gmmu_gk20a_h_
58
59static inline u32 gmmu_pde_aperture_big_w(void)
60{
61 return 0U;
62}
63static inline u32 gmmu_pde_aperture_big_invalid_f(void)
64{
65 return 0x0U;
66}
67static inline u32 gmmu_pde_aperture_big_video_memory_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gmmu_pde_aperture_big_sys_mem_coh_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gmmu_pde_aperture_big_sys_mem_ncoh_f(void)
76{
77 return 0x3U;
78}
79static inline u32 gmmu_pde_size_w(void)
80{
81 return 0U;
82}
83static inline u32 gmmu_pde_size_full_f(void)
84{
85 return 0x0U;
86}
87static inline u32 gmmu_pde_address_big_sys_f(u32 v)
88{
89 return (v & 0xfffffffU) << 4U;
90}
91static inline u32 gmmu_pde_address_big_sys_w(void)
92{
93 return 0U;
94}
95static inline u32 gmmu_pde_aperture_small_w(void)
96{
97 return 1U;
98}
99static inline u32 gmmu_pde_aperture_small_invalid_f(void)
100{
101 return 0x0U;
102}
103static inline u32 gmmu_pde_aperture_small_video_memory_f(void)
104{
105 return 0x1U;
106}
107static inline u32 gmmu_pde_aperture_small_sys_mem_coh_f(void)
108{
109 return 0x2U;
110}
111static inline u32 gmmu_pde_aperture_small_sys_mem_ncoh_f(void)
112{
113 return 0x3U;
114}
115static inline u32 gmmu_pde_vol_small_w(void)
116{
117 return 1U;
118}
119static inline u32 gmmu_pde_vol_small_true_f(void)
120{
121 return 0x4U;
122}
123static inline u32 gmmu_pde_vol_small_false_f(void)
124{
125 return 0x0U;
126}
127static inline u32 gmmu_pde_vol_big_w(void)
128{
129 return 1U;
130}
131static inline u32 gmmu_pde_vol_big_true_f(void)
132{
133 return 0x8U;
134}
135static inline u32 gmmu_pde_vol_big_false_f(void)
136{
137 return 0x0U;
138}
139static inline u32 gmmu_pde_address_small_sys_f(u32 v)
140{
141 return (v & 0xfffffffU) << 4U;
142}
143static inline u32 gmmu_pde_address_small_sys_w(void)
144{
145 return 1U;
146}
147static inline u32 gmmu_pde_address_shift_v(void)
148{
149 return 0x0000000cU;
150}
151static inline u32 gmmu_pde__size_v(void)
152{
153 return 0x00000008U;
154}
155static inline u32 gmmu_pte__size_v(void)
156{
157 return 0x00000008U;
158}
159static inline u32 gmmu_pte_valid_w(void)
160{
161 return 0U;
162}
163static inline u32 gmmu_pte_valid_true_f(void)
164{
165 return 0x1U;
166}
167static inline u32 gmmu_pte_valid_false_f(void)
168{
169 return 0x0U;
170}
171static inline u32 gmmu_pte_privilege_w(void)
172{
173 return 0U;
174}
175static inline u32 gmmu_pte_privilege_true_f(void)
176{
177 return 0x2U;
178}
179static inline u32 gmmu_pte_privilege_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 gmmu_pte_address_sys_f(u32 v)
184{
185 return (v & 0xfffffffU) << 4U;
186}
187static inline u32 gmmu_pte_address_sys_w(void)
188{
189 return 0U;
190}
191static inline u32 gmmu_pte_address_vid_f(u32 v)
192{
193 return (v & 0x1ffffffU) << 4U;
194}
195static inline u32 gmmu_pte_address_vid_w(void)
196{
197 return 0U;
198}
199static inline u32 gmmu_pte_vol_w(void)
200{
201 return 1U;
202}
203static inline u32 gmmu_pte_vol_true_f(void)
204{
205 return 0x1U;
206}
207static inline u32 gmmu_pte_vol_false_f(void)
208{
209 return 0x0U;
210}
211static inline u32 gmmu_pte_aperture_w(void)
212{
213 return 1U;
214}
215static inline u32 gmmu_pte_aperture_video_memory_f(void)
216{
217 return 0x0U;
218}
219static inline u32 gmmu_pte_aperture_sys_mem_coh_f(void)
220{
221 return 0x4U;
222}
223static inline u32 gmmu_pte_aperture_sys_mem_ncoh_f(void)
224{
225 return 0x6U;
226}
227static inline u32 gmmu_pte_read_only_w(void)
228{
229 return 0U;
230}
231static inline u32 gmmu_pte_read_only_true_f(void)
232{
233 return 0x4U;
234}
235static inline u32 gmmu_pte_write_disable_w(void)
236{
237 return 1U;
238}
239static inline u32 gmmu_pte_write_disable_true_f(void)
240{
241 return 0x80000000U;
242}
243static inline u32 gmmu_pte_read_disable_w(void)
244{
245 return 1U;
246}
247static inline u32 gmmu_pte_read_disable_true_f(void)
248{
249 return 0x40000000U;
250}
251static inline u32 gmmu_pte_comptagline_s(void)
252{
253 return 17U;
254}
255static inline u32 gmmu_pte_comptagline_f(u32 v)
256{
257 return (v & 0x1ffffU) << 12U;
258}
259static inline u32 gmmu_pte_comptagline_w(void)
260{
261 return 1U;
262}
263static inline u32 gmmu_pte_address_shift_v(void)
264{
265 return 0x0000000cU;
266}
267static inline u32 gmmu_pte_kind_f(u32 v)
268{
269 return (v & 0xffU) << 4U;
270}
271static inline u32 gmmu_pte_kind_w(void)
272{
273 return 1U;
274}
275static inline u32 gmmu_pte_kind_invalid_v(void)
276{
277 return 0x000000ffU;
278}
279static inline u32 gmmu_pte_kind_pitch_v(void)
280{
281 return 0x00000000U;
282}
283#endif
diff --git a/include/nvgpu/hw/gk20a/hw_gr_gk20a.h b/include/nvgpu/hw/gk20a/hw_gr_gk20a.h
deleted file mode 100644
index 376cc8f..0000000
--- a/include/nvgpu/hw/gk20a/hw_gr_gk20a.h
+++ /dev/null
@@ -1,3868 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gr_gk20a_h_
57#define _hw_gr_gk20a_h_
58
59static inline u32 gr_intr_r(void)
60{
61 return 0x00400100U;
62}
63static inline u32 gr_intr_notify_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 gr_intr_notify_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gr_intr_semaphore_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gr_intr_semaphore_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gr_intr_semaphore_timeout_not_pending_f(void)
80{
81 return 0x0U;
82}
83static inline u32 gr_intr_semaphore_timeout_pending_f(void)
84{
85 return 0x4U;
86}
87static inline u32 gr_intr_semaphore_timeout_reset_f(void)
88{
89 return 0x4U;
90}
91static inline u32 gr_intr_illegal_method_pending_f(void)
92{
93 return 0x10U;
94}
95static inline u32 gr_intr_illegal_method_reset_f(void)
96{
97 return 0x10U;
98}
99static inline u32 gr_intr_illegal_notify_pending_f(void)
100{
101 return 0x40U;
102}
103static inline u32 gr_intr_illegal_notify_reset_f(void)
104{
105 return 0x40U;
106}
107static inline u32 gr_intr_firmware_method_f(u32 v)
108{
109 return (v & 0x1U) << 8U;
110}
111static inline u32 gr_intr_firmware_method_pending_f(void)
112{
113 return 0x100U;
114}
115static inline u32 gr_intr_firmware_method_reset_f(void)
116{
117 return 0x100U;
118}
119static inline u32 gr_intr_illegal_class_pending_f(void)
120{
121 return 0x20U;
122}
123static inline u32 gr_intr_illegal_class_reset_f(void)
124{
125 return 0x20U;
126}
127static inline u32 gr_intr_fecs_error_pending_f(void)
128{
129 return 0x80000U;
130}
131static inline u32 gr_intr_fecs_error_reset_f(void)
132{
133 return 0x80000U;
134}
135static inline u32 gr_intr_class_error_pending_f(void)
136{
137 return 0x100000U;
138}
139static inline u32 gr_intr_class_error_reset_f(void)
140{
141 return 0x100000U;
142}
143static inline u32 gr_intr_exception_pending_f(void)
144{
145 return 0x200000U;
146}
147static inline u32 gr_intr_exception_reset_f(void)
148{
149 return 0x200000U;
150}
151static inline u32 gr_fecs_intr_r(void)
152{
153 return 0x00400144U;
154}
155static inline u32 gr_class_error_r(void)
156{
157 return 0x00400110U;
158}
159static inline u32 gr_class_error_code_v(u32 r)
160{
161 return (r >> 0U) & 0xffffU;
162}
163static inline u32 gr_intr_nonstall_r(void)
164{
165 return 0x00400120U;
166}
167static inline u32 gr_intr_nonstall_trap_pending_f(void)
168{
169 return 0x2U;
170}
171static inline u32 gr_intr_en_r(void)
172{
173 return 0x0040013cU;
174}
175static inline u32 gr_exception_r(void)
176{
177 return 0x00400108U;
178}
179static inline u32 gr_exception_fe_m(void)
180{
181 return 0x1U << 0U;
182}
183static inline u32 gr_exception_gpc_m(void)
184{
185 return 0x1U << 24U;
186}
187static inline u32 gr_exception_memfmt_m(void)
188{
189 return 0x1U << 1U;
190}
191static inline u32 gr_exception_ds_m(void)
192{
193 return 0x1U << 4U;
194}
195static inline u32 gr_exception_sked_m(void)
196{
197 return 0x1U << 8U;
198}
199static inline u32 gr_exception_pd_m(void)
200{
201 return 0x1U << 2U;
202}
203static inline u32 gr_exception_scc_m(void)
204{
205 return 0x1U << 3U;
206}
207static inline u32 gr_exception_ssync_m(void)
208{
209 return 0x1U << 5U;
210}
211static inline u32 gr_exception_mme_m(void)
212{
213 return 0x1U << 7U;
214}
215static inline u32 gr_exception1_r(void)
216{
217 return 0x00400118U;
218}
219static inline u32 gr_exception1_gpc_0_pending_f(void)
220{
221 return 0x1U;
222}
223static inline u32 gr_exception2_r(void)
224{
225 return 0x0040011cU;
226}
227static inline u32 gr_exception_en_r(void)
228{
229 return 0x00400138U;
230}
231static inline u32 gr_exception_en_fe_m(void)
232{
233 return 0x1U << 0U;
234}
235static inline u32 gr_exception1_en_r(void)
236{
237 return 0x00400130U;
238}
239static inline u32 gr_exception2_en_r(void)
240{
241 return 0x00400134U;
242}
243static inline u32 gr_gpfifo_ctl_r(void)
244{
245 return 0x00400500U;
246}
247static inline u32 gr_gpfifo_ctl_access_f(u32 v)
248{
249 return (v & 0x1U) << 0U;
250}
251static inline u32 gr_gpfifo_ctl_access_disabled_f(void)
252{
253 return 0x0U;
254}
255static inline u32 gr_gpfifo_ctl_access_enabled_f(void)
256{
257 return 0x1U;
258}
259static inline u32 gr_gpfifo_ctl_semaphore_access_f(u32 v)
260{
261 return (v & 0x1U) << 16U;
262}
263static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_v(void)
264{
265 return 0x00000001U;
266}
267static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_f(void)
268{
269 return 0x10000U;
270}
271static inline u32 gr_gpfifo_status_r(void)
272{
273 return 0x00400504U;
274}
275static inline u32 gr_trapped_addr_r(void)
276{
277 return 0x00400704U;
278}
279static inline u32 gr_trapped_addr_mthd_v(u32 r)
280{
281 return (r >> 2U) & 0xfffU;
282}
283static inline u32 gr_trapped_addr_subch_v(u32 r)
284{
285 return (r >> 16U) & 0x7U;
286}
287static inline u32 gr_trapped_addr_mme_generated_v(u32 r)
288{
289 return (r >> 20U) & 0x1U;
290}
291static inline u32 gr_trapped_addr_datahigh_v(u32 r)
292{
293 return (r >> 24U) & 0x1U;
294}
295static inline u32 gr_trapped_addr_priv_v(u32 r)
296{
297 return (r >> 28U) & 0x1U;
298}
299static inline u32 gr_trapped_addr_status_v(u32 r)
300{
301 return (r >> 31U) & 0x1U;
302}
303static inline u32 gr_trapped_data_lo_r(void)
304{
305 return 0x00400708U;
306}
307static inline u32 gr_trapped_data_hi_r(void)
308{
309 return 0x0040070cU;
310}
311static inline u32 gr_trapped_data_mme_r(void)
312{
313 return 0x00400710U;
314}
315static inline u32 gr_trapped_data_mme_pc_v(u32 r)
316{
317 return (r >> 0U) & 0x7ffU;
318}
319static inline u32 gr_status_r(void)
320{
321 return 0x00400700U;
322}
323static inline u32 gr_status_fe_method_upper_v(u32 r)
324{
325 return (r >> 1U) & 0x1U;
326}
327static inline u32 gr_status_fe_method_lower_v(u32 r)
328{
329 return (r >> 2U) & 0x1U;
330}
331static inline u32 gr_status_fe_method_lower_idle_v(void)
332{
333 return 0x00000000U;
334}
335static inline u32 gr_status_fe_gi_v(u32 r)
336{
337 return (r >> 21U) & 0x1U;
338}
339static inline u32 gr_status_mask_r(void)
340{
341 return 0x00400610U;
342}
343static inline u32 gr_status_1_r(void)
344{
345 return 0x00400604U;
346}
347static inline u32 gr_status_2_r(void)
348{
349 return 0x00400608U;
350}
351static inline u32 gr_engine_status_r(void)
352{
353 return 0x0040060cU;
354}
355static inline u32 gr_engine_status_value_busy_f(void)
356{
357 return 0x1U;
358}
359static inline u32 gr_pri_be0_becs_be_exception_r(void)
360{
361 return 0x00410204U;
362}
363static inline u32 gr_pri_be0_becs_be_exception_en_r(void)
364{
365 return 0x00410208U;
366}
367static inline u32 gr_pri_gpc0_gpccs_gpc_exception_r(void)
368{
369 return 0x00502c90U;
370}
371static inline u32 gr_pri_gpc0_gpccs_gpc_exception_en_r(void)
372{
373 return 0x00502c94U;
374}
375static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_r(void)
376{
377 return 0x00504508U;
378}
379static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
380{
381 return 0x0050450cU;
382}
383static inline u32 gr_activity_0_r(void)
384{
385 return 0x00400380U;
386}
387static inline u32 gr_activity_1_r(void)
388{
389 return 0x00400384U;
390}
391static inline u32 gr_activity_2_r(void)
392{
393 return 0x00400388U;
394}
395static inline u32 gr_activity_4_r(void)
396{
397 return 0x00400390U;
398}
399static inline u32 gr_pri_gpc0_gcc_dbg_r(void)
400{
401 return 0x00501000U;
402}
403static inline u32 gr_pri_gpcs_gcc_dbg_r(void)
404{
405 return 0x00419000U;
406}
407static inline u32 gr_pri_gpcs_gcc_dbg_invalidate_m(void)
408{
409 return 0x1U << 1U;
410}
411static inline u32 gr_pri_gpc0_tpc0_sm_cache_control_r(void)
412{
413 return 0x005046a4U;
414}
415static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_r(void)
416{
417 return 0x00419ea4U;
418}
419static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_invalidate_cache_m(void)
420{
421 return 0x1U << 0U;
422}
423static inline u32 gr_pri_sked_activity_r(void)
424{
425 return 0x00407054U;
426}
427static inline u32 gr_pri_gpc0_gpccs_gpc_activity0_r(void)
428{
429 return 0x00502c80U;
430}
431static inline u32 gr_pri_gpc0_gpccs_gpc_activity1_r(void)
432{
433 return 0x00502c84U;
434}
435static inline u32 gr_pri_gpc0_gpccs_gpc_activity2_r(void)
436{
437 return 0x00502c88U;
438}
439static inline u32 gr_pri_gpc0_gpccs_gpc_activity3_r(void)
440{
441 return 0x00502c8cU;
442}
443static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r(void)
444{
445 return 0x00504500U;
446}
447static inline u32 gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r(void)
448{
449 return 0x00501d00U;
450}
451static inline u32 gr_pri_gpcs_gpccs_gpc_activity_0_r(void)
452{
453 return 0x0041ac80U;
454}
455static inline u32 gr_pri_gpcs_gpccs_gpc_activity_1_r(void)
456{
457 return 0x0041ac84U;
458}
459static inline u32 gr_pri_gpcs_gpccs_gpc_activity_2_r(void)
460{
461 return 0x0041ac88U;
462}
463static inline u32 gr_pri_gpcs_gpccs_gpc_activity_3_r(void)
464{
465 return 0x0041ac8cU;
466}
467static inline u32 gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r(void)
468{
469 return 0x0041c500U;
470}
471static inline u32 gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r(void)
472{
473 return 0x00419d00U;
474}
475static inline u32 gr_pri_be0_becs_be_activity0_r(void)
476{
477 return 0x00410200U;
478}
479static inline u32 gr_pri_bes_becs_be_activity0_r(void)
480{
481 return 0x00408a00U;
482}
483static inline u32 gr_pri_ds_mpipe_status_r(void)
484{
485 return 0x00405858U;
486}
487static inline u32 gr_pri_fe_go_idle_on_status_r(void)
488{
489 return 0x00404150U;
490}
491static inline u32 gr_pri_fe_go_idle_check_r(void)
492{
493 return 0x00404158U;
494}
495static inline u32 gr_pri_fe_go_idle_info_r(void)
496{
497 return 0x00404194U;
498}
499static inline u32 gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r(void)
500{
501 return 0x00504238U;
502}
503static inline u32 gr_pri_be0_crop_status1_r(void)
504{
505 return 0x00410134U;
506}
507static inline u32 gr_pri_bes_crop_status1_r(void)
508{
509 return 0x00408934U;
510}
511static inline u32 gr_pri_be0_zrop_status_r(void)
512{
513 return 0x00410048U;
514}
515static inline u32 gr_pri_be0_zrop_status2_r(void)
516{
517 return 0x0041004cU;
518}
519static inline u32 gr_pri_bes_zrop_status_r(void)
520{
521 return 0x00408848U;
522}
523static inline u32 gr_pri_bes_zrop_status2_r(void)
524{
525 return 0x0040884cU;
526}
527static inline u32 gr_pipe_bundle_address_r(void)
528{
529 return 0x00400200U;
530}
531static inline u32 gr_pipe_bundle_address_value_v(u32 r)
532{
533 return (r >> 0U) & 0xffffU;
534}
535static inline u32 gr_pipe_bundle_data_r(void)
536{
537 return 0x00400204U;
538}
539static inline u32 gr_pipe_bundle_config_r(void)
540{
541 return 0x00400208U;
542}
543static inline u32 gr_pipe_bundle_config_override_pipe_mode_disabled_f(void)
544{
545 return 0x0U;
546}
547static inline u32 gr_pipe_bundle_config_override_pipe_mode_enabled_f(void)
548{
549 return 0x80000000U;
550}
551static inline u32 gr_fe_hww_esr_r(void)
552{
553 return 0x00404000U;
554}
555static inline u32 gr_fe_hww_esr_reset_active_f(void)
556{
557 return 0x40000000U;
558}
559static inline u32 gr_fe_hww_esr_en_enable_f(void)
560{
561 return 0x80000000U;
562}
563static inline u32 gr_fe_hww_esr_info_r(void)
564{
565 return 0x004041b0U;
566}
567static inline u32 gr_fe_go_idle_timeout_r(void)
568{
569 return 0x00404154U;
570}
571static inline u32 gr_fe_go_idle_timeout_count_f(u32 v)
572{
573 return (v & 0xffffffffU) << 0U;
574}
575static inline u32 gr_fe_go_idle_timeout_count_disabled_f(void)
576{
577 return 0x0U;
578}
579static inline u32 gr_fe_go_idle_timeout_count_prod_f(void)
580{
581 return 0x800U;
582}
583static inline u32 gr_fe_object_table_r(u32 i)
584{
585 return 0x00404200U + i*4U;
586}
587static inline u32 gr_fe_object_table_nvclass_v(u32 r)
588{
589 return (r >> 0U) & 0xffffU;
590}
591static inline u32 gr_pri_mme_shadow_raw_index_r(void)
592{
593 return 0x00404488U;
594}
595static inline u32 gr_pri_mme_shadow_raw_index_write_trigger_f(void)
596{
597 return 0x80000000U;
598}
599static inline u32 gr_pri_mme_shadow_raw_data_r(void)
600{
601 return 0x0040448cU;
602}
603static inline u32 gr_mme_hww_esr_r(void)
604{
605 return 0x00404490U;
606}
607static inline u32 gr_mme_hww_esr_reset_active_f(void)
608{
609 return 0x40000000U;
610}
611static inline u32 gr_mme_hww_esr_en_enable_f(void)
612{
613 return 0x80000000U;
614}
615static inline u32 gr_mme_hww_esr_info_r(void)
616{
617 return 0x00404494U;
618}
619static inline u32 gr_memfmt_hww_esr_r(void)
620{
621 return 0x00404600U;
622}
623static inline u32 gr_memfmt_hww_esr_reset_active_f(void)
624{
625 return 0x40000000U;
626}
627static inline u32 gr_memfmt_hww_esr_en_enable_f(void)
628{
629 return 0x80000000U;
630}
631static inline u32 gr_fecs_cpuctl_r(void)
632{
633 return 0x00409100U;
634}
635static inline u32 gr_fecs_cpuctl_startcpu_f(u32 v)
636{
637 return (v & 0x1U) << 1U;
638}
639static inline u32 gr_fecs_dmactl_r(void)
640{
641 return 0x0040910cU;
642}
643static inline u32 gr_fecs_dmactl_require_ctx_f(u32 v)
644{
645 return (v & 0x1U) << 0U;
646}
647static inline u32 gr_fecs_dmactl_dmem_scrubbing_m(void)
648{
649 return 0x1U << 1U;
650}
651static inline u32 gr_fecs_dmactl_imem_scrubbing_m(void)
652{
653 return 0x1U << 2U;
654}
655static inline u32 gr_fecs_os_r(void)
656{
657 return 0x00409080U;
658}
659static inline u32 gr_fecs_idlestate_r(void)
660{
661 return 0x0040904cU;
662}
663static inline u32 gr_fecs_mailbox0_r(void)
664{
665 return 0x00409040U;
666}
667static inline u32 gr_fecs_mailbox1_r(void)
668{
669 return 0x00409044U;
670}
671static inline u32 gr_fecs_irqstat_r(void)
672{
673 return 0x00409008U;
674}
675static inline u32 gr_fecs_irqmode_r(void)
676{
677 return 0x0040900cU;
678}
679static inline u32 gr_fecs_irqmask_r(void)
680{
681 return 0x00409018U;
682}
683static inline u32 gr_fecs_irqdest_r(void)
684{
685 return 0x0040901cU;
686}
687static inline u32 gr_fecs_curctx_r(void)
688{
689 return 0x00409050U;
690}
691static inline u32 gr_fecs_nxtctx_r(void)
692{
693 return 0x00409054U;
694}
695static inline u32 gr_fecs_engctl_r(void)
696{
697 return 0x004090a4U;
698}
699static inline u32 gr_fecs_debug1_r(void)
700{
701 return 0x00409090U;
702}
703static inline u32 gr_fecs_debuginfo_r(void)
704{
705 return 0x00409094U;
706}
707static inline u32 gr_fecs_icd_cmd_r(void)
708{
709 return 0x00409200U;
710}
711static inline u32 gr_fecs_icd_cmd_opc_s(void)
712{
713 return 4U;
714}
715static inline u32 gr_fecs_icd_cmd_opc_f(u32 v)
716{
717 return (v & 0xfU) << 0U;
718}
719static inline u32 gr_fecs_icd_cmd_opc_m(void)
720{
721 return 0xfU << 0U;
722}
723static inline u32 gr_fecs_icd_cmd_opc_v(u32 r)
724{
725 return (r >> 0U) & 0xfU;
726}
727static inline u32 gr_fecs_icd_cmd_opc_rreg_f(void)
728{
729 return 0x8U;
730}
731static inline u32 gr_fecs_icd_cmd_opc_rstat_f(void)
732{
733 return 0xeU;
734}
735static inline u32 gr_fecs_icd_cmd_idx_f(u32 v)
736{
737 return (v & 0x1fU) << 8U;
738}
739static inline u32 gr_fecs_icd_rdata_r(void)
740{
741 return 0x0040920cU;
742}
743static inline u32 gr_fecs_imemc_r(u32 i)
744{
745 return 0x00409180U + i*16U;
746}
747static inline u32 gr_fecs_imemc_offs_f(u32 v)
748{
749 return (v & 0x3fU) << 2U;
750}
751static inline u32 gr_fecs_imemc_blk_f(u32 v)
752{
753 return (v & 0xffU) << 8U;
754}
755static inline u32 gr_fecs_imemc_aincw_f(u32 v)
756{
757 return (v & 0x1U) << 24U;
758}
759static inline u32 gr_fecs_imemd_r(u32 i)
760{
761 return 0x00409184U + i*16U;
762}
763static inline u32 gr_fecs_imemt_r(u32 i)
764{
765 return 0x00409188U + i*16U;
766}
767static inline u32 gr_fecs_imemt_tag_f(u32 v)
768{
769 return (v & 0xffffU) << 0U;
770}
771static inline u32 gr_fecs_dmemc_r(u32 i)
772{
773 return 0x004091c0U + i*8U;
774}
775static inline u32 gr_fecs_dmemc_offs_s(void)
776{
777 return 6U;
778}
779static inline u32 gr_fecs_dmemc_offs_f(u32 v)
780{
781 return (v & 0x3fU) << 2U;
782}
783static inline u32 gr_fecs_dmemc_offs_m(void)
784{
785 return 0x3fU << 2U;
786}
787static inline u32 gr_fecs_dmemc_offs_v(u32 r)
788{
789 return (r >> 2U) & 0x3fU;
790}
791static inline u32 gr_fecs_dmemc_blk_f(u32 v)
792{
793 return (v & 0xffU) << 8U;
794}
795static inline u32 gr_fecs_dmemc_aincw_f(u32 v)
796{
797 return (v & 0x1U) << 24U;
798}
799static inline u32 gr_fecs_dmemd_r(u32 i)
800{
801 return 0x004091c4U + i*8U;
802}
803static inline u32 gr_fecs_dmatrfbase_r(void)
804{
805 return 0x00409110U;
806}
807static inline u32 gr_fecs_dmatrfmoffs_r(void)
808{
809 return 0x00409114U;
810}
811static inline u32 gr_fecs_dmatrffboffs_r(void)
812{
813 return 0x0040911cU;
814}
815static inline u32 gr_fecs_dmatrfcmd_r(void)
816{
817 return 0x00409118U;
818}
819static inline u32 gr_fecs_dmatrfcmd_imem_f(u32 v)
820{
821 return (v & 0x1U) << 4U;
822}
823static inline u32 gr_fecs_dmatrfcmd_write_f(u32 v)
824{
825 return (v & 0x1U) << 5U;
826}
827static inline u32 gr_fecs_dmatrfcmd_size_f(u32 v)
828{
829 return (v & 0x7U) << 8U;
830}
831static inline u32 gr_fecs_dmatrfcmd_ctxdma_f(u32 v)
832{
833 return (v & 0x7U) << 12U;
834}
835static inline u32 gr_fecs_bootvec_r(void)
836{
837 return 0x00409104U;
838}
839static inline u32 gr_fecs_bootvec_vec_f(u32 v)
840{
841 return (v & 0xffffffffU) << 0U;
842}
843static inline u32 gr_fecs_falcon_hwcfg_r(void)
844{
845 return 0x00409108U;
846}
847static inline u32 gr_gpcs_gpccs_falcon_hwcfg_r(void)
848{
849 return 0x0041a108U;
850}
851static inline u32 gr_fecs_falcon_rm_r(void)
852{
853 return 0x00409084U;
854}
855static inline u32 gr_fecs_current_ctx_r(void)
856{
857 return 0x00409b00U;
858}
859static inline u32 gr_fecs_current_ctx_ptr_f(u32 v)
860{
861 return (v & 0xfffffffU) << 0U;
862}
863static inline u32 gr_fecs_current_ctx_ptr_v(u32 r)
864{
865 return (r >> 0U) & 0xfffffffU;
866}
867static inline u32 gr_fecs_current_ctx_target_s(void)
868{
869 return 2U;
870}
871static inline u32 gr_fecs_current_ctx_target_f(u32 v)
872{
873 return (v & 0x3U) << 28U;
874}
875static inline u32 gr_fecs_current_ctx_target_m(void)
876{
877 return 0x3U << 28U;
878}
879static inline u32 gr_fecs_current_ctx_target_v(u32 r)
880{
881 return (r >> 28U) & 0x3U;
882}
883static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void)
884{
885 return 0x0U;
886}
887static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void)
888{
889 return 0x20000000U;
890}
891static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void)
892{
893 return 0x30000000U;
894}
895static inline u32 gr_fecs_current_ctx_valid_s(void)
896{
897 return 1U;
898}
899static inline u32 gr_fecs_current_ctx_valid_f(u32 v)
900{
901 return (v & 0x1U) << 31U;
902}
903static inline u32 gr_fecs_current_ctx_valid_m(void)
904{
905 return 0x1U << 31U;
906}
907static inline u32 gr_fecs_current_ctx_valid_v(u32 r)
908{
909 return (r >> 31U) & 0x1U;
910}
911static inline u32 gr_fecs_current_ctx_valid_false_f(void)
912{
913 return 0x0U;
914}
915static inline u32 gr_fecs_method_data_r(void)
916{
917 return 0x00409500U;
918}
919static inline u32 gr_fecs_method_push_r(void)
920{
921 return 0x00409504U;
922}
923static inline u32 gr_fecs_method_push_adr_f(u32 v)
924{
925 return (v & 0xfffU) << 0U;
926}
927static inline u32 gr_fecs_method_push_adr_bind_pointer_v(void)
928{
929 return 0x00000003U;
930}
931static inline u32 gr_fecs_method_push_adr_bind_pointer_f(void)
932{
933 return 0x3U;
934}
935static inline u32 gr_fecs_method_push_adr_discover_image_size_v(void)
936{
937 return 0x00000010U;
938}
939static inline u32 gr_fecs_method_push_adr_wfi_golden_save_v(void)
940{
941 return 0x00000009U;
942}
943static inline u32 gr_fecs_method_push_adr_restore_golden_v(void)
944{
945 return 0x00000015U;
946}
947static inline u32 gr_fecs_method_push_adr_discover_zcull_image_size_v(void)
948{
949 return 0x00000016U;
950}
951static inline u32 gr_fecs_method_push_adr_discover_pm_image_size_v(void)
952{
953 return 0x00000025U;
954}
955static inline u32 gr_fecs_method_push_adr_discover_reglist_image_size_v(void)
956{
957 return 0x00000030U;
958}
959static inline u32 gr_fecs_method_push_adr_set_reglist_bind_instance_v(void)
960{
961 return 0x00000031U;
962}
963static inline u32 gr_fecs_method_push_adr_set_reglist_virtual_address_v(void)
964{
965 return 0x00000032U;
966}
967static inline u32 gr_fecs_method_push_adr_stop_ctxsw_v(void)
968{
969 return 0x00000038U;
970}
971static inline u32 gr_fecs_method_push_adr_start_ctxsw_v(void)
972{
973 return 0x00000039U;
974}
975static inline u32 gr_fecs_method_push_adr_set_watchdog_timeout_f(void)
976{
977 return 0x21U;
978}
979static inline u32 gr_fecs_method_push_adr_halt_pipeline_v(void)
980{
981 return 0x00000004U;
982}
983static inline u32 gr_fecs_host_int_status_r(void)
984{
985 return 0x00409c18U;
986}
987static inline u32 gr_fecs_host_int_status_fault_during_ctxsw_f(u32 v)
988{
989 return (v & 0x1U) << 16U;
990}
991static inline u32 gr_fecs_host_int_status_umimp_firmware_method_f(u32 v)
992{
993 return (v & 0x1U) << 17U;
994}
995static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v)
996{
997 return (v & 0x1U) << 18U;
998}
999static inline u32 gr_fecs_host_int_status_watchdog_active_f(void)
1000{
1001 return 0x80000U;
1002}
1003static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v)
1004{
1005 return (v & 0xffffU) << 0U;
1006}
1007static inline u32 gr_fecs_host_int_clear_r(void)
1008{
1009 return 0x00409c20U;
1010}
1011static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_f(u32 v)
1012{
1013 return (v & 0x1U) << 1U;
1014}
1015static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_clear_f(void)
1016{
1017 return 0x2U;
1018}
1019static inline u32 gr_fecs_host_int_enable_r(void)
1020{
1021 return 0x00409c24U;
1022}
1023static inline u32 gr_fecs_host_int_enable_ctxsw_intr1_enable_f(void)
1024{
1025 return 0x2U;
1026}
1027static inline u32 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f(void)
1028{
1029 return 0x10000U;
1030}
1031static inline u32 gr_fecs_host_int_enable_umimp_firmware_method_enable_f(void)
1032{
1033 return 0x20000U;
1034}
1035static inline u32 gr_fecs_host_int_enable_umimp_illegal_method_enable_f(void)
1036{
1037 return 0x40000U;
1038}
1039static inline u32 gr_fecs_host_int_enable_watchdog_enable_f(void)
1040{
1041 return 0x80000U;
1042}
1043static inline u32 gr_fecs_ctxsw_reset_ctl_r(void)
1044{
1045 return 0x00409614U;
1046}
1047static inline u32 gr_fecs_ctxsw_reset_ctl_sys_halt_disabled_f(void)
1048{
1049 return 0x0U;
1050}
1051static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_halt_disabled_f(void)
1052{
1053 return 0x0U;
1054}
1055static inline u32 gr_fecs_ctxsw_reset_ctl_be_halt_disabled_f(void)
1056{
1057 return 0x0U;
1058}
1059static inline u32 gr_fecs_ctxsw_reset_ctl_sys_engine_reset_disabled_f(void)
1060{
1061 return 0x10U;
1062}
1063static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_engine_reset_disabled_f(void)
1064{
1065 return 0x20U;
1066}
1067static inline u32 gr_fecs_ctxsw_reset_ctl_be_engine_reset_disabled_f(void)
1068{
1069 return 0x40U;
1070}
1071static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_enabled_f(void)
1072{
1073 return 0x0U;
1074}
1075static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_disabled_f(void)
1076{
1077 return 0x100U;
1078}
1079static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_enabled_f(void)
1080{
1081 return 0x0U;
1082}
1083static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_disabled_f(void)
1084{
1085 return 0x200U;
1086}
1087static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_s(void)
1088{
1089 return 1U;
1090}
1091static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_f(u32 v)
1092{
1093 return (v & 0x1U) << 10U;
1094}
1095static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_m(void)
1096{
1097 return 0x1U << 10U;
1098}
1099static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_v(u32 r)
1100{
1101 return (r >> 10U) & 0x1U;
1102}
1103static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_enabled_f(void)
1104{
1105 return 0x0U;
1106}
1107static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_disabled_f(void)
1108{
1109 return 0x400U;
1110}
1111static inline u32 gr_fecs_ctx_state_store_major_rev_id_r(void)
1112{
1113 return 0x0040960cU;
1114}
1115static inline u32 gr_fecs_ctxsw_mailbox_r(u32 i)
1116{
1117 return 0x00409800U + i*4U;
1118}
1119static inline u32 gr_fecs_ctxsw_mailbox__size_1_v(void)
1120{
1121 return 0x00000008U;
1122}
1123static inline u32 gr_fecs_ctxsw_mailbox_value_f(u32 v)
1124{
1125 return (v & 0xffffffffU) << 0U;
1126}
1127static inline u32 gr_fecs_ctxsw_mailbox_value_pass_v(void)
1128{
1129 return 0x00000001U;
1130}
1131static inline u32 gr_fecs_ctxsw_mailbox_value_fail_v(void)
1132{
1133 return 0x00000002U;
1134}
1135static inline u32 gr_fecs_ctxsw_mailbox_set_r(u32 i)
1136{
1137 return 0x00409820U + i*4U;
1138}
1139static inline u32 gr_fecs_ctxsw_mailbox_set_value_f(u32 v)
1140{
1141 return (v & 0xffffffffU) << 0U;
1142}
1143static inline u32 gr_fecs_ctxsw_mailbox_clear_r(u32 i)
1144{
1145 return 0x00409840U + i*4U;
1146}
1147static inline u32 gr_fecs_ctxsw_mailbox_clear_value_f(u32 v)
1148{
1149 return (v & 0xffffffffU) << 0U;
1150}
1151static inline u32 gr_fecs_fs_r(void)
1152{
1153 return 0x00409604U;
1154}
1155static inline u32 gr_fecs_fs_num_available_gpcs_s(void)
1156{
1157 return 5U;
1158}
1159static inline u32 gr_fecs_fs_num_available_gpcs_f(u32 v)
1160{
1161 return (v & 0x1fU) << 0U;
1162}
1163static inline u32 gr_fecs_fs_num_available_gpcs_m(void)
1164{
1165 return 0x1fU << 0U;
1166}
1167static inline u32 gr_fecs_fs_num_available_gpcs_v(u32 r)
1168{
1169 return (r >> 0U) & 0x1fU;
1170}
1171static inline u32 gr_fecs_fs_num_available_fbps_s(void)
1172{
1173 return 5U;
1174}
1175static inline u32 gr_fecs_fs_num_available_fbps_f(u32 v)
1176{
1177 return (v & 0x1fU) << 16U;
1178}
1179static inline u32 gr_fecs_fs_num_available_fbps_m(void)
1180{
1181 return 0x1fU << 16U;
1182}
1183static inline u32 gr_fecs_fs_num_available_fbps_v(u32 r)
1184{
1185 return (r >> 16U) & 0x1fU;
1186}
1187static inline u32 gr_fecs_cfg_r(void)
1188{
1189 return 0x00409620U;
1190}
1191static inline u32 gr_fecs_cfg_imem_sz_v(u32 r)
1192{
1193 return (r >> 0U) & 0xffU;
1194}
1195static inline u32 gr_fecs_rc_lanes_r(void)
1196{
1197 return 0x00409880U;
1198}
1199static inline u32 gr_fecs_rc_lanes_num_chains_s(void)
1200{
1201 return 6U;
1202}
1203static inline u32 gr_fecs_rc_lanes_num_chains_f(u32 v)
1204{
1205 return (v & 0x3fU) << 0U;
1206}
1207static inline u32 gr_fecs_rc_lanes_num_chains_m(void)
1208{
1209 return 0x3fU << 0U;
1210}
1211static inline u32 gr_fecs_rc_lanes_num_chains_v(u32 r)
1212{
1213 return (r >> 0U) & 0x3fU;
1214}
1215static inline u32 gr_fecs_ctxsw_status_1_r(void)
1216{
1217 return 0x00409400U;
1218}
1219static inline u32 gr_fecs_ctxsw_status_1_arb_busy_s(void)
1220{
1221 return 1U;
1222}
1223static inline u32 gr_fecs_ctxsw_status_1_arb_busy_f(u32 v)
1224{
1225 return (v & 0x1U) << 12U;
1226}
1227static inline u32 gr_fecs_ctxsw_status_1_arb_busy_m(void)
1228{
1229 return 0x1U << 12U;
1230}
1231static inline u32 gr_fecs_ctxsw_status_1_arb_busy_v(u32 r)
1232{
1233 return (r >> 12U) & 0x1U;
1234}
1235static inline u32 gr_fecs_arb_ctx_adr_r(void)
1236{
1237 return 0x00409a24U;
1238}
1239static inline u32 gr_fecs_new_ctx_r(void)
1240{
1241 return 0x00409b04U;
1242}
1243static inline u32 gr_fecs_new_ctx_ptr_s(void)
1244{
1245 return 28U;
1246}
1247static inline u32 gr_fecs_new_ctx_ptr_f(u32 v)
1248{
1249 return (v & 0xfffffffU) << 0U;
1250}
1251static inline u32 gr_fecs_new_ctx_ptr_m(void)
1252{
1253 return 0xfffffffU << 0U;
1254}
1255static inline u32 gr_fecs_new_ctx_ptr_v(u32 r)
1256{
1257 return (r >> 0U) & 0xfffffffU;
1258}
1259static inline u32 gr_fecs_new_ctx_target_s(void)
1260{
1261 return 2U;
1262}
1263static inline u32 gr_fecs_new_ctx_target_f(u32 v)
1264{
1265 return (v & 0x3U) << 28U;
1266}
1267static inline u32 gr_fecs_new_ctx_target_m(void)
1268{
1269 return 0x3U << 28U;
1270}
1271static inline u32 gr_fecs_new_ctx_target_v(u32 r)
1272{
1273 return (r >> 28U) & 0x3U;
1274}
1275static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void)
1276{
1277 return 0x0U;
1278}
1279static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void)
1280{
1281 return 0x30000000U;
1282}
1283static inline u32 gr_fecs_new_ctx_target_sys_mem_coh_f(void)
1284{
1285 return 0x20000000U;
1286}
1287static inline u32 gr_fecs_new_ctx_valid_s(void)
1288{
1289 return 1U;
1290}
1291static inline u32 gr_fecs_new_ctx_valid_f(u32 v)
1292{
1293 return (v & 0x1U) << 31U;
1294}
1295static inline u32 gr_fecs_new_ctx_valid_m(void)
1296{
1297 return 0x1U << 31U;
1298}
1299static inline u32 gr_fecs_new_ctx_valid_v(u32 r)
1300{
1301 return (r >> 31U) & 0x1U;
1302}
1303static inline u32 gr_fecs_arb_ctx_ptr_r(void)
1304{
1305 return 0x00409a0cU;
1306}
1307static inline u32 gr_fecs_arb_ctx_ptr_ptr_s(void)
1308{
1309 return 28U;
1310}
1311static inline u32 gr_fecs_arb_ctx_ptr_ptr_f(u32 v)
1312{
1313 return (v & 0xfffffffU) << 0U;
1314}
1315static inline u32 gr_fecs_arb_ctx_ptr_ptr_m(void)
1316{
1317 return 0xfffffffU << 0U;
1318}
1319static inline u32 gr_fecs_arb_ctx_ptr_ptr_v(u32 r)
1320{
1321 return (r >> 0U) & 0xfffffffU;
1322}
1323static inline u32 gr_fecs_arb_ctx_ptr_target_s(void)
1324{
1325 return 2U;
1326}
1327static inline u32 gr_fecs_arb_ctx_ptr_target_f(u32 v)
1328{
1329 return (v & 0x3U) << 28U;
1330}
1331static inline u32 gr_fecs_arb_ctx_ptr_target_m(void)
1332{
1333 return 0x3U << 28U;
1334}
1335static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r)
1336{
1337 return (r >> 28U) & 0x3U;
1338}
1339static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void)
1340{
1341 return 0x0U;
1342}
1343static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void)
1344{
1345 return 0x30000000U;
1346}
1347static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_coh_f(void)
1348{
1349 return 0x20000000U;
1350}
1351static inline u32 gr_fecs_arb_ctx_cmd_r(void)
1352{
1353 return 0x00409a10U;
1354}
1355static inline u32 gr_fecs_arb_ctx_cmd_cmd_s(void)
1356{
1357 return 5U;
1358}
1359static inline u32 gr_fecs_arb_ctx_cmd_cmd_f(u32 v)
1360{
1361 return (v & 0x1fU) << 0U;
1362}
1363static inline u32 gr_fecs_arb_ctx_cmd_cmd_m(void)
1364{
1365 return 0x1fU << 0U;
1366}
1367static inline u32 gr_fecs_arb_ctx_cmd_cmd_v(u32 r)
1368{
1369 return (r >> 0U) & 0x1fU;
1370}
1371static inline u32 gr_fecs_ctxsw_status_fe_0_r(void)
1372{
1373 return 0x00409c00U;
1374}
1375static inline u32 gr_gpc0_gpccs_ctxsw_status_gpc_0_r(void)
1376{
1377 return 0x00502c04U;
1378}
1379static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void)
1380{
1381 return 0x00502400U;
1382}
1383static inline u32 gr_gpc0_gpccs_ctxsw_mailbox__size_1_v(void)
1384{
1385 return 0x00000010U;
1386}
1387static inline u32 gr_fecs_ctxsw_idlestate_r(void)
1388{
1389 return 0x00409420U;
1390}
1391static inline u32 gr_gpc0_gpccs_ctxsw_idlestate_r(void)
1392{
1393 return 0x00502420U;
1394}
1395static inline u32 gr_rstr2d_gpc_map0_r(void)
1396{
1397 return 0x0040780cU;
1398}
1399static inline u32 gr_rstr2d_gpc_map1_r(void)
1400{
1401 return 0x00407810U;
1402}
1403static inline u32 gr_rstr2d_gpc_map2_r(void)
1404{
1405 return 0x00407814U;
1406}
1407static inline u32 gr_rstr2d_gpc_map3_r(void)
1408{
1409 return 0x00407818U;
1410}
1411static inline u32 gr_rstr2d_gpc_map4_r(void)
1412{
1413 return 0x0040781cU;
1414}
1415static inline u32 gr_rstr2d_gpc_map5_r(void)
1416{
1417 return 0x00407820U;
1418}
1419static inline u32 gr_rstr2d_map_table_cfg_r(void)
1420{
1421 return 0x004078bcU;
1422}
1423static inline u32 gr_rstr2d_map_table_cfg_row_offset_f(u32 v)
1424{
1425 return (v & 0xffU) << 0U;
1426}
1427static inline u32 gr_rstr2d_map_table_cfg_num_entries_f(u32 v)
1428{
1429 return (v & 0xffU) << 8U;
1430}
1431static inline u32 gr_pd_hww_esr_r(void)
1432{
1433 return 0x00406018U;
1434}
1435static inline u32 gr_pd_hww_esr_reset_active_f(void)
1436{
1437 return 0x40000000U;
1438}
1439static inline u32 gr_pd_hww_esr_en_enable_f(void)
1440{
1441 return 0x80000000U;
1442}
1443static inline u32 gr_pd_num_tpc_per_gpc_r(u32 i)
1444{
1445 return 0x00406028U + i*4U;
1446}
1447static inline u32 gr_pd_num_tpc_per_gpc__size_1_v(void)
1448{
1449 return 0x00000004U;
1450}
1451static inline u32 gr_pd_num_tpc_per_gpc_count0_f(u32 v)
1452{
1453 return (v & 0xfU) << 0U;
1454}
1455static inline u32 gr_pd_num_tpc_per_gpc_count1_f(u32 v)
1456{
1457 return (v & 0xfU) << 4U;
1458}
1459static inline u32 gr_pd_num_tpc_per_gpc_count2_f(u32 v)
1460{
1461 return (v & 0xfU) << 8U;
1462}
1463static inline u32 gr_pd_num_tpc_per_gpc_count3_f(u32 v)
1464{
1465 return (v & 0xfU) << 12U;
1466}
1467static inline u32 gr_pd_num_tpc_per_gpc_count4_f(u32 v)
1468{
1469 return (v & 0xfU) << 16U;
1470}
1471static inline u32 gr_pd_num_tpc_per_gpc_count5_f(u32 v)
1472{
1473 return (v & 0xfU) << 20U;
1474}
1475static inline u32 gr_pd_num_tpc_per_gpc_count6_f(u32 v)
1476{
1477 return (v & 0xfU) << 24U;
1478}
1479static inline u32 gr_pd_num_tpc_per_gpc_count7_f(u32 v)
1480{
1481 return (v & 0xfU) << 28U;
1482}
1483static inline u32 gr_pd_ab_dist_cfg0_r(void)
1484{
1485 return 0x004064c0U;
1486}
1487static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_en_f(void)
1488{
1489 return 0x80000000U;
1490}
1491static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_dis_f(void)
1492{
1493 return 0x0U;
1494}
1495static inline u32 gr_pd_ab_dist_cfg1_r(void)
1496{
1497 return 0x004064c4U;
1498}
1499static inline u32 gr_pd_ab_dist_cfg1_max_batches_init_f(void)
1500{
1501 return 0xffffU;
1502}
1503static inline u32 gr_pd_ab_dist_cfg1_max_output_f(u32 v)
1504{
1505 return (v & 0x7ffU) << 16U;
1506}
1507static inline u32 gr_pd_ab_dist_cfg1_max_output_granularity_v(void)
1508{
1509 return 0x00000080U;
1510}
1511static inline u32 gr_pd_ab_dist_cfg2_r(void)
1512{
1513 return 0x004064c8U;
1514}
1515static inline u32 gr_pd_ab_dist_cfg2_token_limit_f(u32 v)
1516{
1517 return (v & 0xfffU) << 0U;
1518}
1519static inline u32 gr_pd_ab_dist_cfg2_token_limit_init_v(void)
1520{
1521 return 0x00000100U;
1522}
1523static inline u32 gr_pd_ab_dist_cfg2_state_limit_f(u32 v)
1524{
1525 return (v & 0xfffU) << 16U;
1526}
1527static inline u32 gr_pd_ab_dist_cfg2_state_limit_scc_bundle_granularity_v(void)
1528{
1529 return 0x00000020U;
1530}
1531static inline u32 gr_pd_ab_dist_cfg2_state_limit_min_gpm_fifo_depths_v(void)
1532{
1533 return 0x00000062U;
1534}
1535static inline u32 gr_pd_pagepool_r(void)
1536{
1537 return 0x004064ccU;
1538}
1539static inline u32 gr_pd_pagepool_total_pages_f(u32 v)
1540{
1541 return (v & 0xffU) << 0U;
1542}
1543static inline u32 gr_pd_pagepool_valid_true_f(void)
1544{
1545 return 0x80000000U;
1546}
1547static inline u32 gr_pd_dist_skip_table_r(u32 i)
1548{
1549 return 0x004064d0U + i*4U;
1550}
1551static inline u32 gr_pd_dist_skip_table__size_1_v(void)
1552{
1553 return 0x00000008U;
1554}
1555static inline u32 gr_pd_dist_skip_table_gpc_4n0_mask_f(u32 v)
1556{
1557 return (v & 0xffU) << 0U;
1558}
1559static inline u32 gr_pd_dist_skip_table_gpc_4n1_mask_f(u32 v)
1560{
1561 return (v & 0xffU) << 8U;
1562}
1563static inline u32 gr_pd_dist_skip_table_gpc_4n2_mask_f(u32 v)
1564{
1565 return (v & 0xffU) << 16U;
1566}
1567static inline u32 gr_pd_dist_skip_table_gpc_4n3_mask_f(u32 v)
1568{
1569 return (v & 0xffU) << 24U;
1570}
1571static inline u32 gr_pd_alpha_ratio_table_r(u32 i)
1572{
1573 return 0x00406800U + i*4U;
1574}
1575static inline u32 gr_pd_alpha_ratio_table__size_1_v(void)
1576{
1577 return 0x00000100U;
1578}
1579static inline u32 gr_pd_alpha_ratio_table_gpc_4n0_mask_f(u32 v)
1580{
1581 return (v & 0xffU) << 0U;
1582}
1583static inline u32 gr_pd_alpha_ratio_table_gpc_4n1_mask_f(u32 v)
1584{
1585 return (v & 0xffU) << 8U;
1586}
1587static inline u32 gr_pd_alpha_ratio_table_gpc_4n2_mask_f(u32 v)
1588{
1589 return (v & 0xffU) << 16U;
1590}
1591static inline u32 gr_pd_alpha_ratio_table_gpc_4n3_mask_f(u32 v)
1592{
1593 return (v & 0xffU) << 24U;
1594}
1595static inline u32 gr_pd_beta_ratio_table_r(u32 i)
1596{
1597 return 0x00406c00U + i*4U;
1598}
1599static inline u32 gr_pd_beta_ratio_table__size_1_v(void)
1600{
1601 return 0x00000100U;
1602}
1603static inline u32 gr_pd_beta_ratio_table_gpc_4n0_mask_f(u32 v)
1604{
1605 return (v & 0xffU) << 0U;
1606}
1607static inline u32 gr_pd_beta_ratio_table_gpc_4n1_mask_f(u32 v)
1608{
1609 return (v & 0xffU) << 8U;
1610}
1611static inline u32 gr_pd_beta_ratio_table_gpc_4n2_mask_f(u32 v)
1612{
1613 return (v & 0xffU) << 16U;
1614}
1615static inline u32 gr_pd_beta_ratio_table_gpc_4n3_mask_f(u32 v)
1616{
1617 return (v & 0xffU) << 24U;
1618}
1619static inline u32 gr_ds_debug_r(void)
1620{
1621 return 0x00405800U;
1622}
1623static inline u32 gr_ds_debug_timeslice_mode_disable_f(void)
1624{
1625 return 0x0U;
1626}
1627static inline u32 gr_ds_debug_timeslice_mode_enable_f(void)
1628{
1629 return 0x8000000U;
1630}
1631static inline u32 gr_ds_zbc_color_r_r(void)
1632{
1633 return 0x00405804U;
1634}
1635static inline u32 gr_ds_zbc_color_r_val_f(u32 v)
1636{
1637 return (v & 0xffffffffU) << 0U;
1638}
1639static inline u32 gr_ds_zbc_color_g_r(void)
1640{
1641 return 0x00405808U;
1642}
1643static inline u32 gr_ds_zbc_color_g_val_f(u32 v)
1644{
1645 return (v & 0xffffffffU) << 0U;
1646}
1647static inline u32 gr_ds_zbc_color_b_r(void)
1648{
1649 return 0x0040580cU;
1650}
1651static inline u32 gr_ds_zbc_color_b_val_f(u32 v)
1652{
1653 return (v & 0xffffffffU) << 0U;
1654}
1655static inline u32 gr_ds_zbc_color_a_r(void)
1656{
1657 return 0x00405810U;
1658}
1659static inline u32 gr_ds_zbc_color_a_val_f(u32 v)
1660{
1661 return (v & 0xffffffffU) << 0U;
1662}
1663static inline u32 gr_ds_zbc_color_fmt_r(void)
1664{
1665 return 0x00405814U;
1666}
1667static inline u32 gr_ds_zbc_color_fmt_val_f(u32 v)
1668{
1669 return (v & 0x7fU) << 0U;
1670}
1671static inline u32 gr_ds_zbc_color_fmt_val_invalid_f(void)
1672{
1673 return 0x0U;
1674}
1675static inline u32 gr_ds_zbc_color_fmt_val_zero_v(void)
1676{
1677 return 0x00000001U;
1678}
1679static inline u32 gr_ds_zbc_color_fmt_val_unorm_one_v(void)
1680{
1681 return 0x00000002U;
1682}
1683static inline u32 gr_ds_zbc_color_fmt_val_rf32_gf32_bf32_af32_v(void)
1684{
1685 return 0x00000004U;
1686}
1687static inline u32 gr_ds_zbc_color_fmt_val_a8_b8_g8_r8_v(void)
1688{
1689 return 0x00000028U;
1690}
1691static inline u32 gr_ds_zbc_z_r(void)
1692{
1693 return 0x00405818U;
1694}
1695static inline u32 gr_ds_zbc_z_val_s(void)
1696{
1697 return 32U;
1698}
1699static inline u32 gr_ds_zbc_z_val_f(u32 v)
1700{
1701 return (v & 0xffffffffU) << 0U;
1702}
1703static inline u32 gr_ds_zbc_z_val_m(void)
1704{
1705 return 0xffffffffU << 0U;
1706}
1707static inline u32 gr_ds_zbc_z_val_v(u32 r)
1708{
1709 return (r >> 0U) & 0xffffffffU;
1710}
1711static inline u32 gr_ds_zbc_z_val__init_v(void)
1712{
1713 return 0x00000000U;
1714}
1715static inline u32 gr_ds_zbc_z_val__init_f(void)
1716{
1717 return 0x0U;
1718}
1719static inline u32 gr_ds_zbc_z_fmt_r(void)
1720{
1721 return 0x0040581cU;
1722}
1723static inline u32 gr_ds_zbc_z_fmt_val_f(u32 v)
1724{
1725 return (v & 0x1U) << 0U;
1726}
1727static inline u32 gr_ds_zbc_z_fmt_val_invalid_f(void)
1728{
1729 return 0x0U;
1730}
1731static inline u32 gr_ds_zbc_z_fmt_val_fp32_v(void)
1732{
1733 return 0x00000001U;
1734}
1735static inline u32 gr_ds_zbc_tbl_index_r(void)
1736{
1737 return 0x00405820U;
1738}
1739static inline u32 gr_ds_zbc_tbl_index_val_f(u32 v)
1740{
1741 return (v & 0xfU) << 0U;
1742}
1743static inline u32 gr_ds_zbc_tbl_ld_r(void)
1744{
1745 return 0x00405824U;
1746}
1747static inline u32 gr_ds_zbc_tbl_ld_select_c_f(void)
1748{
1749 return 0x0U;
1750}
1751static inline u32 gr_ds_zbc_tbl_ld_select_z_f(void)
1752{
1753 return 0x1U;
1754}
1755static inline u32 gr_ds_zbc_tbl_ld_action_write_f(void)
1756{
1757 return 0x0U;
1758}
1759static inline u32 gr_ds_zbc_tbl_ld_trigger_active_f(void)
1760{
1761 return 0x4U;
1762}
1763static inline u32 gr_ds_tga_constraintlogic_r(void)
1764{
1765 return 0x00405830U;
1766}
1767static inline u32 gr_ds_tga_constraintlogic_beta_cbsize_f(u32 v)
1768{
1769 return (v & 0xfffU) << 16U;
1770}
1771static inline u32 gr_ds_tga_constraintlogic_alpha_cbsize_f(u32 v)
1772{
1773 return (v & 0xfffU) << 0U;
1774}
1775static inline u32 gr_ds_hww_esr_r(void)
1776{
1777 return 0x00405840U;
1778}
1779static inline u32 gr_ds_hww_esr_reset_s(void)
1780{
1781 return 1U;
1782}
1783static inline u32 gr_ds_hww_esr_reset_f(u32 v)
1784{
1785 return (v & 0x1U) << 30U;
1786}
1787static inline u32 gr_ds_hww_esr_reset_m(void)
1788{
1789 return 0x1U << 30U;
1790}
1791static inline u32 gr_ds_hww_esr_reset_v(u32 r)
1792{
1793 return (r >> 30U) & 0x1U;
1794}
1795static inline u32 gr_ds_hww_esr_reset_task_v(void)
1796{
1797 return 0x00000001U;
1798}
1799static inline u32 gr_ds_hww_esr_reset_task_f(void)
1800{
1801 return 0x40000000U;
1802}
1803static inline u32 gr_ds_hww_esr_en_enabled_f(void)
1804{
1805 return 0x80000000U;
1806}
1807static inline u32 gr_ds_hww_report_mask_r(void)
1808{
1809 return 0x00405844U;
1810}
1811static inline u32 gr_ds_hww_report_mask_sph0_err_report_f(void)
1812{
1813 return 0x1U;
1814}
1815static inline u32 gr_ds_hww_report_mask_sph1_err_report_f(void)
1816{
1817 return 0x2U;
1818}
1819static inline u32 gr_ds_hww_report_mask_sph2_err_report_f(void)
1820{
1821 return 0x4U;
1822}
1823static inline u32 gr_ds_hww_report_mask_sph3_err_report_f(void)
1824{
1825 return 0x8U;
1826}
1827static inline u32 gr_ds_hww_report_mask_sph4_err_report_f(void)
1828{
1829 return 0x10U;
1830}
1831static inline u32 gr_ds_hww_report_mask_sph5_err_report_f(void)
1832{
1833 return 0x20U;
1834}
1835static inline u32 gr_ds_hww_report_mask_sph6_err_report_f(void)
1836{
1837 return 0x40U;
1838}
1839static inline u32 gr_ds_hww_report_mask_sph7_err_report_f(void)
1840{
1841 return 0x80U;
1842}
1843static inline u32 gr_ds_hww_report_mask_sph8_err_report_f(void)
1844{
1845 return 0x100U;
1846}
1847static inline u32 gr_ds_hww_report_mask_sph9_err_report_f(void)
1848{
1849 return 0x200U;
1850}
1851static inline u32 gr_ds_hww_report_mask_sph10_err_report_f(void)
1852{
1853 return 0x400U;
1854}
1855static inline u32 gr_ds_hww_report_mask_sph11_err_report_f(void)
1856{
1857 return 0x800U;
1858}
1859static inline u32 gr_ds_hww_report_mask_sph12_err_report_f(void)
1860{
1861 return 0x1000U;
1862}
1863static inline u32 gr_ds_hww_report_mask_sph13_err_report_f(void)
1864{
1865 return 0x2000U;
1866}
1867static inline u32 gr_ds_hww_report_mask_sph14_err_report_f(void)
1868{
1869 return 0x4000U;
1870}
1871static inline u32 gr_ds_hww_report_mask_sph15_err_report_f(void)
1872{
1873 return 0x8000U;
1874}
1875static inline u32 gr_ds_hww_report_mask_sph16_err_report_f(void)
1876{
1877 return 0x10000U;
1878}
1879static inline u32 gr_ds_hww_report_mask_sph17_err_report_f(void)
1880{
1881 return 0x20000U;
1882}
1883static inline u32 gr_ds_hww_report_mask_sph18_err_report_f(void)
1884{
1885 return 0x40000U;
1886}
1887static inline u32 gr_ds_hww_report_mask_sph19_err_report_f(void)
1888{
1889 return 0x80000U;
1890}
1891static inline u32 gr_ds_hww_report_mask_sph20_err_report_f(void)
1892{
1893 return 0x100000U;
1894}
1895static inline u32 gr_ds_hww_report_mask_sph21_err_report_f(void)
1896{
1897 return 0x200000U;
1898}
1899static inline u32 gr_ds_hww_report_mask_sph22_err_report_f(void)
1900{
1901 return 0x400000U;
1902}
1903static inline u32 gr_ds_hww_report_mask_sph23_err_report_f(void)
1904{
1905 return 0x800000U;
1906}
1907static inline u32 gr_ds_num_tpc_per_gpc_r(u32 i)
1908{
1909 return 0x00405870U + i*4U;
1910}
1911static inline u32 gr_scc_bundle_cb_base_r(void)
1912{
1913 return 0x00408004U;
1914}
1915static inline u32 gr_scc_bundle_cb_base_addr_39_8_f(u32 v)
1916{
1917 return (v & 0xffffffffU) << 0U;
1918}
1919static inline u32 gr_scc_bundle_cb_base_addr_39_8_align_bits_v(void)
1920{
1921 return 0x00000008U;
1922}
1923static inline u32 gr_scc_bundle_cb_size_r(void)
1924{
1925 return 0x00408008U;
1926}
1927static inline u32 gr_scc_bundle_cb_size_div_256b_f(u32 v)
1928{
1929 return (v & 0x7ffU) << 0U;
1930}
1931static inline u32 gr_scc_bundle_cb_size_div_256b__prod_v(void)
1932{
1933 return 0x00000018U;
1934}
1935static inline u32 gr_scc_bundle_cb_size_div_256b_byte_granularity_v(void)
1936{
1937 return 0x00000100U;
1938}
1939static inline u32 gr_scc_bundle_cb_size_valid_false_v(void)
1940{
1941 return 0x00000000U;
1942}
1943static inline u32 gr_scc_bundle_cb_size_valid_false_f(void)
1944{
1945 return 0x0U;
1946}
1947static inline u32 gr_scc_bundle_cb_size_valid_true_f(void)
1948{
1949 return 0x80000000U;
1950}
1951static inline u32 gr_scc_pagepool_base_r(void)
1952{
1953 return 0x0040800cU;
1954}
1955static inline u32 gr_scc_pagepool_base_addr_39_8_f(u32 v)
1956{
1957 return (v & 0xffffffffU) << 0U;
1958}
1959static inline u32 gr_scc_pagepool_base_addr_39_8_align_bits_v(void)
1960{
1961 return 0x00000008U;
1962}
1963static inline u32 gr_scc_pagepool_r(void)
1964{
1965 return 0x00408010U;
1966}
1967static inline u32 gr_scc_pagepool_total_pages_f(u32 v)
1968{
1969 return (v & 0xffU) << 0U;
1970}
1971static inline u32 gr_scc_pagepool_total_pages_hwmax_v(void)
1972{
1973 return 0x00000000U;
1974}
1975static inline u32 gr_scc_pagepool_total_pages_hwmax_value_v(void)
1976{
1977 return 0x00000080U;
1978}
1979static inline u32 gr_scc_pagepool_total_pages_byte_granularity_v(void)
1980{
1981 return 0x00000100U;
1982}
1983static inline u32 gr_scc_pagepool_max_valid_pages_s(void)
1984{
1985 return 8U;
1986}
1987static inline u32 gr_scc_pagepool_max_valid_pages_f(u32 v)
1988{
1989 return (v & 0xffU) << 8U;
1990}
1991static inline u32 gr_scc_pagepool_max_valid_pages_m(void)
1992{
1993 return 0xffU << 8U;
1994}
1995static inline u32 gr_scc_pagepool_max_valid_pages_v(u32 r)
1996{
1997 return (r >> 8U) & 0xffU;
1998}
1999static inline u32 gr_scc_pagepool_valid_true_f(void)
2000{
2001 return 0x80000000U;
2002}
2003static inline u32 gr_scc_init_r(void)
2004{
2005 return 0x0040802cU;
2006}
2007static inline u32 gr_scc_init_ram_trigger_f(void)
2008{
2009 return 0x1U;
2010}
2011static inline u32 gr_scc_hww_esr_r(void)
2012{
2013 return 0x00408030U;
2014}
2015static inline u32 gr_scc_hww_esr_reset_active_f(void)
2016{
2017 return 0x40000000U;
2018}
2019static inline u32 gr_scc_hww_esr_en_enable_f(void)
2020{
2021 return 0x80000000U;
2022}
2023static inline u32 gr_sked_hww_esr_r(void)
2024{
2025 return 0x00407020U;
2026}
2027static inline u32 gr_sked_hww_esr_reset_active_f(void)
2028{
2029 return 0x40000000U;
2030}
2031static inline u32 gr_cwd_fs_r(void)
2032{
2033 return 0x00405b00U;
2034}
2035static inline u32 gr_cwd_fs_num_gpcs_f(u32 v)
2036{
2037 return (v & 0xffU) << 0U;
2038}
2039static inline u32 gr_cwd_fs_num_tpcs_f(u32 v)
2040{
2041 return (v & 0xffU) << 8U;
2042}
2043static inline u32 gr_gpc0_fs_gpc_r(void)
2044{
2045 return 0x00502608U;
2046}
2047static inline u32 gr_gpc0_fs_gpc_num_available_tpcs_v(u32 r)
2048{
2049 return (r >> 0U) & 0x1fU;
2050}
2051static inline u32 gr_gpc0_fs_gpc_num_available_zculls_v(u32 r)
2052{
2053 return (r >> 16U) & 0x1fU;
2054}
2055static inline u32 gr_gpc0_cfg_r(void)
2056{
2057 return 0x00502620U;
2058}
2059static inline u32 gr_gpc0_cfg_imem_sz_v(u32 r)
2060{
2061 return (r >> 0U) & 0xffU;
2062}
2063static inline u32 gr_gpccs_rc_lanes_r(void)
2064{
2065 return 0x00502880U;
2066}
2067static inline u32 gr_gpccs_rc_lanes_num_chains_s(void)
2068{
2069 return 6U;
2070}
2071static inline u32 gr_gpccs_rc_lanes_num_chains_f(u32 v)
2072{
2073 return (v & 0x3fU) << 0U;
2074}
2075static inline u32 gr_gpccs_rc_lanes_num_chains_m(void)
2076{
2077 return 0x3fU << 0U;
2078}
2079static inline u32 gr_gpccs_rc_lanes_num_chains_v(u32 r)
2080{
2081 return (r >> 0U) & 0x3fU;
2082}
2083static inline u32 gr_gpccs_rc_lane_size_r(u32 i)
2084{
2085 return 0x00502910U + i*0U;
2086}
2087static inline u32 gr_gpccs_rc_lane_size__size_1_v(void)
2088{
2089 return 0x00000010U;
2090}
2091static inline u32 gr_gpccs_rc_lane_size_v_s(void)
2092{
2093 return 24U;
2094}
2095static inline u32 gr_gpccs_rc_lane_size_v_f(u32 v)
2096{
2097 return (v & 0xffffffU) << 0U;
2098}
2099static inline u32 gr_gpccs_rc_lane_size_v_m(void)
2100{
2101 return 0xffffffU << 0U;
2102}
2103static inline u32 gr_gpccs_rc_lane_size_v_v(u32 r)
2104{
2105 return (r >> 0U) & 0xffffffU;
2106}
2107static inline u32 gr_gpccs_rc_lane_size_v_0_v(void)
2108{
2109 return 0x00000000U;
2110}
2111static inline u32 gr_gpccs_rc_lane_size_v_0_f(void)
2112{
2113 return 0x0U;
2114}
2115static inline u32 gr_gpc0_zcull_fs_r(void)
2116{
2117 return 0x00500910U;
2118}
2119static inline u32 gr_gpc0_zcull_fs_num_sms_f(u32 v)
2120{
2121 return (v & 0x1ffU) << 0U;
2122}
2123static inline u32 gr_gpc0_zcull_fs_num_active_banks_f(u32 v)
2124{
2125 return (v & 0xfU) << 16U;
2126}
2127static inline u32 gr_gpc0_zcull_ram_addr_r(void)
2128{
2129 return 0x00500914U;
2130}
2131static inline u32 gr_gpc0_zcull_ram_addr_tiles_per_hypertile_row_per_gpc_f(u32 v)
2132{
2133 return (v & 0xfU) << 0U;
2134}
2135static inline u32 gr_gpc0_zcull_ram_addr_row_offset_f(u32 v)
2136{
2137 return (v & 0xfU) << 8U;
2138}
2139static inline u32 gr_gpc0_zcull_sm_num_rcp_r(void)
2140{
2141 return 0x00500918U;
2142}
2143static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative_f(u32 v)
2144{
2145 return (v & 0xffffffU) << 0U;
2146}
2147static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative__max_v(void)
2148{
2149 return 0x00800000U;
2150}
2151static inline u32 gr_gpc0_zcull_total_ram_size_r(void)
2152{
2153 return 0x00500920U;
2154}
2155static inline u32 gr_gpc0_zcull_total_ram_size_num_aliquots_f(u32 v)
2156{
2157 return (v & 0xffffU) << 0U;
2158}
2159static inline u32 gr_gpc0_zcull_zcsize_r(u32 i)
2160{
2161 return 0x00500a04U + i*32U;
2162}
2163static inline u32 gr_gpc0_zcull_zcsize_height_subregion__multiple_v(void)
2164{
2165 return 0x00000040U;
2166}
2167static inline u32 gr_gpc0_zcull_zcsize_width_subregion__multiple_v(void)
2168{
2169 return 0x00000010U;
2170}
2171static inline u32 gr_gpc0_gpm_pd_active_tpcs_r(void)
2172{
2173 return 0x00500c08U;
2174}
2175static inline u32 gr_gpc0_gpm_pd_active_tpcs_num_f(u32 v)
2176{
2177 return (v & 0x7U) << 0U;
2178}
2179static inline u32 gr_gpc0_gpm_pd_sm_id_r(u32 i)
2180{
2181 return 0x00500c10U + i*4U;
2182}
2183static inline u32 gr_gpc0_gpm_pd_sm_id_id_f(u32 v)
2184{
2185 return (v & 0xffU) << 0U;
2186}
2187static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_r(u32 i)
2188{
2189 return 0x00500c30U + i*4U;
2190}
2191static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(u32 r)
2192{
2193 return (r >> 0U) & 0xffU;
2194}
2195static inline u32 gr_gpc0_gpm_sd_active_tpcs_r(void)
2196{
2197 return 0x00500c8cU;
2198}
2199static inline u32 gr_gpc0_gpm_sd_active_tpcs_num_f(u32 v)
2200{
2201 return (v & 0x7U) << 0U;
2202}
2203static inline u32 gr_gpc0_tpc0_pe_cfg_smid_r(void)
2204{
2205 return 0x00504088U;
2206}
2207static inline u32 gr_gpc0_tpc0_pe_cfg_smid_value_f(u32 v)
2208{
2209 return (v & 0xffffU) << 0U;
2210}
2211static inline u32 gr_gpc0_tpc0_l1c_cfg_smid_r(void)
2212{
2213 return 0x005044e8U;
2214}
2215static inline u32 gr_gpc0_tpc0_l1c_cfg_smid_value_f(u32 v)
2216{
2217 return (v & 0xffffU) << 0U;
2218}
2219static inline u32 gr_gpc0_tpc0_sm_cfg_r(void)
2220{
2221 return 0x00504698U;
2222}
2223static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_f(u32 v)
2224{
2225 return (v & 0xffffU) << 0U;
2226}
2227static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_v(u32 r)
2228{
2229 return (r >> 0U) & 0xffffU;
2230}
2231static inline u32 gr_gpc0_tpc0_sm_arch_r(void)
2232{
2233 return 0x0050469cU;
2234}
2235static inline u32 gr_gpc0_tpc0_sm_arch_warp_count_v(u32 r)
2236{
2237 return (r >> 0U) & 0xffU;
2238}
2239static inline u32 gr_gpc0_tpc0_sm_arch_spa_version_v(u32 r)
2240{
2241 return (r >> 8U) & 0xfU;
2242}
2243static inline u32 gr_gpc0_tpc0_sm_arch_spa_version_smkepler_lp_v(void)
2244{
2245 return 0x0000000cU;
2246}
2247static inline u32 gr_gpc0_ppc0_pes_vsc_strem_r(void)
2248{
2249 return 0x00503018U;
2250}
2251static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_m(void)
2252{
2253 return 0x1U << 0U;
2254}
2255static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_true_f(void)
2256{
2257 return 0x1U;
2258}
2259static inline u32 gr_gpc0_ppc0_cbm_cfg_r(void)
2260{
2261 return 0x005030c0U;
2262}
2263static inline u32 gr_gpc0_ppc0_cbm_cfg_start_offset_f(u32 v)
2264{
2265 return (v & 0xffffU) << 0U;
2266}
2267static inline u32 gr_gpc0_ppc0_cbm_cfg_start_offset_m(void)
2268{
2269 return 0xffffU << 0U;
2270}
2271static inline u32 gr_gpc0_ppc0_cbm_cfg_start_offset_v(u32 r)
2272{
2273 return (r >> 0U) & 0xffffU;
2274}
2275static inline u32 gr_gpc0_ppc0_cbm_cfg_size_f(u32 v)
2276{
2277 return (v & 0xfffU) << 16U;
2278}
2279static inline u32 gr_gpc0_ppc0_cbm_cfg_size_m(void)
2280{
2281 return 0xfffU << 16U;
2282}
2283static inline u32 gr_gpc0_ppc0_cbm_cfg_size_v(u32 r)
2284{
2285 return (r >> 16U) & 0xfffU;
2286}
2287static inline u32 gr_gpc0_ppc0_cbm_cfg_size_default_v(void)
2288{
2289 return 0x00000240U;
2290}
2291static inline u32 gr_gpc0_ppc0_cbm_cfg_size_granularity_v(void)
2292{
2293 return 0x00000020U;
2294}
2295static inline u32 gr_gpc0_ppc0_cbm_cfg_timeslice_mode_f(u32 v)
2296{
2297 return (v & 0x1U) << 28U;
2298}
2299static inline u32 gr_gpc0_ppc0_cbm_cfg2_r(void)
2300{
2301 return 0x005030e4U;
2302}
2303static inline u32 gr_gpc0_ppc0_cbm_cfg2_start_offset_f(u32 v)
2304{
2305 return (v & 0xffffU) << 0U;
2306}
2307static inline u32 gr_gpc0_ppc0_cbm_cfg2_size_f(u32 v)
2308{
2309 return (v & 0xfffU) << 16U;
2310}
2311static inline u32 gr_gpc0_ppc0_cbm_cfg2_size_m(void)
2312{
2313 return 0xfffU << 16U;
2314}
2315static inline u32 gr_gpc0_ppc0_cbm_cfg2_size_v(u32 r)
2316{
2317 return (r >> 16U) & 0xfffU;
2318}
2319static inline u32 gr_gpc0_ppc0_cbm_cfg2_size_default_v(void)
2320{
2321 return 0x00000648U;
2322}
2323static inline u32 gr_gpc0_ppc0_cbm_cfg2_size_granularity_v(void)
2324{
2325 return 0x00000020U;
2326}
2327static inline u32 gr_gpccs_falcon_addr_r(void)
2328{
2329 return 0x0041a0acU;
2330}
2331static inline u32 gr_gpccs_falcon_addr_lsb_s(void)
2332{
2333 return 6U;
2334}
2335static inline u32 gr_gpccs_falcon_addr_lsb_f(u32 v)
2336{
2337 return (v & 0x3fU) << 0U;
2338}
2339static inline u32 gr_gpccs_falcon_addr_lsb_m(void)
2340{
2341 return 0x3fU << 0U;
2342}
2343static inline u32 gr_gpccs_falcon_addr_lsb_v(u32 r)
2344{
2345 return (r >> 0U) & 0x3fU;
2346}
2347static inline u32 gr_gpccs_falcon_addr_lsb_init_v(void)
2348{
2349 return 0x00000000U;
2350}
2351static inline u32 gr_gpccs_falcon_addr_lsb_init_f(void)
2352{
2353 return 0x0U;
2354}
2355static inline u32 gr_gpccs_falcon_addr_msb_s(void)
2356{
2357 return 6U;
2358}
2359static inline u32 gr_gpccs_falcon_addr_msb_f(u32 v)
2360{
2361 return (v & 0x3fU) << 6U;
2362}
2363static inline u32 gr_gpccs_falcon_addr_msb_m(void)
2364{
2365 return 0x3fU << 6U;
2366}
2367static inline u32 gr_gpccs_falcon_addr_msb_v(u32 r)
2368{
2369 return (r >> 6U) & 0x3fU;
2370}
2371static inline u32 gr_gpccs_falcon_addr_msb_init_v(void)
2372{
2373 return 0x00000000U;
2374}
2375static inline u32 gr_gpccs_falcon_addr_msb_init_f(void)
2376{
2377 return 0x0U;
2378}
2379static inline u32 gr_gpccs_falcon_addr_ext_s(void)
2380{
2381 return 12U;
2382}
2383static inline u32 gr_gpccs_falcon_addr_ext_f(u32 v)
2384{
2385 return (v & 0xfffU) << 0U;
2386}
2387static inline u32 gr_gpccs_falcon_addr_ext_m(void)
2388{
2389 return 0xfffU << 0U;
2390}
2391static inline u32 gr_gpccs_falcon_addr_ext_v(u32 r)
2392{
2393 return (r >> 0U) & 0xfffU;
2394}
2395static inline u32 gr_gpccs_cpuctl_r(void)
2396{
2397 return 0x0041a100U;
2398}
2399static inline u32 gr_gpccs_cpuctl_startcpu_f(u32 v)
2400{
2401 return (v & 0x1U) << 1U;
2402}
2403static inline u32 gr_gpccs_dmactl_r(void)
2404{
2405 return 0x0041a10cU;
2406}
2407static inline u32 gr_gpccs_dmactl_require_ctx_f(u32 v)
2408{
2409 return (v & 0x1U) << 0U;
2410}
2411static inline u32 gr_gpccs_dmactl_dmem_scrubbing_m(void)
2412{
2413 return 0x1U << 1U;
2414}
2415static inline u32 gr_gpccs_dmactl_imem_scrubbing_m(void)
2416{
2417 return 0x1U << 2U;
2418}
2419static inline u32 gr_gpccs_imemc_r(u32 i)
2420{
2421 return 0x0041a180U + i*16U;
2422}
2423static inline u32 gr_gpccs_imemc_offs_f(u32 v)
2424{
2425 return (v & 0x3fU) << 2U;
2426}
2427static inline u32 gr_gpccs_imemc_blk_f(u32 v)
2428{
2429 return (v & 0xffU) << 8U;
2430}
2431static inline u32 gr_gpccs_imemc_aincw_f(u32 v)
2432{
2433 return (v & 0x1U) << 24U;
2434}
2435static inline u32 gr_gpccs_imemd_r(u32 i)
2436{
2437 return 0x0041a184U + i*16U;
2438}
2439static inline u32 gr_gpccs_imemt_r(u32 i)
2440{
2441 return 0x0041a188U + i*16U;
2442}
2443static inline u32 gr_gpccs_imemt__size_1_v(void)
2444{
2445 return 0x00000004U;
2446}
2447static inline u32 gr_gpccs_imemt_tag_f(u32 v)
2448{
2449 return (v & 0xffffU) << 0U;
2450}
2451static inline u32 gr_gpccs_dmemc_r(u32 i)
2452{
2453 return 0x0041a1c0U + i*8U;
2454}
2455static inline u32 gr_gpccs_dmemc_offs_f(u32 v)
2456{
2457 return (v & 0x3fU) << 2U;
2458}
2459static inline u32 gr_gpccs_dmemc_blk_f(u32 v)
2460{
2461 return (v & 0xffU) << 8U;
2462}
2463static inline u32 gr_gpccs_dmemc_aincw_f(u32 v)
2464{
2465 return (v & 0x1U) << 24U;
2466}
2467static inline u32 gr_gpccs_dmemd_r(u32 i)
2468{
2469 return 0x0041a1c4U + i*8U;
2470}
2471static inline u32 gr_gpccs_ctxsw_mailbox_r(u32 i)
2472{
2473 return 0x0041a800U + i*4U;
2474}
2475static inline u32 gr_gpccs_ctxsw_mailbox_value_f(u32 v)
2476{
2477 return (v & 0xffffffffU) << 0U;
2478}
2479static inline u32 gr_gpcs_setup_bundle_cb_base_r(void)
2480{
2481 return 0x00418808U;
2482}
2483static inline u32 gr_gpcs_setup_bundle_cb_base_addr_39_8_s(void)
2484{
2485 return 32U;
2486}
2487static inline u32 gr_gpcs_setup_bundle_cb_base_addr_39_8_f(u32 v)
2488{
2489 return (v & 0xffffffffU) << 0U;
2490}
2491static inline u32 gr_gpcs_setup_bundle_cb_base_addr_39_8_m(void)
2492{
2493 return 0xffffffffU << 0U;
2494}
2495static inline u32 gr_gpcs_setup_bundle_cb_base_addr_39_8_v(u32 r)
2496{
2497 return (r >> 0U) & 0xffffffffU;
2498}
2499static inline u32 gr_gpcs_setup_bundle_cb_base_addr_39_8_init_v(void)
2500{
2501 return 0x00000000U;
2502}
2503static inline u32 gr_gpcs_setup_bundle_cb_base_addr_39_8_init_f(void)
2504{
2505 return 0x0U;
2506}
2507static inline u32 gr_gpcs_setup_bundle_cb_size_r(void)
2508{
2509 return 0x0041880cU;
2510}
2511static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b_s(void)
2512{
2513 return 11U;
2514}
2515static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b_f(u32 v)
2516{
2517 return (v & 0x7ffU) << 0U;
2518}
2519static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b_m(void)
2520{
2521 return 0x7ffU << 0U;
2522}
2523static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b_v(u32 r)
2524{
2525 return (r >> 0U) & 0x7ffU;
2526}
2527static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b_init_v(void)
2528{
2529 return 0x00000000U;
2530}
2531static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b_init_f(void)
2532{
2533 return 0x0U;
2534}
2535static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b__prod_v(void)
2536{
2537 return 0x00000018U;
2538}
2539static inline u32 gr_gpcs_setup_bundle_cb_size_div_256b__prod_f(void)
2540{
2541 return 0x18U;
2542}
2543static inline u32 gr_gpcs_setup_bundle_cb_size_valid_s(void)
2544{
2545 return 1U;
2546}
2547static inline u32 gr_gpcs_setup_bundle_cb_size_valid_f(u32 v)
2548{
2549 return (v & 0x1U) << 31U;
2550}
2551static inline u32 gr_gpcs_setup_bundle_cb_size_valid_m(void)
2552{
2553 return 0x1U << 31U;
2554}
2555static inline u32 gr_gpcs_setup_bundle_cb_size_valid_v(u32 r)
2556{
2557 return (r >> 31U) & 0x1U;
2558}
2559static inline u32 gr_gpcs_setup_bundle_cb_size_valid_false_v(void)
2560{
2561 return 0x00000000U;
2562}
2563static inline u32 gr_gpcs_setup_bundle_cb_size_valid_false_f(void)
2564{
2565 return 0x0U;
2566}
2567static inline u32 gr_gpcs_setup_bundle_cb_size_valid_true_v(void)
2568{
2569 return 0x00000001U;
2570}
2571static inline u32 gr_gpcs_setup_bundle_cb_size_valid_true_f(void)
2572{
2573 return 0x80000000U;
2574}
2575static inline u32 gr_gpcs_setup_attrib_cb_base_r(void)
2576{
2577 return 0x00418810U;
2578}
2579static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_f(u32 v)
2580{
2581 return (v & 0xfffffffU) << 0U;
2582}
2583static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_align_bits_v(void)
2584{
2585 return 0x0000000cU;
2586}
2587static inline u32 gr_gpcs_setup_attrib_cb_base_valid_true_f(void)
2588{
2589 return 0x80000000U;
2590}
2591static inline u32 gr_crstr_gpc_map0_r(void)
2592{
2593 return 0x00418b08U;
2594}
2595static inline u32 gr_crstr_gpc_map0_tile0_f(u32 v)
2596{
2597 return (v & 0x7U) << 0U;
2598}
2599static inline u32 gr_crstr_gpc_map0_tile1_f(u32 v)
2600{
2601 return (v & 0x7U) << 5U;
2602}
2603static inline u32 gr_crstr_gpc_map0_tile2_f(u32 v)
2604{
2605 return (v & 0x7U) << 10U;
2606}
2607static inline u32 gr_crstr_gpc_map0_tile3_f(u32 v)
2608{
2609 return (v & 0x7U) << 15U;
2610}
2611static inline u32 gr_crstr_gpc_map0_tile4_f(u32 v)
2612{
2613 return (v & 0x7U) << 20U;
2614}
2615static inline u32 gr_crstr_gpc_map0_tile5_f(u32 v)
2616{
2617 return (v & 0x7U) << 25U;
2618}
2619static inline u32 gr_crstr_gpc_map1_r(void)
2620{
2621 return 0x00418b0cU;
2622}
2623static inline u32 gr_crstr_gpc_map1_tile6_f(u32 v)
2624{
2625 return (v & 0x7U) << 0U;
2626}
2627static inline u32 gr_crstr_gpc_map1_tile7_f(u32 v)
2628{
2629 return (v & 0x7U) << 5U;
2630}
2631static inline u32 gr_crstr_gpc_map1_tile8_f(u32 v)
2632{
2633 return (v & 0x7U) << 10U;
2634}
2635static inline u32 gr_crstr_gpc_map1_tile9_f(u32 v)
2636{
2637 return (v & 0x7U) << 15U;
2638}
2639static inline u32 gr_crstr_gpc_map1_tile10_f(u32 v)
2640{
2641 return (v & 0x7U) << 20U;
2642}
2643static inline u32 gr_crstr_gpc_map1_tile11_f(u32 v)
2644{
2645 return (v & 0x7U) << 25U;
2646}
2647static inline u32 gr_crstr_gpc_map2_r(void)
2648{
2649 return 0x00418b10U;
2650}
2651static inline u32 gr_crstr_gpc_map2_tile12_f(u32 v)
2652{
2653 return (v & 0x7U) << 0U;
2654}
2655static inline u32 gr_crstr_gpc_map2_tile13_f(u32 v)
2656{
2657 return (v & 0x7U) << 5U;
2658}
2659static inline u32 gr_crstr_gpc_map2_tile14_f(u32 v)
2660{
2661 return (v & 0x7U) << 10U;
2662}
2663static inline u32 gr_crstr_gpc_map2_tile15_f(u32 v)
2664{
2665 return (v & 0x7U) << 15U;
2666}
2667static inline u32 gr_crstr_gpc_map2_tile16_f(u32 v)
2668{
2669 return (v & 0x7U) << 20U;
2670}
2671static inline u32 gr_crstr_gpc_map2_tile17_f(u32 v)
2672{
2673 return (v & 0x7U) << 25U;
2674}
2675static inline u32 gr_crstr_gpc_map3_r(void)
2676{
2677 return 0x00418b14U;
2678}
2679static inline u32 gr_crstr_gpc_map3_tile18_f(u32 v)
2680{
2681 return (v & 0x7U) << 0U;
2682}
2683static inline u32 gr_crstr_gpc_map3_tile19_f(u32 v)
2684{
2685 return (v & 0x7U) << 5U;
2686}
2687static inline u32 gr_crstr_gpc_map3_tile20_f(u32 v)
2688{
2689 return (v & 0x7U) << 10U;
2690}
2691static inline u32 gr_crstr_gpc_map3_tile21_f(u32 v)
2692{
2693 return (v & 0x7U) << 15U;
2694}
2695static inline u32 gr_crstr_gpc_map3_tile22_f(u32 v)
2696{
2697 return (v & 0x7U) << 20U;
2698}
2699static inline u32 gr_crstr_gpc_map3_tile23_f(u32 v)
2700{
2701 return (v & 0x7U) << 25U;
2702}
2703static inline u32 gr_crstr_gpc_map4_r(void)
2704{
2705 return 0x00418b18U;
2706}
2707static inline u32 gr_crstr_gpc_map4_tile24_f(u32 v)
2708{
2709 return (v & 0x7U) << 0U;
2710}
2711static inline u32 gr_crstr_gpc_map4_tile25_f(u32 v)
2712{
2713 return (v & 0x7U) << 5U;
2714}
2715static inline u32 gr_crstr_gpc_map4_tile26_f(u32 v)
2716{
2717 return (v & 0x7U) << 10U;
2718}
2719static inline u32 gr_crstr_gpc_map4_tile27_f(u32 v)
2720{
2721 return (v & 0x7U) << 15U;
2722}
2723static inline u32 gr_crstr_gpc_map4_tile28_f(u32 v)
2724{
2725 return (v & 0x7U) << 20U;
2726}
2727static inline u32 gr_crstr_gpc_map4_tile29_f(u32 v)
2728{
2729 return (v & 0x7U) << 25U;
2730}
2731static inline u32 gr_crstr_gpc_map5_r(void)
2732{
2733 return 0x00418b1cU;
2734}
2735static inline u32 gr_crstr_gpc_map5_tile30_f(u32 v)
2736{
2737 return (v & 0x7U) << 0U;
2738}
2739static inline u32 gr_crstr_gpc_map5_tile31_f(u32 v)
2740{
2741 return (v & 0x7U) << 5U;
2742}
2743static inline u32 gr_crstr_gpc_map5_tile32_f(u32 v)
2744{
2745 return (v & 0x7U) << 10U;
2746}
2747static inline u32 gr_crstr_gpc_map5_tile33_f(u32 v)
2748{
2749 return (v & 0x7U) << 15U;
2750}
2751static inline u32 gr_crstr_gpc_map5_tile34_f(u32 v)
2752{
2753 return (v & 0x7U) << 20U;
2754}
2755static inline u32 gr_crstr_gpc_map5_tile35_f(u32 v)
2756{
2757 return (v & 0x7U) << 25U;
2758}
2759static inline u32 gr_crstr_map_table_cfg_r(void)
2760{
2761 return 0x00418bb8U;
2762}
2763static inline u32 gr_crstr_map_table_cfg_row_offset_f(u32 v)
2764{
2765 return (v & 0xffU) << 0U;
2766}
2767static inline u32 gr_crstr_map_table_cfg_num_entries_f(u32 v)
2768{
2769 return (v & 0xffU) << 8U;
2770}
2771static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_r(void)
2772{
2773 return 0x00418980U;
2774}
2775static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_0_f(u32 v)
2776{
2777 return (v & 0x7U) << 0U;
2778}
2779static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_1_f(u32 v)
2780{
2781 return (v & 0x7U) << 4U;
2782}
2783static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_2_f(u32 v)
2784{
2785 return (v & 0x7U) << 8U;
2786}
2787static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_3_f(u32 v)
2788{
2789 return (v & 0x7U) << 12U;
2790}
2791static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_4_f(u32 v)
2792{
2793 return (v & 0x7U) << 16U;
2794}
2795static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_5_f(u32 v)
2796{
2797 return (v & 0x7U) << 20U;
2798}
2799static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_6_f(u32 v)
2800{
2801 return (v & 0x7U) << 24U;
2802}
2803static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_7_f(u32 v)
2804{
2805 return (v & 0x7U) << 28U;
2806}
2807static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_r(void)
2808{
2809 return 0x00418984U;
2810}
2811static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_8_f(u32 v)
2812{
2813 return (v & 0x7U) << 0U;
2814}
2815static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_9_f(u32 v)
2816{
2817 return (v & 0x7U) << 4U;
2818}
2819static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_10_f(u32 v)
2820{
2821 return (v & 0x7U) << 8U;
2822}
2823static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_11_f(u32 v)
2824{
2825 return (v & 0x7U) << 12U;
2826}
2827static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_12_f(u32 v)
2828{
2829 return (v & 0x7U) << 16U;
2830}
2831static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_13_f(u32 v)
2832{
2833 return (v & 0x7U) << 20U;
2834}
2835static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_14_f(u32 v)
2836{
2837 return (v & 0x7U) << 24U;
2838}
2839static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_15_f(u32 v)
2840{
2841 return (v & 0x7U) << 28U;
2842}
2843static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_r(void)
2844{
2845 return 0x00418988U;
2846}
2847static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_16_f(u32 v)
2848{
2849 return (v & 0x7U) << 0U;
2850}
2851static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_17_f(u32 v)
2852{
2853 return (v & 0x7U) << 4U;
2854}
2855static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_18_f(u32 v)
2856{
2857 return (v & 0x7U) << 8U;
2858}
2859static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_19_f(u32 v)
2860{
2861 return (v & 0x7U) << 12U;
2862}
2863static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_20_f(u32 v)
2864{
2865 return (v & 0x7U) << 16U;
2866}
2867static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_21_f(u32 v)
2868{
2869 return (v & 0x7U) << 20U;
2870}
2871static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_22_f(u32 v)
2872{
2873 return (v & 0x7U) << 24U;
2874}
2875static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_s(void)
2876{
2877 return 3U;
2878}
2879static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_f(u32 v)
2880{
2881 return (v & 0x7U) << 28U;
2882}
2883static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_m(void)
2884{
2885 return 0x7U << 28U;
2886}
2887static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_v(u32 r)
2888{
2889 return (r >> 28U) & 0x7U;
2890}
2891static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_r(void)
2892{
2893 return 0x0041898cU;
2894}
2895static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_24_f(u32 v)
2896{
2897 return (v & 0x7U) << 0U;
2898}
2899static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_25_f(u32 v)
2900{
2901 return (v & 0x7U) << 4U;
2902}
2903static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_26_f(u32 v)
2904{
2905 return (v & 0x7U) << 8U;
2906}
2907static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_27_f(u32 v)
2908{
2909 return (v & 0x7U) << 12U;
2910}
2911static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_28_f(u32 v)
2912{
2913 return (v & 0x7U) << 16U;
2914}
2915static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_29_f(u32 v)
2916{
2917 return (v & 0x7U) << 20U;
2918}
2919static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_30_f(u32 v)
2920{
2921 return (v & 0x7U) << 24U;
2922}
2923static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_31_f(u32 v)
2924{
2925 return (v & 0x7U) << 28U;
2926}
2927static inline u32 gr_gpcs_gpm_pd_cfg_r(void)
2928{
2929 return 0x00418c6cU;
2930}
2931static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_disable_f(void)
2932{
2933 return 0x0U;
2934}
2935static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_enable_f(void)
2936{
2937 return 0x1U;
2938}
2939static inline u32 gr_gpcs_gcc_pagepool_base_r(void)
2940{
2941 return 0x00419004U;
2942}
2943static inline u32 gr_gpcs_gcc_pagepool_base_addr_39_8_f(u32 v)
2944{
2945 return (v & 0xffffffffU) << 0U;
2946}
2947static inline u32 gr_gpcs_gcc_pagepool_r(void)
2948{
2949 return 0x00419008U;
2950}
2951static inline u32 gr_gpcs_gcc_pagepool_total_pages_f(u32 v)
2952{
2953 return (v & 0xffU) << 0U;
2954}
2955static inline u32 gr_gpcs_tpcs_pe_vaf_r(void)
2956{
2957 return 0x0041980cU;
2958}
2959static inline u32 gr_gpcs_tpcs_pe_vaf_fast_mode_switch_true_f(void)
2960{
2961 return 0x10U;
2962}
2963static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_r(void)
2964{
2965 return 0x00419848U;
2966}
2967static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_v_f(u32 v)
2968{
2969 return (v & 0xfffffffU) << 0U;
2970}
2971static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_f(u32 v)
2972{
2973 return (v & 0x1U) << 28U;
2974}
2975static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_true_f(void)
2976{
2977 return 0x10000000U;
2978}
2979static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_r(void)
2980{
2981 return 0x00419c00U;
2982}
2983static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_disabled_f(void)
2984{
2985 return 0x0U;
2986}
2987static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_enabled_f(void)
2988{
2989 return 0x8U;
2990}
2991static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_r(void)
2992{
2993 return 0x00419e44U;
2994}
2995static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_stack_error_report_f(void)
2996{
2997 return 0x2U;
2998}
2999static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_api_stack_error_report_f(void)
3000{
3001 return 0x4U;
3002}
3003static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_ret_empty_stack_error_report_f(void)
3004{
3005 return 0x8U;
3006}
3007static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_wrap_report_f(void)
3008{
3009 return 0x10U;
3010}
3011static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_pc_report_f(void)
3012{
3013 return 0x20U;
3014}
3015static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_overflow_report_f(void)
3016{
3017 return 0x40U;
3018}
3019static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_immc_addr_report_f(void)
3020{
3021 return 0x80U;
3022}
3023static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_reg_report_f(void)
3024{
3025 return 0x100U;
3026}
3027static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_encoding_report_f(void)
3028{
3029 return 0x200U;
3030}
3031static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_sph_instr_combo_report_f(void)
3032{
3033 return 0x400U;
3034}
3035static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param_report_f(void)
3036{
3037 return 0x800U;
3038}
3039static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_report_f(void)
3040{
3041 return 0x1000U;
3042}
3043static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_reg_report_f(void)
3044{
3045 return 0x2000U;
3046}
3047static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_addr_report_f(void)
3048{
3049 return 0x4000U;
3050}
3051static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_addr_report_f(void)
3052{
3053 return 0x8000U;
3054}
3055static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_addr_space_report_f(void)
3056{
3057 return 0x10000U;
3058}
3059static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param2_report_f(void)
3060{
3061 return 0x20000U;
3062}
3063static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_ldc_report_f(void)
3064{
3065 return 0x40000U;
3066}
3067static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_geometry_sm_error_report_f(void)
3068{
3069 return 0x80000U;
3070}
3071static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_divergent_report_f(void)
3072{
3073 return 0x100000U;
3074}
3075static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_r(void)
3076{
3077 return 0x00419e4cU;
3078}
3079static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_sm_to_sm_fault_report_f(void)
3080{
3081 return 0x1U;
3082}
3083static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_l1_error_report_f(void)
3084{
3085 return 0x2U;
3086}
3087static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_multiple_warp_errors_report_f(void)
3088{
3089 return 0x4U;
3090}
3091static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_physical_stack_overflow_error_report_f(void)
3092{
3093 return 0x8U;
3094}
3095static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_int_report_f(void)
3096{
3097 return 0x10U;
3098}
3099static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_pause_report_f(void)
3100{
3101 return 0x20U;
3102}
3103static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_single_step_complete_report_f(void)
3104{
3105 return 0x40U;
3106}
3107static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void)
3108{
3109 return 0x00419d0cU;
3110}
3111static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f(void)
3112{
3113 return 0x2U;
3114}
3115static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_tex_enabled_f(void)
3116{
3117 return 0x1U;
3118}
3119static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
3120{
3121 return 0x0050450cU;
3122}
3123static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_v(u32 r)
3124{
3125 return (r >> 1U) & 0x1U;
3126}
3127static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_enabled_f(void)
3128{
3129 return 0x2U;
3130}
3131static inline u32 gr_gpcs_gpccs_gpc_exception_en_r(void)
3132{
3133 return 0x0041ac94U;
3134}
3135static inline u32 gr_gpcs_gpccs_gpc_exception_en_tpc_f(u32 v)
3136{
3137 return (v & 0xffU) << 16U;
3138}
3139static inline u32 gr_gpc0_gpccs_gpc_exception_r(void)
3140{
3141 return 0x00502c90U;
3142}
3143static inline u32 gr_gpc0_gpccs_gpc_exception_gcc_v(u32 r)
3144{
3145 return (r >> 2U) & 0x1U;
3146}
3147static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_v(u32 r)
3148{
3149 return (r >> 16U) & 0xffU;
3150}
3151static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_0_pending_v(void)
3152{
3153 return 0x00000001U;
3154}
3155static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_r(void)
3156{
3157 return 0x00504508U;
3158}
3159static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_v(u32 r)
3160{
3161 return (r >> 0U) & 0x1U;
3162}
3163static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_pending_v(void)
3164{
3165 return 0x00000001U;
3166}
3167static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_v(u32 r)
3168{
3169 return (r >> 1U) & 0x1U;
3170}
3171static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_pending_v(void)
3172{
3173 return 0x00000001U;
3174}
3175static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_r(void)
3176{
3177 return 0x00504610U;
3178}
3179static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_m(void)
3180{
3181 return 0x1U << 0U;
3182}
3183static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_v(u32 r)
3184{
3185 return (r >> 0U) & 0x1U;
3186}
3187static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_on_v(void)
3188{
3189 return 0x00000001U;
3190}
3191static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_on_f(void)
3192{
3193 return 0x1U;
3194}
3195static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_off_v(void)
3196{
3197 return 0x00000000U;
3198}
3199static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_off_f(void)
3200{
3201 return 0x0U;
3202}
3203static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_enable_f(void)
3204{
3205 return 0x80000000U;
3206}
3207static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_disable_f(void)
3208{
3209 return 0x0U;
3210}
3211static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_single_step_mode_enable_f(void)
3212{
3213 return 0x8U;
3214}
3215static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_single_step_mode_disable_f(void)
3216{
3217 return 0x0U;
3218}
3219static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_run_trigger_task_f(void)
3220{
3221 return 0x40000000U;
3222}
3223static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_m(void)
3224{
3225 return 0x1U << 1U;
3226}
3227static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_v(u32 r)
3228{
3229 return (r >> 1U) & 0x1U;
3230}
3231static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_disable_f(void)
3232{
3233 return 0x0U;
3234}
3235static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_m(void)
3236{
3237 return 0x1U << 2U;
3238}
3239static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_v(u32 r)
3240{
3241 return (r >> 2U) & 0x1U;
3242}
3243static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_disable_f(void)
3244{
3245 return 0x0U;
3246}
3247static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_stop_on_any_warp_disable_v(void)
3248{
3249 return 0x00000000U;
3250}
3251static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_stop_on_any_sm_disable_v(void)
3252{
3253 return 0x00000000U;
3254}
3255static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_r(void)
3256{
3257 return 0x00504614U;
3258}
3259static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_1_r(void)
3260{
3261 return 0x00504618U;
3262}
3263static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_r(void)
3264{
3265 return 0x00504624U;
3266}
3267static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_1_r(void)
3268{
3269 return 0x00504628U;
3270}
3271static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_r(void)
3272{
3273 return 0x00504634U;
3274}
3275static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_1_r(void)
3276{
3277 return 0x00504638U;
3278}
3279static inline u32 gr_gpcs_tpcs_sm_dbgr_bpt_pause_mask_r(void)
3280{
3281 return 0x00419e24U;
3282}
3283static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_r(void)
3284{
3285 return 0x0050460cU;
3286}
3287static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_sm_in_trap_mode_v(u32 r)
3288{
3289 return (r >> 0U) & 0x1U;
3290}
3291static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_v(u32 r)
3292{
3293 return (r >> 4U) & 0x1U;
3294}
3295static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_true_v(void)
3296{
3297 return 0x00000001U;
3298}
3299static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_r(void)
3300{
3301 return 0x00419e50U;
3302}
3303static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_int_pending_f(void)
3304{
3305 return 0x10U;
3306}
3307static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_pause_pending_f(void)
3308{
3309 return 0x20U;
3310}
3311static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_single_step_complete_pending_f(void)
3312{
3313 return 0x40U;
3314}
3315static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_sm_to_sm_fault_pending_f(void)
3316{
3317 return 0x1U;
3318}
3319static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_l1_error_pending_f(void)
3320{
3321 return 0x2U;
3322}
3323static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_multiple_warp_errors_pending_f(void)
3324{
3325 return 0x4U;
3326}
3327static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_physical_stack_overflow_error_pending_f(void)
3328{
3329 return 0x8U;
3330}
3331static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_timeout_error_pending_f(void)
3332{
3333 return 0x80000000U;
3334}
3335static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_r(void)
3336{
3337 return 0x00504650U;
3338}
3339static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_int_pending_f(void)
3340{
3341 return 0x10U;
3342}
3343static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_pause_pending_f(void)
3344{
3345 return 0x20U;
3346}
3347static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_single_step_complete_pending_f(void)
3348{
3349 return 0x40U;
3350}
3351static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_sm_to_sm_fault_pending_f(void)
3352{
3353 return 0x1U;
3354}
3355static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_l1_error_pending_f(void)
3356{
3357 return 0x2U;
3358}
3359static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_multiple_warp_errors_pending_f(void)
3360{
3361 return 0x4U;
3362}
3363static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_physical_stack_overflow_error_pending_f(void)
3364{
3365 return 0x8U;
3366}
3367static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_timeout_error_pending_f(void)
3368{
3369 return 0x80000000U;
3370}
3371static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_r(void)
3372{
3373 return 0x00504224U;
3374}
3375static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_intr_pending_f(void)
3376{
3377 return 0x1U;
3378}
3379static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_r(void)
3380{
3381 return 0x00504648U;
3382}
3383static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_v(u32 r)
3384{
3385 return (r >> 0U) & 0xffffU;
3386}
3387static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_v(void)
3388{
3389 return 0x00000000U;
3390}
3391static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_f(void)
3392{
3393 return 0x0U;
3394}
3395static inline u32 gr_gpc0_tpc0_sm_halfctl_ctrl_r(void)
3396{
3397 return 0x00504770U;
3398}
3399static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_r(void)
3400{
3401 return 0x00419f70U;
3402}
3403static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_m(void)
3404{
3405 return 0x1U << 4U;
3406}
3407static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_f(u32 v)
3408{
3409 return (v & 0x1U) << 4U;
3410}
3411static inline u32 gr_gpc0_tpc0_sm_debug_sfe_control_r(void)
3412{
3413 return 0x0050477cU;
3414}
3415static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_r(void)
3416{
3417 return 0x00419f7cU;
3418}
3419static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_m(void)
3420{
3421 return 0x1U << 0U;
3422}
3423static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_f(u32 v)
3424{
3425 return (v & 0x1U) << 0U;
3426}
3427static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_r(void)
3428{
3429 return 0x0041be08U;
3430}
3431static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_fast_mode_switch_true_f(void)
3432{
3433 return 0x4U;
3434}
3435static inline u32 gr_ppcs_wwdx_map_gpc_map0_r(void)
3436{
3437 return 0x0041bf00U;
3438}
3439static inline u32 gr_ppcs_wwdx_map_gpc_map1_r(void)
3440{
3441 return 0x0041bf04U;
3442}
3443static inline u32 gr_ppcs_wwdx_map_gpc_map2_r(void)
3444{
3445 return 0x0041bf08U;
3446}
3447static inline u32 gr_ppcs_wwdx_map_gpc_map3_r(void)
3448{
3449 return 0x0041bf0cU;
3450}
3451static inline u32 gr_ppcs_wwdx_map_gpc_map4_r(void)
3452{
3453 return 0x0041bf10U;
3454}
3455static inline u32 gr_ppcs_wwdx_map_gpc_map5_r(void)
3456{
3457 return 0x0041bf14U;
3458}
3459static inline u32 gr_ppcs_wwdx_map_table_cfg_r(void)
3460{
3461 return 0x0041bfd0U;
3462}
3463static inline u32 gr_ppcs_wwdx_map_table_cfg_row_offset_f(u32 v)
3464{
3465 return (v & 0xffU) << 0U;
3466}
3467static inline u32 gr_ppcs_wwdx_map_table_cfg_num_entries_f(u32 v)
3468{
3469 return (v & 0xffU) << 8U;
3470}
3471static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_num_entries_f(u32 v)
3472{
3473 return (v & 0x1fU) << 16U;
3474}
3475static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_shift_value_f(u32 v)
3476{
3477 return (v & 0x7U) << 21U;
3478}
3479static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff5_mod_value_f(u32 v)
3480{
3481 return (v & 0x1fU) << 24U;
3482}
3483static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_r(void)
3484{
3485 return 0x0041bfd4U;
3486}
3487static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_conservative_f(u32 v)
3488{
3489 return (v & 0xffffffU) << 0U;
3490}
3491static inline u32 gr_ppcs_wwdx_map_table_cfg2_r(void)
3492{
3493 return 0x0041bfe4U;
3494}
3495static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff6_mod_value_f(u32 v)
3496{
3497 return (v & 0x1fU) << 0U;
3498}
3499static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff7_mod_value_f(u32 v)
3500{
3501 return (v & 0x1fU) << 5U;
3502}
3503static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff8_mod_value_f(u32 v)
3504{
3505 return (v & 0x1fU) << 10U;
3506}
3507static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff9_mod_value_f(u32 v)
3508{
3509 return (v & 0x1fU) << 15U;
3510}
3511static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff10_mod_value_f(u32 v)
3512{
3513 return (v & 0x1fU) << 20U;
3514}
3515static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff11_mod_value_f(u32 v)
3516{
3517 return (v & 0x1fU) << 25U;
3518}
3519static inline u32 gr_gpcs_ppcs_cbm_cfg_r(void)
3520{
3521 return 0x0041bec0U;
3522}
3523static inline u32 gr_gpcs_ppcs_cbm_cfg_timeslice_mode_enable_v(void)
3524{
3525 return 0x00000001U;
3526}
3527static inline u32 gr_bes_zrop_settings_r(void)
3528{
3529 return 0x00408850U;
3530}
3531static inline u32 gr_bes_zrop_settings_num_active_fbps_f(u32 v)
3532{
3533 return (v & 0xfU) << 0U;
3534}
3535static inline u32 gr_bes_crop_settings_r(void)
3536{
3537 return 0x00408958U;
3538}
3539static inline u32 gr_bes_crop_settings_num_active_fbps_f(u32 v)
3540{
3541 return (v & 0xfU) << 0U;
3542}
3543static inline u32 gr_zcull_bytes_per_aliquot_per_gpu_v(void)
3544{
3545 return 0x00000020U;
3546}
3547static inline u32 gr_zcull_save_restore_header_bytes_per_gpc_v(void)
3548{
3549 return 0x00000020U;
3550}
3551static inline u32 gr_zcull_save_restore_subregion_header_bytes_per_gpc_v(void)
3552{
3553 return 0x000000c0U;
3554}
3555static inline u32 gr_zcull_subregion_qty_v(void)
3556{
3557 return 0x00000010U;
3558}
3559static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel0_r(void)
3560{
3561 return 0x00504604U;
3562}
3563static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel1_r(void)
3564{
3565 return 0x00504608U;
3566}
3567static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control0_r(void)
3568{
3569 return 0x0050465cU;
3570}
3571static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control1_r(void)
3572{
3573 return 0x00504660U;
3574}
3575static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control2_r(void)
3576{
3577 return 0x00504664U;
3578}
3579static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control3_r(void)
3580{
3581 return 0x00504668U;
3582}
3583static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control4_r(void)
3584{
3585 return 0x0050466cU;
3586}
3587static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control5_r(void)
3588{
3589 return 0x00504658U;
3590}
3591static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status_r(void)
3592{
3593 return 0x00504670U;
3594}
3595static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status1_r(void)
3596{
3597 return 0x00504694U;
3598}
3599static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_control_r(void)
3600{
3601 return 0x00504730U;
3602}
3603static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_control_r(void)
3604{
3605 return 0x00504734U;
3606}
3607static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_control_r(void)
3608{
3609 return 0x00504738U;
3610}
3611static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_control_r(void)
3612{
3613 return 0x0050473cU;
3614}
3615static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter4_control_r(void)
3616{
3617 return 0x00504740U;
3618}
3619static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter5_control_r(void)
3620{
3621 return 0x00504744U;
3622}
3623static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter6_control_r(void)
3624{
3625 return 0x00504748U;
3626}
3627static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter7_control_r(void)
3628{
3629 return 0x0050474cU;
3630}
3631static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_r(void)
3632{
3633 return 0x00504674U;
3634}
3635static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_r(void)
3636{
3637 return 0x00504678U;
3638}
3639static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_r(void)
3640{
3641 return 0x0050467cU;
3642}
3643static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_r(void)
3644{
3645 return 0x00504680U;
3646}
3647static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter4_r(void)
3648{
3649 return 0x00504684U;
3650}
3651static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter5_r(void)
3652{
3653 return 0x00504688U;
3654}
3655static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter6_r(void)
3656{
3657 return 0x0050468cU;
3658}
3659static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter7_r(void)
3660{
3661 return 0x00504690U;
3662}
3663static inline u32 gr_fe_pwr_mode_r(void)
3664{
3665 return 0x00404170U;
3666}
3667static inline u32 gr_fe_pwr_mode_mode_auto_f(void)
3668{
3669 return 0x0U;
3670}
3671static inline u32 gr_fe_pwr_mode_mode_force_on_f(void)
3672{
3673 return 0x2U;
3674}
3675static inline u32 gr_fe_pwr_mode_req_v(u32 r)
3676{
3677 return (r >> 4U) & 0x1U;
3678}
3679static inline u32 gr_fe_pwr_mode_req_send_f(void)
3680{
3681 return 0x10U;
3682}
3683static inline u32 gr_fe_pwr_mode_req_done_v(void)
3684{
3685 return 0x00000000U;
3686}
3687static inline u32 gr_gpc0_tpc0_l1c_dbg_r(void)
3688{
3689 return 0x005044b0U;
3690}
3691static inline u32 gr_gpc0_tpc0_l1c_dbg_cya15_en_f(void)
3692{
3693 return 0x8000000U;
3694}
3695static inline u32 gr_gpcs_tpcs_sm_sch_texlock_r(void)
3696{
3697 return 0x00419ec8U;
3698}
3699static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_m(void)
3700{
3701 return 0x1U << 0U;
3702}
3703static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_disable_f(void)
3704{
3705 return 0x0U;
3706}
3707static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_tile_m(void)
3708{
3709 return 0x1U << 1U;
3710}
3711static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_tile_disable_f(void)
3712{
3713 return 0x0U;
3714}
3715static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_phase_m(void)
3716{
3717 return 0x1U << 2U;
3718}
3719static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_phase_disable_f(void)
3720{
3721 return 0x0U;
3722}
3723static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_tex_m(void)
3724{
3725 return 0x1U << 3U;
3726}
3727static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_tex_disable_f(void)
3728{
3729 return 0x0U;
3730}
3731static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_timeout_m(void)
3732{
3733 return 0xffU << 4U;
3734}
3735static inline u32 gr_gpcs_tpcs_sm_sch_texlock_tex_hash_timeout_disable_f(void)
3736{
3737 return 0x0U;
3738}
3739static inline u32 gr_gpcs_tpcs_sm_sch_texlock_dot_t_unlock_m(void)
3740{
3741 return 0x1U << 16U;
3742}
3743static inline u32 gr_gpcs_tpcs_sm_sch_texlock_dot_t_unlock_disable_f(void)
3744{
3745 return 0x0U;
3746}
3747static inline u32 gr_gpcs_tpcs_sm_sch_macro_sched_r(void)
3748{
3749 return 0x00419eacU;
3750}
3751static inline u32 gr_gpcs_tpcs_sm_sch_macro_sched_lockboost_size_f(u32 v)
3752{
3753 return (v & 0x1U) << 2U;
3754}
3755static inline u32 gr_gpcs_tpcs_sm_sch_macro_sched_lockboost_size_m(void)
3756{
3757 return 0x1U << 2U;
3758}
3759static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_r(void)
3760{
3761 return 0x00419e10U;
3762}
3763static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_f(u32 v)
3764{
3765 return (v & 0x1U) << 0U;
3766}
3767static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_on_v(void)
3768{
3769 return 0x00000001U;
3770}
3771static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_m(void)
3772{
3773 return 0x1U << 31U;
3774}
3775static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_v(u32 r)
3776{
3777 return (r >> 31U) & 0x1U;
3778}
3779static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_enable_f(void)
3780{
3781 return 0x80000000U;
3782}
3783static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_disable_f(void)
3784{
3785 return 0x0U;
3786}
3787static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_m(void)
3788{
3789 return 0x1U << 3U;
3790}
3791static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_enable_f(void)
3792{
3793 return 0x8U;
3794}
3795static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_disable_f(void)
3796{
3797 return 0x0U;
3798}
3799static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_m(void)
3800{
3801 return 0x1U << 30U;
3802}
3803static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_v(u32 r)
3804{
3805 return (r >> 30U) & 0x1U;
3806}
3807static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_task_f(void)
3808{
3809 return 0x40000000U;
3810}
3811
3812static inline u32 gr_gpc0_gpccs_falcon_irqstat_r(void)
3813{
3814 return 0x00502008U;
3815}
3816static inline u32 gr_gpc0_gpccs_falcon_irqmode_r(void)
3817{
3818 return 0x0050200cU;
3819}
3820static inline u32 gr_gpc0_gpccs_falcon_irqmask_r(void)
3821{
3822 return 0x00502018U;
3823}
3824static inline u32 gr_gpc0_gpccs_falcon_irqdest_r(void)
3825{
3826 return 0x0050201cU;
3827}
3828static inline u32 gr_gpc0_gpccs_falcon_debug1_r(void)
3829{
3830 return 0x00502090U;
3831}
3832static inline u32 gr_gpc0_gpccs_falcon_debuginfo_r(void)
3833{
3834 return 0x00502094U;
3835}
3836static inline u32 gr_gpc0_gpccs_falcon_engctl_r(void)
3837{
3838 return 0x005020a4U;
3839}
3840static inline u32 gr_gpc0_gpccs_falcon_curctx_r(void)
3841{
3842 return 0x00502050U;
3843}
3844static inline u32 gr_gpc0_gpccs_falcon_nxtctx_r(void)
3845{
3846 return 0x00502054U;
3847}
3848static inline u32 gr_gpc0_gpccs_ctxsw_mailbox_r(u32 i)
3849{
3850 return 0x00502800U + i*4U;
3851}
3852static inline u32 gr_gpc0_gpccs_falcon_icd_cmd_r(void)
3853{
3854 return 0x00502200U;
3855}
3856static inline u32 gr_gpc0_gpccs_falcon_icd_cmd_opc_rreg_f(void)
3857{
3858 return 0x8U;
3859}
3860static inline u32 gr_gpc0_gpccs_falcon_icd_cmd_idx_f(u32 v)
3861{
3862 return (v & 0x1fU) << 8U;
3863}
3864static inline u32 gr_gpc_gpccs_falcon_icd_rdata_r(void)
3865{
3866 return 0x0050220cU;
3867}
3868#endif
diff --git a/include/nvgpu/hw/gk20a/hw_ltc_gk20a.h b/include/nvgpu/hw/gk20a/hw_ltc_gk20a.h
deleted file mode 100644
index efe7f98..0000000
--- a/include/nvgpu/hw/gk20a/hw_ltc_gk20a.h
+++ /dev/null
@@ -1,455 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ltc_gk20a_h_
57#define _hw_ltc_gk20a_h_
58
59static inline u32 ltc_pltcg_base_v(void)
60{
61 return 0x00140000U;
62}
63static inline u32 ltc_pltcg_extent_v(void)
64{
65 return 0x0017ffffU;
66}
67static inline u32 ltc_ltcs_lts0_cbc_ctrl1_r(void)
68{
69 return 0x001410c8U;
70}
71static inline u32 ltc_ltc0_lts0_dstg_cfg0_r(void)
72{
73 return 0x00141200U;
74}
75static inline u32 ltc_ltcs_ltss_dstg_cfg0_r(void)
76{
77 return 0x0017ea00U;
78}
79static inline u32 ltc_ltc0_lts0_tstg_cfg1_r(void)
80{
81 return 0x00141104U;
82}
83static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_ways_v(u32 r)
84{
85 return (r >> 0U) & 0xffffU;
86}
87static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_v(u32 r)
88{
89 return (r >> 16U) & 0x3U;
90}
91static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_all_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_half_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v(void)
100{
101 return 0x00000002U;
102}
103static inline u32 ltc_ltcs_ltss_cbc_ctrl1_r(void)
104{
105 return 0x0017e8c8U;
106}
107static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clean_active_f(void)
108{
109 return 0x1U;
110}
111static inline u32 ltc_ltcs_ltss_cbc_ctrl1_invalidate_active_f(void)
112{
113 return 0x2U;
114}
115static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_v(u32 r)
116{
117 return (r >> 2U) & 0x1U;
118}
119static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_f(void)
124{
125 return 0x4U;
126}
127static inline u32 ltc_ltc0_lts0_cbc_ctrl1_r(void)
128{
129 return 0x001410c8U;
130}
131static inline u32 ltc_ltcs_ltss_cbc_ctrl2_r(void)
132{
133 return 0x0017e8ccU;
134}
135static inline u32 ltc_ltcs_ltss_cbc_ctrl2_clear_lower_bound_f(u32 v)
136{
137 return (v & 0x1ffffU) << 0U;
138}
139static inline u32 ltc_ltcs_ltss_cbc_ctrl3_r(void)
140{
141 return 0x0017e8d0U;
142}
143static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_f(u32 v)
144{
145 return (v & 0x1ffffU) << 0U;
146}
147static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_init_v(void)
148{
149 return 0x0001ffffU;
150}
151static inline u32 ltc_ltcs_ltss_cbc_base_r(void)
152{
153 return 0x0017e8d4U;
154}
155static inline u32 ltc_ltcs_ltss_cbc_base_alignment_shift_v(void)
156{
157 return 0x0000000bU;
158}
159static inline u32 ltc_ltcs_ltss_cbc_base_address_v(u32 r)
160{
161 return (r >> 0U) & 0x3ffffffU;
162}
163static inline u32 ltc_ltcs_ltss_cbc_param_r(void)
164{
165 return 0x0017e8dcU;
166}
167static inline u32 ltc_ltcs_ltss_cbc_param_comptags_per_cache_line_v(u32 r)
168{
169 return (r >> 0U) & 0xffffU;
170}
171static inline u32 ltc_ltcs_ltss_cbc_param_cache_line_size_v(u32 r)
172{
173 return (r >> 24U) & 0xfU;
174}
175static inline u32 ltc_ltcs_ltss_cbc_param_slices_per_fbp_v(u32 r)
176{
177 return (r >> 28U) & 0xfU;
178}
179static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_r(void)
180{
181 return 0x0017e91cU;
182}
183static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(u32 v)
184{
185 return (v & 0x1fU) << 16U;
186}
187static inline u32 ltc_ltcs_ltss_dstg_zbc_index_r(void)
188{
189 return 0x0017ea44U;
190}
191static inline u32 ltc_ltcs_ltss_dstg_zbc_index_address_f(u32 v)
192{
193 return (v & 0xfU) << 0U;
194}
195static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value_r(u32 i)
196{
197 return 0x0017ea48U + i*4U;
198}
199static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value__size_1_v(void)
200{
201 return 0x00000004U;
202}
203static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_r(void)
204{
205 return 0x0017ea58U;
206}
207static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_s(void)
208{
209 return 32U;
210}
211static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_f(u32 v)
212{
213 return (v & 0xffffffffU) << 0U;
214}
215static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_m(void)
216{
217 return 0xffffffffU << 0U;
218}
219static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_v(u32 r)
220{
221 return (r >> 0U) & 0xffffffffU;
222}
223static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_r(void)
224{
225 return 0x0017e924U;
226}
227static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_l2_bypass_mode_enabled_f(void)
228{
229 return 0x10000000U;
230}
231static inline u32 ltc_ltcs_ltss_g_elpg_r(void)
232{
233 return 0x0017e828U;
234}
235static inline u32 ltc_ltcs_ltss_g_elpg_flush_v(u32 r)
236{
237 return (r >> 0U) & 0x1U;
238}
239static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_v(void)
240{
241 return 0x00000001U;
242}
243static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_f(void)
244{
245 return 0x1U;
246}
247static inline u32 ltc_ltc0_ltss_g_elpg_r(void)
248{
249 return 0x00140828U;
250}
251static inline u32 ltc_ltc0_ltss_g_elpg_flush_v(u32 r)
252{
253 return (r >> 0U) & 0x1U;
254}
255static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_v(void)
256{
257 return 0x00000001U;
258}
259static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_f(void)
260{
261 return 0x1U;
262}
263static inline u32 ltc_ltc0_ltss_intr_r(void)
264{
265 return 0x00140820U;
266}
267static inline u32 ltc_ltcs_ltss_intr_r(void)
268{
269 return 0x0017e820U;
270}
271static inline u32 ltc_ltcs_ltss_intr_en_evicted_cb_m(void)
272{
273 return 0x1U << 20U;
274}
275static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_m(void)
276{
277 return 0x1U << 21U;
278}
279static inline u32 ltc_ltc0_lts0_intr_r(void)
280{
281 return 0x00141020U;
282}
283static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_r(void)
284{
285 return 0x0017e910U;
286}
287static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_v(u32 r)
288{
289 return (r >> 0U) & 0x1U;
290}
291static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_v(void)
292{
293 return 0x00000001U;
294}
295static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_f(void)
296{
297 return 0x1U;
298}
299static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_v(u32 r)
300{
301 return (r >> 8U) & 0xfU;
302}
303static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_v(void)
304{
305 return 0x00000003U;
306}
307static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_f(void)
308{
309 return 0x300U;
310}
311static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_v(u32 r)
312{
313 return (r >> 28U) & 0x1U;
314}
315static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_v(void)
316{
317 return 0x00000001U;
318}
319static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_f(void)
320{
321 return 0x10000000U;
322}
323static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_v(u32 r)
324{
325 return (r >> 29U) & 0x1U;
326}
327static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_v(void)
328{
329 return 0x00000001U;
330}
331static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_f(void)
332{
333 return 0x20000000U;
334}
335static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_v(u32 r)
336{
337 return (r >> 30U) & 0x1U;
338}
339static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_v(void)
340{
341 return 0x00000001U;
342}
343static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_f(void)
344{
345 return 0x40000000U;
346}
347static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_r(void)
348{
349 return 0x0017e914U;
350}
351static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_v(u32 r)
352{
353 return (r >> 0U) & 0x1U;
354}
355static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_v(void)
356{
357 return 0x00000001U;
358}
359static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_f(void)
360{
361 return 0x1U;
362}
363static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_v(u32 r)
364{
365 return (r >> 8U) & 0xfU;
366}
367static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_v(void)
368{
369 return 0x00000003U;
370}
371static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_f(void)
372{
373 return 0x300U;
374}
375static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_v(u32 r)
376{
377 return (r >> 16U) & 0x1U;
378}
379static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_f(void)
384{
385 return 0x10000U;
386}
387static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_v(u32 r)
388{
389 return (r >> 28U) & 0x1U;
390}
391static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_v(void)
392{
393 return 0x00000001U;
394}
395static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_f(void)
396{
397 return 0x10000000U;
398}
399static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_v(u32 r)
400{
401 return (r >> 29U) & 0x1U;
402}
403static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_v(void)
404{
405 return 0x00000001U;
406}
407static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_f(void)
408{
409 return 0x20000000U;
410}
411static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_v(u32 r)
412{
413 return (r >> 30U) & 0x1U;
414}
415static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_v(void)
416{
417 return 0x00000001U;
418}
419static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_f(void)
420{
421 return 0x40000000U;
422}
423static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_r(void)
424{
425 return 0x00140910U;
426}
427static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_v(u32 r)
428{
429 return (r >> 0U) & 0x1U;
430}
431static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_v(void)
432{
433 return 0x00000001U;
434}
435static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_f(void)
436{
437 return 0x1U;
438}
439static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_r(void)
440{
441 return 0x00140914U;
442}
443static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_v(u32 r)
444{
445 return (r >> 0U) & 0x1U;
446}
447static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_v(void)
448{
449 return 0x00000001U;
450}
451static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_f(void)
452{
453 return 0x1U;
454}
455#endif
diff --git a/include/nvgpu/hw/gk20a/hw_mc_gk20a.h b/include/nvgpu/hw/gk20a/hw_mc_gk20a.h
deleted file mode 100644
index 3ca2a29..0000000
--- a/include/nvgpu/hw/gk20a/hw_mc_gk20a.h
+++ /dev/null
@@ -1,291 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_mc_gk20a_h_
57#define _hw_mc_gk20a_h_
58
59static inline u32 mc_boot_0_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 mc_boot_0_architecture_v(u32 r)
64{
65 return (r >> 24U) & 0x1fU;
66}
67static inline u32 mc_boot_0_implementation_v(u32 r)
68{
69 return (r >> 20U) & 0xfU;
70}
71static inline u32 mc_boot_0_major_revision_v(u32 r)
72{
73 return (r >> 4U) & 0xfU;
74}
75static inline u32 mc_boot_0_minor_revision_v(u32 r)
76{
77 return (r >> 0U) & 0xfU;
78}
79static inline u32 mc_intr_0_r(void)
80{
81 return 0x00000100U;
82}
83static inline u32 mc_intr_0_pfifo_pending_f(void)
84{
85 return 0x100U;
86}
87static inline u32 mc_intr_0_pgraph_pending_f(void)
88{
89 return 0x1000U;
90}
91static inline u32 mc_intr_0_pmu_pending_f(void)
92{
93 return 0x1000000U;
94}
95static inline u32 mc_intr_0_ltc_pending_f(void)
96{
97 return 0x2000000U;
98}
99static inline u32 mc_intr_0_priv_ring_pending_f(void)
100{
101 return 0x40000000U;
102}
103static inline u32 mc_intr_0_pbus_pending_f(void)
104{
105 return 0x10000000U;
106}
107static inline u32 mc_intr_1_r(void)
108{
109 return 0x00000104U;
110}
111static inline u32 mc_intr_mask_0_r(void)
112{
113 return 0x00000640U;
114}
115static inline u32 mc_intr_mask_0_pmu_enabled_f(void)
116{
117 return 0x1000000U;
118}
119static inline u32 mc_intr_en_0_r(void)
120{
121 return 0x00000140U;
122}
123static inline u32 mc_intr_en_0_inta_disabled_f(void)
124{
125 return 0x0U;
126}
127static inline u32 mc_intr_en_0_inta_hardware_f(void)
128{
129 return 0x1U;
130}
131static inline u32 mc_intr_mask_1_r(void)
132{
133 return 0x00000644U;
134}
135static inline u32 mc_intr_mask_1_pmu_s(void)
136{
137 return 1U;
138}
139static inline u32 mc_intr_mask_1_pmu_f(u32 v)
140{
141 return (v & 0x1U) << 24U;
142}
143static inline u32 mc_intr_mask_1_pmu_m(void)
144{
145 return 0x1U << 24U;
146}
147static inline u32 mc_intr_mask_1_pmu_v(u32 r)
148{
149 return (r >> 24U) & 0x1U;
150}
151static inline u32 mc_intr_mask_1_pmu_enabled_f(void)
152{
153 return 0x1000000U;
154}
155static inline u32 mc_intr_en_1_r(void)
156{
157 return 0x00000144U;
158}
159static inline u32 mc_intr_en_1_inta_disabled_f(void)
160{
161 return 0x0U;
162}
163static inline u32 mc_intr_en_1_inta_hardware_f(void)
164{
165 return 0x1U;
166}
167static inline u32 mc_enable_r(void)
168{
169 return 0x00000200U;
170}
171static inline u32 mc_enable_xbar_enabled_f(void)
172{
173 return 0x4U;
174}
175static inline u32 mc_enable_l2_enabled_f(void)
176{
177 return 0x8U;
178}
179static inline u32 mc_enable_pmedia_s(void)
180{
181 return 1U;
182}
183static inline u32 mc_enable_pmedia_f(u32 v)
184{
185 return (v & 0x1U) << 4U;
186}
187static inline u32 mc_enable_pmedia_m(void)
188{
189 return 0x1U << 4U;
190}
191static inline u32 mc_enable_pmedia_v(u32 r)
192{
193 return (r >> 4U) & 0x1U;
194}
195static inline u32 mc_enable_priv_ring_enabled_f(void)
196{
197 return 0x20U;
198}
199static inline u32 mc_enable_ce0_m(void)
200{
201 return 0x1U << 6U;
202}
203static inline u32 mc_enable_pfifo_enabled_f(void)
204{
205 return 0x100U;
206}
207static inline u32 mc_enable_pgraph_enabled_f(void)
208{
209 return 0x1000U;
210}
211static inline u32 mc_enable_pwr_v(u32 r)
212{
213 return (r >> 13U) & 0x1U;
214}
215static inline u32 mc_enable_pwr_disabled_v(void)
216{
217 return 0x00000000U;
218}
219static inline u32 mc_enable_pwr_enabled_f(void)
220{
221 return 0x2000U;
222}
223static inline u32 mc_enable_pfb_enabled_f(void)
224{
225 return 0x100000U;
226}
227static inline u32 mc_enable_ce2_m(void)
228{
229 return 0x1U << 21U;
230}
231static inline u32 mc_enable_ce2_enabled_f(void)
232{
233 return 0x200000U;
234}
235static inline u32 mc_enable_blg_enabled_f(void)
236{
237 return 0x8000000U;
238}
239static inline u32 mc_enable_perfmon_enabled_f(void)
240{
241 return 0x10000000U;
242}
243static inline u32 mc_enable_hub_enabled_f(void)
244{
245 return 0x20000000U;
246}
247static inline u32 mc_enable_pb_r(void)
248{
249 return 0x00000204U;
250}
251static inline u32 mc_enable_pb_0_s(void)
252{
253 return 1U;
254}
255static inline u32 mc_enable_pb_0_f(u32 v)
256{
257 return (v & 0x1U) << 0U;
258}
259static inline u32 mc_enable_pb_0_m(void)
260{
261 return 0x1U << 0U;
262}
263static inline u32 mc_enable_pb_0_v(u32 r)
264{
265 return (r >> 0U) & 0x1U;
266}
267static inline u32 mc_enable_pb_0_enabled_v(void)
268{
269 return 0x00000001U;
270}
271static inline u32 mc_enable_pb_sel_f(u32 v, u32 i)
272{
273 return (v & 0x1U) << (0U + i*1U);
274}
275static inline u32 mc_elpg_enable_r(void)
276{
277 return 0x0000020cU;
278}
279static inline u32 mc_elpg_enable_xbar_enabled_f(void)
280{
281 return 0x4U;
282}
283static inline u32 mc_elpg_enable_pfb_enabled_f(void)
284{
285 return 0x100000U;
286}
287static inline u32 mc_elpg_enable_hub_enabled_f(void)
288{
289 return 0x20000000U;
290}
291#endif
diff --git a/include/nvgpu/hw/gk20a/hw_pbdma_gk20a.h b/include/nvgpu/hw/gk20a/hw_pbdma_gk20a.h
deleted file mode 100644
index 2c8f48d..0000000
--- a/include/nvgpu/hw/gk20a/hw_pbdma_gk20a.h
+++ /dev/null
@@ -1,575 +0,0 @@
1/*
2 * Copyright (c) 2012-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pbdma_gk20a_h_
57#define _hw_pbdma_gk20a_h_
58
59static inline u32 pbdma_gp_entry1_r(void)
60{
61 return 0x10000004U;
62}
63static inline u32 pbdma_gp_entry1_get_hi_v(u32 r)
64{
65 return (r >> 0U) & 0xffU;
66}
67static inline u32 pbdma_gp_entry1_length_f(u32 v)
68{
69 return (v & 0x1fffffU) << 10U;
70}
71static inline u32 pbdma_gp_entry1_length_v(u32 r)
72{
73 return (r >> 10U) & 0x1fffffU;
74}
75static inline u32 pbdma_gp_base_r(u32 i)
76{
77 return 0x00040048U + i*8192U;
78}
79static inline u32 pbdma_gp_base__size_1_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 pbdma_gp_base_offset_f(u32 v)
84{
85 return (v & 0x1fffffffU) << 3U;
86}
87static inline u32 pbdma_gp_base_rsvd_s(void)
88{
89 return 3U;
90}
91static inline u32 pbdma_gp_base_hi_r(u32 i)
92{
93 return 0x0004004cU + i*8192U;
94}
95static inline u32 pbdma_gp_base_hi_offset_f(u32 v)
96{
97 return (v & 0xffU) << 0U;
98}
99static inline u32 pbdma_gp_base_hi_limit2_f(u32 v)
100{
101 return (v & 0x1fU) << 16U;
102}
103static inline u32 pbdma_gp_fetch_r(u32 i)
104{
105 return 0x00040050U + i*8192U;
106}
107static inline u32 pbdma_gp_get_r(u32 i)
108{
109 return 0x00040014U + i*8192U;
110}
111static inline u32 pbdma_gp_put_r(u32 i)
112{
113 return 0x00040000U + i*8192U;
114}
115static inline u32 pbdma_timeout_r(u32 i)
116{
117 return 0x0004012cU + i*8192U;
118}
119static inline u32 pbdma_timeout__size_1_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 pbdma_timeout_period_m(void)
124{
125 return 0xffffffffU << 0U;
126}
127static inline u32 pbdma_timeout_period_max_f(void)
128{
129 return 0xffffffffU;
130}
131static inline u32 pbdma_pb_fetch_r(u32 i)
132{
133 return 0x00040054U + i*8192U;
134}
135static inline u32 pbdma_pb_fetch_hi_r(u32 i)
136{
137 return 0x00040058U + i*8192U;
138}
139static inline u32 pbdma_get_r(u32 i)
140{
141 return 0x00040018U + i*8192U;
142}
143static inline u32 pbdma_get_hi_r(u32 i)
144{
145 return 0x0004001cU + i*8192U;
146}
147static inline u32 pbdma_put_r(u32 i)
148{
149 return 0x0004005cU + i*8192U;
150}
151static inline u32 pbdma_put_hi_r(u32 i)
152{
153 return 0x00040060U + i*8192U;
154}
155static inline u32 pbdma_formats_r(u32 i)
156{
157 return 0x0004009cU + i*8192U;
158}
159static inline u32 pbdma_formats_gp_fermi0_f(void)
160{
161 return 0x0U;
162}
163static inline u32 pbdma_formats_pb_fermi1_f(void)
164{
165 return 0x100U;
166}
167static inline u32 pbdma_formats_mp_fermi0_f(void)
168{
169 return 0x0U;
170}
171static inline u32 pbdma_pb_header_r(u32 i)
172{
173 return 0x00040084U + i*8192U;
174}
175static inline u32 pbdma_pb_header_priv_user_f(void)
176{
177 return 0x0U;
178}
179static inline u32 pbdma_pb_header_method_zero_f(void)
180{
181 return 0x0U;
182}
183static inline u32 pbdma_pb_header_subchannel_zero_f(void)
184{
185 return 0x0U;
186}
187static inline u32 pbdma_pb_header_level_main_f(void)
188{
189 return 0x0U;
190}
191static inline u32 pbdma_pb_header_first_true_f(void)
192{
193 return 0x400000U;
194}
195static inline u32 pbdma_pb_header_type_inc_f(void)
196{
197 return 0x20000000U;
198}
199static inline u32 pbdma_pb_header_type_non_inc_f(void)
200{
201 return 0x60000000U;
202}
203static inline u32 pbdma_hdr_shadow_r(u32 i)
204{
205 return 0x00040118U + i*8192U;
206}
207static inline u32 pbdma_gp_shadow_0_r(u32 i)
208{
209 return 0x00040110U + i*8192U;
210}
211static inline u32 pbdma_gp_shadow_1_r(u32 i)
212{
213 return 0x00040114U + i*8192U;
214}
215static inline u32 pbdma_subdevice_r(u32 i)
216{
217 return 0x00040094U + i*8192U;
218}
219static inline u32 pbdma_subdevice_id_f(u32 v)
220{
221 return (v & 0xfffU) << 0U;
222}
223static inline u32 pbdma_subdevice_status_active_f(void)
224{
225 return 0x10000000U;
226}
227static inline u32 pbdma_subdevice_channel_dma_enable_f(void)
228{
229 return 0x20000000U;
230}
231static inline u32 pbdma_method0_r(u32 i)
232{
233 return 0x000400c0U + i*8192U;
234}
235static inline u32 pbdma_method0_addr_f(u32 v)
236{
237 return (v & 0xfffU) << 2U;
238}
239static inline u32 pbdma_method0_addr_v(u32 r)
240{
241 return (r >> 2U) & 0xfffU;
242}
243static inline u32 pbdma_method0_subch_v(u32 r)
244{
245 return (r >> 16U) & 0x7U;
246}
247static inline u32 pbdma_method0_first_true_f(void)
248{
249 return 0x400000U;
250}
251static inline u32 pbdma_method0_valid_true_f(void)
252{
253 return 0x80000000U;
254}
255static inline u32 pbdma_method1_r(u32 i)
256{
257 return 0x000400c8U + i*8192U;
258}
259static inline u32 pbdma_method2_r(u32 i)
260{
261 return 0x000400d0U + i*8192U;
262}
263static inline u32 pbdma_method3_r(u32 i)
264{
265 return 0x000400d8U + i*8192U;
266}
267static inline u32 pbdma_data0_r(u32 i)
268{
269 return 0x000400c4U + i*8192U;
270}
271static inline u32 pbdma_target_r(u32 i)
272{
273 return 0x000400acU + i*8192U;
274}
275static inline u32 pbdma_target_engine_sw_f(void)
276{
277 return 0x1fU;
278}
279static inline u32 pbdma_acquire_r(u32 i)
280{
281 return 0x00040030U + i*8192U;
282}
283static inline u32 pbdma_acquire_retry_man_2_f(void)
284{
285 return 0x2U;
286}
287static inline u32 pbdma_acquire_retry_exp_2_f(void)
288{
289 return 0x100U;
290}
291static inline u32 pbdma_acquire_timeout_exp_f(u32 v)
292{
293 return (v & 0xfU) << 11U;
294}
295static inline u32 pbdma_acquire_timeout_exp_max_v(void)
296{
297 return 0x0000000fU;
298}
299static inline u32 pbdma_acquire_timeout_exp_max_f(void)
300{
301 return 0x7800U;
302}
303static inline u32 pbdma_acquire_timeout_man_f(u32 v)
304{
305 return (v & 0xffffU) << 15U;
306}
307static inline u32 pbdma_acquire_timeout_man_max_v(void)
308{
309 return 0x0000ffffU;
310}
311static inline u32 pbdma_acquire_timeout_man_max_f(void)
312{
313 return 0x7fff8000U;
314}
315static inline u32 pbdma_acquire_timeout_en_enable_f(void)
316{
317 return 0x80000000U;
318}
319static inline u32 pbdma_acquire_timeout_en_disable_f(void)
320{
321 return 0x0U;
322}
323static inline u32 pbdma_status_r(u32 i)
324{
325 return 0x00040100U + i*8192U;
326}
327static inline u32 pbdma_channel_r(u32 i)
328{
329 return 0x00040120U + i*8192U;
330}
331static inline u32 pbdma_signature_r(u32 i)
332{
333 return 0x00040010U + i*8192U;
334}
335static inline u32 pbdma_signature_hw_valid_f(void)
336{
337 return 0xfaceU;
338}
339static inline u32 pbdma_signature_sw_zero_f(void)
340{
341 return 0x0U;
342}
343static inline u32 pbdma_userd_r(u32 i)
344{
345 return 0x00040008U + i*8192U;
346}
347static inline u32 pbdma_userd_target_vid_mem_f(void)
348{
349 return 0x0U;
350}
351static inline u32 pbdma_userd_target_sys_mem_coh_f(void)
352{
353 return 0x2U;
354}
355static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void)
356{
357 return 0x3U;
358}
359static inline u32 pbdma_userd_addr_f(u32 v)
360{
361 return (v & 0x7fffffU) << 9U;
362}
363static inline u32 pbdma_userd_hi_r(u32 i)
364{
365 return 0x0004000cU + i*8192U;
366}
367static inline u32 pbdma_userd_hi_addr_f(u32 v)
368{
369 return (v & 0xffU) << 0U;
370}
371static inline u32 pbdma_hce_ctrl_r(u32 i)
372{
373 return 0x000400e4U + i*8192U;
374}
375static inline u32 pbdma_hce_ctrl_hce_priv_mode_yes_f(void)
376{
377 return 0x20U;
378}
379static inline u32 pbdma_intr_0_r(u32 i)
380{
381 return 0x00040108U + i*8192U;
382}
383static inline u32 pbdma_intr_0_memreq_v(u32 r)
384{
385 return (r >> 0U) & 0x1U;
386}
387static inline u32 pbdma_intr_0_memreq_pending_f(void)
388{
389 return 0x1U;
390}
391static inline u32 pbdma_intr_0_memack_timeout_pending_f(void)
392{
393 return 0x2U;
394}
395static inline u32 pbdma_intr_0_memack_extra_pending_f(void)
396{
397 return 0x4U;
398}
399static inline u32 pbdma_intr_0_memdat_timeout_pending_f(void)
400{
401 return 0x8U;
402}
403static inline u32 pbdma_intr_0_memdat_extra_pending_f(void)
404{
405 return 0x10U;
406}
407static inline u32 pbdma_intr_0_memflush_pending_f(void)
408{
409 return 0x20U;
410}
411static inline u32 pbdma_intr_0_memop_pending_f(void)
412{
413 return 0x40U;
414}
415static inline u32 pbdma_intr_0_lbconnect_pending_f(void)
416{
417 return 0x80U;
418}
419static inline u32 pbdma_intr_0_lbreq_pending_f(void)
420{
421 return 0x100U;
422}
423static inline u32 pbdma_intr_0_lback_timeout_pending_f(void)
424{
425 return 0x200U;
426}
427static inline u32 pbdma_intr_0_lback_extra_pending_f(void)
428{
429 return 0x400U;
430}
431static inline u32 pbdma_intr_0_lbdat_timeout_pending_f(void)
432{
433 return 0x800U;
434}
435static inline u32 pbdma_intr_0_lbdat_extra_pending_f(void)
436{
437 return 0x1000U;
438}
439static inline u32 pbdma_intr_0_gpfifo_pending_f(void)
440{
441 return 0x2000U;
442}
443static inline u32 pbdma_intr_0_gpptr_pending_f(void)
444{
445 return 0x4000U;
446}
447static inline u32 pbdma_intr_0_gpentry_pending_f(void)
448{
449 return 0x8000U;
450}
451static inline u32 pbdma_intr_0_gpcrc_pending_f(void)
452{
453 return 0x10000U;
454}
455static inline u32 pbdma_intr_0_pbptr_pending_f(void)
456{
457 return 0x20000U;
458}
459static inline u32 pbdma_intr_0_pbentry_pending_f(void)
460{
461 return 0x40000U;
462}
463static inline u32 pbdma_intr_0_pbcrc_pending_f(void)
464{
465 return 0x80000U;
466}
467static inline u32 pbdma_intr_0_xbarconnect_pending_f(void)
468{
469 return 0x100000U;
470}
471static inline u32 pbdma_intr_0_method_pending_f(void)
472{
473 return 0x200000U;
474}
475static inline u32 pbdma_intr_0_methodcrc_pending_f(void)
476{
477 return 0x400000U;
478}
479static inline u32 pbdma_intr_0_device_pending_f(void)
480{
481 return 0x800000U;
482}
483static inline u32 pbdma_intr_0_semaphore_pending_f(void)
484{
485 return 0x2000000U;
486}
487static inline u32 pbdma_intr_0_acquire_pending_f(void)
488{
489 return 0x4000000U;
490}
491static inline u32 pbdma_intr_0_pri_pending_f(void)
492{
493 return 0x8000000U;
494}
495static inline u32 pbdma_intr_0_no_ctxsw_seg_pending_f(void)
496{
497 return 0x20000000U;
498}
499static inline u32 pbdma_intr_0_pbseg_pending_f(void)
500{
501 return 0x40000000U;
502}
503static inline u32 pbdma_intr_0_signature_pending_f(void)
504{
505 return 0x80000000U;
506}
507static inline u32 pbdma_intr_1_r(u32 i)
508{
509 return 0x00040148U + i*8192U;
510}
511static inline u32 pbdma_intr_en_0_r(u32 i)
512{
513 return 0x0004010cU + i*8192U;
514}
515static inline u32 pbdma_intr_en_0_lbreq_enabled_f(void)
516{
517 return 0x100U;
518}
519static inline u32 pbdma_intr_en_1_r(u32 i)
520{
521 return 0x0004014cU + i*8192U;
522}
523static inline u32 pbdma_intr_stall_r(u32 i)
524{
525 return 0x0004013cU + i*8192U;
526}
527static inline u32 pbdma_intr_stall_lbreq_enabled_f(void)
528{
529 return 0x100U;
530}
531static inline u32 pbdma_intr_stall_1_r(u32 i)
532{
533 return 0x00040140U + i*8192U;
534}
535static inline u32 pbdma_intr_stall_1_hce_illegal_op_enabled_f(void)
536{
537 return 0x1U;
538}
539static inline u32 pbdma_udma_nop_r(void)
540{
541 return 0x00000008U;
542}
543static inline u32 pbdma_syncpointa_r(u32 i)
544{
545 return 0x000400a4U + i*8192U;
546}
547static inline u32 pbdma_syncpointa_payload_v(u32 r)
548{
549 return (r >> 0U) & 0xffffffffU;
550}
551static inline u32 pbdma_syncpointb_r(u32 i)
552{
553 return 0x000400a8U + i*8192U;
554}
555static inline u32 pbdma_syncpointb_op_v(u32 r)
556{
557 return (r >> 0U) & 0x3U;
558}
559static inline u32 pbdma_syncpointb_op_wait_v(void)
560{
561 return 0x00000000U;
562}
563static inline u32 pbdma_syncpointb_wait_switch_v(u32 r)
564{
565 return (r >> 4U) & 0x1U;
566}
567static inline u32 pbdma_syncpointb_wait_switch_en_v(void)
568{
569 return 0x00000001U;
570}
571static inline u32 pbdma_syncpointb_syncpt_index_v(u32 r)
572{
573 return (r >> 8U) & 0xffU;
574}
575#endif
diff --git a/include/nvgpu/hw/gk20a/hw_perf_gk20a.h b/include/nvgpu/hw/gk20a/hw_perf_gk20a.h
deleted file mode 100644
index a93560f..0000000
--- a/include/nvgpu/hw/gk20a/hw_perf_gk20a.h
+++ /dev/null
@@ -1,211 +0,0 @@
1/*
2 * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_perf_gk20a_h_
57#define _hw_perf_gk20a_h_
58
59static inline u32 perf_pmasys_control_r(void)
60{
61 return 0x001b4000U;
62}
63static inline u32 perf_pmasys_control_membuf_status_v(u32 r)
64{
65 return (r >> 4U) & 0x1U;
66}
67static inline u32 perf_pmasys_control_membuf_status_overflowed_v(void)
68{
69 return 0x00000001U;
70}
71static inline u32 perf_pmasys_control_membuf_status_overflowed_f(void)
72{
73 return 0x10U;
74}
75static inline u32 perf_pmasys_control_membuf_clear_status_f(u32 v)
76{
77 return (v & 0x1U) << 5U;
78}
79static inline u32 perf_pmasys_control_membuf_clear_status_v(u32 r)
80{
81 return (r >> 5U) & 0x1U;
82}
83static inline u32 perf_pmasys_control_membuf_clear_status_doit_v(void)
84{
85 return 0x00000001U;
86}
87static inline u32 perf_pmasys_control_membuf_clear_status_doit_f(void)
88{
89 return 0x20U;
90}
91static inline u32 perf_pmasys_mem_block_r(void)
92{
93 return 0x001b4070U;
94}
95static inline u32 perf_pmasys_mem_block_base_f(u32 v)
96{
97 return (v & 0xfffffffU) << 0U;
98}
99static inline u32 perf_pmasys_mem_block_target_f(u32 v)
100{
101 return (v & 0x3U) << 28U;
102}
103static inline u32 perf_pmasys_mem_block_target_v(u32 r)
104{
105 return (r >> 28U) & 0x3U;
106}
107static inline u32 perf_pmasys_mem_block_target_lfb_v(void)
108{
109 return 0x00000000U;
110}
111static inline u32 perf_pmasys_mem_block_target_lfb_f(void)
112{
113 return 0x0U;
114}
115static inline u32 perf_pmasys_mem_block_target_sys_coh_v(void)
116{
117 return 0x00000002U;
118}
119static inline u32 perf_pmasys_mem_block_target_sys_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 perf_pmasys_mem_block_target_sys_ncoh_v(void)
124{
125 return 0x00000003U;
126}
127static inline u32 perf_pmasys_mem_block_target_sys_ncoh_f(void)
128{
129 return 0x30000000U;
130}
131static inline u32 perf_pmasys_mem_block_valid_f(u32 v)
132{
133 return (v & 0x1U) << 31U;
134}
135static inline u32 perf_pmasys_mem_block_valid_v(u32 r)
136{
137 return (r >> 31U) & 0x1U;
138}
139static inline u32 perf_pmasys_mem_block_valid_true_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 perf_pmasys_mem_block_valid_true_f(void)
144{
145 return 0x80000000U;
146}
147static inline u32 perf_pmasys_mem_block_valid_false_v(void)
148{
149 return 0x00000000U;
150}
151static inline u32 perf_pmasys_mem_block_valid_false_f(void)
152{
153 return 0x0U;
154}
155static inline u32 perf_pmasys_outbase_r(void)
156{
157 return 0x001b4074U;
158}
159static inline u32 perf_pmasys_outbase_ptr_f(u32 v)
160{
161 return (v & 0x7ffffffU) << 5U;
162}
163static inline u32 perf_pmasys_outbaseupper_r(void)
164{
165 return 0x001b4078U;
166}
167static inline u32 perf_pmasys_outbaseupper_ptr_f(u32 v)
168{
169 return (v & 0xffU) << 0U;
170}
171static inline u32 perf_pmasys_outsize_r(void)
172{
173 return 0x001b407cU;
174}
175static inline u32 perf_pmasys_outsize_numbytes_f(u32 v)
176{
177 return (v & 0x7ffffffU) << 5U;
178}
179static inline u32 perf_pmasys_mem_bytes_r(void)
180{
181 return 0x001b4084U;
182}
183static inline u32 perf_pmasys_mem_bytes_numbytes_f(u32 v)
184{
185 return (v & 0xfffffffU) << 4U;
186}
187static inline u32 perf_pmasys_mem_bump_r(void)
188{
189 return 0x001b4088U;
190}
191static inline u32 perf_pmasys_mem_bump_numbytes_f(u32 v)
192{
193 return (v & 0xfffffffU) << 4U;
194}
195static inline u32 perf_pmasys_enginestatus_r(void)
196{
197 return 0x001b40a4U;
198}
199static inline u32 perf_pmasys_enginestatus_rbufempty_f(u32 v)
200{
201 return (v & 0x1U) << 4U;
202}
203static inline u32 perf_pmasys_enginestatus_rbufempty_empty_v(void)
204{
205 return 0x00000001U;
206}
207static inline u32 perf_pmasys_enginestatus_rbufempty_empty_f(void)
208{
209 return 0x10U;
210}
211#endif
diff --git a/include/nvgpu/hw/gk20a/hw_pram_gk20a.h b/include/nvgpu/hw/gk20a/hw_pram_gk20a.h
deleted file mode 100644
index 10923e2..0000000
--- a/include/nvgpu/hw/gk20a/hw_pram_gk20a.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pram_gk20a_h_
57#define _hw_pram_gk20a_h_
58
59static inline u32 pram_data032_r(u32 i)
60{
61 return 0x00700000U + i*4U;
62}
63#endif
diff --git a/include/nvgpu/hw/gk20a/hw_pri_ringmaster_gk20a.h b/include/nvgpu/hw/gk20a/hw_pri_ringmaster_gk20a.h
deleted file mode 100644
index ca2775e..0000000
--- a/include/nvgpu/hw/gk20a/hw_pri_ringmaster_gk20a.h
+++ /dev/null
@@ -1,159 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringmaster_gk20a_h_
57#define _hw_pri_ringmaster_gk20a_h_
58
59static inline u32 pri_ringmaster_command_r(void)
60{
61 return 0x0012004cU;
62}
63static inline u32 pri_ringmaster_command_cmd_m(void)
64{
65 return 0x3fU << 0U;
66}
67static inline u32 pri_ringmaster_command_cmd_v(u32 r)
68{
69 return (r >> 0U) & 0x3fU;
70}
71static inline u32 pri_ringmaster_command_cmd_no_cmd_v(void)
72{
73 return 0x00000000U;
74}
75static inline u32 pri_ringmaster_command_cmd_start_ring_f(void)
76{
77 return 0x1U;
78}
79static inline u32 pri_ringmaster_command_cmd_ack_interrupt_f(void)
80{
81 return 0x2U;
82}
83static inline u32 pri_ringmaster_command_cmd_enumerate_stations_f(void)
84{
85 return 0x3U;
86}
87static inline u32 pri_ringmaster_command_cmd_enumerate_stations_bc_grp_all_f(void)
88{
89 return 0x0U;
90}
91static inline u32 pri_ringmaster_command_data_r(void)
92{
93 return 0x00120048U;
94}
95static inline u32 pri_ringmaster_start_results_r(void)
96{
97 return 0x00120050U;
98}
99static inline u32 pri_ringmaster_start_results_connectivity_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 pri_ringmaster_start_results_connectivity_pass_v(void)
104{
105 return 0x00000001U;
106}
107static inline u32 pri_ringmaster_intr_status0_r(void)
108{
109 return 0x00120058U;
110}
111static inline u32 pri_ringmaster_intr_status0_ring_start_conn_fault_v(u32 r)
112{
113 return (r >> 0U) & 0x1U;
114}
115static inline u32 pri_ringmaster_intr_status0_disconnect_fault_v(u32 r)
116{
117 return (r >> 1U) & 0x1U;
118}
119static inline u32 pri_ringmaster_intr_status0_overflow_fault_v(u32 r)
120{
121 return (r >> 2U) & 0x1U;
122}
123static inline u32 pri_ringmaster_intr_status0_gbl_write_error_sys_v(u32 r)
124{
125 return (r >> 8U) & 0x1U;
126}
127static inline u32 pri_ringmaster_intr_status1_r(void)
128{
129 return 0x0012005cU;
130}
131static inline u32 pri_ringmaster_global_ctl_r(void)
132{
133 return 0x00120060U;
134}
135static inline u32 pri_ringmaster_global_ctl_ring_reset_asserted_f(void)
136{
137 return 0x1U;
138}
139static inline u32 pri_ringmaster_global_ctl_ring_reset_deasserted_f(void)
140{
141 return 0x0U;
142}
143static inline u32 pri_ringmaster_enum_fbp_r(void)
144{
145 return 0x00120074U;
146}
147static inline u32 pri_ringmaster_enum_fbp_count_v(u32 r)
148{
149 return (r >> 0U) & 0x1fU;
150}
151static inline u32 pri_ringmaster_enum_gpc_r(void)
152{
153 return 0x00120078U;
154}
155static inline u32 pri_ringmaster_enum_gpc_count_v(u32 r)
156{
157 return (r >> 0U) & 0x1fU;
158}
159#endif
diff --git a/include/nvgpu/hw/gk20a/hw_pri_ringstation_fbp_gk20a.h b/include/nvgpu/hw/gk20a/hw_pri_ringstation_fbp_gk20a.h
deleted file mode 100644
index 06e08bd..0000000
--- a/include/nvgpu/hw/gk20a/hw_pri_ringstation_fbp_gk20a.h
+++ /dev/null
@@ -1,231 +0,0 @@
1/*
2 * drivers/video/tegra/host/gk20a/hw_pri_ringstation_fbp_gk20a.h
3 *
4 * Copyright (c) 2012-2013, NVIDIA Corporation. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25 /*
26 * Function naming determines intended use:
27 *
28 * <x>_r(void) : Returns the offset for register <x>.
29 *
30 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
31 *
32 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
33 *
34 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
35 * and masked to place it at field <y> of register <x>. This value
36 * can be |'d with others to produce a full register value for
37 * register <x>.
38 *
39 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
40 * value can be ~'d and then &'d to clear the value of field <y> for
41 * register <x>.
42 *
43 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
44 * to place it at field <y> of register <x>. This value can be |'d
45 * with others to produce a full register value for <x>.
46 *
47 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
48 * <x> value 'r' after being shifted to place its LSB at bit 0.
49 * This value is suitable for direct comparison with other unshifted
50 * values appropriate for use in field <y> of register <x>.
51 *
52 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
53 * field <y> of register <x>. This value is suitable for direct
54 * comparison with unshifted values appropriate for use in field <y>
55 * of register <x>.
56 */
57
58#ifndef __hw_pri_ringstation_fbp_gk20a_h__
59#define __hw_pri_ringstation_fbp_gk20a_h__
60/*This file is autogenerated. Do not edit. */
61
62static inline u32 pri_ringstation_fbp_master_config_r(u32 i)
63{
64 return 0x00124300+((i)*4);
65}
66static inline u32 pri_ringstation_fbp_master_config__size_1_v(void)
67{
68 return 64;
69}
70static inline u32 pri_ringstation_fbp_master_config_timeout_s(void)
71{
72 return 18;
73}
74static inline u32 pri_ringstation_fbp_master_config_timeout_f(u32 v)
75{
76 return (v & 0x3ffff) << 0;
77}
78static inline u32 pri_ringstation_fbp_master_config_timeout_m(void)
79{
80 return 0x3ffff << 0;
81}
82static inline u32 pri_ringstation_fbp_master_config_timeout_v(u32 r)
83{
84 return (r >> 0) & 0x3ffff;
85}
86static inline u32 pri_ringstation_fbp_master_config_timeout_i_v(void)
87{
88 return 0x00000064;
89}
90static inline u32 pri_ringstation_fbp_master_config_timeout_i_f(void)
91{
92 return 0x64;
93}
94static inline u32 pri_ringstation_fbp_master_config_fs_action_s(void)
95{
96 return 1;
97}
98static inline u32 pri_ringstation_fbp_master_config_fs_action_f(u32 v)
99{
100 return (v & 0x1) << 30;
101}
102static inline u32 pri_ringstation_fbp_master_config_fs_action_m(void)
103{
104 return 0x1 << 30;
105}
106static inline u32 pri_ringstation_fbp_master_config_fs_action_v(u32 r)
107{
108 return (r >> 30) & 0x1;
109}
110static inline u32 pri_ringstation_fbp_master_config_fs_action_error_v(void)
111{
112 return 0x00000000;
113}
114static inline u32 pri_ringstation_fbp_master_config_fs_action_error_f(void)
115{
116 return 0x0;
117}
118static inline u32 pri_ringstation_fbp_master_config_fs_action_soldier_on_v(void)
119{
120 return 0x00000001;
121}
122static inline u32 pri_ringstation_fbp_master_config_fs_action_soldier_on_f(void)
123{
124 return 0x40000000;
125}
126static inline u32 pri_ringstation_fbp_master_config_reset_action_s(void)
127{
128 return 1;
129}
130static inline u32 pri_ringstation_fbp_master_config_reset_action_f(u32 v)
131{
132 return (v & 0x1) << 31;
133}
134static inline u32 pri_ringstation_fbp_master_config_reset_action_m(void)
135{
136 return 0x1 << 31;
137}
138static inline u32 pri_ringstation_fbp_master_config_reset_action_v(u32 r)
139{
140 return (r >> 31) & 0x1;
141}
142static inline u32 pri_ringstation_fbp_master_config_reset_action_error_v(void)
143{
144 return 0x00000000;
145}
146static inline u32 pri_ringstation_fbp_master_config_reset_action_error_f(void)
147{
148 return 0x0;
149}
150static inline u32 pri_ringstation_fbp_master_config_reset_action_soldier_on_v(void)
151{
152 return 0x00000001;
153}
154static inline u32 pri_ringstation_fbp_master_config_reset_action_soldier_on_f(void)
155{
156 return 0x80000000;
157}
158static inline u32 pri_ringstation_fbp_master_config_setup_clocks_s(void)
159{
160 return 3;
161}
162static inline u32 pri_ringstation_fbp_master_config_setup_clocks_f(u32 v)
163{
164 return (v & 0x7) << 20;
165}
166static inline u32 pri_ringstation_fbp_master_config_setup_clocks_m(void)
167{
168 return 0x7 << 20;
169}
170static inline u32 pri_ringstation_fbp_master_config_setup_clocks_v(u32 r)
171{
172 return (r >> 20) & 0x7;
173}
174static inline u32 pri_ringstation_fbp_master_config_setup_clocks_i_v(void)
175{
176 return 0x00000000;
177}
178static inline u32 pri_ringstation_fbp_master_config_setup_clocks_i_f(void)
179{
180 return 0x0;
181}
182static inline u32 pri_ringstation_fbp_master_config_wait_clocks_s(void)
183{
184 return 3;
185}
186static inline u32 pri_ringstation_fbp_master_config_wait_clocks_f(u32 v)
187{
188 return (v & 0x7) << 24;
189}
190static inline u32 pri_ringstation_fbp_master_config_wait_clocks_m(void)
191{
192 return 0x7 << 24;
193}
194static inline u32 pri_ringstation_fbp_master_config_wait_clocks_v(u32 r)
195{
196 return (r >> 24) & 0x7;
197}
198static inline u32 pri_ringstation_fbp_master_config_wait_clocks_i_v(void)
199{
200 return 0x00000000;
201}
202static inline u32 pri_ringstation_fbp_master_config_wait_clocks_i_f(void)
203{
204 return 0x0;
205}
206static inline u32 pri_ringstation_fbp_master_config_hold_clocks_s(void)
207{
208 return 3;
209}
210static inline u32 pri_ringstation_fbp_master_config_hold_clocks_f(u32 v)
211{
212 return (v & 0x7) << 27;
213}
214static inline u32 pri_ringstation_fbp_master_config_hold_clocks_m(void)
215{
216 return 0x7 << 27;
217}
218static inline u32 pri_ringstation_fbp_master_config_hold_clocks_v(u32 r)
219{
220 return (r >> 27) & 0x7;
221}
222static inline u32 pri_ringstation_fbp_master_config_hold_clocks_i_v(void)
223{
224 return 0x00000000;
225}
226static inline u32 pri_ringstation_fbp_master_config_hold_clocks_i_f(void)
227{
228 return 0x0;
229}
230
231#endif /* __hw_pri_ringstation_fbp_gk20a_h__ */
diff --git a/include/nvgpu/hw/gk20a/hw_pri_ringstation_gpc_gk20a.h b/include/nvgpu/hw/gk20a/hw_pri_ringstation_gpc_gk20a.h
deleted file mode 100644
index 6b57429..0000000
--- a/include/nvgpu/hw/gk20a/hw_pri_ringstation_gpc_gk20a.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_gpc_gk20a_h_
57#define _hw_pri_ringstation_gpc_gk20a_h_
58
59static inline u32 pri_ringstation_gpc_master_config_r(u32 i)
60{
61 return 0x00128300U + i*4U;
62}
63static inline u32 pri_ringstation_gpc_gpc0_priv_error_adr_r(void)
64{
65 return 0x00128120U;
66}
67static inline u32 pri_ringstation_gpc_gpc0_priv_error_wrdat_r(void)
68{
69 return 0x00128124U;
70}
71static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_r(void)
72{
73 return 0x00128128U;
74}
75static inline u32 pri_ringstation_gpc_gpc0_priv_error_code_r(void)
76{
77 return 0x0012812cU;
78}
79#endif
diff --git a/include/nvgpu/hw/gk20a/hw_pri_ringstation_sys_gk20a.h b/include/nvgpu/hw/gk20a/hw_pri_ringstation_sys_gk20a.h
deleted file mode 100644
index e4d5c3b..0000000
--- a/include/nvgpu/hw/gk20a/hw_pri_ringstation_sys_gk20a.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_sys_gk20a_h_
57#define _hw_pri_ringstation_sys_gk20a_h_
58
59static inline u32 pri_ringstation_sys_master_config_r(u32 i)
60{
61 return 0x00122300U + i*4U;
62}
63static inline u32 pri_ringstation_sys_decode_config_r(void)
64{
65 return 0x00122204U;
66}
67static inline u32 pri_ringstation_sys_decode_config_ring_m(void)
68{
69 return 0x7U << 0U;
70}
71static inline u32 pri_ringstation_sys_decode_config_ring_drop_on_ring_not_started_f(void)
72{
73 return 0x1U;
74}
75static inline u32 pri_ringstation_sys_priv_error_adr_r(void)
76{
77 return 0x00122120U;
78}
79static inline u32 pri_ringstation_sys_priv_error_wrdat_r(void)
80{
81 return 0x00122124U;
82}
83static inline u32 pri_ringstation_sys_priv_error_info_r(void)
84{
85 return 0x00122128U;
86}
87static inline u32 pri_ringstation_sys_priv_error_code_r(void)
88{
89 return 0x0012212cU;
90}
91#endif
diff --git a/include/nvgpu/hw/gk20a/hw_proj_gk20a.h b/include/nvgpu/hw/gk20a/hw_proj_gk20a.h
deleted file mode 100644
index 10509ca..0000000
--- a/include/nvgpu/hw/gk20a/hw_proj_gk20a.h
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * Copyright (c) 2012-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_proj_gk20a_h_
57#define _hw_proj_gk20a_h_
58
59static inline u32 proj_gpc_base_v(void)
60{
61 return 0x00500000U;
62}
63static inline u32 proj_gpc_shared_base_v(void)
64{
65 return 0x00418000U;
66}
67static inline u32 proj_gpc_stride_v(void)
68{
69 return 0x00008000U;
70}
71static inline u32 proj_gpc_priv_stride_v(void)
72{
73 return 0x00000800U;
74}
75static inline u32 proj_ltc_stride_v(void)
76{
77 return 0x00002000U;
78}
79static inline u32 proj_lts_stride_v(void)
80{
81 return 0x00000400U;
82}
83static inline u32 proj_fbpa_stride_v(void)
84{
85 return 0x00001000U;
86}
87static inline u32 proj_ppc_in_gpc_base_v(void)
88{
89 return 0x00003000U;
90}
91static inline u32 proj_ppc_in_gpc_shared_base_v(void)
92{
93 return 0x00003e00U;
94}
95static inline u32 proj_ppc_in_gpc_stride_v(void)
96{
97 return 0x00000200U;
98}
99static inline u32 proj_rop_base_v(void)
100{
101 return 0x00410000U;
102}
103static inline u32 proj_rop_shared_base_v(void)
104{
105 return 0x00408800U;
106}
107static inline u32 proj_rop_stride_v(void)
108{
109 return 0x00000400U;
110}
111static inline u32 proj_tpc_in_gpc_base_v(void)
112{
113 return 0x00004000U;
114}
115static inline u32 proj_tpc_in_gpc_stride_v(void)
116{
117 return 0x00000800U;
118}
119static inline u32 proj_tpc_in_gpc_shared_base_v(void)
120{
121 return 0x00001800U;
122}
123static inline u32 proj_host_num_engines_v(void)
124{
125 return 0x00000002U;
126}
127static inline u32 proj_host_num_pbdma_v(void)
128{
129 return 0x00000001U;
130}
131static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void)
132{
133 return 0x00000001U;
134}
135static inline u32 proj_scal_litter_num_fbps_v(void)
136{
137 return 0x00000001U;
138}
139static inline u32 proj_scal_litter_num_fbpas_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 proj_scal_litter_num_gpcs_v(void)
144{
145 return 0x00000001U;
146}
147static inline u32 proj_scal_litter_num_pes_per_gpc_v(void)
148{
149 return 0x00000001U;
150}
151static inline u32 proj_scal_litter_num_tpcs_per_pes_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 proj_scal_litter_num_zcull_banks_v(void)
156{
157 return 0x00000004U;
158}
159static inline u32 proj_scal_max_gpcs_v(void)
160{
161 return 0x00000020U;
162}
163static inline u32 proj_scal_max_tpc_per_gpc_v(void)
164{
165 return 0x00000008U;
166}
167#endif
diff --git a/include/nvgpu/hw/gk20a/hw_pwr_gk20a.h b/include/nvgpu/hw/gk20a/hw_pwr_gk20a.h
deleted file mode 100644
index b879563..0000000
--- a/include/nvgpu/hw/gk20a/hw_pwr_gk20a.h
+++ /dev/null
@@ -1,827 +0,0 @@
1/*
2 * Copyright (c) 2012-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pwr_gk20a_h_
57#define _hw_pwr_gk20a_h_
58
59static inline u32 pwr_falcon_irqsset_r(void)
60{
61 return 0x0010a000U;
62}
63static inline u32 pwr_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 pwr_falcon_irqsclr_r(void)
68{
69 return 0x0010a004U;
70}
71static inline u32 pwr_falcon_irqstat_r(void)
72{
73 return 0x0010a008U;
74}
75static inline u32 pwr_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 pwr_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 pwr_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 pwr_falcon_irqmode_r(void)
88{
89 return 0x0010a00cU;
90}
91static inline u32 pwr_falcon_irqmset_r(void)
92{
93 return 0x0010a010U;
94}
95static inline u32 pwr_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 pwr_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 pwr_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 pwr_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 pwr_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 pwr_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 pwr_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 pwr_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 pwr_falcon_irqmclr_r(void)
128{
129 return 0x0010a014U;
130}
131static inline u32 pwr_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 pwr_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 pwr_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 pwr_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 pwr_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 pwr_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 pwr_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 pwr_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 pwr_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 pwr_falcon_irqmask_r(void)
168{
169 return 0x0010a018U;
170}
171static inline u32 pwr_falcon_irqdest_r(void)
172{
173 return 0x0010a01cU;
174}
175static inline u32 pwr_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 pwr_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 pwr_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 pwr_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 pwr_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 pwr_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 pwr_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 pwr_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 pwr_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 pwr_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 pwr_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 pwr_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 pwr_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 pwr_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 pwr_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 pwr_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 pwr_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 pwr_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 pwr_falcon_curctx_r(void)
248{
249 return 0x0010a050U;
250}
251static inline u32 pwr_falcon_nxtctx_r(void)
252{
253 return 0x0010a054U;
254}
255static inline u32 pwr_falcon_mailbox0_r(void)
256{
257 return 0x0010a040U;
258}
259static inline u32 pwr_falcon_mailbox1_r(void)
260{
261 return 0x0010a044U;
262}
263static inline u32 pwr_falcon_itfen_r(void)
264{
265 return 0x0010a048U;
266}
267static inline u32 pwr_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 pwr_falcon_idlestate_r(void)
272{
273 return 0x0010a04cU;
274}
275static inline u32 pwr_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 pwr_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 pwr_falcon_os_r(void)
284{
285 return 0x0010a080U;
286}
287static inline u32 pwr_falcon_engctl_r(void)
288{
289 return 0x0010a0a4U;
290}
291static inline u32 pwr_falcon_cpuctl_r(void)
292{
293 return 0x0010a100U;
294}
295static inline u32 pwr_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 pwr_falcon_cpuctl_halt_intr_f(u32 v)
300{
301 return (v & 0x1U) << 4U;
302}
303static inline u32 pwr_falcon_cpuctl_halt_intr_m(void)
304{
305 return 0x1U << 4U;
306}
307static inline u32 pwr_falcon_cpuctl_halt_intr_v(u32 r)
308{
309 return (r >> 4U) & 0x1U;
310}
311static inline u32 pwr_falcon_imemc_r(u32 i)
312{
313 return 0x0010a180U + i*16U;
314}
315static inline u32 pwr_falcon_imemc_offs_f(u32 v)
316{
317 return (v & 0x3fU) << 2U;
318}
319static inline u32 pwr_falcon_imemc_blk_f(u32 v)
320{
321 return (v & 0xffU) << 8U;
322}
323static inline u32 pwr_falcon_imemc_aincw_f(u32 v)
324{
325 return (v & 0x1U) << 24U;
326}
327static inline u32 pwr_falcon_imemd_r(u32 i)
328{
329 return 0x0010a184U + i*16U;
330}
331static inline u32 pwr_falcon_imemt_r(u32 i)
332{
333 return 0x0010a188U + i*16U;
334}
335static inline u32 pwr_falcon_bootvec_r(void)
336{
337 return 0x0010a104U;
338}
339static inline u32 pwr_falcon_bootvec_vec_f(u32 v)
340{
341 return (v & 0xffffffffU) << 0U;
342}
343static inline u32 pwr_falcon_dmactl_r(void)
344{
345 return 0x0010a10cU;
346}
347static inline u32 pwr_falcon_dmactl_dmem_scrubbing_m(void)
348{
349 return 0x1U << 1U;
350}
351static inline u32 pwr_falcon_dmactl_imem_scrubbing_m(void)
352{
353 return 0x1U << 2U;
354}
355static inline u32 pwr_falcon_hwcfg_r(void)
356{
357 return 0x0010a108U;
358}
359static inline u32 pwr_falcon_hwcfg_imem_size_v(u32 r)
360{
361 return (r >> 0U) & 0x1ffU;
362}
363static inline u32 pwr_falcon_hwcfg_dmem_size_v(u32 r)
364{
365 return (r >> 9U) & 0x1ffU;
366}
367static inline u32 pwr_falcon_dmatrfbase_r(void)
368{
369 return 0x0010a110U;
370}
371static inline u32 pwr_falcon_dmatrfmoffs_r(void)
372{
373 return 0x0010a114U;
374}
375static inline u32 pwr_falcon_dmatrfcmd_r(void)
376{
377 return 0x0010a118U;
378}
379static inline u32 pwr_falcon_dmatrfcmd_imem_f(u32 v)
380{
381 return (v & 0x1U) << 4U;
382}
383static inline u32 pwr_falcon_dmatrfcmd_write_f(u32 v)
384{
385 return (v & 0x1U) << 5U;
386}
387static inline u32 pwr_falcon_dmatrfcmd_size_f(u32 v)
388{
389 return (v & 0x7U) << 8U;
390}
391static inline u32 pwr_falcon_dmatrfcmd_ctxdma_f(u32 v)
392{
393 return (v & 0x7U) << 12U;
394}
395static inline u32 pwr_falcon_dmatrffboffs_r(void)
396{
397 return 0x0010a11cU;
398}
399static inline u32 pwr_falcon_exterraddr_r(void)
400{
401 return 0x0010a168U;
402}
403static inline u32 pwr_falcon_exterrstat_r(void)
404{
405 return 0x0010a16cU;
406}
407static inline u32 pwr_falcon_exterrstat_valid_m(void)
408{
409 return 0x1U << 31U;
410}
411static inline u32 pwr_falcon_exterrstat_valid_v(u32 r)
412{
413 return (r >> 31U) & 0x1U;
414}
415static inline u32 pwr_falcon_exterrstat_valid_true_v(void)
416{
417 return 0x00000001U;
418}
419static inline u32 pwr_pmu_falcon_icd_cmd_r(void)
420{
421 return 0x0010a200U;
422}
423static inline u32 pwr_pmu_falcon_icd_cmd_opc_s(void)
424{
425 return 4U;
426}
427static inline u32 pwr_pmu_falcon_icd_cmd_opc_f(u32 v)
428{
429 return (v & 0xfU) << 0U;
430}
431static inline u32 pwr_pmu_falcon_icd_cmd_opc_m(void)
432{
433 return 0xfU << 0U;
434}
435static inline u32 pwr_pmu_falcon_icd_cmd_opc_v(u32 r)
436{
437 return (r >> 0U) & 0xfU;
438}
439static inline u32 pwr_pmu_falcon_icd_cmd_opc_rreg_f(void)
440{
441 return 0x8U;
442}
443static inline u32 pwr_pmu_falcon_icd_cmd_opc_rstat_f(void)
444{
445 return 0xeU;
446}
447static inline u32 pwr_pmu_falcon_icd_cmd_idx_f(u32 v)
448{
449 return (v & 0x1fU) << 8U;
450}
451static inline u32 pwr_pmu_falcon_icd_rdata_r(void)
452{
453 return 0x0010a20cU;
454}
455static inline u32 pwr_falcon_dmemc_r(u32 i)
456{
457 return 0x0010a1c0U + i*8U;
458}
459static inline u32 pwr_falcon_dmemc_offs_f(u32 v)
460{
461 return (v & 0x3fU) << 2U;
462}
463static inline u32 pwr_falcon_dmemc_offs_m(void)
464{
465 return 0x3fU << 2U;
466}
467static inline u32 pwr_falcon_dmemc_blk_f(u32 v)
468{
469 return (v & 0xffU) << 8U;
470}
471static inline u32 pwr_falcon_dmemc_blk_m(void)
472{
473 return 0xffU << 8U;
474}
475static inline u32 pwr_falcon_dmemc_aincw_f(u32 v)
476{
477 return (v & 0x1U) << 24U;
478}
479static inline u32 pwr_falcon_dmemc_aincr_f(u32 v)
480{
481 return (v & 0x1U) << 25U;
482}
483static inline u32 pwr_falcon_dmemd_r(u32 i)
484{
485 return 0x0010a1c4U + i*8U;
486}
487static inline u32 pwr_pmu_new_instblk_r(void)
488{
489 return 0x0010a480U;
490}
491static inline u32 pwr_pmu_new_instblk_ptr_f(u32 v)
492{
493 return (v & 0xfffffffU) << 0U;
494}
495static inline u32 pwr_pmu_new_instblk_target_fb_f(void)
496{
497 return 0x0U;
498}
499static inline u32 pwr_pmu_new_instblk_target_sys_coh_f(void)
500{
501 return 0x20000000U;
502}
503static inline u32 pwr_pmu_new_instblk_target_sys_ncoh_f(void)
504{
505 return 0x30000000U;
506}
507static inline u32 pwr_pmu_new_instblk_valid_f(u32 v)
508{
509 return (v & 0x1U) << 30U;
510}
511static inline u32 pwr_pmu_mutex_id_r(void)
512{
513 return 0x0010a488U;
514}
515static inline u32 pwr_pmu_mutex_id_value_v(u32 r)
516{
517 return (r >> 0U) & 0xffU;
518}
519static inline u32 pwr_pmu_mutex_id_value_init_v(void)
520{
521 return 0x00000000U;
522}
523static inline u32 pwr_pmu_mutex_id_value_not_avail_v(void)
524{
525 return 0x000000ffU;
526}
527static inline u32 pwr_pmu_mutex_id_release_r(void)
528{
529 return 0x0010a48cU;
530}
531static inline u32 pwr_pmu_mutex_id_release_value_f(u32 v)
532{
533 return (v & 0xffU) << 0U;
534}
535static inline u32 pwr_pmu_mutex_id_release_value_m(void)
536{
537 return 0xffU << 0U;
538}
539static inline u32 pwr_pmu_mutex_id_release_value_init_v(void)
540{
541 return 0x00000000U;
542}
543static inline u32 pwr_pmu_mutex_id_release_value_init_f(void)
544{
545 return 0x0U;
546}
547static inline u32 pwr_pmu_mutex_r(u32 i)
548{
549 return 0x0010a580U + i*4U;
550}
551static inline u32 pwr_pmu_mutex__size_1_v(void)
552{
553 return 0x00000010U;
554}
555static inline u32 pwr_pmu_mutex_value_f(u32 v)
556{
557 return (v & 0xffU) << 0U;
558}
559static inline u32 pwr_pmu_mutex_value_v(u32 r)
560{
561 return (r >> 0U) & 0xffU;
562}
563static inline u32 pwr_pmu_mutex_value_initial_lock_f(void)
564{
565 return 0x0U;
566}
567static inline u32 pwr_pmu_queue_head_r(u32 i)
568{
569 return 0x0010a4a0U + i*4U;
570}
571static inline u32 pwr_pmu_queue_head__size_1_v(void)
572{
573 return 0x00000004U;
574}
575static inline u32 pwr_pmu_queue_head_address_f(u32 v)
576{
577 return (v & 0xffffffffU) << 0U;
578}
579static inline u32 pwr_pmu_queue_head_address_v(u32 r)
580{
581 return (r >> 0U) & 0xffffffffU;
582}
583static inline u32 pwr_pmu_queue_tail_r(u32 i)
584{
585 return 0x0010a4b0U + i*4U;
586}
587static inline u32 pwr_pmu_queue_tail__size_1_v(void)
588{
589 return 0x00000004U;
590}
591static inline u32 pwr_pmu_queue_tail_address_f(u32 v)
592{
593 return (v & 0xffffffffU) << 0U;
594}
595static inline u32 pwr_pmu_queue_tail_address_v(u32 r)
596{
597 return (r >> 0U) & 0xffffffffU;
598}
599static inline u32 pwr_pmu_msgq_head_r(void)
600{
601 return 0x0010a4c8U;
602}
603static inline u32 pwr_pmu_msgq_head_val_f(u32 v)
604{
605 return (v & 0xffffffffU) << 0U;
606}
607static inline u32 pwr_pmu_msgq_head_val_v(u32 r)
608{
609 return (r >> 0U) & 0xffffffffU;
610}
611static inline u32 pwr_pmu_msgq_tail_r(void)
612{
613 return 0x0010a4ccU;
614}
615static inline u32 pwr_pmu_msgq_tail_val_f(u32 v)
616{
617 return (v & 0xffffffffU) << 0U;
618}
619static inline u32 pwr_pmu_msgq_tail_val_v(u32 r)
620{
621 return (r >> 0U) & 0xffffffffU;
622}
623static inline u32 pwr_pmu_idle_mask_r(u32 i)
624{
625 return 0x0010a504U + i*16U;
626}
627static inline u32 pwr_pmu_idle_mask_gr_enabled_f(void)
628{
629 return 0x1U;
630}
631static inline u32 pwr_pmu_idle_mask_ce_2_enabled_f(void)
632{
633 return 0x200000U;
634}
635static inline u32 pwr_pmu_idle_mask_1_r(u32 i)
636{
637 return 0x0010aa34U + i*8U;
638}
639static inline u32 pwr_pmu_idle_count_r(u32 i)
640{
641 return 0x0010a508U + i*16U;
642}
643static inline u32 pwr_pmu_idle_count_value_f(u32 v)
644{
645 return (v & 0x7fffffffU) << 0U;
646}
647static inline u32 pwr_pmu_idle_count_value_v(u32 r)
648{
649 return (r >> 0U) & 0x7fffffffU;
650}
651static inline u32 pwr_pmu_idle_count_reset_f(u32 v)
652{
653 return (v & 0x1U) << 31U;
654}
655static inline u32 pwr_pmu_idle_ctrl_r(u32 i)
656{
657 return 0x0010a50cU + i*16U;
658}
659static inline u32 pwr_pmu_idle_ctrl_value_m(void)
660{
661 return 0x3U << 0U;
662}
663static inline u32 pwr_pmu_idle_ctrl_value_busy_f(void)
664{
665 return 0x2U;
666}
667static inline u32 pwr_pmu_idle_ctrl_value_always_f(void)
668{
669 return 0x3U;
670}
671static inline u32 pwr_pmu_idle_ctrl_filter_m(void)
672{
673 return 0x1U << 2U;
674}
675static inline u32 pwr_pmu_idle_ctrl_filter_disabled_f(void)
676{
677 return 0x0U;
678}
679static inline u32 pwr_pmu_idle_threshold_r(u32 i)
680{
681 return 0x0010a8a0U + i*4U;
682}
683static inline u32 pwr_pmu_idle_threshold_value_f(u32 v)
684{
685 return (v & 0x7fffffffU) << 0U;
686}
687static inline u32 pwr_pmu_idle_intr_r(void)
688{
689 return 0x0010a9e8U;
690}
691static inline u32 pwr_pmu_idle_intr_en_f(u32 v)
692{
693 return (v & 0x1U) << 0U;
694}
695static inline u32 pwr_pmu_idle_intr_en_disabled_v(void)
696{
697 return 0x00000000U;
698}
699static inline u32 pwr_pmu_idle_intr_en_enabled_v(void)
700{
701 return 0x00000001U;
702}
703static inline u32 pwr_pmu_idle_intr_status_r(void)
704{
705 return 0x0010a9ecU;
706}
707static inline u32 pwr_pmu_idle_intr_status_intr_f(u32 v)
708{
709 return (v & 0x1U) << 0U;
710}
711static inline u32 pwr_pmu_idle_intr_status_intr_m(void)
712{
713 return 0x1U << 0U;
714}
715static inline u32 pwr_pmu_idle_intr_status_intr_v(u32 r)
716{
717 return (r >> 0U) & 0x1U;
718}
719static inline u32 pwr_pmu_idle_mask_supp_r(u32 i)
720{
721 return 0x0010a9f0U + i*8U;
722}
723static inline u32 pwr_pmu_idle_mask_1_supp_r(u32 i)
724{
725 return 0x0010a9f4U + i*8U;
726}
727static inline u32 pwr_pmu_idle_ctrl_supp_r(u32 i)
728{
729 return 0x0010aa30U + i*8U;
730}
731static inline u32 pwr_pmu_debug_r(u32 i)
732{
733 return 0x0010a5c0U + i*4U;
734}
735static inline u32 pwr_pmu_debug__size_1_v(void)
736{
737 return 0x00000004U;
738}
739static inline u32 pwr_pmu_mailbox_r(u32 i)
740{
741 return 0x0010a450U + i*4U;
742}
743static inline u32 pwr_pmu_mailbox__size_1_v(void)
744{
745 return 0x0000000cU;
746}
747static inline u32 pwr_pmu_bar0_addr_r(void)
748{
749 return 0x0010a7a0U;
750}
751static inline u32 pwr_pmu_bar0_data_r(void)
752{
753 return 0x0010a7a4U;
754}
755static inline u32 pwr_pmu_bar0_ctl_r(void)
756{
757 return 0x0010a7acU;
758}
759static inline u32 pwr_pmu_bar0_timeout_r(void)
760{
761 return 0x0010a7a8U;
762}
763static inline u32 pwr_pmu_bar0_fecs_error_r(void)
764{
765 return 0x0010a988U;
766}
767static inline u32 pwr_pmu_bar0_error_status_r(void)
768{
769 return 0x0010a7b0U;
770}
771static inline u32 pwr_pmu_pg_idlefilth_r(u32 i)
772{
773 return 0x0010a6c0U + i*4U;
774}
775static inline u32 pwr_pmu_pg_ppuidlefilth_r(u32 i)
776{
777 return 0x0010a6e8U + i*4U;
778}
779static inline u32 pwr_pmu_pg_idle_cnt_r(u32 i)
780{
781 return 0x0010a710U + i*4U;
782}
783static inline u32 pwr_pmu_pg_intren_r(u32 i)
784{
785 return 0x0010a760U + i*4U;
786}
787static inline u32 pwr_fbif_transcfg_r(u32 i)
788{
789 return 0x0010a600U + i*4U;
790}
791static inline u32 pwr_fbif_transcfg_target_local_fb_f(void)
792{
793 return 0x0U;
794}
795static inline u32 pwr_fbif_transcfg_target_coherent_sysmem_f(void)
796{
797 return 0x1U;
798}
799static inline u32 pwr_fbif_transcfg_target_noncoherent_sysmem_f(void)
800{
801 return 0x2U;
802}
803static inline u32 pwr_fbif_transcfg_mem_type_s(void)
804{
805 return 1U;
806}
807static inline u32 pwr_fbif_transcfg_mem_type_f(u32 v)
808{
809 return (v & 0x1U) << 2U;
810}
811static inline u32 pwr_fbif_transcfg_mem_type_m(void)
812{
813 return 0x1U << 2U;
814}
815static inline u32 pwr_fbif_transcfg_mem_type_v(u32 r)
816{
817 return (r >> 2U) & 0x1U;
818}
819static inline u32 pwr_fbif_transcfg_mem_type_virtual_f(void)
820{
821 return 0x0U;
822}
823static inline u32 pwr_fbif_transcfg_mem_type_physical_f(void)
824{
825 return 0x4U;
826}
827#endif
diff --git a/include/nvgpu/hw/gk20a/hw_ram_gk20a.h b/include/nvgpu/hw/gk20a/hw_ram_gk20a.h
deleted file mode 100644
index ed385d9..0000000
--- a/include/nvgpu/hw/gk20a/hw_ram_gk20a.h
+++ /dev/null
@@ -1,443 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ram_gk20a_h_
57#define _hw_ram_gk20a_h_
58
59static inline u32 ram_in_ramfc_s(void)
60{
61 return 4096U;
62}
63static inline u32 ram_in_ramfc_w(void)
64{
65 return 0U;
66}
67static inline u32 ram_in_page_dir_base_target_f(u32 v)
68{
69 return (v & 0x3U) << 0U;
70}
71static inline u32 ram_in_page_dir_base_target_w(void)
72{
73 return 128U;
74}
75static inline u32 ram_in_page_dir_base_target_vid_mem_f(void)
76{
77 return 0x0U;
78}
79static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void)
80{
81 return 0x2U;
82}
83static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void)
84{
85 return 0x3U;
86}
87static inline u32 ram_in_page_dir_base_vol_w(void)
88{
89 return 128U;
90}
91static inline u32 ram_in_page_dir_base_vol_true_f(void)
92{
93 return 0x4U;
94}
95static inline u32 ram_in_page_dir_base_lo_f(u32 v)
96{
97 return (v & 0xfffffU) << 12U;
98}
99static inline u32 ram_in_page_dir_base_lo_w(void)
100{
101 return 128U;
102}
103static inline u32 ram_in_page_dir_base_hi_f(u32 v)
104{
105 return (v & 0xffU) << 0U;
106}
107static inline u32 ram_in_page_dir_base_hi_w(void)
108{
109 return 129U;
110}
111static inline u32 ram_in_adr_limit_lo_f(u32 v)
112{
113 return (v & 0xfffffU) << 12U;
114}
115static inline u32 ram_in_adr_limit_lo_w(void)
116{
117 return 130U;
118}
119static inline u32 ram_in_adr_limit_hi_f(u32 v)
120{
121 return (v & 0xffU) << 0U;
122}
123static inline u32 ram_in_adr_limit_hi_w(void)
124{
125 return 131U;
126}
127static inline u32 ram_in_engine_cs_w(void)
128{
129 return 132U;
130}
131static inline u32 ram_in_engine_cs_wfi_v(void)
132{
133 return 0x00000000U;
134}
135static inline u32 ram_in_engine_cs_wfi_f(void)
136{
137 return 0x0U;
138}
139static inline u32 ram_in_engine_cs_fg_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 ram_in_engine_cs_fg_f(void)
144{
145 return 0x8U;
146}
147static inline u32 ram_in_gr_cs_w(void)
148{
149 return 132U;
150}
151static inline u32 ram_in_gr_cs_wfi_f(void)
152{
153 return 0x0U;
154}
155static inline u32 ram_in_gr_wfi_target_w(void)
156{
157 return 132U;
158}
159static inline u32 ram_in_gr_wfi_mode_w(void)
160{
161 return 132U;
162}
163static inline u32 ram_in_gr_wfi_mode_physical_v(void)
164{
165 return 0x00000000U;
166}
167static inline u32 ram_in_gr_wfi_mode_physical_f(void)
168{
169 return 0x0U;
170}
171static inline u32 ram_in_gr_wfi_mode_virtual_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 ram_in_gr_wfi_mode_virtual_f(void)
176{
177 return 0x4U;
178}
179static inline u32 ram_in_gr_wfi_ptr_lo_f(u32 v)
180{
181 return (v & 0xfffffU) << 12U;
182}
183static inline u32 ram_in_gr_wfi_ptr_lo_w(void)
184{
185 return 132U;
186}
187static inline u32 ram_in_gr_wfi_ptr_hi_f(u32 v)
188{
189 return (v & 0xffU) << 0U;
190}
191static inline u32 ram_in_gr_wfi_ptr_hi_w(void)
192{
193 return 133U;
194}
195static inline u32 ram_in_base_shift_v(void)
196{
197 return 0x0000000cU;
198}
199static inline u32 ram_in_alloc_size_v(void)
200{
201 return 0x00001000U;
202}
203static inline u32 ram_fc_size_val_v(void)
204{
205 return 0x00000200U;
206}
207static inline u32 ram_fc_gp_put_w(void)
208{
209 return 0U;
210}
211static inline u32 ram_fc_userd_w(void)
212{
213 return 2U;
214}
215static inline u32 ram_fc_userd_hi_w(void)
216{
217 return 3U;
218}
219static inline u32 ram_fc_signature_w(void)
220{
221 return 4U;
222}
223static inline u32 ram_fc_gp_get_w(void)
224{
225 return 5U;
226}
227static inline u32 ram_fc_pb_get_w(void)
228{
229 return 6U;
230}
231static inline u32 ram_fc_pb_get_hi_w(void)
232{
233 return 7U;
234}
235static inline u32 ram_fc_pb_top_level_get_w(void)
236{
237 return 8U;
238}
239static inline u32 ram_fc_pb_top_level_get_hi_w(void)
240{
241 return 9U;
242}
243static inline u32 ram_fc_acquire_w(void)
244{
245 return 12U;
246}
247static inline u32 ram_fc_semaphorea_w(void)
248{
249 return 14U;
250}
251static inline u32 ram_fc_semaphoreb_w(void)
252{
253 return 15U;
254}
255static inline u32 ram_fc_semaphorec_w(void)
256{
257 return 16U;
258}
259static inline u32 ram_fc_semaphored_w(void)
260{
261 return 17U;
262}
263static inline u32 ram_fc_gp_base_w(void)
264{
265 return 18U;
266}
267static inline u32 ram_fc_gp_base_hi_w(void)
268{
269 return 19U;
270}
271static inline u32 ram_fc_gp_fetch_w(void)
272{
273 return 20U;
274}
275static inline u32 ram_fc_pb_fetch_w(void)
276{
277 return 21U;
278}
279static inline u32 ram_fc_pb_fetch_hi_w(void)
280{
281 return 22U;
282}
283static inline u32 ram_fc_pb_put_w(void)
284{
285 return 23U;
286}
287static inline u32 ram_fc_pb_put_hi_w(void)
288{
289 return 24U;
290}
291static inline u32 ram_fc_pb_header_w(void)
292{
293 return 33U;
294}
295static inline u32 ram_fc_pb_count_w(void)
296{
297 return 34U;
298}
299static inline u32 ram_fc_subdevice_w(void)
300{
301 return 37U;
302}
303static inline u32 ram_fc_formats_w(void)
304{
305 return 39U;
306}
307static inline u32 ram_fc_syncpointa_w(void)
308{
309 return 41U;
310}
311static inline u32 ram_fc_syncpointb_w(void)
312{
313 return 42U;
314}
315static inline u32 ram_fc_target_w(void)
316{
317 return 43U;
318}
319static inline u32 ram_fc_hce_ctrl_w(void)
320{
321 return 57U;
322}
323static inline u32 ram_fc_chid_w(void)
324{
325 return 58U;
326}
327static inline u32 ram_fc_chid_id_f(u32 v)
328{
329 return (v & 0xfffU) << 0U;
330}
331static inline u32 ram_fc_chid_id_w(void)
332{
333 return 0U;
334}
335static inline u32 ram_fc_runlist_timeslice_w(void)
336{
337 return 62U;
338}
339static inline u32 ram_fc_pb_timeslice_w(void)
340{
341 return 63U;
342}
343static inline u32 ram_userd_base_shift_v(void)
344{
345 return 0x00000009U;
346}
347static inline u32 ram_userd_chan_size_v(void)
348{
349 return 0x00000200U;
350}
351static inline u32 ram_userd_put_w(void)
352{
353 return 16U;
354}
355static inline u32 ram_userd_get_w(void)
356{
357 return 17U;
358}
359static inline u32 ram_userd_ref_w(void)
360{
361 return 18U;
362}
363static inline u32 ram_userd_put_hi_w(void)
364{
365 return 19U;
366}
367static inline u32 ram_userd_ref_threshold_w(void)
368{
369 return 20U;
370}
371static inline u32 ram_userd_top_level_get_w(void)
372{
373 return 22U;
374}
375static inline u32 ram_userd_top_level_get_hi_w(void)
376{
377 return 23U;
378}
379static inline u32 ram_userd_get_hi_w(void)
380{
381 return 24U;
382}
383static inline u32 ram_userd_gp_get_w(void)
384{
385 return 34U;
386}
387static inline u32 ram_userd_gp_put_w(void)
388{
389 return 35U;
390}
391static inline u32 ram_userd_gp_top_level_get_w(void)
392{
393 return 22U;
394}
395static inline u32 ram_userd_gp_top_level_get_hi_w(void)
396{
397 return 23U;
398}
399static inline u32 ram_rl_entry_size_v(void)
400{
401 return 0x00000008U;
402}
403static inline u32 ram_rl_entry_chid_f(u32 v)
404{
405 return (v & 0xfffU) << 0U;
406}
407static inline u32 ram_rl_entry_id_f(u32 v)
408{
409 return (v & 0xfffU) << 0U;
410}
411static inline u32 ram_rl_entry_type_f(u32 v)
412{
413 return (v & 0x1U) << 13U;
414}
415static inline u32 ram_rl_entry_type_chid_f(void)
416{
417 return 0x0U;
418}
419static inline u32 ram_rl_entry_type_tsg_f(void)
420{
421 return 0x2000U;
422}
423static inline u32 ram_rl_entry_timeslice_scale_f(u32 v)
424{
425 return (v & 0xfU) << 14U;
426}
427static inline u32 ram_rl_entry_timeslice_scale_3_f(void)
428{
429 return 0xc000U;
430}
431static inline u32 ram_rl_entry_timeslice_timeout_f(u32 v)
432{
433 return (v & 0xffU) << 18U;
434}
435static inline u32 ram_rl_entry_timeslice_timeout_128_f(void)
436{
437 return 0x2000000U;
438}
439static inline u32 ram_rl_entry_tsg_length_f(u32 v)
440{
441 return (v & 0x3fU) << 26U;
442}
443#endif
diff --git a/include/nvgpu/hw/gk20a/hw_therm_gk20a.h b/include/nvgpu/hw/gk20a/hw_therm_gk20a.h
deleted file mode 100644
index 075c9bc..0000000
--- a/include/nvgpu/hw/gk20a/hw_therm_gk20a.h
+++ /dev/null
@@ -1,367 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_therm_gk20a_h_
57#define _hw_therm_gk20a_h_
58
59static inline u32 therm_use_a_r(void)
60{
61 return 0x00020798U;
62}
63static inline u32 therm_use_a_ext_therm_0_enable_f(void)
64{
65 return 0x1U;
66}
67static inline u32 therm_use_a_ext_therm_1_enable_f(void)
68{
69 return 0x2U;
70}
71static inline u32 therm_use_a_ext_therm_2_enable_f(void)
72{
73 return 0x4U;
74}
75static inline u32 therm_evt_ext_therm_0_r(void)
76{
77 return 0x00020700U;
78}
79static inline u32 therm_evt_ext_therm_0_slow_factor_f(u32 v)
80{
81 return (v & 0x3fU) << 8U;
82}
83static inline u32 therm_evt_ext_therm_0_slow_factor_init_v(void)
84{
85 return 0x00000000U;
86}
87static inline u32 therm_evt_ext_therm_0_priority_f(u32 v)
88{
89 return (v & 0x1fU) << 24U;
90}
91static inline u32 therm_evt_ext_therm_1_r(void)
92{
93 return 0x00020704U;
94}
95static inline u32 therm_evt_ext_therm_1_slow_factor_f(u32 v)
96{
97 return (v & 0x3fU) << 8U;
98}
99static inline u32 therm_evt_ext_therm_1_slow_factor_init_v(void)
100{
101 return 0x00000000U;
102}
103static inline u32 therm_evt_ext_therm_1_priority_f(u32 v)
104{
105 return (v & 0x1fU) << 24U;
106}
107static inline u32 therm_evt_ext_therm_2_r(void)
108{
109 return 0x00020708U;
110}
111static inline u32 therm_evt_ext_therm_2_slow_factor_f(u32 v)
112{
113 return (v & 0x3fU) << 8U;
114}
115static inline u32 therm_evt_ext_therm_2_slow_factor_init_v(void)
116{
117 return 0x00000000U;
118}
119static inline u32 therm_evt_ext_therm_2_priority_f(u32 v)
120{
121 return (v & 0x1fU) << 24U;
122}
123static inline u32 therm_weight_1_r(void)
124{
125 return 0x00020024U;
126}
127static inline u32 therm_config1_r(void)
128{
129 return 0x00020050U;
130}
131static inline u32 therm_config2_r(void)
132{
133 return 0x00020130U;
134}
135static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
136{
137 return (v & 0x1U) << 24U;
138}
139static inline u32 therm_config2_grad_enable_f(u32 v)
140{
141 return (v & 0x1U) << 31U;
142}
143static inline u32 therm_gate_ctrl_r(u32 i)
144{
145 return 0x00020200U + i*4U;
146}
147static inline u32 therm_gate_ctrl_eng_clk_m(void)
148{
149 return 0x3U << 0U;
150}
151static inline u32 therm_gate_ctrl_eng_clk_run_f(void)
152{
153 return 0x0U;
154}
155static inline u32 therm_gate_ctrl_eng_clk_auto_f(void)
156{
157 return 0x1U;
158}
159static inline u32 therm_gate_ctrl_eng_clk_stop_f(void)
160{
161 return 0x2U;
162}
163static inline u32 therm_gate_ctrl_blk_clk_m(void)
164{
165 return 0x3U << 2U;
166}
167static inline u32 therm_gate_ctrl_blk_clk_run_f(void)
168{
169 return 0x0U;
170}
171static inline u32 therm_gate_ctrl_blk_clk_auto_f(void)
172{
173 return 0x4U;
174}
175static inline u32 therm_gate_ctrl_eng_pwr_m(void)
176{
177 return 0x3U << 4U;
178}
179static inline u32 therm_gate_ctrl_eng_pwr_auto_f(void)
180{
181 return 0x10U;
182}
183static inline u32 therm_gate_ctrl_eng_pwr_off_v(void)
184{
185 return 0x00000002U;
186}
187static inline u32 therm_gate_ctrl_eng_pwr_off_f(void)
188{
189 return 0x20U;
190}
191static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v)
192{
193 return (v & 0x1fU) << 8U;
194}
195static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void)
196{
197 return 0x1fU << 8U;
198}
199static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v)
200{
201 return (v & 0x7U) << 13U;
202}
203static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
204{
205 return 0x7U << 13U;
206}
207static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
208{
209 return (v & 0xfU) << 16U;
210}
211static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
212{
213 return 0xfU << 16U;
214}
215static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
216{
217 return (v & 0xfU) << 20U;
218}
219static inline u32 therm_gate_ctrl_eng_delay_after_m(void)
220{
221 return 0xfU << 20U;
222}
223static inline u32 therm_fecs_idle_filter_r(void)
224{
225 return 0x00020288U;
226}
227static inline u32 therm_fecs_idle_filter_value_m(void)
228{
229 return 0xffffffffU << 0U;
230}
231static inline u32 therm_hubmmu_idle_filter_r(void)
232{
233 return 0x0002028cU;
234}
235static inline u32 therm_hubmmu_idle_filter_value_m(void)
236{
237 return 0xffffffffU << 0U;
238}
239static inline u32 therm_clk_slowdown_r(u32 i)
240{
241 return 0x00020160U + i*4U;
242}
243static inline u32 therm_clk_slowdown_idle_factor_f(u32 v)
244{
245 return (v & 0x3fU) << 16U;
246}
247static inline u32 therm_clk_slowdown_idle_factor_m(void)
248{
249 return 0x3fU << 16U;
250}
251static inline u32 therm_clk_slowdown_idle_factor_v(u32 r)
252{
253 return (r >> 16U) & 0x3fU;
254}
255static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void)
256{
257 return 0x0U;
258}
259static inline u32 therm_grad_stepping_table_r(u32 i)
260{
261 return 0x000202c8U + i*4U;
262}
263static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
264{
265 return (v & 0x3fU) << 0U;
266}
267static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
268{
269 return 0x3fU << 0U;
270}
271static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
272{
273 return 0x1U;
274}
275static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
276{
277 return 0x2U;
278}
279static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
280{
281 return 0x6U;
282}
283static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
284{
285 return 0xeU;
286}
287static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
288{
289 return (v & 0x3fU) << 6U;
290}
291static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
292{
293 return 0x3fU << 6U;
294}
295static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
296{
297 return (v & 0x3fU) << 12U;
298}
299static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
300{
301 return 0x3fU << 12U;
302}
303static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
304{
305 return (v & 0x3fU) << 18U;
306}
307static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
308{
309 return 0x3fU << 18U;
310}
311static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
312{
313 return (v & 0x3fU) << 24U;
314}
315static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
316{
317 return 0x3fU << 24U;
318}
319static inline u32 therm_grad_stepping0_r(void)
320{
321 return 0x000202c0U;
322}
323static inline u32 therm_grad_stepping0_feature_s(void)
324{
325 return 1U;
326}
327static inline u32 therm_grad_stepping0_feature_f(u32 v)
328{
329 return (v & 0x1U) << 0U;
330}
331static inline u32 therm_grad_stepping0_feature_m(void)
332{
333 return 0x1U << 0U;
334}
335static inline u32 therm_grad_stepping0_feature_v(u32 r)
336{
337 return (r >> 0U) & 0x1U;
338}
339static inline u32 therm_grad_stepping0_feature_enable_f(void)
340{
341 return 0x1U;
342}
343static inline u32 therm_grad_stepping1_r(void)
344{
345 return 0x000202c4U;
346}
347static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
348{
349 return (v & 0x1ffffU) << 0U;
350}
351static inline u32 therm_clk_timing_r(u32 i)
352{
353 return 0x000203c0U + i*4U;
354}
355static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
356{
357 return (v & 0x1U) << 16U;
358}
359static inline u32 therm_clk_timing_grad_slowdown_m(void)
360{
361 return 0x1U << 16U;
362}
363static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
364{
365 return 0x10000U;
366}
367#endif
diff --git a/include/nvgpu/hw/gk20a/hw_timer_gk20a.h b/include/nvgpu/hw/gk20a/hw_timer_gk20a.h
deleted file mode 100644
index 972d68a..0000000
--- a/include/nvgpu/hw/gk20a/hw_timer_gk20a.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_timer_gk20a_h_
57#define _hw_timer_gk20a_h_
58
59static inline u32 timer_pri_timeout_r(void)
60{
61 return 0x00009080U;
62}
63static inline u32 timer_pri_timeout_period_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 timer_pri_timeout_period_m(void)
68{
69 return 0xffffffU << 0U;
70}
71static inline u32 timer_pri_timeout_period_v(u32 r)
72{
73 return (r >> 0U) & 0xffffffU;
74}
75static inline u32 timer_pri_timeout_en_f(u32 v)
76{
77 return (v & 0x1U) << 31U;
78}
79static inline u32 timer_pri_timeout_en_m(void)
80{
81 return 0x1U << 31U;
82}
83static inline u32 timer_pri_timeout_en_v(u32 r)
84{
85 return (r >> 31U) & 0x1U;
86}
87static inline u32 timer_pri_timeout_en_en_enabled_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 timer_pri_timeout_en_en_disabled_f(void)
92{
93 return 0x0U;
94}
95static inline u32 timer_pri_timeout_save_0_r(void)
96{
97 return 0x00009084U;
98}
99static inline u32 timer_pri_timeout_save_0_fecs_tgt_v(u32 r)
100{
101 return (r >> 31U) & 0x1U;
102}
103static inline u32 timer_pri_timeout_save_0_addr_v(u32 r)
104{
105 return (r >> 2U) & 0x3fffffU;
106}
107static inline u32 timer_pri_timeout_save_0_write_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 timer_pri_timeout_save_1_r(void)
112{
113 return 0x00009088U;
114}
115static inline u32 timer_pri_timeout_fecs_errcode_r(void)
116{
117 return 0x0000908cU;
118}
119static inline u32 timer_time_0_r(void)
120{
121 return 0x00009400U;
122}
123static inline u32 timer_time_1_r(void)
124{
125 return 0x00009410U;
126}
127#endif
diff --git a/include/nvgpu/hw/gk20a/hw_top_gk20a.h b/include/nvgpu/hw/gk20a/hw_top_gk20a.h
deleted file mode 100644
index be7fa4a..0000000
--- a/include/nvgpu/hw/gk20a/hw_top_gk20a.h
+++ /dev/null
@@ -1,211 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_top_gk20a_h_
57#define _hw_top_gk20a_h_
58
59static inline u32 top_num_gpcs_r(void)
60{
61 return 0x00022430U;
62}
63static inline u32 top_num_gpcs_value_v(u32 r)
64{
65 return (r >> 0U) & 0x1fU;
66}
67static inline u32 top_tpc_per_gpc_r(void)
68{
69 return 0x00022434U;
70}
71static inline u32 top_tpc_per_gpc_value_v(u32 r)
72{
73 return (r >> 0U) & 0x1fU;
74}
75static inline u32 top_num_fbps_r(void)
76{
77 return 0x00022438U;
78}
79static inline u32 top_num_fbps_value_v(u32 r)
80{
81 return (r >> 0U) & 0x1fU;
82}
83static inline u32 top_device_info_r(u32 i)
84{
85 return 0x00022700U + i*4U;
86}
87static inline u32 top_device_info__size_1_v(void)
88{
89 return 0x00000040U;
90}
91static inline u32 top_device_info_chain_v(u32 r)
92{
93 return (r >> 31U) & 0x1U;
94}
95static inline u32 top_device_info_chain_enable_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 top_device_info_engine_enum_v(u32 r)
100{
101 return (r >> 26U) & 0xfU;
102}
103static inline u32 top_device_info_runlist_enum_v(u32 r)
104{
105 return (r >> 21U) & 0xfU;
106}
107static inline u32 top_device_info_intr_enum_v(u32 r)
108{
109 return (r >> 15U) & 0x1fU;
110}
111static inline u32 top_device_info_reset_enum_v(u32 r)
112{
113 return (r >> 9U) & 0x1fU;
114}
115static inline u32 top_device_info_type_enum_v(u32 r)
116{
117 return (r >> 2U) & 0x1fffffffU;
118}
119static inline u32 top_device_info_type_enum_graphics_v(void)
120{
121 return 0x00000000U;
122}
123static inline u32 top_device_info_type_enum_graphics_f(void)
124{
125 return 0x0U;
126}
127static inline u32 top_device_info_type_enum_copy0_v(void)
128{
129 return 0x00000001U;
130}
131static inline u32 top_device_info_type_enum_copy0_f(void)
132{
133 return 0x4U;
134}
135static inline u32 top_device_info_type_enum_copy1_v(void)
136{
137 return 0x00000002U;
138}
139static inline u32 top_device_info_type_enum_copy1_f(void)
140{
141 return 0x8U;
142}
143static inline u32 top_device_info_type_enum_copy2_v(void)
144{
145 return 0x00000003U;
146}
147static inline u32 top_device_info_type_enum_copy2_f(void)
148{
149 return 0xcU;
150}
151static inline u32 top_device_info_engine_v(u32 r)
152{
153 return (r >> 5U) & 0x1U;
154}
155static inline u32 top_device_info_runlist_v(u32 r)
156{
157 return (r >> 4U) & 0x1U;
158}
159static inline u32 top_device_info_intr_v(u32 r)
160{
161 return (r >> 3U) & 0x1U;
162}
163static inline u32 top_device_info_reset_v(u32 r)
164{
165 return (r >> 2U) & 0x1U;
166}
167static inline u32 top_device_info_entry_v(u32 r)
168{
169 return (r >> 0U) & 0x3U;
170}
171static inline u32 top_device_info_entry_not_valid_v(void)
172{
173 return 0x00000000U;
174}
175static inline u32 top_device_info_entry_enum_v(void)
176{
177 return 0x00000002U;
178}
179static inline u32 top_device_info_entry_engine_type_v(void)
180{
181 return 0x00000003U;
182}
183static inline u32 top_device_info_entry_data_v(void)
184{
185 return 0x00000001U;
186}
187static inline u32 top_fs_status_fbp_r(void)
188{
189 return 0x00022548U;
190}
191static inline u32 top_fs_status_fbp_cluster_v(u32 r)
192{
193 return (r >> 0U) & 0xffffU;
194}
195static inline u32 top_fs_status_fbp_cluster_enable_v(void)
196{
197 return 0x00000000U;
198}
199static inline u32 top_fs_status_fbp_cluster_enable_f(void)
200{
201 return 0x0U;
202}
203static inline u32 top_fs_status_fbp_cluster_disable_v(void)
204{
205 return 0x00000001U;
206}
207static inline u32 top_fs_status_fbp_cluster_disable_f(void)
208{
209 return 0x1U;
210}
211#endif
diff --git a/include/nvgpu/hw/gk20a/hw_trim_gk20a.h b/include/nvgpu/hw/gk20a/hw_trim_gk20a.h
deleted file mode 100644
index f28c21f..0000000
--- a/include/nvgpu/hw/gk20a/hw_trim_gk20a.h
+++ /dev/null
@@ -1,315 +0,0 @@
1/*
2 * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_trim_gk20a_h_
57#define _hw_trim_gk20a_h_
58
59static inline u32 trim_sys_gpcpll_cfg_r(void)
60{
61 return 0x00137000U;
62}
63static inline u32 trim_sys_gpcpll_cfg_enable_m(void)
64{
65 return 0x1U << 0U;
66}
67static inline u32 trim_sys_gpcpll_cfg_enable_v(u32 r)
68{
69 return (r >> 0U) & 0x1U;
70}
71static inline u32 trim_sys_gpcpll_cfg_enable_no_f(void)
72{
73 return 0x0U;
74}
75static inline u32 trim_sys_gpcpll_cfg_enable_yes_f(void)
76{
77 return 0x1U;
78}
79static inline u32 trim_sys_gpcpll_cfg_iddq_m(void)
80{
81 return 0x1U << 1U;
82}
83static inline u32 trim_sys_gpcpll_cfg_iddq_v(u32 r)
84{
85 return (r >> 1U) & 0x1U;
86}
87static inline u32 trim_sys_gpcpll_cfg_iddq_power_on_v(void)
88{
89 return 0x00000000U;
90}
91static inline u32 trim_sys_gpcpll_cfg_enb_lckdet_m(void)
92{
93 return 0x1U << 4U;
94}
95static inline u32 trim_sys_gpcpll_cfg_enb_lckdet_power_on_f(void)
96{
97 return 0x0U;
98}
99static inline u32 trim_sys_gpcpll_cfg_enb_lckdet_power_off_f(void)
100{
101 return 0x10U;
102}
103static inline u32 trim_sys_gpcpll_cfg_pll_lock_v(u32 r)
104{
105 return (r >> 17U) & 0x1U;
106}
107static inline u32 trim_sys_gpcpll_cfg_pll_lock_true_f(void)
108{
109 return 0x20000U;
110}
111static inline u32 trim_sys_gpcpll_coeff_r(void)
112{
113 return 0x00137004U;
114}
115static inline u32 trim_sys_gpcpll_coeff_mdiv_f(u32 v)
116{
117 return (v & 0xffU) << 0U;
118}
119static inline u32 trim_sys_gpcpll_coeff_mdiv_m(void)
120{
121 return 0xffU << 0U;
122}
123static inline u32 trim_sys_gpcpll_coeff_mdiv_v(u32 r)
124{
125 return (r >> 0U) & 0xffU;
126}
127static inline u32 trim_sys_gpcpll_coeff_ndiv_f(u32 v)
128{
129 return (v & 0xffU) << 8U;
130}
131static inline u32 trim_sys_gpcpll_coeff_ndiv_m(void)
132{
133 return 0xffU << 8U;
134}
135static inline u32 trim_sys_gpcpll_coeff_ndiv_v(u32 r)
136{
137 return (r >> 8U) & 0xffU;
138}
139static inline u32 trim_sys_gpcpll_coeff_pldiv_f(u32 v)
140{
141 return (v & 0x3fU) << 16U;
142}
143static inline u32 trim_sys_gpcpll_coeff_pldiv_m(void)
144{
145 return 0x3fU << 16U;
146}
147static inline u32 trim_sys_gpcpll_coeff_pldiv_v(u32 r)
148{
149 return (r >> 16U) & 0x3fU;
150}
151static inline u32 trim_sys_sel_vco_r(void)
152{
153 return 0x00137100U;
154}
155static inline u32 trim_sys_sel_vco_gpc2clk_out_m(void)
156{
157 return 0x1U << 0U;
158}
159static inline u32 trim_sys_sel_vco_gpc2clk_out_init_v(void)
160{
161 return 0x00000000U;
162}
163static inline u32 trim_sys_sel_vco_gpc2clk_out_init_f(void)
164{
165 return 0x0U;
166}
167static inline u32 trim_sys_sel_vco_gpc2clk_out_bypass_f(void)
168{
169 return 0x0U;
170}
171static inline u32 trim_sys_sel_vco_gpc2clk_out_vco_f(void)
172{
173 return 0x1U;
174}
175static inline u32 trim_sys_gpc2clk_out_r(void)
176{
177 return 0x00137250U;
178}
179static inline u32 trim_sys_gpc2clk_out_bypdiv_s(void)
180{
181 return 6U;
182}
183static inline u32 trim_sys_gpc2clk_out_bypdiv_f(u32 v)
184{
185 return (v & 0x3fU) << 0U;
186}
187static inline u32 trim_sys_gpc2clk_out_bypdiv_m(void)
188{
189 return 0x3fU << 0U;
190}
191static inline u32 trim_sys_gpc2clk_out_bypdiv_v(u32 r)
192{
193 return (r >> 0U) & 0x3fU;
194}
195static inline u32 trim_sys_gpc2clk_out_bypdiv_by31_f(void)
196{
197 return 0x3cU;
198}
199static inline u32 trim_sys_gpc2clk_out_vcodiv_s(void)
200{
201 return 6U;
202}
203static inline u32 trim_sys_gpc2clk_out_vcodiv_f(u32 v)
204{
205 return (v & 0x3fU) << 8U;
206}
207static inline u32 trim_sys_gpc2clk_out_vcodiv_m(void)
208{
209 return 0x3fU << 8U;
210}
211static inline u32 trim_sys_gpc2clk_out_vcodiv_v(u32 r)
212{
213 return (r >> 8U) & 0x3fU;
214}
215static inline u32 trim_sys_gpc2clk_out_vcodiv_by1_f(void)
216{
217 return 0x0U;
218}
219static inline u32 trim_sys_gpc2clk_out_sdiv14_m(void)
220{
221 return 0x1U << 31U;
222}
223static inline u32 trim_sys_gpc2clk_out_sdiv14_indiv4_mode_f(void)
224{
225 return 0x80000000U;
226}
227static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_r(u32 i)
228{
229 return 0x00134124U + i*512U;
230}
231static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_noofipclks_f(u32 v)
232{
233 return (v & 0x3fffU) << 0U;
234}
235static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_write_en_asserted_f(void)
236{
237 return 0x10000U;
238}
239static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_enable_asserted_f(void)
240{
241 return 0x100000U;
242}
243static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_reset_asserted_f(void)
244{
245 return 0x1000000U;
246}
247static inline u32 trim_gpc_clk_cntr_ncgpcclk_cnt_r(u32 i)
248{
249 return 0x00134128U + i*512U;
250}
251static inline u32 trim_gpc_clk_cntr_ncgpcclk_cnt_value_v(u32 r)
252{
253 return (r >> 0U) & 0xfffffU;
254}
255static inline u32 trim_sys_gpcpll_cfg2_r(void)
256{
257 return 0x0013700cU;
258}
259static inline u32 trim_sys_gpcpll_cfg2_pll_stepa_f(u32 v)
260{
261 return (v & 0xffU) << 24U;
262}
263static inline u32 trim_sys_gpcpll_cfg2_pll_stepa_m(void)
264{
265 return 0xffU << 24U;
266}
267static inline u32 trim_sys_gpcpll_cfg3_r(void)
268{
269 return 0x00137018U;
270}
271static inline u32 trim_sys_gpcpll_cfg3_pll_stepb_f(u32 v)
272{
273 return (v & 0xffU) << 16U;
274}
275static inline u32 trim_sys_gpcpll_cfg3_pll_stepb_m(void)
276{
277 return 0xffU << 16U;
278}
279static inline u32 trim_sys_gpcpll_ndiv_slowdown_r(void)
280{
281 return 0x0013701cU;
282}
283static inline u32 trim_sys_gpcpll_ndiv_slowdown_slowdown_using_pll_m(void)
284{
285 return 0x1U << 22U;
286}
287static inline u32 trim_sys_gpcpll_ndiv_slowdown_slowdown_using_pll_yes_f(void)
288{
289 return 0x400000U;
290}
291static inline u32 trim_sys_gpcpll_ndiv_slowdown_slowdown_using_pll_no_f(void)
292{
293 return 0x0U;
294}
295static inline u32 trim_sys_gpcpll_ndiv_slowdown_en_dynramp_m(void)
296{
297 return 0x1U << 31U;
298}
299static inline u32 trim_sys_gpcpll_ndiv_slowdown_en_dynramp_yes_f(void)
300{
301 return 0x80000000U;
302}
303static inline u32 trim_sys_gpcpll_ndiv_slowdown_en_dynramp_no_f(void)
304{
305 return 0x0U;
306}
307static inline u32 trim_gpc_bcast_gpcpll_ndiv_slowdown_debug_r(void)
308{
309 return 0x001328a0U;
310}
311static inline u32 trim_gpc_bcast_gpcpll_ndiv_slowdown_debug_pll_dynramp_done_synced_v(u32 r)
312{
313 return (r >> 24U) & 0x1U;
314}
315#endif
diff --git a/include/nvgpu/hw/gm20b/hw_bus_gm20b.h b/include/nvgpu/hw/gm20b/hw_bus_gm20b.h
deleted file mode 100644
index 15cddae..0000000
--- a/include/nvgpu/hw/gm20b/hw_bus_gm20b.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_bus_gm20b_h_
57#define _hw_bus_gm20b_h_
58
59static inline u32 bus_bar0_window_r(void)
60{
61 return 0x00001700U;
62}
63static inline u32 bus_bar0_window_base_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 bus_bar0_window_target_vid_mem_f(void)
68{
69 return 0x0U;
70}
71static inline u32 bus_bar0_window_target_sys_mem_coherent_f(void)
72{
73 return 0x2000000U;
74}
75static inline u32 bus_bar0_window_target_sys_mem_noncoherent_f(void)
76{
77 return 0x3000000U;
78}
79static inline u32 bus_bar0_window_target_bar0_window_base_shift_v(void)
80{
81 return 0x00000010U;
82}
83static inline u32 bus_bar1_block_r(void)
84{
85 return 0x00001704U;
86}
87static inline u32 bus_bar1_block_ptr_f(u32 v)
88{
89 return (v & 0xfffffffU) << 0U;
90}
91static inline u32 bus_bar1_block_target_vid_mem_f(void)
92{
93 return 0x0U;
94}
95static inline u32 bus_bar1_block_target_sys_mem_coh_f(void)
96{
97 return 0x20000000U;
98}
99static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void)
100{
101 return 0x30000000U;
102}
103static inline u32 bus_bar1_block_mode_virtual_f(void)
104{
105 return 0x80000000U;
106}
107static inline u32 bus_bar2_block_r(void)
108{
109 return 0x00001714U;
110}
111static inline u32 bus_bar2_block_ptr_f(u32 v)
112{
113 return (v & 0xfffffffU) << 0U;
114}
115static inline u32 bus_bar2_block_target_vid_mem_f(void)
116{
117 return 0x0U;
118}
119static inline u32 bus_bar2_block_target_sys_mem_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void)
124{
125 return 0x30000000U;
126}
127static inline u32 bus_bar2_block_mode_virtual_f(void)
128{
129 return 0x80000000U;
130}
131static inline u32 bus_bar1_block_ptr_shift_v(void)
132{
133 return 0x0000000cU;
134}
135static inline u32 bus_bar2_block_ptr_shift_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 bus_bind_status_r(void)
140{
141 return 0x00001710U;
142}
143static inline u32 bus_bind_status_bar1_pending_v(u32 r)
144{
145 return (r >> 0U) & 0x1U;
146}
147static inline u32 bus_bind_status_bar1_pending_empty_f(void)
148{
149 return 0x0U;
150}
151static inline u32 bus_bind_status_bar1_pending_busy_f(void)
152{
153 return 0x1U;
154}
155static inline u32 bus_bind_status_bar1_outstanding_v(u32 r)
156{
157 return (r >> 1U) & 0x1U;
158}
159static inline u32 bus_bind_status_bar1_outstanding_false_f(void)
160{
161 return 0x0U;
162}
163static inline u32 bus_bind_status_bar1_outstanding_true_f(void)
164{
165 return 0x2U;
166}
167static inline u32 bus_bind_status_bar2_pending_v(u32 r)
168{
169 return (r >> 2U) & 0x1U;
170}
171static inline u32 bus_bind_status_bar2_pending_empty_f(void)
172{
173 return 0x0U;
174}
175static inline u32 bus_bind_status_bar2_pending_busy_f(void)
176{
177 return 0x4U;
178}
179static inline u32 bus_bind_status_bar2_outstanding_v(u32 r)
180{
181 return (r >> 3U) & 0x1U;
182}
183static inline u32 bus_bind_status_bar2_outstanding_false_f(void)
184{
185 return 0x0U;
186}
187static inline u32 bus_bind_status_bar2_outstanding_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 bus_intr_0_r(void)
192{
193 return 0x00001100U;
194}
195static inline u32 bus_intr_0_pri_squash_m(void)
196{
197 return 0x1U << 1U;
198}
199static inline u32 bus_intr_0_pri_fecserr_m(void)
200{
201 return 0x1U << 2U;
202}
203static inline u32 bus_intr_0_pri_timeout_m(void)
204{
205 return 0x1U << 3U;
206}
207static inline u32 bus_intr_en_0_r(void)
208{
209 return 0x00001140U;
210}
211static inline u32 bus_intr_en_0_pri_squash_m(void)
212{
213 return 0x1U << 1U;
214}
215static inline u32 bus_intr_en_0_pri_fecserr_m(void)
216{
217 return 0x1U << 2U;
218}
219static inline u32 bus_intr_en_0_pri_timeout_m(void)
220{
221 return 0x1U << 3U;
222}
223#endif
diff --git a/include/nvgpu/hw/gm20b/hw_ccsr_gm20b.h b/include/nvgpu/hw/gm20b/hw_ccsr_gm20b.h
deleted file mode 100644
index adfce72..0000000
--- a/include/nvgpu/hw/gm20b/hw_ccsr_gm20b.h
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ccsr_gm20b_h_
57#define _hw_ccsr_gm20b_h_
58
59static inline u32 ccsr_channel_inst_r(u32 i)
60{
61 return 0x00800000U + i*8U;
62}
63static inline u32 ccsr_channel_inst__size_1_v(void)
64{
65 return 0x00000200U;
66}
67static inline u32 ccsr_channel_inst_ptr_f(u32 v)
68{
69 return (v & 0xfffffffU) << 0U;
70}
71static inline u32 ccsr_channel_inst_target_vid_mem_f(void)
72{
73 return 0x0U;
74}
75static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void)
76{
77 return 0x20000000U;
78}
79static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void)
80{
81 return 0x30000000U;
82}
83static inline u32 ccsr_channel_inst_bind_false_f(void)
84{
85 return 0x0U;
86}
87static inline u32 ccsr_channel_inst_bind_true_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 ccsr_channel_r(u32 i)
92{
93 return 0x00800004U + i*8U;
94}
95static inline u32 ccsr_channel__size_1_v(void)
96{
97 return 0x00000200U;
98}
99static inline u32 ccsr_channel_enable_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 ccsr_channel_enable_set_f(u32 v)
104{
105 return (v & 0x1U) << 10U;
106}
107static inline u32 ccsr_channel_enable_set_true_f(void)
108{
109 return 0x400U;
110}
111static inline u32 ccsr_channel_enable_clr_true_f(void)
112{
113 return 0x800U;
114}
115static inline u32 ccsr_channel_status_v(u32 r)
116{
117 return (r >> 24U) & 0xfU;
118}
119static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
120{
121 return 0x00000002U;
122}
123static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
124{
125 return 0x00000004U;
126}
127static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
128{
129 return 0x0000000aU;
130}
131static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
132{
133 return 0x0000000bU;
134}
135static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
140{
141 return 0x0000000dU;
142}
143static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
144{
145 return 0x0000000eU;
146}
147static inline u32 ccsr_channel_next_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 ccsr_channel_next_true_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 ccsr_channel_force_ctx_reload_true_f(void)
156{
157 return 0x100U;
158}
159static inline u32 ccsr_channel_busy_v(u32 r)
160{
161 return (r >> 28U) & 0x1U;
162}
163#endif
diff --git a/include/nvgpu/hw/gm20b/hw_ce2_gm20b.h b/include/nvgpu/hw/gm20b/hw_ce2_gm20b.h
deleted file mode 100644
index fb741a7..0000000
--- a/include/nvgpu/hw/gm20b/hw_ce2_gm20b.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ce2_gm20b_h_
57#define _hw_ce2_gm20b_h_
58
59static inline u32 ce2_intr_status_r(void)
60{
61 return 0x00106908U;
62}
63static inline u32 ce2_intr_status_blockpipe_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 ce2_intr_status_blockpipe_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 ce2_intr_status_nonblockpipe_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 ce2_intr_status_nonblockpipe_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 ce2_intr_status_launcherr_pending_f(void)
80{
81 return 0x4U;
82}
83static inline u32 ce2_intr_status_launcherr_reset_f(void)
84{
85 return 0x4U;
86}
87#endif
diff --git a/include/nvgpu/hw/gm20b/hw_ctxsw_prog_gm20b.h b/include/nvgpu/hw/gm20b/hw_ctxsw_prog_gm20b.h
deleted file mode 100644
index 6b5632a..0000000
--- a/include/nvgpu/hw/gm20b/hw_ctxsw_prog_gm20b.h
+++ /dev/null
@@ -1,475 +0,0 @@
1/*
2 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ctxsw_prog_gm20b_h_
57#define _hw_ctxsw_prog_gm20b_h_
58
59static inline u32 ctxsw_prog_fecs_header_v(void)
60{
61 return 0x00000100U;
62}
63static inline u32 ctxsw_prog_main_image_num_gpcs_o(void)
64{
65 return 0x00000008U;
66}
67static inline u32 ctxsw_prog_main_image_ctl_o(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 ctxsw_prog_main_image_ctl_cde_enabled_f(void)
72{
73 return 0x400U;
74}
75static inline u32 ctxsw_prog_main_image_ctl_cde_disabled_f(void)
76{
77 return 0x0U;
78}
79static inline u32 ctxsw_prog_main_image_patch_count_o(void)
80{
81 return 0x00000010U;
82}
83static inline u32 ctxsw_prog_main_image_context_id_o(void)
84{
85 return 0x000000f0U;
86}
87static inline u32 ctxsw_prog_main_image_patch_adr_lo_o(void)
88{
89 return 0x00000014U;
90}
91static inline u32 ctxsw_prog_main_image_patch_adr_hi_o(void)
92{
93 return 0x00000018U;
94}
95static inline u32 ctxsw_prog_main_image_zcull_o(void)
96{
97 return 0x0000001cU;
98}
99static inline u32 ctxsw_prog_main_image_zcull_mode_no_ctxsw_v(void)
100{
101 return 0x00000001U;
102}
103static inline u32 ctxsw_prog_main_image_zcull_mode_separate_buffer_v(void)
104{
105 return 0x00000002U;
106}
107static inline u32 ctxsw_prog_main_image_zcull_ptr_o(void)
108{
109 return 0x00000020U;
110}
111static inline u32 ctxsw_prog_main_image_pm_o(void)
112{
113 return 0x00000028U;
114}
115static inline u32 ctxsw_prog_main_image_pm_mode_m(void)
116{
117 return 0x7U << 0U;
118}
119static inline u32 ctxsw_prog_main_image_pm_mode_ctxsw_f(void)
120{
121 return 0x1U;
122}
123static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void)
124{
125 return 0x0U;
126}
127static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void)
128{
129 return 0x7U << 3U;
130}
131static inline u32 ctxsw_prog_main_image_pm_smpc_mode_ctxsw_f(void)
132{
133 return 0x8U;
134}
135static inline u32 ctxsw_prog_main_image_pm_smpc_mode_no_ctxsw_f(void)
136{
137 return 0x0U;
138}
139static inline u32 ctxsw_prog_main_image_pm_pc_sampling_f(u32 v)
140{
141 return (v & 0x1U) << 6U;
142}
143static inline u32 ctxsw_prog_main_image_pm_pc_sampling_m(void)
144{
145 return 0x1U << 6U;
146}
147static inline u32 ctxsw_prog_main_image_pm_ptr_o(void)
148{
149 return 0x0000002cU;
150}
151static inline u32 ctxsw_prog_main_image_num_save_ops_o(void)
152{
153 return 0x000000f4U;
154}
155static inline u32 ctxsw_prog_main_image_num_restore_ops_o(void)
156{
157 return 0x000000f8U;
158}
159static inline u32 ctxsw_prog_main_image_magic_value_o(void)
160{
161 return 0x000000fcU;
162}
163static inline u32 ctxsw_prog_main_image_magic_value_v_value_v(void)
164{
165 return 0x600dc0deU;
166}
167static inline u32 ctxsw_prog_local_priv_register_ctl_o(void)
168{
169 return 0x0000000cU;
170}
171static inline u32 ctxsw_prog_local_priv_register_ctl_offset_v(u32 r)
172{
173 return (r >> 0U) & 0xffffU;
174}
175static inline u32 ctxsw_prog_local_image_ppc_info_o(void)
176{
177 return 0x000000f4U;
178}
179static inline u32 ctxsw_prog_local_image_ppc_info_num_ppcs_v(u32 r)
180{
181 return (r >> 0U) & 0xffffU;
182}
183static inline u32 ctxsw_prog_local_image_ppc_info_ppc_mask_v(u32 r)
184{
185 return (r >> 16U) & 0xffffU;
186}
187static inline u32 ctxsw_prog_local_image_num_tpcs_o(void)
188{
189 return 0x000000f8U;
190}
191static inline u32 ctxsw_prog_local_magic_value_o(void)
192{
193 return 0x000000fcU;
194}
195static inline u32 ctxsw_prog_local_magic_value_v_value_v(void)
196{
197 return 0xad0becabU;
198}
199static inline u32 ctxsw_prog_main_extended_buffer_ctl_o(void)
200{
201 return 0x000000ecU;
202}
203static inline u32 ctxsw_prog_main_extended_buffer_ctl_offset_v(u32 r)
204{
205 return (r >> 0U) & 0xffffU;
206}
207static inline u32 ctxsw_prog_main_extended_buffer_ctl_size_v(u32 r)
208{
209 return (r >> 16U) & 0xffU;
210}
211static inline u32 ctxsw_prog_extended_buffer_segments_size_in_bytes_v(void)
212{
213 return 0x00000100U;
214}
215static inline u32 ctxsw_prog_extended_marker_size_in_bytes_v(void)
216{
217 return 0x00000004U;
218}
219static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_register_stride_v(void)
220{
221 return 0x00000000U;
222}
223static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_control_register_stride_v(void)
224{
225 return 0x00000002U;
226}
227static inline u32 ctxsw_prog_main_image_priv_access_map_config_o(void)
228{
229 return 0x000000a0U;
230}
231static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_s(void)
232{
233 return 2U;
234}
235static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_f(u32 v)
236{
237 return (v & 0x3U) << 0U;
238}
239static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_m(void)
240{
241 return 0x3U << 0U;
242}
243static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_v(u32 r)
244{
245 return (r >> 0U) & 0x3U;
246}
247static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_allow_all_f(void)
248{
249 return 0x0U;
250}
251static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f(void)
252{
253 return 0x2U;
254}
255static inline u32 ctxsw_prog_main_image_priv_access_map_addr_lo_o(void)
256{
257 return 0x000000a4U;
258}
259static inline u32 ctxsw_prog_main_image_priv_access_map_addr_hi_o(void)
260{
261 return 0x000000a8U;
262}
263static inline u32 ctxsw_prog_main_image_misc_options_o(void)
264{
265 return 0x0000003cU;
266}
267static inline u32 ctxsw_prog_main_image_misc_options_verif_features_m(void)
268{
269 return 0x1U << 3U;
270}
271static inline u32 ctxsw_prog_main_image_misc_options_verif_features_disabled_f(void)
272{
273 return 0x0U;
274}
275static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_o(void)
276{
277 return 0x000000acU;
278}
279static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_num_records_f(u32 v)
280{
281 return (v & 0xffffU) << 0U;
282}
283static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_o(void)
284{
285 return 0x000000b0U;
286}
287static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_v_m(void)
288{
289 return 0xfffffffU << 0U;
290}
291static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_m(void)
292{
293 return 0x3U << 28U;
294}
295static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_vid_mem_f(void)
296{
297 return 0x0U;
298}
299static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_coherent_f(void)
300{
301 return 0x20000000U;
302}
303static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_noncoherent_f(void)
304{
305 return 0x30000000U;
306}
307static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(void)
308{
309 return 0x000000b4U;
310}
311static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_v_f(u32 v)
312{
313 return (v & 0xffffffffU) << 0U;
314}
315static inline u32 ctxsw_prog_record_timestamp_record_size_in_bytes_v(void)
316{
317 return 0x00000080U;
318}
319static inline u32 ctxsw_prog_record_timestamp_record_size_in_words_v(void)
320{
321 return 0x00000020U;
322}
323static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_o(void)
324{
325 return 0x00000000U;
326}
327static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_v_value_v(void)
328{
329 return 0x00000000U;
330}
331static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_o(void)
332{
333 return 0x00000004U;
334}
335static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_v_value_v(void)
336{
337 return 0x600dbeefU;
338}
339static inline u32 ctxsw_prog_record_timestamp_context_id_o(void)
340{
341 return 0x00000008U;
342}
343static inline u32 ctxsw_prog_record_timestamp_context_ptr_o(void)
344{
345 return 0x0000000cU;
346}
347static inline u32 ctxsw_prog_record_timestamp_new_context_id_o(void)
348{
349 return 0x00000010U;
350}
351static inline u32 ctxsw_prog_record_timestamp_new_context_ptr_o(void)
352{
353 return 0x00000014U;
354}
355static inline u32 ctxsw_prog_record_timestamp_timestamp_lo_o(void)
356{
357 return 0x00000018U;
358}
359static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_o(void)
360{
361 return 0x0000001cU;
362}
363static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_f(u32 v)
364{
365 return (v & 0xffffffU) << 0U;
366}
367static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_v(u32 r)
368{
369 return (r >> 0U) & 0xffffffU;
370}
371static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_f(u32 v)
372{
373 return (v & 0xffU) << 24U;
374}
375static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_m(void)
376{
377 return 0xffU << 24U;
378}
379static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_v(u32 r)
380{
381 return (r >> 24U) & 0xffU;
382}
383static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_v(void)
384{
385 return 0x00000001U;
386}
387static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_f(void)
388{
389 return 0x1000000U;
390}
391static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_v(void)
392{
393 return 0x00000002U;
394}
395static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_f(void)
396{
397 return 0x2000000U;
398}
399static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_v(void)
400{
401 return 0x0000000aU;
402}
403static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_f(void)
404{
405 return 0xa000000U;
406}
407static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_v(void)
408{
409 return 0x0000000bU;
410}
411static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_f(void)
412{
413 return 0xb000000U;
414}
415static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_v(void)
416{
417 return 0x0000000cU;
418}
419static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_f(void)
420{
421 return 0xc000000U;
422}
423static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_v(void)
424{
425 return 0x0000000dU;
426}
427static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_f(void)
428{
429 return 0xd000000U;
430}
431static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_v(void)
432{
433 return 0x00000003U;
434}
435static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_f(void)
436{
437 return 0x3000000U;
438}
439static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_v(void)
440{
441 return 0x00000004U;
442}
443static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_f(void)
444{
445 return 0x4000000U;
446}
447static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_v(void)
448{
449 return 0x00000005U;
450}
451static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_f(void)
452{
453 return 0x5000000U;
454}
455static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_v(void)
456{
457 return 0x000000ffU;
458}
459static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_f(void)
460{
461 return 0xff000000U;
462}
463static inline u32 ctxsw_prog_main_image_preemption_options_o(void)
464{
465 return 0x00000060U;
466}
467static inline u32 ctxsw_prog_main_image_preemption_options_control_f(u32 v)
468{
469 return (v & 0x3U) << 0U;
470}
471static inline u32 ctxsw_prog_main_image_preemption_options_control_cta_enabled_f(void)
472{
473 return 0x1U;
474}
475#endif
diff --git a/include/nvgpu/hw/gm20b/hw_falcon_gm20b.h b/include/nvgpu/hw/gm20b/hw_falcon_gm20b.h
deleted file mode 100644
index c598568..0000000
--- a/include/nvgpu/hw/gm20b/hw_falcon_gm20b.h
+++ /dev/null
@@ -1,599 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_falcon_gm20b_h_
57#define _hw_falcon_gm20b_h_
58
59static inline u32 falcon_falcon_irqsset_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 falcon_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 falcon_falcon_irqsclr_r(void)
68{
69 return 0x00000004U;
70}
71static inline u32 falcon_falcon_irqstat_r(void)
72{
73 return 0x00000008U;
74}
75static inline u32 falcon_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 falcon_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 falcon_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 falcon_falcon_irqmode_r(void)
88{
89 return 0x0000000cU;
90}
91static inline u32 falcon_falcon_irqmset_r(void)
92{
93 return 0x00000010U;
94}
95static inline u32 falcon_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 falcon_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 falcon_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 falcon_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 falcon_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 falcon_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 falcon_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 falcon_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 falcon_falcon_irqmclr_r(void)
128{
129 return 0x00000014U;
130}
131static inline u32 falcon_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 falcon_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 falcon_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 falcon_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 falcon_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 falcon_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 falcon_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 falcon_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 falcon_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 falcon_falcon_irqmask_r(void)
168{
169 return 0x00000018U;
170}
171static inline u32 falcon_falcon_irqdest_r(void)
172{
173 return 0x0000001cU;
174}
175static inline u32 falcon_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 falcon_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 falcon_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 falcon_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 falcon_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 falcon_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 falcon_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 falcon_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 falcon_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 falcon_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 falcon_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 falcon_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 falcon_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 falcon_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 falcon_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 falcon_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 falcon_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 falcon_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 falcon_falcon_curctx_r(void)
248{
249 return 0x00000050U;
250}
251static inline u32 falcon_falcon_nxtctx_r(void)
252{
253 return 0x00000054U;
254}
255static inline u32 falcon_falcon_mailbox0_r(void)
256{
257 return 0x00000040U;
258}
259static inline u32 falcon_falcon_mailbox1_r(void)
260{
261 return 0x00000044U;
262}
263static inline u32 falcon_falcon_itfen_r(void)
264{
265 return 0x00000048U;
266}
267static inline u32 falcon_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 falcon_falcon_idlestate_r(void)
272{
273 return 0x0000004cU;
274}
275static inline u32 falcon_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 falcon_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 falcon_falcon_os_r(void)
284{
285 return 0x00000080U;
286}
287static inline u32 falcon_falcon_engctl_r(void)
288{
289 return 0x000000a4U;
290}
291static inline u32 falcon_falcon_cpuctl_r(void)
292{
293 return 0x00000100U;
294}
295static inline u32 falcon_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 falcon_falcon_cpuctl_sreset_f(u32 v)
300{
301 return (v & 0x1U) << 2U;
302}
303static inline u32 falcon_falcon_cpuctl_hreset_f(u32 v)
304{
305 return (v & 0x1U) << 3U;
306}
307static inline u32 falcon_falcon_cpuctl_halt_intr_f(u32 v)
308{
309 return (v & 0x1U) << 4U;
310}
311static inline u32 falcon_falcon_cpuctl_halt_intr_m(void)
312{
313 return 0x1U << 4U;
314}
315static inline u32 falcon_falcon_cpuctl_halt_intr_v(u32 r)
316{
317 return (r >> 4U) & 0x1U;
318}
319static inline u32 falcon_falcon_cpuctl_stopped_m(void)
320{
321 return 0x1U << 5U;
322}
323static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
324{
325 return (v & 0x1U) << 6U;
326}
327static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_m(void)
328{
329 return 0x1U << 6U;
330}
331static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
332{
333 return (r >> 6U) & 0x1U;
334}
335static inline u32 falcon_falcon_cpuctl_alias_r(void)
336{
337 return 0x00000130U;
338}
339static inline u32 falcon_falcon_cpuctl_alias_startcpu_f(u32 v)
340{
341 return (v & 0x1U) << 1U;
342}
343static inline u32 falcon_falcon_imemc_r(u32 i)
344{
345 return 0x00000180U + i*16U;
346}
347static inline u32 falcon_falcon_imemc_offs_f(u32 v)
348{
349 return (v & 0x3fU) << 2U;
350}
351static inline u32 falcon_falcon_imemc_blk_f(u32 v)
352{
353 return (v & 0xffU) << 8U;
354}
355static inline u32 falcon_falcon_imemc_aincw_f(u32 v)
356{
357 return (v & 0x1U) << 24U;
358}
359static inline u32 falcon_falcon_imemc_secure_f(u32 v)
360{
361 return (v & 0x1U) << 28U;
362}
363static inline u32 falcon_falcon_imemd_r(u32 i)
364{
365 return 0x00000184U + i*16U;
366}
367static inline u32 falcon_falcon_imemt_r(u32 i)
368{
369 return 0x00000188U + i*16U;
370}
371static inline u32 falcon_falcon_sctl_r(void)
372{
373 return 0x00000240U;
374}
375static inline u32 falcon_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 falcon_falcon_bootvec_r(void)
380{
381 return 0x00000104U;
382}
383static inline u32 falcon_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 falcon_falcon_dmactl_r(void)
388{
389 return 0x0000010cU;
390}
391static inline u32 falcon_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 falcon_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 falcon_falcon_dmactl_require_ctx_f(u32 v)
400{
401 return (v & 0x1U) << 0U;
402}
403static inline u32 falcon_falcon_hwcfg_r(void)
404{
405 return 0x00000108U;
406}
407static inline u32 falcon_falcon_hwcfg_imem_size_v(u32 r)
408{
409 return (r >> 0U) & 0x1ffU;
410}
411static inline u32 falcon_falcon_hwcfg_dmem_size_v(u32 r)
412{
413 return (r >> 9U) & 0x1ffU;
414}
415static inline u32 falcon_falcon_dmatrfbase_r(void)
416{
417 return 0x00000110U;
418}
419static inline u32 falcon_falcon_dmatrfmoffs_r(void)
420{
421 return 0x00000114U;
422}
423static inline u32 falcon_falcon_dmatrfcmd_r(void)
424{
425 return 0x00000118U;
426}
427static inline u32 falcon_falcon_dmatrfcmd_imem_f(u32 v)
428{
429 return (v & 0x1U) << 4U;
430}
431static inline u32 falcon_falcon_dmatrfcmd_write_f(u32 v)
432{
433 return (v & 0x1U) << 5U;
434}
435static inline u32 falcon_falcon_dmatrfcmd_size_f(u32 v)
436{
437 return (v & 0x7U) << 8U;
438}
439static inline u32 falcon_falcon_dmatrfcmd_ctxdma_f(u32 v)
440{
441 return (v & 0x7U) << 12U;
442}
443static inline u32 falcon_falcon_dmatrffboffs_r(void)
444{
445 return 0x0000011cU;
446}
447static inline u32 falcon_falcon_imctl_debug_r(void)
448{
449 return 0x0000015cU;
450}
451static inline u32 falcon_falcon_imctl_debug_addr_blk_f(u32 v)
452{
453 return (v & 0xffffffU) << 0U;
454}
455static inline u32 falcon_falcon_imctl_debug_cmd_f(u32 v)
456{
457 return (v & 0x7U) << 24U;
458}
459static inline u32 falcon_falcon_imstat_r(void)
460{
461 return 0x00000144U;
462}
463static inline u32 falcon_falcon_traceidx_r(void)
464{
465 return 0x00000148U;
466}
467static inline u32 falcon_falcon_traceidx_maxidx_v(u32 r)
468{
469 return (r >> 16U) & 0xffU;
470}
471static inline u32 falcon_falcon_traceidx_idx_f(u32 v)
472{
473 return (v & 0xffU) << 0U;
474}
475static inline u32 falcon_falcon_tracepc_r(void)
476{
477 return 0x0000014cU;
478}
479static inline u32 falcon_falcon_tracepc_pc_v(u32 r)
480{
481 return (r >> 0U) & 0xffffffU;
482}
483static inline u32 falcon_falcon_exterraddr_r(void)
484{
485 return 0x00000168U;
486}
487static inline u32 falcon_falcon_exterrstat_r(void)
488{
489 return 0x0000016cU;
490}
491static inline u32 falcon_falcon_exterrstat_valid_m(void)
492{
493 return 0x1U << 31U;
494}
495static inline u32 falcon_falcon_exterrstat_valid_v(u32 r)
496{
497 return (r >> 31U) & 0x1U;
498}
499static inline u32 falcon_falcon_exterrstat_valid_true_v(void)
500{
501 return 0x00000001U;
502}
503static inline u32 falcon_falcon_icd_cmd_r(void)
504{
505 return 0x00000200U;
506}
507static inline u32 falcon_falcon_icd_cmd_opc_s(void)
508{
509 return 4U;
510}
511static inline u32 falcon_falcon_icd_cmd_opc_f(u32 v)
512{
513 return (v & 0xfU) << 0U;
514}
515static inline u32 falcon_falcon_icd_cmd_opc_m(void)
516{
517 return 0xfU << 0U;
518}
519static inline u32 falcon_falcon_icd_cmd_opc_v(u32 r)
520{
521 return (r >> 0U) & 0xfU;
522}
523static inline u32 falcon_falcon_icd_cmd_opc_rreg_f(void)
524{
525 return 0x8U;
526}
527static inline u32 falcon_falcon_icd_cmd_opc_rstat_f(void)
528{
529 return 0xeU;
530}
531static inline u32 falcon_falcon_icd_cmd_idx_f(u32 v)
532{
533 return (v & 0x1fU) << 8U;
534}
535static inline u32 falcon_falcon_icd_rdata_r(void)
536{
537 return 0x0000020cU;
538}
539static inline u32 falcon_falcon_dmemc_r(u32 i)
540{
541 return 0x000001c0U + i*8U;
542}
543static inline u32 falcon_falcon_dmemc_offs_f(u32 v)
544{
545 return (v & 0x3fU) << 2U;
546}
547static inline u32 falcon_falcon_dmemc_offs_m(void)
548{
549 return 0x3fU << 2U;
550}
551static inline u32 falcon_falcon_dmemc_blk_f(u32 v)
552{
553 return (v & 0xffU) << 8U;
554}
555static inline u32 falcon_falcon_dmemc_blk_m(void)
556{
557 return 0xffU << 8U;
558}
559static inline u32 falcon_falcon_dmemc_aincw_f(u32 v)
560{
561 return (v & 0x1U) << 24U;
562}
563static inline u32 falcon_falcon_dmemc_aincr_f(u32 v)
564{
565 return (v & 0x1U) << 25U;
566}
567static inline u32 falcon_falcon_dmemd_r(u32 i)
568{
569 return 0x000001c4U + i*8U;
570}
571static inline u32 falcon_falcon_debug1_r(void)
572{
573 return 0x00000090U;
574}
575static inline u32 falcon_falcon_debug1_ctxsw_mode_s(void)
576{
577 return 1U;
578}
579static inline u32 falcon_falcon_debug1_ctxsw_mode_f(u32 v)
580{
581 return (v & 0x1U) << 16U;
582}
583static inline u32 falcon_falcon_debug1_ctxsw_mode_m(void)
584{
585 return 0x1U << 16U;
586}
587static inline u32 falcon_falcon_debug1_ctxsw_mode_v(u32 r)
588{
589 return (r >> 16U) & 0x1U;
590}
591static inline u32 falcon_falcon_debug1_ctxsw_mode_init_f(void)
592{
593 return 0x0U;
594}
595static inline u32 falcon_falcon_debuginfo_r(void)
596{
597 return 0x00000094U;
598}
599#endif
diff --git a/include/nvgpu/hw/gm20b/hw_fb_gm20b.h b/include/nvgpu/hw/gm20b/hw_fb_gm20b.h
deleted file mode 100644
index e6464c1..0000000
--- a/include/nvgpu/hw/gm20b/hw_fb_gm20b.h
+++ /dev/null
@@ -1,339 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fb_gm20b_h_
57#define _hw_fb_gm20b_h_
58
59static inline u32 fb_fbhub_num_active_ltcs_r(void)
60{
61 return 0x00100800U;
62}
63static inline u32 fb_mmu_ctrl_r(void)
64{
65 return 0x00100c80U;
66}
67static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r)
68{
69 return (r >> 15U) & 0x1U;
70}
71static inline u32 fb_mmu_ctrl_pri_fifo_empty_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r)
76{
77 return (r >> 16U) & 0xffU;
78}
79static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_v(u32 r)
80{
81 return (r >> 11U) & 0x1U;
82}
83static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_true_f(void)
84{
85 return 0x800U;
86}
87static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_false_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fb_mmu_ctrl_use_full_comp_tag_line_v(u32 r)
92{
93 return (r >> 12U) & 0x1U;
94}
95static inline u32 fb_mmu_ctrl_use_full_comp_tag_line_true_f(void)
96{
97 return 0x1000U;
98}
99static inline u32 fb_priv_mmu_phy_secure_r(void)
100{
101 return 0x00100ce4U;
102}
103static inline u32 fb_mmu_invalidate_pdb_r(void)
104{
105 return 0x00100cb8U;
106}
107static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void)
108{
109 return 0x0U;
110}
111static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void)
112{
113 return 0x2U;
114}
115static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v)
116{
117 return (v & 0xfffffffU) << 4U;
118}
119static inline u32 fb_mmu_invalidate_r(void)
120{
121 return 0x00100cbcU;
122}
123static inline u32 fb_mmu_invalidate_all_va_true_f(void)
124{
125 return 0x1U;
126}
127static inline u32 fb_mmu_invalidate_all_pdb_true_f(void)
128{
129 return 0x2U;
130}
131static inline u32 fb_mmu_invalidate_trigger_s(void)
132{
133 return 1U;
134}
135static inline u32 fb_mmu_invalidate_trigger_f(u32 v)
136{
137 return (v & 0x1U) << 31U;
138}
139static inline u32 fb_mmu_invalidate_trigger_m(void)
140{
141 return 0x1U << 31U;
142}
143static inline u32 fb_mmu_invalidate_trigger_v(u32 r)
144{
145 return (r >> 31U) & 0x1U;
146}
147static inline u32 fb_mmu_invalidate_trigger_true_f(void)
148{
149 return 0x80000000U;
150}
151static inline u32 fb_mmu_debug_wr_r(void)
152{
153 return 0x00100cc8U;
154}
155static inline u32 fb_mmu_debug_wr_aperture_s(void)
156{
157 return 2U;
158}
159static inline u32 fb_mmu_debug_wr_aperture_f(u32 v)
160{
161 return (v & 0x3U) << 0U;
162}
163static inline u32 fb_mmu_debug_wr_aperture_m(void)
164{
165 return 0x3U << 0U;
166}
167static inline u32 fb_mmu_debug_wr_aperture_v(u32 r)
168{
169 return (r >> 0U) & 0x3U;
170}
171static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void)
172{
173 return 0x0U;
174}
175static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void)
176{
177 return 0x2U;
178}
179static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void)
180{
181 return 0x3U;
182}
183static inline u32 fb_mmu_debug_wr_vol_false_f(void)
184{
185 return 0x0U;
186}
187static inline u32 fb_mmu_debug_wr_vol_true_v(void)
188{
189 return 0x00000001U;
190}
191static inline u32 fb_mmu_debug_wr_vol_true_f(void)
192{
193 return 0x4U;
194}
195static inline u32 fb_mmu_debug_wr_addr_f(u32 v)
196{
197 return (v & 0xfffffffU) << 4U;
198}
199static inline u32 fb_mmu_debug_wr_addr_alignment_v(void)
200{
201 return 0x0000000cU;
202}
203static inline u32 fb_mmu_debug_rd_r(void)
204{
205 return 0x00100cccU;
206}
207static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void)
208{
209 return 0x0U;
210}
211static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void)
212{
213 return 0x2U;
214}
215static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void)
216{
217 return 0x3U;
218}
219static inline u32 fb_mmu_debug_rd_vol_false_f(void)
220{
221 return 0x0U;
222}
223static inline u32 fb_mmu_debug_rd_addr_f(u32 v)
224{
225 return (v & 0xfffffffU) << 4U;
226}
227static inline u32 fb_mmu_debug_rd_addr_alignment_v(void)
228{
229 return 0x0000000cU;
230}
231static inline u32 fb_mmu_debug_ctrl_r(void)
232{
233 return 0x00100cc4U;
234}
235static inline u32 fb_mmu_debug_ctrl_debug_v(u32 r)
236{
237 return (r >> 16U) & 0x1U;
238}
239static inline u32 fb_mmu_debug_ctrl_debug_m(void)
240{
241 return 0x1U << 16U;
242}
243static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void)
244{
245 return 0x00000001U;
246}
247static inline u32 fb_mmu_debug_ctrl_debug_enabled_f(void)
248{
249 return 0x10000U;
250}
251static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void)
252{
253 return 0x00000000U;
254}
255static inline u32 fb_mmu_debug_ctrl_debug_disabled_f(void)
256{
257 return 0x0U;
258}
259static inline u32 fb_mmu_vpr_info_r(void)
260{
261 return 0x00100cd0U;
262}
263static inline u32 fb_mmu_vpr_info_index_f(u32 v)
264{
265 return (v & 0x3U) << 0U;
266}
267static inline u32 fb_mmu_vpr_info_index_v(u32 r)
268{
269 return (r >> 0U) & 0x3U;
270}
271static inline u32 fb_mmu_vpr_info_index_addr_lo_v(void)
272{
273 return 0x00000000U;
274}
275static inline u32 fb_mmu_vpr_info_index_addr_hi_v(void)
276{
277 return 0x00000001U;
278}
279static inline u32 fb_mmu_vpr_info_index_cya_lo_v(void)
280{
281 return 0x00000002U;
282}
283static inline u32 fb_mmu_vpr_info_index_cya_hi_v(void)
284{
285 return 0x00000003U;
286}
287static inline u32 fb_mmu_vpr_info_fetch_f(u32 v)
288{
289 return (v & 0x1U) << 2U;
290}
291static inline u32 fb_mmu_vpr_info_fetch_v(u32 r)
292{
293 return (r >> 2U) & 0x1U;
294}
295static inline u32 fb_mmu_vpr_info_fetch_false_v(void)
296{
297 return 0x00000000U;
298}
299static inline u32 fb_mmu_vpr_info_fetch_true_v(void)
300{
301 return 0x00000001U;
302}
303static inline u32 fb_mmu_wpr_info_r(void)
304{
305 return 0x00100cd4U;
306}
307static inline u32 fb_mmu_wpr_info_index_f(u32 v)
308{
309 return (v & 0xfU) << 0U;
310}
311static inline u32 fb_mmu_wpr_info_index_allow_read_v(void)
312{
313 return 0x00000000U;
314}
315static inline u32 fb_mmu_wpr_info_index_allow_write_v(void)
316{
317 return 0x00000001U;
318}
319static inline u32 fb_mmu_wpr_info_index_wpr1_addr_lo_v(void)
320{
321 return 0x00000002U;
322}
323static inline u32 fb_mmu_wpr_info_index_wpr1_addr_hi_v(void)
324{
325 return 0x00000003U;
326}
327static inline u32 fb_mmu_wpr_info_index_wpr2_addr_lo_v(void)
328{
329 return 0x00000004U;
330}
331static inline u32 fb_mmu_wpr_info_index_wpr2_addr_hi_v(void)
332{
333 return 0x00000005U;
334}
335static inline u32 fb_niso_flush_sysmem_addr_r(void)
336{
337 return 0x00100c10U;
338}
339#endif
diff --git a/include/nvgpu/hw/gm20b/hw_fifo_gm20b.h b/include/nvgpu/hw/gm20b/hw_fifo_gm20b.h
deleted file mode 100644
index d32506d..0000000
--- a/include/nvgpu/hw/gm20b/hw_fifo_gm20b.h
+++ /dev/null
@@ -1,571 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fifo_gm20b_h_
57#define _hw_fifo_gm20b_h_
58
59static inline u32 fifo_bar1_base_r(void)
60{
61 return 0x00002254U;
62}
63static inline u32 fifo_bar1_base_ptr_f(u32 v)
64{
65 return (v & 0xfffffffU) << 0U;
66}
67static inline u32 fifo_bar1_base_ptr_align_shift_v(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 fifo_bar1_base_valid_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fifo_bar1_base_valid_true_f(void)
76{
77 return 0x10000000U;
78}
79static inline u32 fifo_runlist_base_r(void)
80{
81 return 0x00002270U;
82}
83static inline u32 fifo_runlist_base_ptr_f(u32 v)
84{
85 return (v & 0xfffffffU) << 0U;
86}
87static inline u32 fifo_runlist_base_target_vid_mem_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void)
92{
93 return 0x20000000U;
94}
95static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void)
96{
97 return 0x30000000U;
98}
99static inline u32 fifo_runlist_r(void)
100{
101 return 0x00002274U;
102}
103static inline u32 fifo_runlist_engine_f(u32 v)
104{
105 return (v & 0xfU) << 20U;
106}
107static inline u32 fifo_eng_runlist_base_r(u32 i)
108{
109 return 0x00002280U + i*8U;
110}
111static inline u32 fifo_eng_runlist_base__size_1_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 fifo_eng_runlist_r(u32 i)
116{
117 return 0x00002284U + i*8U;
118}
119static inline u32 fifo_eng_runlist__size_1_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 fifo_eng_runlist_length_f(u32 v)
124{
125 return (v & 0xffffU) << 0U;
126}
127static inline u32 fifo_eng_runlist_length_max_v(void)
128{
129 return 0x0000ffffU;
130}
131static inline u32 fifo_eng_runlist_pending_true_f(void)
132{
133 return 0x100000U;
134}
135static inline u32 fifo_pb_timeslice_r(u32 i)
136{
137 return 0x00002350U + i*4U;
138}
139static inline u32 fifo_pb_timeslice_timeout_16_f(void)
140{
141 return 0x10U;
142}
143static inline u32 fifo_pb_timeslice_timescale_0_f(void)
144{
145 return 0x0U;
146}
147static inline u32 fifo_pb_timeslice_enable_true_f(void)
148{
149 return 0x10000000U;
150}
151static inline u32 fifo_pbdma_map_r(u32 i)
152{
153 return 0x00002390U + i*4U;
154}
155static inline u32 fifo_intr_0_r(void)
156{
157 return 0x00002100U;
158}
159static inline u32 fifo_intr_0_bind_error_pending_f(void)
160{
161 return 0x1U;
162}
163static inline u32 fifo_intr_0_bind_error_reset_f(void)
164{
165 return 0x1U;
166}
167static inline u32 fifo_intr_0_sched_error_pending_f(void)
168{
169 return 0x100U;
170}
171static inline u32 fifo_intr_0_sched_error_reset_f(void)
172{
173 return 0x100U;
174}
175static inline u32 fifo_intr_0_chsw_error_pending_f(void)
176{
177 return 0x10000U;
178}
179static inline u32 fifo_intr_0_chsw_error_reset_f(void)
180{
181 return 0x10000U;
182}
183static inline u32 fifo_intr_0_fb_flush_timeout_pending_f(void)
184{
185 return 0x800000U;
186}
187static inline u32 fifo_intr_0_fb_flush_timeout_reset_f(void)
188{
189 return 0x800000U;
190}
191static inline u32 fifo_intr_0_lb_error_pending_f(void)
192{
193 return 0x1000000U;
194}
195static inline u32 fifo_intr_0_lb_error_reset_f(void)
196{
197 return 0x1000000U;
198}
199static inline u32 fifo_intr_0_dropped_mmu_fault_pending_f(void)
200{
201 return 0x8000000U;
202}
203static inline u32 fifo_intr_0_dropped_mmu_fault_reset_f(void)
204{
205 return 0x8000000U;
206}
207static inline u32 fifo_intr_0_mmu_fault_pending_f(void)
208{
209 return 0x10000000U;
210}
211static inline u32 fifo_intr_0_pbdma_intr_pending_f(void)
212{
213 return 0x20000000U;
214}
215static inline u32 fifo_intr_0_runlist_event_pending_f(void)
216{
217 return 0x40000000U;
218}
219static inline u32 fifo_intr_0_channel_intr_pending_f(void)
220{
221 return 0x80000000U;
222}
223static inline u32 fifo_intr_en_0_r(void)
224{
225 return 0x00002140U;
226}
227static inline u32 fifo_intr_en_0_sched_error_f(u32 v)
228{
229 return (v & 0x1U) << 8U;
230}
231static inline u32 fifo_intr_en_0_sched_error_m(void)
232{
233 return 0x1U << 8U;
234}
235static inline u32 fifo_intr_en_0_mmu_fault_f(u32 v)
236{
237 return (v & 0x1U) << 28U;
238}
239static inline u32 fifo_intr_en_0_mmu_fault_m(void)
240{
241 return 0x1U << 28U;
242}
243static inline u32 fifo_intr_en_1_r(void)
244{
245 return 0x00002528U;
246}
247static inline u32 fifo_intr_bind_error_r(void)
248{
249 return 0x0000252cU;
250}
251static inline u32 fifo_intr_sched_error_r(void)
252{
253 return 0x0000254cU;
254}
255static inline u32 fifo_intr_sched_error_code_f(u32 v)
256{
257 return (v & 0xffU) << 0U;
258}
259static inline u32 fifo_intr_sched_error_code_ctxsw_timeout_v(void)
260{
261 return 0x0000000aU;
262}
263static inline u32 fifo_intr_chsw_error_r(void)
264{
265 return 0x0000256cU;
266}
267static inline u32 fifo_intr_mmu_fault_id_r(void)
268{
269 return 0x0000259cU;
270}
271static inline u32 fifo_intr_mmu_fault_eng_id_graphics_v(void)
272{
273 return 0x00000000U;
274}
275static inline u32 fifo_intr_mmu_fault_eng_id_graphics_f(void)
276{
277 return 0x0U;
278}
279static inline u32 fifo_intr_mmu_fault_inst_r(u32 i)
280{
281 return 0x00002800U + i*16U;
282}
283static inline u32 fifo_intr_mmu_fault_inst_ptr_v(u32 r)
284{
285 return (r >> 0U) & 0xfffffffU;
286}
287static inline u32 fifo_intr_mmu_fault_inst_ptr_align_shift_v(void)
288{
289 return 0x0000000cU;
290}
291static inline u32 fifo_intr_mmu_fault_lo_r(u32 i)
292{
293 return 0x00002804U + i*16U;
294}
295static inline u32 fifo_intr_mmu_fault_hi_r(u32 i)
296{
297 return 0x00002808U + i*16U;
298}
299static inline u32 fifo_intr_mmu_fault_info_r(u32 i)
300{
301 return 0x0000280cU + i*16U;
302}
303static inline u32 fifo_intr_mmu_fault_info_type_v(u32 r)
304{
305 return (r >> 0U) & 0xfU;
306}
307static inline u32 fifo_intr_mmu_fault_info_write_v(u32 r)
308{
309 return (r >> 7U) & 0x1U;
310}
311static inline u32 fifo_intr_mmu_fault_info_engine_subid_v(u32 r)
312{
313 return (r >> 6U) & 0x1U;
314}
315static inline u32 fifo_intr_mmu_fault_info_engine_subid_gpc_v(void)
316{
317 return 0x00000000U;
318}
319static inline u32 fifo_intr_mmu_fault_info_engine_subid_hub_v(void)
320{
321 return 0x00000001U;
322}
323static inline u32 fifo_intr_mmu_fault_info_client_v(u32 r)
324{
325 return (r >> 8U) & 0x3fU;
326}
327static inline u32 fifo_intr_pbdma_id_r(void)
328{
329 return 0x000025a0U;
330}
331static inline u32 fifo_intr_pbdma_id_status_f(u32 v, u32 i)
332{
333 return (v & 0x1U) << (0U + i*1U);
334}
335static inline u32 fifo_intr_pbdma_id_status_v(u32 r, u32 i)
336{
337 return (r >> (0U + i*1U)) & 0x1U;
338}
339static inline u32 fifo_intr_pbdma_id_status__size_1_v(void)
340{
341 return 0x00000001U;
342}
343static inline u32 fifo_intr_runlist_r(void)
344{
345 return 0x00002a00U;
346}
347static inline u32 fifo_fb_timeout_r(void)
348{
349 return 0x00002a04U;
350}
351static inline u32 fifo_fb_timeout_period_m(void)
352{
353 return 0x3fffffffU << 0U;
354}
355static inline u32 fifo_fb_timeout_period_max_f(void)
356{
357 return 0x3fffffffU;
358}
359static inline u32 fifo_error_sched_disable_r(void)
360{
361 return 0x0000262cU;
362}
363static inline u32 fifo_sched_disable_r(void)
364{
365 return 0x00002630U;
366}
367static inline u32 fifo_sched_disable_runlist_f(u32 v, u32 i)
368{
369 return (v & 0x1U) << (0U + i*1U);
370}
371static inline u32 fifo_sched_disable_runlist_m(u32 i)
372{
373 return 0x1U << (0U + i*1U);
374}
375static inline u32 fifo_sched_disable_true_v(void)
376{
377 return 0x00000001U;
378}
379static inline u32 fifo_preempt_r(void)
380{
381 return 0x00002634U;
382}
383static inline u32 fifo_preempt_pending_true_f(void)
384{
385 return 0x100000U;
386}
387static inline u32 fifo_preempt_type_channel_f(void)
388{
389 return 0x0U;
390}
391static inline u32 fifo_preempt_type_tsg_f(void)
392{
393 return 0x1000000U;
394}
395static inline u32 fifo_preempt_chid_f(u32 v)
396{
397 return (v & 0xfffU) << 0U;
398}
399static inline u32 fifo_preempt_id_f(u32 v)
400{
401 return (v & 0xfffU) << 0U;
402}
403static inline u32 fifo_trigger_mmu_fault_r(u32 i)
404{
405 return 0x00002a30U + i*4U;
406}
407static inline u32 fifo_trigger_mmu_fault_id_f(u32 v)
408{
409 return (v & 0x1fU) << 0U;
410}
411static inline u32 fifo_trigger_mmu_fault_enable_f(u32 v)
412{
413 return (v & 0x1U) << 8U;
414}
415static inline u32 fifo_engine_status_r(u32 i)
416{
417 return 0x00002640U + i*8U;
418}
419static inline u32 fifo_engine_status__size_1_v(void)
420{
421 return 0x00000002U;
422}
423static inline u32 fifo_engine_status_id_v(u32 r)
424{
425 return (r >> 0U) & 0xfffU;
426}
427static inline u32 fifo_engine_status_id_type_v(u32 r)
428{
429 return (r >> 12U) & 0x1U;
430}
431static inline u32 fifo_engine_status_id_type_chid_v(void)
432{
433 return 0x00000000U;
434}
435static inline u32 fifo_engine_status_id_type_tsgid_v(void)
436{
437 return 0x00000001U;
438}
439static inline u32 fifo_engine_status_ctx_status_v(u32 r)
440{
441 return (r >> 13U) & 0x7U;
442}
443static inline u32 fifo_engine_status_ctx_status_invalid_v(void)
444{
445 return 0x00000000U;
446}
447static inline u32 fifo_engine_status_ctx_status_valid_v(void)
448{
449 return 0x00000001U;
450}
451static inline u32 fifo_engine_status_ctx_status_ctxsw_load_v(void)
452{
453 return 0x00000005U;
454}
455static inline u32 fifo_engine_status_ctx_status_ctxsw_save_v(void)
456{
457 return 0x00000006U;
458}
459static inline u32 fifo_engine_status_ctx_status_ctxsw_switch_v(void)
460{
461 return 0x00000007U;
462}
463static inline u32 fifo_engine_status_next_id_v(u32 r)
464{
465 return (r >> 16U) & 0xfffU;
466}
467static inline u32 fifo_engine_status_next_id_type_v(u32 r)
468{
469 return (r >> 28U) & 0x1U;
470}
471static inline u32 fifo_engine_status_next_id_type_chid_v(void)
472{
473 return 0x00000000U;
474}
475static inline u32 fifo_engine_status_faulted_v(u32 r)
476{
477 return (r >> 30U) & 0x1U;
478}
479static inline u32 fifo_engine_status_faulted_true_v(void)
480{
481 return 0x00000001U;
482}
483static inline u32 fifo_engine_status_engine_v(u32 r)
484{
485 return (r >> 31U) & 0x1U;
486}
487static inline u32 fifo_engine_status_engine_idle_v(void)
488{
489 return 0x00000000U;
490}
491static inline u32 fifo_engine_status_engine_busy_v(void)
492{
493 return 0x00000001U;
494}
495static inline u32 fifo_engine_status_ctxsw_v(u32 r)
496{
497 return (r >> 15U) & 0x1U;
498}
499static inline u32 fifo_engine_status_ctxsw_in_progress_v(void)
500{
501 return 0x00000001U;
502}
503static inline u32 fifo_engine_status_ctxsw_in_progress_f(void)
504{
505 return 0x8000U;
506}
507static inline u32 fifo_pbdma_status_r(u32 i)
508{
509 return 0x00003080U + i*4U;
510}
511static inline u32 fifo_pbdma_status__size_1_v(void)
512{
513 return 0x00000001U;
514}
515static inline u32 fifo_pbdma_status_id_v(u32 r)
516{
517 return (r >> 0U) & 0xfffU;
518}
519static inline u32 fifo_pbdma_status_id_type_v(u32 r)
520{
521 return (r >> 12U) & 0x1U;
522}
523static inline u32 fifo_pbdma_status_id_type_chid_v(void)
524{
525 return 0x00000000U;
526}
527static inline u32 fifo_pbdma_status_id_type_tsgid_v(void)
528{
529 return 0x00000001U;
530}
531static inline u32 fifo_pbdma_status_chan_status_v(u32 r)
532{
533 return (r >> 13U) & 0x7U;
534}
535static inline u32 fifo_pbdma_status_chan_status_valid_v(void)
536{
537 return 0x00000001U;
538}
539static inline u32 fifo_pbdma_status_chan_status_chsw_load_v(void)
540{
541 return 0x00000005U;
542}
543static inline u32 fifo_pbdma_status_chan_status_chsw_save_v(void)
544{
545 return 0x00000006U;
546}
547static inline u32 fifo_pbdma_status_chan_status_chsw_switch_v(void)
548{
549 return 0x00000007U;
550}
551static inline u32 fifo_pbdma_status_next_id_v(u32 r)
552{
553 return (r >> 16U) & 0xfffU;
554}
555static inline u32 fifo_pbdma_status_next_id_type_v(u32 r)
556{
557 return (r >> 28U) & 0x1U;
558}
559static inline u32 fifo_pbdma_status_next_id_type_chid_v(void)
560{
561 return 0x00000000U;
562}
563static inline u32 fifo_pbdma_status_chsw_v(u32 r)
564{
565 return (r >> 15U) & 0x1U;
566}
567static inline u32 fifo_pbdma_status_chsw_in_progress_v(void)
568{
569 return 0x00000001U;
570}
571#endif
diff --git a/include/nvgpu/hw/gm20b/hw_flush_gm20b.h b/include/nvgpu/hw/gm20b/hw_flush_gm20b.h
deleted file mode 100644
index 3b5801b..0000000
--- a/include/nvgpu/hw/gm20b/hw_flush_gm20b.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_flush_gm20b_h_
57#define _hw_flush_gm20b_h_
58
59static inline u32 flush_l2_system_invalidate_r(void)
60{
61 return 0x00070004U;
62}
63static inline u32 flush_l2_system_invalidate_pending_v(u32 r)
64{
65 return (r >> 0U) & 0x1U;
66}
67static inline u32 flush_l2_system_invalidate_pending_busy_v(void)
68{
69 return 0x00000001U;
70}
71static inline u32 flush_l2_system_invalidate_pending_busy_f(void)
72{
73 return 0x1U;
74}
75static inline u32 flush_l2_system_invalidate_outstanding_v(u32 r)
76{
77 return (r >> 1U) & 0x1U;
78}
79static inline u32 flush_l2_system_invalidate_outstanding_true_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 flush_l2_flush_dirty_r(void)
84{
85 return 0x00070010U;
86}
87static inline u32 flush_l2_flush_dirty_pending_v(u32 r)
88{
89 return (r >> 0U) & 0x1U;
90}
91static inline u32 flush_l2_flush_dirty_pending_empty_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 flush_l2_flush_dirty_pending_empty_f(void)
96{
97 return 0x0U;
98}
99static inline u32 flush_l2_flush_dirty_pending_busy_v(void)
100{
101 return 0x00000001U;
102}
103static inline u32 flush_l2_flush_dirty_pending_busy_f(void)
104{
105 return 0x1U;
106}
107static inline u32 flush_l2_flush_dirty_outstanding_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 flush_l2_flush_dirty_outstanding_false_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 flush_l2_flush_dirty_outstanding_false_f(void)
116{
117 return 0x0U;
118}
119static inline u32 flush_l2_flush_dirty_outstanding_true_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 flush_l2_clean_comptags_r(void)
124{
125 return 0x0007000cU;
126}
127static inline u32 flush_l2_clean_comptags_pending_v(u32 r)
128{
129 return (r >> 0U) & 0x1U;
130}
131static inline u32 flush_l2_clean_comptags_pending_empty_v(void)
132{
133 return 0x00000000U;
134}
135static inline u32 flush_l2_clean_comptags_pending_empty_f(void)
136{
137 return 0x0U;
138}
139static inline u32 flush_l2_clean_comptags_pending_busy_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 flush_l2_clean_comptags_pending_busy_f(void)
144{
145 return 0x1U;
146}
147static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 flush_l2_clean_comptags_outstanding_false_v(void)
152{
153 return 0x00000000U;
154}
155static inline u32 flush_l2_clean_comptags_outstanding_false_f(void)
156{
157 return 0x0U;
158}
159static inline u32 flush_l2_clean_comptags_outstanding_true_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 flush_fb_flush_r(void)
164{
165 return 0x00070000U;
166}
167static inline u32 flush_fb_flush_pending_v(u32 r)
168{
169 return (r >> 0U) & 0x1U;
170}
171static inline u32 flush_fb_flush_pending_busy_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 flush_fb_flush_pending_busy_f(void)
176{
177 return 0x1U;
178}
179static inline u32 flush_fb_flush_outstanding_v(u32 r)
180{
181 return (r >> 1U) & 0x1U;
182}
183static inline u32 flush_fb_flush_outstanding_true_v(void)
184{
185 return 0x00000001U;
186}
187#endif
diff --git a/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h b/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h
deleted file mode 100644
index d97eb7d..0000000
--- a/include/nvgpu/hw/gm20b/hw_fuse_gm20b.h
+++ /dev/null
@@ -1,147 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fuse_gm20b_h_
57#define _hw_fuse_gm20b_h_
58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
64{
65 return 0x00021c38U + i*4U;
66}
67static inline u32 fuse_ctrl_opt_tpc_gpc_r(u32 i)
68{
69 return 0x00021838U + i*4U;
70}
71static inline u32 fuse_ctrl_opt_ram_svop_pdp_r(void)
72{
73 return 0x00021944U;
74}
75static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_f(u32 v)
76{
77 return (v & 0x3U) << 0U;
78}
79static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_m(void)
80{
81 return 0x3U << 0U;
82}
83static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_v(u32 r)
84{
85 return (r >> 0U) & 0x3U;
86}
87static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_r(void)
88{
89 return 0x00021948U;
90}
91static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_f(u32 v)
92{
93 return (v & 0x1U) << 0U;
94}
95static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_m(void)
96{
97 return 0x1U << 0U;
98}
99static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_yes_f(void)
104{
105 return 0x1U;
106}
107static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_no_f(void)
108{
109 return 0x0U;
110}
111static inline u32 fuse_status_opt_fbio_r(void)
112{
113 return 0x00021c14U;
114}
115static inline u32 fuse_status_opt_fbio_data_f(u32 v)
116{
117 return (v & 0xffffU) << 0U;
118}
119static inline u32 fuse_status_opt_fbio_data_m(void)
120{
121 return 0xffffU << 0U;
122}
123static inline u32 fuse_status_opt_fbio_data_v(u32 r)
124{
125 return (r >> 0U) & 0xffffU;
126}
127static inline u32 fuse_status_opt_rop_l2_fbp_r(u32 i)
128{
129 return 0x00021d70U + i*4U;
130}
131static inline u32 fuse_status_opt_fbp_r(void)
132{
133 return 0x00021d38U;
134}
135static inline u32 fuse_status_opt_fbp_idx_v(u32 r, u32 i)
136{
137 return (r >> (0U + i*1U)) & 0x1U;
138}
139static inline u32 fuse_opt_sec_debug_en_r(void)
140{
141 return 0x00021218U;
142}
143static inline u32 fuse_opt_priv_sec_en_r(void)
144{
145 return 0x00021434U;
146}
147#endif
diff --git a/include/nvgpu/hw/gm20b/hw_gmmu_gm20b.h b/include/nvgpu/hw/gm20b/hw_gmmu_gm20b.h
deleted file mode 100644
index 11cc3d7..0000000
--- a/include/nvgpu/hw/gm20b/hw_gmmu_gm20b.h
+++ /dev/null
@@ -1,283 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gmmu_gm20b_h_
57#define _hw_gmmu_gm20b_h_
58
59static inline u32 gmmu_pde_aperture_big_w(void)
60{
61 return 0U;
62}
63static inline u32 gmmu_pde_aperture_big_invalid_f(void)
64{
65 return 0x0U;
66}
67static inline u32 gmmu_pde_aperture_big_video_memory_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gmmu_pde_aperture_big_sys_mem_coh_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gmmu_pde_aperture_big_sys_mem_ncoh_f(void)
76{
77 return 0x3U;
78}
79static inline u32 gmmu_pde_size_w(void)
80{
81 return 0U;
82}
83static inline u32 gmmu_pde_size_full_f(void)
84{
85 return 0x0U;
86}
87static inline u32 gmmu_pde_address_big_sys_f(u32 v)
88{
89 return (v & 0xfffffffU) << 4U;
90}
91static inline u32 gmmu_pde_address_big_sys_w(void)
92{
93 return 0U;
94}
95static inline u32 gmmu_pde_aperture_small_w(void)
96{
97 return 1U;
98}
99static inline u32 gmmu_pde_aperture_small_invalid_f(void)
100{
101 return 0x0U;
102}
103static inline u32 gmmu_pde_aperture_small_video_memory_f(void)
104{
105 return 0x1U;
106}
107static inline u32 gmmu_pde_aperture_small_sys_mem_coh_f(void)
108{
109 return 0x2U;
110}
111static inline u32 gmmu_pde_aperture_small_sys_mem_ncoh_f(void)
112{
113 return 0x3U;
114}
115static inline u32 gmmu_pde_vol_small_w(void)
116{
117 return 1U;
118}
119static inline u32 gmmu_pde_vol_small_true_f(void)
120{
121 return 0x4U;
122}
123static inline u32 gmmu_pde_vol_small_false_f(void)
124{
125 return 0x0U;
126}
127static inline u32 gmmu_pde_vol_big_w(void)
128{
129 return 1U;
130}
131static inline u32 gmmu_pde_vol_big_true_f(void)
132{
133 return 0x8U;
134}
135static inline u32 gmmu_pde_vol_big_false_f(void)
136{
137 return 0x0U;
138}
139static inline u32 gmmu_pde_address_small_sys_f(u32 v)
140{
141 return (v & 0xfffffffU) << 4U;
142}
143static inline u32 gmmu_pde_address_small_sys_w(void)
144{
145 return 1U;
146}
147static inline u32 gmmu_pde_address_shift_v(void)
148{
149 return 0x0000000cU;
150}
151static inline u32 gmmu_pde__size_v(void)
152{
153 return 0x00000008U;
154}
155static inline u32 gmmu_pte__size_v(void)
156{
157 return 0x00000008U;
158}
159static inline u32 gmmu_pte_valid_w(void)
160{
161 return 0U;
162}
163static inline u32 gmmu_pte_valid_true_f(void)
164{
165 return 0x1U;
166}
167static inline u32 gmmu_pte_valid_false_f(void)
168{
169 return 0x0U;
170}
171static inline u32 gmmu_pte_privilege_w(void)
172{
173 return 0U;
174}
175static inline u32 gmmu_pte_privilege_true_f(void)
176{
177 return 0x2U;
178}
179static inline u32 gmmu_pte_privilege_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 gmmu_pte_address_sys_f(u32 v)
184{
185 return (v & 0xfffffffU) << 4U;
186}
187static inline u32 gmmu_pte_address_sys_w(void)
188{
189 return 0U;
190}
191static inline u32 gmmu_pte_address_vid_f(u32 v)
192{
193 return (v & 0x1ffffffU) << 4U;
194}
195static inline u32 gmmu_pte_address_vid_w(void)
196{
197 return 0U;
198}
199static inline u32 gmmu_pte_vol_w(void)
200{
201 return 1U;
202}
203static inline u32 gmmu_pte_vol_true_f(void)
204{
205 return 0x1U;
206}
207static inline u32 gmmu_pte_vol_false_f(void)
208{
209 return 0x0U;
210}
211static inline u32 gmmu_pte_aperture_w(void)
212{
213 return 1U;
214}
215static inline u32 gmmu_pte_aperture_video_memory_f(void)
216{
217 return 0x0U;
218}
219static inline u32 gmmu_pte_aperture_sys_mem_coh_f(void)
220{
221 return 0x4U;
222}
223static inline u32 gmmu_pte_aperture_sys_mem_ncoh_f(void)
224{
225 return 0x6U;
226}
227static inline u32 gmmu_pte_read_only_w(void)
228{
229 return 0U;
230}
231static inline u32 gmmu_pte_read_only_true_f(void)
232{
233 return 0x4U;
234}
235static inline u32 gmmu_pte_write_disable_w(void)
236{
237 return 1U;
238}
239static inline u32 gmmu_pte_write_disable_true_f(void)
240{
241 return 0x80000000U;
242}
243static inline u32 gmmu_pte_read_disable_w(void)
244{
245 return 1U;
246}
247static inline u32 gmmu_pte_read_disable_true_f(void)
248{
249 return 0x40000000U;
250}
251static inline u32 gmmu_pte_comptagline_s(void)
252{
253 return 17U;
254}
255static inline u32 gmmu_pte_comptagline_f(u32 v)
256{
257 return (v & 0x1ffffU) << 12U;
258}
259static inline u32 gmmu_pte_comptagline_w(void)
260{
261 return 1U;
262}
263static inline u32 gmmu_pte_address_shift_v(void)
264{
265 return 0x0000000cU;
266}
267static inline u32 gmmu_pte_kind_f(u32 v)
268{
269 return (v & 0xffU) << 4U;
270}
271static inline u32 gmmu_pte_kind_w(void)
272{
273 return 1U;
274}
275static inline u32 gmmu_pte_kind_invalid_v(void)
276{
277 return 0x000000ffU;
278}
279static inline u32 gmmu_pte_kind_pitch_v(void)
280{
281 return 0x00000000U;
282}
283#endif
diff --git a/include/nvgpu/hw/gm20b/hw_gr_gm20b.h b/include/nvgpu/hw/gm20b/hw_gr_gm20b.h
deleted file mode 100644
index 79ad326..0000000
--- a/include/nvgpu/hw/gm20b/hw_gr_gm20b.h
+++ /dev/null
@@ -1,3939 +0,0 @@
1/*
2 * Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gr_gm20b_h_
57#define _hw_gr_gm20b_h_
58
59static inline u32 gr_intr_r(void)
60{
61 return 0x00400100U;
62}
63static inline u32 gr_intr_notify_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 gr_intr_notify_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gr_intr_semaphore_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gr_intr_semaphore_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gr_intr_illegal_method_pending_f(void)
80{
81 return 0x10U;
82}
83static inline u32 gr_intr_illegal_method_reset_f(void)
84{
85 return 0x10U;
86}
87static inline u32 gr_intr_illegal_notify_pending_f(void)
88{
89 return 0x40U;
90}
91static inline u32 gr_intr_illegal_notify_reset_f(void)
92{
93 return 0x40U;
94}
95static inline u32 gr_intr_firmware_method_f(u32 v)
96{
97 return (v & 0x1U) << 8U;
98}
99static inline u32 gr_intr_firmware_method_pending_f(void)
100{
101 return 0x100U;
102}
103static inline u32 gr_intr_firmware_method_reset_f(void)
104{
105 return 0x100U;
106}
107static inline u32 gr_intr_illegal_class_pending_f(void)
108{
109 return 0x20U;
110}
111static inline u32 gr_intr_illegal_class_reset_f(void)
112{
113 return 0x20U;
114}
115static inline u32 gr_intr_fecs_error_pending_f(void)
116{
117 return 0x80000U;
118}
119static inline u32 gr_intr_fecs_error_reset_f(void)
120{
121 return 0x80000U;
122}
123static inline u32 gr_intr_class_error_pending_f(void)
124{
125 return 0x100000U;
126}
127static inline u32 gr_intr_class_error_reset_f(void)
128{
129 return 0x100000U;
130}
131static inline u32 gr_intr_exception_pending_f(void)
132{
133 return 0x200000U;
134}
135static inline u32 gr_intr_exception_reset_f(void)
136{
137 return 0x200000U;
138}
139static inline u32 gr_fecs_intr_r(void)
140{
141 return 0x00400144U;
142}
143static inline u32 gr_class_error_r(void)
144{
145 return 0x00400110U;
146}
147static inline u32 gr_class_error_code_v(u32 r)
148{
149 return (r >> 0U) & 0xffffU;
150}
151static inline u32 gr_intr_nonstall_r(void)
152{
153 return 0x00400120U;
154}
155static inline u32 gr_intr_nonstall_trap_pending_f(void)
156{
157 return 0x2U;
158}
159static inline u32 gr_intr_en_r(void)
160{
161 return 0x0040013cU;
162}
163static inline u32 gr_exception_r(void)
164{
165 return 0x00400108U;
166}
167static inline u32 gr_exception_fe_m(void)
168{
169 return 0x1U << 0U;
170}
171static inline u32 gr_exception_gpc_m(void)
172{
173 return 0x1U << 24U;
174}
175static inline u32 gr_exception_memfmt_m(void)
176{
177 return 0x1U << 1U;
178}
179static inline u32 gr_exception_ds_m(void)
180{
181 return 0x1U << 4U;
182}
183static inline u32 gr_exception_sked_m(void)
184{
185 return 0x1U << 8U;
186}
187static inline u32 gr_exception_pd_m(void)
188{
189 return 0x1U << 2U;
190}
191static inline u32 gr_exception_scc_m(void)
192{
193 return 0x1U << 3U;
194}
195static inline u32 gr_exception_ssync_m(void)
196{
197 return 0x1U << 5U;
198}
199static inline u32 gr_exception_mme_m(void)
200{
201 return 0x1U << 7U;
202}
203static inline u32 gr_exception1_r(void)
204{
205 return 0x00400118U;
206}
207static inline u32 gr_exception1_gpc_0_pending_f(void)
208{
209 return 0x1U;
210}
211static inline u32 gr_exception2_r(void)
212{
213 return 0x0040011cU;
214}
215static inline u32 gr_exception_en_r(void)
216{
217 return 0x00400138U;
218}
219static inline u32 gr_exception_en_fe_m(void)
220{
221 return 0x1U << 0U;
222}
223static inline u32 gr_exception1_en_r(void)
224{
225 return 0x00400130U;
226}
227static inline u32 gr_exception2_en_r(void)
228{
229 return 0x00400134U;
230}
231static inline u32 gr_gpfifo_ctl_r(void)
232{
233 return 0x00400500U;
234}
235static inline u32 gr_gpfifo_ctl_access_f(u32 v)
236{
237 return (v & 0x1U) << 0U;
238}
239static inline u32 gr_gpfifo_ctl_access_disabled_f(void)
240{
241 return 0x0U;
242}
243static inline u32 gr_gpfifo_ctl_access_enabled_f(void)
244{
245 return 0x1U;
246}
247static inline u32 gr_gpfifo_ctl_semaphore_access_f(u32 v)
248{
249 return (v & 0x1U) << 16U;
250}
251static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_v(void)
252{
253 return 0x00000001U;
254}
255static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_f(void)
256{
257 return 0x10000U;
258}
259static inline u32 gr_gpfifo_status_r(void)
260{
261 return 0x00400504U;
262}
263static inline u32 gr_trapped_addr_r(void)
264{
265 return 0x00400704U;
266}
267static inline u32 gr_trapped_addr_mthd_v(u32 r)
268{
269 return (r >> 2U) & 0xfffU;
270}
271static inline u32 gr_trapped_addr_subch_v(u32 r)
272{
273 return (r >> 16U) & 0x7U;
274}
275static inline u32 gr_trapped_addr_mme_generated_v(u32 r)
276{
277 return (r >> 20U) & 0x1U;
278}
279static inline u32 gr_trapped_addr_datahigh_v(u32 r)
280{
281 return (r >> 24U) & 0x1U;
282}
283static inline u32 gr_trapped_addr_priv_v(u32 r)
284{
285 return (r >> 28U) & 0x1U;
286}
287static inline u32 gr_trapped_addr_status_v(u32 r)
288{
289 return (r >> 31U) & 0x1U;
290}
291static inline u32 gr_trapped_data_lo_r(void)
292{
293 return 0x00400708U;
294}
295static inline u32 gr_trapped_data_hi_r(void)
296{
297 return 0x0040070cU;
298}
299static inline u32 gr_trapped_data_mme_r(void)
300{
301 return 0x00400710U;
302}
303static inline u32 gr_trapped_data_mme_pc_v(u32 r)
304{
305 return (r >> 0U) & 0x7ffU;
306}
307static inline u32 gr_status_r(void)
308{
309 return 0x00400700U;
310}
311static inline u32 gr_status_fe_method_upper_v(u32 r)
312{
313 return (r >> 1U) & 0x1U;
314}
315static inline u32 gr_status_fe_method_lower_v(u32 r)
316{
317 return (r >> 2U) & 0x1U;
318}
319static inline u32 gr_status_fe_method_lower_idle_v(void)
320{
321 return 0x00000000U;
322}
323static inline u32 gr_status_fe_gi_v(u32 r)
324{
325 return (r >> 21U) & 0x1U;
326}
327static inline u32 gr_status_mask_r(void)
328{
329 return 0x00400610U;
330}
331static inline u32 gr_status_1_r(void)
332{
333 return 0x00400604U;
334}
335static inline u32 gr_status_2_r(void)
336{
337 return 0x00400608U;
338}
339static inline u32 gr_engine_status_r(void)
340{
341 return 0x0040060cU;
342}
343static inline u32 gr_engine_status_value_busy_f(void)
344{
345 return 0x1U;
346}
347static inline u32 gr_pri_be0_becs_be_exception_r(void)
348{
349 return 0x00410204U;
350}
351static inline u32 gr_pri_be0_becs_be_exception_en_r(void)
352{
353 return 0x00410208U;
354}
355static inline u32 gr_pri_gpc0_gpccs_gpc_exception_r(void)
356{
357 return 0x00502c90U;
358}
359static inline u32 gr_pri_gpc0_gpccs_gpc_exception_en_r(void)
360{
361 return 0x00502c94U;
362}
363static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_r(void)
364{
365 return 0x00504508U;
366}
367static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
368{
369 return 0x0050450cU;
370}
371static inline u32 gr_activity_0_r(void)
372{
373 return 0x00400380U;
374}
375static inline u32 gr_activity_1_r(void)
376{
377 return 0x00400384U;
378}
379static inline u32 gr_activity_2_r(void)
380{
381 return 0x00400388U;
382}
383static inline u32 gr_activity_4_r(void)
384{
385 return 0x00400390U;
386}
387static inline u32 gr_pri_gpc0_gcc_dbg_r(void)
388{
389 return 0x00501000U;
390}
391static inline u32 gr_pri_gpcs_gcc_dbg_r(void)
392{
393 return 0x00419000U;
394}
395static inline u32 gr_pri_gpcs_gcc_dbg_invalidate_m(void)
396{
397 return 0x1U << 1U;
398}
399static inline u32 gr_pri_gpc0_tpc0_sm_cache_control_r(void)
400{
401 return 0x005046a4U;
402}
403static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_r(void)
404{
405 return 0x00419ea4U;
406}
407static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_invalidate_cache_m(void)
408{
409 return 0x1U << 0U;
410}
411static inline u32 gr_pri_sked_activity_r(void)
412{
413 return 0x00407054U;
414}
415static inline u32 gr_pri_gpc0_gpccs_gpc_activity0_r(void)
416{
417 return 0x00502c80U;
418}
419static inline u32 gr_pri_gpc0_gpccs_gpc_activity1_r(void)
420{
421 return 0x00502c84U;
422}
423static inline u32 gr_pri_gpc0_gpccs_gpc_activity2_r(void)
424{
425 return 0x00502c88U;
426}
427static inline u32 gr_pri_gpc0_gpccs_gpc_activity3_r(void)
428{
429 return 0x00502c8cU;
430}
431static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r(void)
432{
433 return 0x00504500U;
434}
435static inline u32 gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r(void)
436{
437 return 0x00504d00U;
438}
439static inline u32 gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r(void)
440{
441 return 0x00501d00U;
442}
443static inline u32 gr_pri_gpcs_gpccs_gpc_activity_0_r(void)
444{
445 return 0x0041ac80U;
446}
447static inline u32 gr_pri_gpcs_gpccs_gpc_activity_1_r(void)
448{
449 return 0x0041ac84U;
450}
451static inline u32 gr_pri_gpcs_gpccs_gpc_activity_2_r(void)
452{
453 return 0x0041ac88U;
454}
455static inline u32 gr_pri_gpcs_gpccs_gpc_activity_3_r(void)
456{
457 return 0x0041ac8cU;
458}
459static inline u32 gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r(void)
460{
461 return 0x0041c500U;
462}
463static inline u32 gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r(void)
464{
465 return 0x0041cd00U;
466}
467static inline u32 gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r(void)
468{
469 return 0x00419d00U;
470}
471static inline u32 gr_pri_be0_becs_be_activity0_r(void)
472{
473 return 0x00410200U;
474}
475static inline u32 gr_pri_be1_becs_be_activity0_r(void)
476{
477 return 0x00410600U;
478}
479static inline u32 gr_pri_bes_becs_be_activity0_r(void)
480{
481 return 0x00408a00U;
482}
483static inline u32 gr_pri_ds_mpipe_status_r(void)
484{
485 return 0x00405858U;
486}
487static inline u32 gr_pri_fe_go_idle_on_status_r(void)
488{
489 return 0x00404150U;
490}
491static inline u32 gr_pri_fe_go_idle_check_r(void)
492{
493 return 0x00404158U;
494}
495static inline u32 gr_pri_fe_go_idle_info_r(void)
496{
497 return 0x00404194U;
498}
499static inline u32 gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r(void)
500{
501 return 0x00504238U;
502}
503static inline u32 gr_pri_be0_crop_status1_r(void)
504{
505 return 0x00410134U;
506}
507static inline u32 gr_pri_bes_crop_status1_r(void)
508{
509 return 0x00408934U;
510}
511static inline u32 gr_pri_be0_zrop_status_r(void)
512{
513 return 0x00410048U;
514}
515static inline u32 gr_pri_be0_zrop_status2_r(void)
516{
517 return 0x0041004cU;
518}
519static inline u32 gr_pri_bes_zrop_status_r(void)
520{
521 return 0x00408848U;
522}
523static inline u32 gr_pri_bes_zrop_status2_r(void)
524{
525 return 0x0040884cU;
526}
527static inline u32 gr_pipe_bundle_address_r(void)
528{
529 return 0x00400200U;
530}
531static inline u32 gr_pipe_bundle_address_value_v(u32 r)
532{
533 return (r >> 0U) & 0xffffU;
534}
535static inline u32 gr_pipe_bundle_data_r(void)
536{
537 return 0x00400204U;
538}
539static inline u32 gr_pipe_bundle_config_r(void)
540{
541 return 0x00400208U;
542}
543static inline u32 gr_pipe_bundle_config_override_pipe_mode_disabled_f(void)
544{
545 return 0x0U;
546}
547static inline u32 gr_pipe_bundle_config_override_pipe_mode_enabled_f(void)
548{
549 return 0x80000000U;
550}
551static inline u32 gr_fe_hww_esr_r(void)
552{
553 return 0x00404000U;
554}
555static inline u32 gr_fe_hww_esr_reset_active_f(void)
556{
557 return 0x40000000U;
558}
559static inline u32 gr_fe_hww_esr_en_enable_f(void)
560{
561 return 0x80000000U;
562}
563static inline u32 gr_fe_hww_esr_info_r(void)
564{
565 return 0x004041b0U;
566}
567static inline u32 gr_fe_go_idle_timeout_r(void)
568{
569 return 0x00404154U;
570}
571static inline u32 gr_fe_go_idle_timeout_count_f(u32 v)
572{
573 return (v & 0xffffffffU) << 0U;
574}
575static inline u32 gr_fe_go_idle_timeout_count_disabled_f(void)
576{
577 return 0x0U;
578}
579static inline u32 gr_fe_go_idle_timeout_count_prod_f(void)
580{
581 return 0x800U;
582}
583static inline u32 gr_fe_object_table_r(u32 i)
584{
585 return 0x00404200U + i*4U;
586}
587static inline u32 gr_fe_object_table_nvclass_v(u32 r)
588{
589 return (r >> 0U) & 0xffffU;
590}
591static inline u32 gr_fe_tpc_fs_r(void)
592{
593 return 0x004041c4U;
594}
595static inline u32 gr_pri_mme_shadow_raw_index_r(void)
596{
597 return 0x00404488U;
598}
599static inline u32 gr_pri_mme_shadow_raw_index_write_trigger_f(void)
600{
601 return 0x80000000U;
602}
603static inline u32 gr_pri_mme_shadow_raw_data_r(void)
604{
605 return 0x0040448cU;
606}
607static inline u32 gr_mme_hww_esr_r(void)
608{
609 return 0x00404490U;
610}
611static inline u32 gr_mme_hww_esr_reset_active_f(void)
612{
613 return 0x40000000U;
614}
615static inline u32 gr_mme_hww_esr_en_enable_f(void)
616{
617 return 0x80000000U;
618}
619static inline u32 gr_mme_hww_esr_info_r(void)
620{
621 return 0x00404494U;
622}
623static inline u32 gr_memfmt_hww_esr_r(void)
624{
625 return 0x00404600U;
626}
627static inline u32 gr_memfmt_hww_esr_reset_active_f(void)
628{
629 return 0x40000000U;
630}
631static inline u32 gr_memfmt_hww_esr_en_enable_f(void)
632{
633 return 0x80000000U;
634}
635static inline u32 gr_fecs_cpuctl_r(void)
636{
637 return 0x00409100U;
638}
639static inline u32 gr_fecs_cpuctl_startcpu_f(u32 v)
640{
641 return (v & 0x1U) << 1U;
642}
643static inline u32 gr_fecs_cpuctl_alias_r(void)
644{
645 return 0x00409130U;
646}
647static inline u32 gr_fecs_cpuctl_alias_startcpu_f(u32 v)
648{
649 return (v & 0x1U) << 1U;
650}
651static inline u32 gr_fecs_dmactl_r(void)
652{
653 return 0x0040910cU;
654}
655static inline u32 gr_fecs_dmactl_require_ctx_f(u32 v)
656{
657 return (v & 0x1U) << 0U;
658}
659static inline u32 gr_fecs_dmactl_dmem_scrubbing_m(void)
660{
661 return 0x1U << 1U;
662}
663static inline u32 gr_fecs_dmactl_imem_scrubbing_m(void)
664{
665 return 0x1U << 2U;
666}
667static inline u32 gr_fecs_os_r(void)
668{
669 return 0x00409080U;
670}
671static inline u32 gr_fecs_idlestate_r(void)
672{
673 return 0x0040904cU;
674}
675static inline u32 gr_fecs_mailbox0_r(void)
676{
677 return 0x00409040U;
678}
679static inline u32 gr_fecs_mailbox1_r(void)
680{
681 return 0x00409044U;
682}
683static inline u32 gr_fecs_irqstat_r(void)
684{
685 return 0x00409008U;
686}
687static inline u32 gr_fecs_irqmode_r(void)
688{
689 return 0x0040900cU;
690}
691static inline u32 gr_fecs_irqmask_r(void)
692{
693 return 0x00409018U;
694}
695static inline u32 gr_fecs_irqdest_r(void)
696{
697 return 0x0040901cU;
698}
699static inline u32 gr_fecs_curctx_r(void)
700{
701 return 0x00409050U;
702}
703static inline u32 gr_fecs_nxtctx_r(void)
704{
705 return 0x00409054U;
706}
707static inline u32 gr_fecs_engctl_r(void)
708{
709 return 0x004090a4U;
710}
711static inline u32 gr_fecs_debug1_r(void)
712{
713 return 0x00409090U;
714}
715static inline u32 gr_fecs_debuginfo_r(void)
716{
717 return 0x00409094U;
718}
719static inline u32 gr_fecs_icd_cmd_r(void)
720{
721 return 0x00409200U;
722}
723static inline u32 gr_fecs_icd_cmd_opc_s(void)
724{
725 return 4U;
726}
727static inline u32 gr_fecs_icd_cmd_opc_f(u32 v)
728{
729 return (v & 0xfU) << 0U;
730}
731static inline u32 gr_fecs_icd_cmd_opc_m(void)
732{
733 return 0xfU << 0U;
734}
735static inline u32 gr_fecs_icd_cmd_opc_v(u32 r)
736{
737 return (r >> 0U) & 0xfU;
738}
739static inline u32 gr_fecs_icd_cmd_opc_rreg_f(void)
740{
741 return 0x8U;
742}
743static inline u32 gr_fecs_icd_cmd_opc_rstat_f(void)
744{
745 return 0xeU;
746}
747static inline u32 gr_fecs_icd_cmd_idx_f(u32 v)
748{
749 return (v & 0x1fU) << 8U;
750}
751static inline u32 gr_fecs_icd_rdata_r(void)
752{
753 return 0x0040920cU;
754}
755static inline u32 gr_fecs_imemc_r(u32 i)
756{
757 return 0x00409180U + i*16U;
758}
759static inline u32 gr_fecs_imemc_offs_f(u32 v)
760{
761 return (v & 0x3fU) << 2U;
762}
763static inline u32 gr_fecs_imemc_blk_f(u32 v)
764{
765 return (v & 0xffU) << 8U;
766}
767static inline u32 gr_fecs_imemc_aincw_f(u32 v)
768{
769 return (v & 0x1U) << 24U;
770}
771static inline u32 gr_fecs_imemd_r(u32 i)
772{
773 return 0x00409184U + i*16U;
774}
775static inline u32 gr_fecs_imemt_r(u32 i)
776{
777 return 0x00409188U + i*16U;
778}
779static inline u32 gr_fecs_imemt_tag_f(u32 v)
780{
781 return (v & 0xffffU) << 0U;
782}
783static inline u32 gr_fecs_dmemc_r(u32 i)
784{
785 return 0x004091c0U + i*8U;
786}
787static inline u32 gr_fecs_dmemc_offs_s(void)
788{
789 return 6U;
790}
791static inline u32 gr_fecs_dmemc_offs_f(u32 v)
792{
793 return (v & 0x3fU) << 2U;
794}
795static inline u32 gr_fecs_dmemc_offs_m(void)
796{
797 return 0x3fU << 2U;
798}
799static inline u32 gr_fecs_dmemc_offs_v(u32 r)
800{
801 return (r >> 2U) & 0x3fU;
802}
803static inline u32 gr_fecs_dmemc_blk_f(u32 v)
804{
805 return (v & 0xffU) << 8U;
806}
807static inline u32 gr_fecs_dmemc_aincw_f(u32 v)
808{
809 return (v & 0x1U) << 24U;
810}
811static inline u32 gr_fecs_dmemd_r(u32 i)
812{
813 return 0x004091c4U + i*8U;
814}
815static inline u32 gr_fecs_dmatrfbase_r(void)
816{
817 return 0x00409110U;
818}
819static inline u32 gr_fecs_dmatrfmoffs_r(void)
820{
821 return 0x00409114U;
822}
823static inline u32 gr_fecs_dmatrffboffs_r(void)
824{
825 return 0x0040911cU;
826}
827static inline u32 gr_fecs_dmatrfcmd_r(void)
828{
829 return 0x00409118U;
830}
831static inline u32 gr_fecs_dmatrfcmd_imem_f(u32 v)
832{
833 return (v & 0x1U) << 4U;
834}
835static inline u32 gr_fecs_dmatrfcmd_write_f(u32 v)
836{
837 return (v & 0x1U) << 5U;
838}
839static inline u32 gr_fecs_dmatrfcmd_size_f(u32 v)
840{
841 return (v & 0x7U) << 8U;
842}
843static inline u32 gr_fecs_dmatrfcmd_ctxdma_f(u32 v)
844{
845 return (v & 0x7U) << 12U;
846}
847static inline u32 gr_fecs_bootvec_r(void)
848{
849 return 0x00409104U;
850}
851static inline u32 gr_fecs_bootvec_vec_f(u32 v)
852{
853 return (v & 0xffffffffU) << 0U;
854}
855static inline u32 gr_fecs_falcon_hwcfg_r(void)
856{
857 return 0x00409108U;
858}
859static inline u32 gr_gpcs_gpccs_falcon_hwcfg_r(void)
860{
861 return 0x0041a108U;
862}
863static inline u32 gr_fecs_falcon_rm_r(void)
864{
865 return 0x00409084U;
866}
867static inline u32 gr_fecs_current_ctx_r(void)
868{
869 return 0x00409b00U;
870}
871static inline u32 gr_fecs_current_ctx_ptr_f(u32 v)
872{
873 return (v & 0xfffffffU) << 0U;
874}
875static inline u32 gr_fecs_current_ctx_ptr_v(u32 r)
876{
877 return (r >> 0U) & 0xfffffffU;
878}
879static inline u32 gr_fecs_current_ctx_target_s(void)
880{
881 return 2U;
882}
883static inline u32 gr_fecs_current_ctx_target_f(u32 v)
884{
885 return (v & 0x3U) << 28U;
886}
887static inline u32 gr_fecs_current_ctx_target_m(void)
888{
889 return 0x3U << 28U;
890}
891static inline u32 gr_fecs_current_ctx_target_v(u32 r)
892{
893 return (r >> 28U) & 0x3U;
894}
895static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void)
896{
897 return 0x0U;
898}
899static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void)
900{
901 return 0x20000000U;
902}
903static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void)
904{
905 return 0x30000000U;
906}
907static inline u32 gr_fecs_current_ctx_valid_s(void)
908{
909 return 1U;
910}
911static inline u32 gr_fecs_current_ctx_valid_f(u32 v)
912{
913 return (v & 0x1U) << 31U;
914}
915static inline u32 gr_fecs_current_ctx_valid_m(void)
916{
917 return 0x1U << 31U;
918}
919static inline u32 gr_fecs_current_ctx_valid_v(u32 r)
920{
921 return (r >> 31U) & 0x1U;
922}
923static inline u32 gr_fecs_current_ctx_valid_false_f(void)
924{
925 return 0x0U;
926}
927static inline u32 gr_fecs_method_data_r(void)
928{
929 return 0x00409500U;
930}
931static inline u32 gr_fecs_method_push_r(void)
932{
933 return 0x00409504U;
934}
935static inline u32 gr_fecs_method_push_adr_f(u32 v)
936{
937 return (v & 0xfffU) << 0U;
938}
939static inline u32 gr_fecs_method_push_adr_bind_pointer_v(void)
940{
941 return 0x00000003U;
942}
943static inline u32 gr_fecs_method_push_adr_bind_pointer_f(void)
944{
945 return 0x3U;
946}
947static inline u32 gr_fecs_method_push_adr_discover_image_size_v(void)
948{
949 return 0x00000010U;
950}
951static inline u32 gr_fecs_method_push_adr_wfi_golden_save_v(void)
952{
953 return 0x00000009U;
954}
955static inline u32 gr_fecs_method_push_adr_restore_golden_v(void)
956{
957 return 0x00000015U;
958}
959static inline u32 gr_fecs_method_push_adr_discover_zcull_image_size_v(void)
960{
961 return 0x00000016U;
962}
963static inline u32 gr_fecs_method_push_adr_discover_pm_image_size_v(void)
964{
965 return 0x00000025U;
966}
967static inline u32 gr_fecs_method_push_adr_discover_reglist_image_size_v(void)
968{
969 return 0x00000030U;
970}
971static inline u32 gr_fecs_method_push_adr_set_reglist_bind_instance_v(void)
972{
973 return 0x00000031U;
974}
975static inline u32 gr_fecs_method_push_adr_set_reglist_virtual_address_v(void)
976{
977 return 0x00000032U;
978}
979static inline u32 gr_fecs_method_push_adr_stop_ctxsw_v(void)
980{
981 return 0x00000038U;
982}
983static inline u32 gr_fecs_method_push_adr_start_ctxsw_v(void)
984{
985 return 0x00000039U;
986}
987static inline u32 gr_fecs_method_push_adr_set_watchdog_timeout_f(void)
988{
989 return 0x21U;
990}
991static inline u32 gr_fecs_method_push_adr_write_timestamp_record_v(void)
992{
993 return 0x0000003dU;
994}
995static inline u32 gr_fecs_method_push_adr_halt_pipeline_v(void)
996{
997 return 0x00000004U;
998}
999static inline u32 gr_fecs_host_int_status_r(void)
1000{
1001 return 0x00409c18U;
1002}
1003static inline u32 gr_fecs_host_int_status_fault_during_ctxsw_f(u32 v)
1004{
1005 return (v & 0x1U) << 16U;
1006}
1007static inline u32 gr_fecs_host_int_status_umimp_firmware_method_f(u32 v)
1008{
1009 return (v & 0x1U) << 17U;
1010}
1011static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v)
1012{
1013 return (v & 0x1U) << 18U;
1014}
1015static inline u32 gr_fecs_host_int_status_watchdog_active_f(void)
1016{
1017 return 0x80000U;
1018}
1019static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v)
1020{
1021 return (v & 0xffffU) << 0U;
1022}
1023static inline u32 gr_fecs_host_int_clear_r(void)
1024{
1025 return 0x00409c20U;
1026}
1027static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_f(u32 v)
1028{
1029 return (v & 0x1U) << 1U;
1030}
1031static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_clear_f(void)
1032{
1033 return 0x2U;
1034}
1035static inline u32 gr_fecs_host_int_enable_r(void)
1036{
1037 return 0x00409c24U;
1038}
1039static inline u32 gr_fecs_host_int_enable_ctxsw_intr1_enable_f(void)
1040{
1041 return 0x2U;
1042}
1043static inline u32 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f(void)
1044{
1045 return 0x10000U;
1046}
1047static inline u32 gr_fecs_host_int_enable_umimp_firmware_method_enable_f(void)
1048{
1049 return 0x20000U;
1050}
1051static inline u32 gr_fecs_host_int_enable_umimp_illegal_method_enable_f(void)
1052{
1053 return 0x40000U;
1054}
1055static inline u32 gr_fecs_host_int_enable_watchdog_enable_f(void)
1056{
1057 return 0x80000U;
1058}
1059static inline u32 gr_fecs_ctxsw_reset_ctl_r(void)
1060{
1061 return 0x00409614U;
1062}
1063static inline u32 gr_fecs_ctxsw_reset_ctl_sys_halt_disabled_f(void)
1064{
1065 return 0x0U;
1066}
1067static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_halt_disabled_f(void)
1068{
1069 return 0x0U;
1070}
1071static inline u32 gr_fecs_ctxsw_reset_ctl_be_halt_disabled_f(void)
1072{
1073 return 0x0U;
1074}
1075static inline u32 gr_fecs_ctxsw_reset_ctl_sys_engine_reset_disabled_f(void)
1076{
1077 return 0x10U;
1078}
1079static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_engine_reset_disabled_f(void)
1080{
1081 return 0x20U;
1082}
1083static inline u32 gr_fecs_ctxsw_reset_ctl_be_engine_reset_disabled_f(void)
1084{
1085 return 0x40U;
1086}
1087static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_enabled_f(void)
1088{
1089 return 0x0U;
1090}
1091static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_disabled_f(void)
1092{
1093 return 0x100U;
1094}
1095static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_enabled_f(void)
1096{
1097 return 0x0U;
1098}
1099static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_disabled_f(void)
1100{
1101 return 0x200U;
1102}
1103static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_s(void)
1104{
1105 return 1U;
1106}
1107static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_f(u32 v)
1108{
1109 return (v & 0x1U) << 10U;
1110}
1111static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_m(void)
1112{
1113 return 0x1U << 10U;
1114}
1115static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_v(u32 r)
1116{
1117 return (r >> 10U) & 0x1U;
1118}
1119static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_enabled_f(void)
1120{
1121 return 0x0U;
1122}
1123static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_disabled_f(void)
1124{
1125 return 0x400U;
1126}
1127static inline u32 gr_fecs_ctx_state_store_major_rev_id_r(void)
1128{
1129 return 0x0040960cU;
1130}
1131static inline u32 gr_fecs_ctxsw_mailbox_r(u32 i)
1132{
1133 return 0x00409800U + i*4U;
1134}
1135static inline u32 gr_fecs_ctxsw_mailbox__size_1_v(void)
1136{
1137 return 0x00000010U;
1138}
1139static inline u32 gr_fecs_ctxsw_mailbox_value_f(u32 v)
1140{
1141 return (v & 0xffffffffU) << 0U;
1142}
1143static inline u32 gr_fecs_ctxsw_mailbox_value_pass_v(void)
1144{
1145 return 0x00000001U;
1146}
1147static inline u32 gr_fecs_ctxsw_mailbox_value_fail_v(void)
1148{
1149 return 0x00000002U;
1150}
1151static inline u32 gr_fecs_ctxsw_mailbox_set_r(u32 i)
1152{
1153 return 0x004098c0U + i*4U;
1154}
1155static inline u32 gr_fecs_ctxsw_mailbox_set_value_f(u32 v)
1156{
1157 return (v & 0xffffffffU) << 0U;
1158}
1159static inline u32 gr_fecs_ctxsw_mailbox_clear_r(u32 i)
1160{
1161 return 0x00409840U + i*4U;
1162}
1163static inline u32 gr_fecs_ctxsw_mailbox_clear_value_f(u32 v)
1164{
1165 return (v & 0xffffffffU) << 0U;
1166}
1167static inline u32 gr_fecs_fs_r(void)
1168{
1169 return 0x00409604U;
1170}
1171static inline u32 gr_fecs_fs_num_available_gpcs_s(void)
1172{
1173 return 5U;
1174}
1175static inline u32 gr_fecs_fs_num_available_gpcs_f(u32 v)
1176{
1177 return (v & 0x1fU) << 0U;
1178}
1179static inline u32 gr_fecs_fs_num_available_gpcs_m(void)
1180{
1181 return 0x1fU << 0U;
1182}
1183static inline u32 gr_fecs_fs_num_available_gpcs_v(u32 r)
1184{
1185 return (r >> 0U) & 0x1fU;
1186}
1187static inline u32 gr_fecs_fs_num_available_fbps_s(void)
1188{
1189 return 5U;
1190}
1191static inline u32 gr_fecs_fs_num_available_fbps_f(u32 v)
1192{
1193 return (v & 0x1fU) << 16U;
1194}
1195static inline u32 gr_fecs_fs_num_available_fbps_m(void)
1196{
1197 return 0x1fU << 16U;
1198}
1199static inline u32 gr_fecs_fs_num_available_fbps_v(u32 r)
1200{
1201 return (r >> 16U) & 0x1fU;
1202}
1203static inline u32 gr_fecs_cfg_r(void)
1204{
1205 return 0x00409620U;
1206}
1207static inline u32 gr_fecs_cfg_imem_sz_v(u32 r)
1208{
1209 return (r >> 0U) & 0xffU;
1210}
1211static inline u32 gr_fecs_rc_lanes_r(void)
1212{
1213 return 0x00409880U;
1214}
1215static inline u32 gr_fecs_rc_lanes_num_chains_s(void)
1216{
1217 return 6U;
1218}
1219static inline u32 gr_fecs_rc_lanes_num_chains_f(u32 v)
1220{
1221 return (v & 0x3fU) << 0U;
1222}
1223static inline u32 gr_fecs_rc_lanes_num_chains_m(void)
1224{
1225 return 0x3fU << 0U;
1226}
1227static inline u32 gr_fecs_rc_lanes_num_chains_v(u32 r)
1228{
1229 return (r >> 0U) & 0x3fU;
1230}
1231static inline u32 gr_fecs_ctxsw_status_1_r(void)
1232{
1233 return 0x00409400U;
1234}
1235static inline u32 gr_fecs_ctxsw_status_1_arb_busy_s(void)
1236{
1237 return 1U;
1238}
1239static inline u32 gr_fecs_ctxsw_status_1_arb_busy_f(u32 v)
1240{
1241 return (v & 0x1U) << 12U;
1242}
1243static inline u32 gr_fecs_ctxsw_status_1_arb_busy_m(void)
1244{
1245 return 0x1U << 12U;
1246}
1247static inline u32 gr_fecs_ctxsw_status_1_arb_busy_v(u32 r)
1248{
1249 return (r >> 12U) & 0x1U;
1250}
1251static inline u32 gr_fecs_arb_ctx_adr_r(void)
1252{
1253 return 0x00409a24U;
1254}
1255static inline u32 gr_fecs_new_ctx_r(void)
1256{
1257 return 0x00409b04U;
1258}
1259static inline u32 gr_fecs_new_ctx_ptr_s(void)
1260{
1261 return 28U;
1262}
1263static inline u32 gr_fecs_new_ctx_ptr_f(u32 v)
1264{
1265 return (v & 0xfffffffU) << 0U;
1266}
1267static inline u32 gr_fecs_new_ctx_ptr_m(void)
1268{
1269 return 0xfffffffU << 0U;
1270}
1271static inline u32 gr_fecs_new_ctx_ptr_v(u32 r)
1272{
1273 return (r >> 0U) & 0xfffffffU;
1274}
1275static inline u32 gr_fecs_new_ctx_target_s(void)
1276{
1277 return 2U;
1278}
1279static inline u32 gr_fecs_new_ctx_target_f(u32 v)
1280{
1281 return (v & 0x3U) << 28U;
1282}
1283static inline u32 gr_fecs_new_ctx_target_m(void)
1284{
1285 return 0x3U << 28U;
1286}
1287static inline u32 gr_fecs_new_ctx_target_v(u32 r)
1288{
1289 return (r >> 28U) & 0x3U;
1290}
1291static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void)
1292{
1293 return 0x0U;
1294}
1295static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void)
1296{
1297 return 0x30000000U;
1298}
1299static inline u32 gr_fecs_new_ctx_target_sys_mem_coh_f(void)
1300{
1301 return 0x20000000U;
1302}
1303static inline u32 gr_fecs_new_ctx_valid_s(void)
1304{
1305 return 1U;
1306}
1307static inline u32 gr_fecs_new_ctx_valid_f(u32 v)
1308{
1309 return (v & 0x1U) << 31U;
1310}
1311static inline u32 gr_fecs_new_ctx_valid_m(void)
1312{
1313 return 0x1U << 31U;
1314}
1315static inline u32 gr_fecs_new_ctx_valid_v(u32 r)
1316{
1317 return (r >> 31U) & 0x1U;
1318}
1319static inline u32 gr_fecs_arb_ctx_ptr_r(void)
1320{
1321 return 0x00409a0cU;
1322}
1323static inline u32 gr_fecs_arb_ctx_ptr_ptr_s(void)
1324{
1325 return 28U;
1326}
1327static inline u32 gr_fecs_arb_ctx_ptr_ptr_f(u32 v)
1328{
1329 return (v & 0xfffffffU) << 0U;
1330}
1331static inline u32 gr_fecs_arb_ctx_ptr_ptr_m(void)
1332{
1333 return 0xfffffffU << 0U;
1334}
1335static inline u32 gr_fecs_arb_ctx_ptr_ptr_v(u32 r)
1336{
1337 return (r >> 0U) & 0xfffffffU;
1338}
1339static inline u32 gr_fecs_arb_ctx_ptr_target_s(void)
1340{
1341 return 2U;
1342}
1343static inline u32 gr_fecs_arb_ctx_ptr_target_f(u32 v)
1344{
1345 return (v & 0x3U) << 28U;
1346}
1347static inline u32 gr_fecs_arb_ctx_ptr_target_m(void)
1348{
1349 return 0x3U << 28U;
1350}
1351static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r)
1352{
1353 return (r >> 28U) & 0x3U;
1354}
1355static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void)
1356{
1357 return 0x0U;
1358}
1359static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void)
1360{
1361 return 0x30000000U;
1362}
1363static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_coh_f(void)
1364{
1365 return 0x20000000U;
1366}
1367static inline u32 gr_fecs_arb_ctx_cmd_r(void)
1368{
1369 return 0x00409a10U;
1370}
1371static inline u32 gr_fecs_arb_ctx_cmd_cmd_s(void)
1372{
1373 return 5U;
1374}
1375static inline u32 gr_fecs_arb_ctx_cmd_cmd_f(u32 v)
1376{
1377 return (v & 0x1fU) << 0U;
1378}
1379static inline u32 gr_fecs_arb_ctx_cmd_cmd_m(void)
1380{
1381 return 0x1fU << 0U;
1382}
1383static inline u32 gr_fecs_arb_ctx_cmd_cmd_v(u32 r)
1384{
1385 return (r >> 0U) & 0x1fU;
1386}
1387static inline u32 gr_fecs_ctxsw_status_fe_0_r(void)
1388{
1389 return 0x00409c00U;
1390}
1391static inline u32 gr_gpc0_gpccs_ctxsw_status_gpc_0_r(void)
1392{
1393 return 0x00502c04U;
1394}
1395static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void)
1396{
1397 return 0x00502400U;
1398}
1399static inline u32 gr_gpc0_gpccs_ctxsw_mailbox__size_1_v(void)
1400{
1401 return 0x00000010U;
1402}
1403static inline u32 gr_fecs_ctxsw_idlestate_r(void)
1404{
1405 return 0x00409420U;
1406}
1407static inline u32 gr_gpc0_gpccs_ctxsw_idlestate_r(void)
1408{
1409 return 0x00502420U;
1410}
1411static inline u32 gr_rstr2d_gpc_map0_r(void)
1412{
1413 return 0x0040780cU;
1414}
1415static inline u32 gr_rstr2d_gpc_map1_r(void)
1416{
1417 return 0x00407810U;
1418}
1419static inline u32 gr_rstr2d_gpc_map2_r(void)
1420{
1421 return 0x00407814U;
1422}
1423static inline u32 gr_rstr2d_gpc_map3_r(void)
1424{
1425 return 0x00407818U;
1426}
1427static inline u32 gr_rstr2d_gpc_map4_r(void)
1428{
1429 return 0x0040781cU;
1430}
1431static inline u32 gr_rstr2d_gpc_map5_r(void)
1432{
1433 return 0x00407820U;
1434}
1435static inline u32 gr_rstr2d_map_table_cfg_r(void)
1436{
1437 return 0x004078bcU;
1438}
1439static inline u32 gr_rstr2d_map_table_cfg_row_offset_f(u32 v)
1440{
1441 return (v & 0xffU) << 0U;
1442}
1443static inline u32 gr_rstr2d_map_table_cfg_num_entries_f(u32 v)
1444{
1445 return (v & 0xffU) << 8U;
1446}
1447static inline u32 gr_pd_hww_esr_r(void)
1448{
1449 return 0x00406018U;
1450}
1451static inline u32 gr_pd_hww_esr_reset_active_f(void)
1452{
1453 return 0x40000000U;
1454}
1455static inline u32 gr_pd_hww_esr_en_enable_f(void)
1456{
1457 return 0x80000000U;
1458}
1459static inline u32 gr_pd_num_tpc_per_gpc_r(u32 i)
1460{
1461 return 0x00406028U + i*4U;
1462}
1463static inline u32 gr_pd_num_tpc_per_gpc__size_1_v(void)
1464{
1465 return 0x00000004U;
1466}
1467static inline u32 gr_pd_num_tpc_per_gpc_count0_f(u32 v)
1468{
1469 return (v & 0xfU) << 0U;
1470}
1471static inline u32 gr_pd_num_tpc_per_gpc_count1_f(u32 v)
1472{
1473 return (v & 0xfU) << 4U;
1474}
1475static inline u32 gr_pd_num_tpc_per_gpc_count2_f(u32 v)
1476{
1477 return (v & 0xfU) << 8U;
1478}
1479static inline u32 gr_pd_num_tpc_per_gpc_count3_f(u32 v)
1480{
1481 return (v & 0xfU) << 12U;
1482}
1483static inline u32 gr_pd_num_tpc_per_gpc_count4_f(u32 v)
1484{
1485 return (v & 0xfU) << 16U;
1486}
1487static inline u32 gr_pd_num_tpc_per_gpc_count5_f(u32 v)
1488{
1489 return (v & 0xfU) << 20U;
1490}
1491static inline u32 gr_pd_num_tpc_per_gpc_count6_f(u32 v)
1492{
1493 return (v & 0xfU) << 24U;
1494}
1495static inline u32 gr_pd_num_tpc_per_gpc_count7_f(u32 v)
1496{
1497 return (v & 0xfU) << 28U;
1498}
1499static inline u32 gr_pd_ab_dist_cfg0_r(void)
1500{
1501 return 0x004064c0U;
1502}
1503static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_en_f(void)
1504{
1505 return 0x80000000U;
1506}
1507static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_dis_f(void)
1508{
1509 return 0x0U;
1510}
1511static inline u32 gr_pd_ab_dist_cfg1_r(void)
1512{
1513 return 0x004064c4U;
1514}
1515static inline u32 gr_pd_ab_dist_cfg1_max_batches_init_f(void)
1516{
1517 return 0xffffU;
1518}
1519static inline u32 gr_pd_ab_dist_cfg1_max_output_f(u32 v)
1520{
1521 return (v & 0xffffU) << 16U;
1522}
1523static inline u32 gr_pd_ab_dist_cfg1_max_output_granularity_v(void)
1524{
1525 return 0x00000080U;
1526}
1527static inline u32 gr_pd_ab_dist_cfg2_r(void)
1528{
1529 return 0x004064c8U;
1530}
1531static inline u32 gr_pd_ab_dist_cfg2_token_limit_f(u32 v)
1532{
1533 return (v & 0xfffU) << 0U;
1534}
1535static inline u32 gr_pd_ab_dist_cfg2_token_limit_init_v(void)
1536{
1537 return 0x000001c0U;
1538}
1539static inline u32 gr_pd_ab_dist_cfg2_state_limit_f(u32 v)
1540{
1541 return (v & 0xfffU) << 16U;
1542}
1543static inline u32 gr_pd_ab_dist_cfg2_state_limit_scc_bundle_granularity_v(void)
1544{
1545 return 0x00000020U;
1546}
1547static inline u32 gr_pd_ab_dist_cfg2_state_limit_min_gpm_fifo_depths_v(void)
1548{
1549 return 0x00000182U;
1550}
1551static inline u32 gr_pd_pagepool_r(void)
1552{
1553 return 0x004064ccU;
1554}
1555static inline u32 gr_pd_pagepool_total_pages_f(u32 v)
1556{
1557 return (v & 0xffU) << 0U;
1558}
1559static inline u32 gr_pd_pagepool_valid_true_f(void)
1560{
1561 return 0x80000000U;
1562}
1563static inline u32 gr_pd_dist_skip_table_r(u32 i)
1564{
1565 return 0x004064d0U + i*4U;
1566}
1567static inline u32 gr_pd_dist_skip_table__size_1_v(void)
1568{
1569 return 0x00000008U;
1570}
1571static inline u32 gr_pd_dist_skip_table_gpc_4n0_mask_f(u32 v)
1572{
1573 return (v & 0xffU) << 0U;
1574}
1575static inline u32 gr_pd_dist_skip_table_gpc_4n1_mask_f(u32 v)
1576{
1577 return (v & 0xffU) << 8U;
1578}
1579static inline u32 gr_pd_dist_skip_table_gpc_4n2_mask_f(u32 v)
1580{
1581 return (v & 0xffU) << 16U;
1582}
1583static inline u32 gr_pd_dist_skip_table_gpc_4n3_mask_f(u32 v)
1584{
1585 return (v & 0xffU) << 24U;
1586}
1587static inline u32 gr_ds_debug_r(void)
1588{
1589 return 0x00405800U;
1590}
1591static inline u32 gr_ds_debug_timeslice_mode_disable_f(void)
1592{
1593 return 0x0U;
1594}
1595static inline u32 gr_ds_debug_timeslice_mode_enable_f(void)
1596{
1597 return 0x8000000U;
1598}
1599static inline u32 gr_ds_zbc_color_r_r(void)
1600{
1601 return 0x00405804U;
1602}
1603static inline u32 gr_ds_zbc_color_r_val_f(u32 v)
1604{
1605 return (v & 0xffffffffU) << 0U;
1606}
1607static inline u32 gr_ds_zbc_color_g_r(void)
1608{
1609 return 0x00405808U;
1610}
1611static inline u32 gr_ds_zbc_color_g_val_f(u32 v)
1612{
1613 return (v & 0xffffffffU) << 0U;
1614}
1615static inline u32 gr_ds_zbc_color_b_r(void)
1616{
1617 return 0x0040580cU;
1618}
1619static inline u32 gr_ds_zbc_color_b_val_f(u32 v)
1620{
1621 return (v & 0xffffffffU) << 0U;
1622}
1623static inline u32 gr_ds_zbc_color_a_r(void)
1624{
1625 return 0x00405810U;
1626}
1627static inline u32 gr_ds_zbc_color_a_val_f(u32 v)
1628{
1629 return (v & 0xffffffffU) << 0U;
1630}
1631static inline u32 gr_ds_zbc_color_fmt_r(void)
1632{
1633 return 0x00405814U;
1634}
1635static inline u32 gr_ds_zbc_color_fmt_val_f(u32 v)
1636{
1637 return (v & 0x7fU) << 0U;
1638}
1639static inline u32 gr_ds_zbc_color_fmt_val_invalid_f(void)
1640{
1641 return 0x0U;
1642}
1643static inline u32 gr_ds_zbc_color_fmt_val_zero_v(void)
1644{
1645 return 0x00000001U;
1646}
1647static inline u32 gr_ds_zbc_color_fmt_val_unorm_one_v(void)
1648{
1649 return 0x00000002U;
1650}
1651static inline u32 gr_ds_zbc_color_fmt_val_rf32_gf32_bf32_af32_v(void)
1652{
1653 return 0x00000004U;
1654}
1655static inline u32 gr_ds_zbc_color_fmt_val_a8_b8_g8_r8_v(void)
1656{
1657 return 0x00000028U;
1658}
1659static inline u32 gr_ds_zbc_z_r(void)
1660{
1661 return 0x00405818U;
1662}
1663static inline u32 gr_ds_zbc_z_val_s(void)
1664{
1665 return 32U;
1666}
1667static inline u32 gr_ds_zbc_z_val_f(u32 v)
1668{
1669 return (v & 0xffffffffU) << 0U;
1670}
1671static inline u32 gr_ds_zbc_z_val_m(void)
1672{
1673 return 0xffffffffU << 0U;
1674}
1675static inline u32 gr_ds_zbc_z_val_v(u32 r)
1676{
1677 return (r >> 0U) & 0xffffffffU;
1678}
1679static inline u32 gr_ds_zbc_z_val__init_v(void)
1680{
1681 return 0x00000000U;
1682}
1683static inline u32 gr_ds_zbc_z_val__init_f(void)
1684{
1685 return 0x0U;
1686}
1687static inline u32 gr_ds_zbc_z_fmt_r(void)
1688{
1689 return 0x0040581cU;
1690}
1691static inline u32 gr_ds_zbc_z_fmt_val_f(u32 v)
1692{
1693 return (v & 0x1U) << 0U;
1694}
1695static inline u32 gr_ds_zbc_z_fmt_val_invalid_f(void)
1696{
1697 return 0x0U;
1698}
1699static inline u32 gr_ds_zbc_z_fmt_val_fp32_v(void)
1700{
1701 return 0x00000001U;
1702}
1703static inline u32 gr_ds_zbc_tbl_index_r(void)
1704{
1705 return 0x00405820U;
1706}
1707static inline u32 gr_ds_zbc_tbl_index_val_f(u32 v)
1708{
1709 return (v & 0xfU) << 0U;
1710}
1711static inline u32 gr_ds_zbc_tbl_ld_r(void)
1712{
1713 return 0x00405824U;
1714}
1715static inline u32 gr_ds_zbc_tbl_ld_select_c_f(void)
1716{
1717 return 0x0U;
1718}
1719static inline u32 gr_ds_zbc_tbl_ld_select_z_f(void)
1720{
1721 return 0x1U;
1722}
1723static inline u32 gr_ds_zbc_tbl_ld_action_write_f(void)
1724{
1725 return 0x0U;
1726}
1727static inline u32 gr_ds_zbc_tbl_ld_trigger_active_f(void)
1728{
1729 return 0x4U;
1730}
1731static inline u32 gr_ds_tga_constraintlogic_r(void)
1732{
1733 return 0x00405830U;
1734}
1735static inline u32 gr_ds_tga_constraintlogic_beta_cbsize_f(u32 v)
1736{
1737 return (v & 0xffffU) << 16U;
1738}
1739static inline u32 gr_ds_tga_constraintlogic_alpha_cbsize_f(u32 v)
1740{
1741 return (v & 0xffffU) << 0U;
1742}
1743static inline u32 gr_ds_hww_esr_r(void)
1744{
1745 return 0x00405840U;
1746}
1747static inline u32 gr_ds_hww_esr_reset_s(void)
1748{
1749 return 1U;
1750}
1751static inline u32 gr_ds_hww_esr_reset_f(u32 v)
1752{
1753 return (v & 0x1U) << 30U;
1754}
1755static inline u32 gr_ds_hww_esr_reset_m(void)
1756{
1757 return 0x1U << 30U;
1758}
1759static inline u32 gr_ds_hww_esr_reset_v(u32 r)
1760{
1761 return (r >> 30U) & 0x1U;
1762}
1763static inline u32 gr_ds_hww_esr_reset_task_v(void)
1764{
1765 return 0x00000001U;
1766}
1767static inline u32 gr_ds_hww_esr_reset_task_f(void)
1768{
1769 return 0x40000000U;
1770}
1771static inline u32 gr_ds_hww_esr_en_enabled_f(void)
1772{
1773 return 0x80000000U;
1774}
1775static inline u32 gr_ds_hww_esr_2_r(void)
1776{
1777 return 0x00405848U;
1778}
1779static inline u32 gr_ds_hww_esr_2_reset_s(void)
1780{
1781 return 1U;
1782}
1783static inline u32 gr_ds_hww_esr_2_reset_f(u32 v)
1784{
1785 return (v & 0x1U) << 30U;
1786}
1787static inline u32 gr_ds_hww_esr_2_reset_m(void)
1788{
1789 return 0x1U << 30U;
1790}
1791static inline u32 gr_ds_hww_esr_2_reset_v(u32 r)
1792{
1793 return (r >> 30U) & 0x1U;
1794}
1795static inline u32 gr_ds_hww_esr_2_reset_task_v(void)
1796{
1797 return 0x00000001U;
1798}
1799static inline u32 gr_ds_hww_esr_2_reset_task_f(void)
1800{
1801 return 0x40000000U;
1802}
1803static inline u32 gr_ds_hww_esr_2_en_enabled_f(void)
1804{
1805 return 0x80000000U;
1806}
1807static inline u32 gr_ds_hww_report_mask_r(void)
1808{
1809 return 0x00405844U;
1810}
1811static inline u32 gr_ds_hww_report_mask_sph0_err_report_f(void)
1812{
1813 return 0x1U;
1814}
1815static inline u32 gr_ds_hww_report_mask_sph1_err_report_f(void)
1816{
1817 return 0x2U;
1818}
1819static inline u32 gr_ds_hww_report_mask_sph2_err_report_f(void)
1820{
1821 return 0x4U;
1822}
1823static inline u32 gr_ds_hww_report_mask_sph3_err_report_f(void)
1824{
1825 return 0x8U;
1826}
1827static inline u32 gr_ds_hww_report_mask_sph4_err_report_f(void)
1828{
1829 return 0x10U;
1830}
1831static inline u32 gr_ds_hww_report_mask_sph5_err_report_f(void)
1832{
1833 return 0x20U;
1834}
1835static inline u32 gr_ds_hww_report_mask_sph6_err_report_f(void)
1836{
1837 return 0x40U;
1838}
1839static inline u32 gr_ds_hww_report_mask_sph7_err_report_f(void)
1840{
1841 return 0x80U;
1842}
1843static inline u32 gr_ds_hww_report_mask_sph8_err_report_f(void)
1844{
1845 return 0x100U;
1846}
1847static inline u32 gr_ds_hww_report_mask_sph9_err_report_f(void)
1848{
1849 return 0x200U;
1850}
1851static inline u32 gr_ds_hww_report_mask_sph10_err_report_f(void)
1852{
1853 return 0x400U;
1854}
1855static inline u32 gr_ds_hww_report_mask_sph11_err_report_f(void)
1856{
1857 return 0x800U;
1858}
1859static inline u32 gr_ds_hww_report_mask_sph12_err_report_f(void)
1860{
1861 return 0x1000U;
1862}
1863static inline u32 gr_ds_hww_report_mask_sph13_err_report_f(void)
1864{
1865 return 0x2000U;
1866}
1867static inline u32 gr_ds_hww_report_mask_sph14_err_report_f(void)
1868{
1869 return 0x4000U;
1870}
1871static inline u32 gr_ds_hww_report_mask_sph15_err_report_f(void)
1872{
1873 return 0x8000U;
1874}
1875static inline u32 gr_ds_hww_report_mask_sph16_err_report_f(void)
1876{
1877 return 0x10000U;
1878}
1879static inline u32 gr_ds_hww_report_mask_sph17_err_report_f(void)
1880{
1881 return 0x20000U;
1882}
1883static inline u32 gr_ds_hww_report_mask_sph18_err_report_f(void)
1884{
1885 return 0x40000U;
1886}
1887static inline u32 gr_ds_hww_report_mask_sph19_err_report_f(void)
1888{
1889 return 0x80000U;
1890}
1891static inline u32 gr_ds_hww_report_mask_sph20_err_report_f(void)
1892{
1893 return 0x100000U;
1894}
1895static inline u32 gr_ds_hww_report_mask_sph21_err_report_f(void)
1896{
1897 return 0x200000U;
1898}
1899static inline u32 gr_ds_hww_report_mask_sph22_err_report_f(void)
1900{
1901 return 0x400000U;
1902}
1903static inline u32 gr_ds_hww_report_mask_sph23_err_report_f(void)
1904{
1905 return 0x800000U;
1906}
1907static inline u32 gr_ds_hww_report_mask_2_r(void)
1908{
1909 return 0x0040584cU;
1910}
1911static inline u32 gr_ds_hww_report_mask_2_sph24_err_report_f(void)
1912{
1913 return 0x1U;
1914}
1915static inline u32 gr_ds_num_tpc_per_gpc_r(u32 i)
1916{
1917 return 0x00405870U + i*4U;
1918}
1919static inline u32 gr_scc_bundle_cb_base_r(void)
1920{
1921 return 0x00408004U;
1922}
1923static inline u32 gr_scc_bundle_cb_base_addr_39_8_f(u32 v)
1924{
1925 return (v & 0xffffffffU) << 0U;
1926}
1927static inline u32 gr_scc_bundle_cb_base_addr_39_8_align_bits_v(void)
1928{
1929 return 0x00000008U;
1930}
1931static inline u32 gr_scc_bundle_cb_size_r(void)
1932{
1933 return 0x00408008U;
1934}
1935static inline u32 gr_scc_bundle_cb_size_div_256b_f(u32 v)
1936{
1937 return (v & 0x7ffU) << 0U;
1938}
1939static inline u32 gr_scc_bundle_cb_size_div_256b__prod_v(void)
1940{
1941 return 0x00000018U;
1942}
1943static inline u32 gr_scc_bundle_cb_size_div_256b_byte_granularity_v(void)
1944{
1945 return 0x00000100U;
1946}
1947static inline u32 gr_scc_bundle_cb_size_valid_false_v(void)
1948{
1949 return 0x00000000U;
1950}
1951static inline u32 gr_scc_bundle_cb_size_valid_false_f(void)
1952{
1953 return 0x0U;
1954}
1955static inline u32 gr_scc_bundle_cb_size_valid_true_f(void)
1956{
1957 return 0x80000000U;
1958}
1959static inline u32 gr_scc_pagepool_base_r(void)
1960{
1961 return 0x0040800cU;
1962}
1963static inline u32 gr_scc_pagepool_base_addr_39_8_f(u32 v)
1964{
1965 return (v & 0xffffffffU) << 0U;
1966}
1967static inline u32 gr_scc_pagepool_base_addr_39_8_align_bits_v(void)
1968{
1969 return 0x00000008U;
1970}
1971static inline u32 gr_scc_pagepool_r(void)
1972{
1973 return 0x00408010U;
1974}
1975static inline u32 gr_scc_pagepool_total_pages_f(u32 v)
1976{
1977 return (v & 0xffU) << 0U;
1978}
1979static inline u32 gr_scc_pagepool_total_pages_hwmax_v(void)
1980{
1981 return 0x00000000U;
1982}
1983static inline u32 gr_scc_pagepool_total_pages_hwmax_value_v(void)
1984{
1985 return 0x00000080U;
1986}
1987static inline u32 gr_scc_pagepool_total_pages_byte_granularity_v(void)
1988{
1989 return 0x00000100U;
1990}
1991static inline u32 gr_scc_pagepool_max_valid_pages_s(void)
1992{
1993 return 8U;
1994}
1995static inline u32 gr_scc_pagepool_max_valid_pages_f(u32 v)
1996{
1997 return (v & 0xffU) << 8U;
1998}
1999static inline u32 gr_scc_pagepool_max_valid_pages_m(void)
2000{
2001 return 0xffU << 8U;
2002}
2003static inline u32 gr_scc_pagepool_max_valid_pages_v(u32 r)
2004{
2005 return (r >> 8U) & 0xffU;
2006}
2007static inline u32 gr_scc_pagepool_valid_true_f(void)
2008{
2009 return 0x80000000U;
2010}
2011static inline u32 gr_scc_init_r(void)
2012{
2013 return 0x0040802cU;
2014}
2015static inline u32 gr_scc_init_ram_trigger_f(void)
2016{
2017 return 0x1U;
2018}
2019static inline u32 gr_scc_hww_esr_r(void)
2020{
2021 return 0x00408030U;
2022}
2023static inline u32 gr_scc_hww_esr_reset_active_f(void)
2024{
2025 return 0x40000000U;
2026}
2027static inline u32 gr_scc_hww_esr_en_enable_f(void)
2028{
2029 return 0x80000000U;
2030}
2031static inline u32 gr_sked_hww_esr_r(void)
2032{
2033 return 0x00407020U;
2034}
2035static inline u32 gr_sked_hww_esr_reset_active_f(void)
2036{
2037 return 0x40000000U;
2038}
2039static inline u32 gr_cwd_fs_r(void)
2040{
2041 return 0x00405b00U;
2042}
2043static inline u32 gr_cwd_fs_num_gpcs_f(u32 v)
2044{
2045 return (v & 0xffU) << 0U;
2046}
2047static inline u32 gr_cwd_fs_num_tpcs_f(u32 v)
2048{
2049 return (v & 0xffU) << 8U;
2050}
2051static inline u32 gr_cwd_gpc_tpc_id_r(u32 i)
2052{
2053 return 0x00405b60U + i*4U;
2054}
2055static inline u32 gr_cwd_gpc_tpc_id_tpc0_s(void)
2056{
2057 return 4U;
2058}
2059static inline u32 gr_cwd_gpc_tpc_id_tpc0_f(u32 v)
2060{
2061 return (v & 0xfU) << 0U;
2062}
2063static inline u32 gr_cwd_gpc_tpc_id_gpc0_s(void)
2064{
2065 return 4U;
2066}
2067static inline u32 gr_cwd_gpc_tpc_id_gpc0_f(u32 v)
2068{
2069 return (v & 0xfU) << 4U;
2070}
2071static inline u32 gr_cwd_gpc_tpc_id_tpc1_f(u32 v)
2072{
2073 return (v & 0xfU) << 8U;
2074}
2075static inline u32 gr_cwd_sm_id_r(u32 i)
2076{
2077 return 0x00405ba0U + i*4U;
2078}
2079static inline u32 gr_cwd_sm_id__size_1_v(void)
2080{
2081 return 0x00000006U;
2082}
2083static inline u32 gr_cwd_sm_id_tpc0_f(u32 v)
2084{
2085 return (v & 0xffU) << 0U;
2086}
2087static inline u32 gr_cwd_sm_id_tpc1_f(u32 v)
2088{
2089 return (v & 0xffU) << 8U;
2090}
2091static inline u32 gr_gpc0_fs_gpc_r(void)
2092{
2093 return 0x00502608U;
2094}
2095static inline u32 gr_gpc0_fs_gpc_num_available_tpcs_v(u32 r)
2096{
2097 return (r >> 0U) & 0x1fU;
2098}
2099static inline u32 gr_gpc0_fs_gpc_num_available_zculls_v(u32 r)
2100{
2101 return (r >> 16U) & 0x1fU;
2102}
2103static inline u32 gr_gpc0_cfg_r(void)
2104{
2105 return 0x00502620U;
2106}
2107static inline u32 gr_gpc0_cfg_imem_sz_v(u32 r)
2108{
2109 return (r >> 0U) & 0xffU;
2110}
2111static inline u32 gr_gpccs_rc_lanes_r(void)
2112{
2113 return 0x00502880U;
2114}
2115static inline u32 gr_gpccs_rc_lanes_num_chains_s(void)
2116{
2117 return 6U;
2118}
2119static inline u32 gr_gpccs_rc_lanes_num_chains_f(u32 v)
2120{
2121 return (v & 0x3fU) << 0U;
2122}
2123static inline u32 gr_gpccs_rc_lanes_num_chains_m(void)
2124{
2125 return 0x3fU << 0U;
2126}
2127static inline u32 gr_gpccs_rc_lanes_num_chains_v(u32 r)
2128{
2129 return (r >> 0U) & 0x3fU;
2130}
2131static inline u32 gr_gpccs_rc_lane_size_r(u32 i)
2132{
2133 return 0x00502910U + i*0U;
2134}
2135static inline u32 gr_gpccs_rc_lane_size__size_1_v(void)
2136{
2137 return 0x00000010U;
2138}
2139static inline u32 gr_gpccs_rc_lane_size_v_s(void)
2140{
2141 return 24U;
2142}
2143static inline u32 gr_gpccs_rc_lane_size_v_f(u32 v)
2144{
2145 return (v & 0xffffffU) << 0U;
2146}
2147static inline u32 gr_gpccs_rc_lane_size_v_m(void)
2148{
2149 return 0xffffffU << 0U;
2150}
2151static inline u32 gr_gpccs_rc_lane_size_v_v(u32 r)
2152{
2153 return (r >> 0U) & 0xffffffU;
2154}
2155static inline u32 gr_gpccs_rc_lane_size_v_0_v(void)
2156{
2157 return 0x00000000U;
2158}
2159static inline u32 gr_gpccs_rc_lane_size_v_0_f(void)
2160{
2161 return 0x0U;
2162}
2163static inline u32 gr_gpc0_zcull_fs_r(void)
2164{
2165 return 0x00500910U;
2166}
2167static inline u32 gr_gpc0_zcull_fs_num_sms_f(u32 v)
2168{
2169 return (v & 0x1ffU) << 0U;
2170}
2171static inline u32 gr_gpc0_zcull_fs_num_active_banks_f(u32 v)
2172{
2173 return (v & 0xfU) << 16U;
2174}
2175static inline u32 gr_gpc0_zcull_ram_addr_r(void)
2176{
2177 return 0x00500914U;
2178}
2179static inline u32 gr_gpc0_zcull_ram_addr_tiles_per_hypertile_row_per_gpc_f(u32 v)
2180{
2181 return (v & 0xfU) << 0U;
2182}
2183static inline u32 gr_gpc0_zcull_ram_addr_row_offset_f(u32 v)
2184{
2185 return (v & 0xfU) << 8U;
2186}
2187static inline u32 gr_gpc0_zcull_sm_num_rcp_r(void)
2188{
2189 return 0x00500918U;
2190}
2191static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative_f(u32 v)
2192{
2193 return (v & 0xffffffU) << 0U;
2194}
2195static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative__max_v(void)
2196{
2197 return 0x00800000U;
2198}
2199static inline u32 gr_gpc0_zcull_total_ram_size_r(void)
2200{
2201 return 0x00500920U;
2202}
2203static inline u32 gr_gpc0_zcull_total_ram_size_num_aliquots_f(u32 v)
2204{
2205 return (v & 0xffffU) << 0U;
2206}
2207static inline u32 gr_gpc0_zcull_zcsize_r(u32 i)
2208{
2209 return 0x00500a04U + i*32U;
2210}
2211static inline u32 gr_gpc0_zcull_zcsize_height_subregion__multiple_v(void)
2212{
2213 return 0x00000040U;
2214}
2215static inline u32 gr_gpc0_zcull_zcsize_width_subregion__multiple_v(void)
2216{
2217 return 0x00000010U;
2218}
2219static inline u32 gr_gpc0_gpm_pd_sm_id_r(u32 i)
2220{
2221 return 0x00500c10U + i*4U;
2222}
2223static inline u32 gr_gpc0_gpm_pd_sm_id_id_f(u32 v)
2224{
2225 return (v & 0xffU) << 0U;
2226}
2227static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_r(u32 i)
2228{
2229 return 0x00500c30U + i*4U;
2230}
2231static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(u32 r)
2232{
2233 return (r >> 0U) & 0xffU;
2234}
2235static inline u32 gr_gpc0_tpc0_pe_cfg_smid_r(void)
2236{
2237 return 0x00504088U;
2238}
2239static inline u32 gr_gpc0_tpc0_pe_cfg_smid_value_f(u32 v)
2240{
2241 return (v & 0xffffU) << 0U;
2242}
2243static inline u32 gr_gpc0_tpc0_sm_cfg_r(void)
2244{
2245 return 0x00504698U;
2246}
2247static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_f(u32 v)
2248{
2249 return (v & 0xffffU) << 0U;
2250}
2251static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_v(u32 r)
2252{
2253 return (r >> 0U) & 0xffffU;
2254}
2255static inline u32 gr_gpc0_tpc0_sm_arch_r(void)
2256{
2257 return 0x0050469cU;
2258}
2259static inline u32 gr_gpc0_tpc0_sm_arch_warp_count_v(u32 r)
2260{
2261 return (r >> 0U) & 0xffU;
2262}
2263static inline u32 gr_gpc0_tpc0_sm_arch_spa_version_v(u32 r)
2264{
2265 return (r >> 8U) & 0xfffU;
2266}
2267static inline u32 gr_gpc0_tpc0_sm_arch_sm_version_v(u32 r)
2268{
2269 return (r >> 20U) & 0xfffU;
2270}
2271static inline u32 gr_gpc0_ppc0_pes_vsc_strem_r(void)
2272{
2273 return 0x00503018U;
2274}
2275static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_m(void)
2276{
2277 return 0x1U << 0U;
2278}
2279static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_true_f(void)
2280{
2281 return 0x1U;
2282}
2283static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_r(void)
2284{
2285 return 0x005030c0U;
2286}
2287static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_f(u32 v)
2288{
2289 return (v & 0xffffU) << 0U;
2290}
2291static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_m(void)
2292{
2293 return 0xffffU << 0U;
2294}
2295static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_default_v(void)
2296{
2297 return 0x00000400U;
2298}
2299static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v(void)
2300{
2301 return 0x00000020U;
2302}
2303static inline u32 gr_gpc0_ppc0_cbm_beta_cb_offset_r(void)
2304{
2305 return 0x005030f4U;
2306}
2307static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_r(void)
2308{
2309 return 0x005030e4U;
2310}
2311static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(u32 v)
2312{
2313 return (v & 0xffffU) << 0U;
2314}
2315static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_m(void)
2316{
2317 return 0xffffU << 0U;
2318}
2319static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_default_v(void)
2320{
2321 return 0x00000800U;
2322}
2323static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_granularity_v(void)
2324{
2325 return 0x00000020U;
2326}
2327static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_offset_r(void)
2328{
2329 return 0x005030f8U;
2330}
2331static inline u32 gr_gpcs_tpcs_tex_m_dbg2_r(void)
2332{
2333 return 0x00419a3cU;
2334}
2335static inline u32 gr_gpcs_tpcs_tex_m_dbg2_lg_rd_coalesce_en_f(u32 v)
2336{
2337 return (v & 0x1U) << 2U;
2338}
2339static inline u32 gr_gpcs_tpcs_tex_m_dbg2_lg_rd_coalesce_en_m(void)
2340{
2341 return 0x1U << 2U;
2342}
2343static inline u32 gr_gpcs_tpcs_tex_m_dbg2_su_rd_coalesce_en_f(u32 v)
2344{
2345 return (v & 0x1U) << 4U;
2346}
2347static inline u32 gr_gpcs_tpcs_tex_m_dbg2_su_rd_coalesce_en_m(void)
2348{
2349 return 0x1U << 4U;
2350}
2351static inline u32 gr_gpcs_tpcs_tex_m_dbg2_tex_rd_coalesce_en_f(u32 v)
2352{
2353 return (v & 0x1U) << 5U;
2354}
2355static inline u32 gr_gpcs_tpcs_tex_m_dbg2_tex_rd_coalesce_en_m(void)
2356{
2357 return 0x1U << 5U;
2358}
2359static inline u32 gr_gpccs_falcon_addr_r(void)
2360{
2361 return 0x0041a0acU;
2362}
2363static inline u32 gr_gpccs_falcon_addr_lsb_s(void)
2364{
2365 return 6U;
2366}
2367static inline u32 gr_gpccs_falcon_addr_lsb_f(u32 v)
2368{
2369 return (v & 0x3fU) << 0U;
2370}
2371static inline u32 gr_gpccs_falcon_addr_lsb_m(void)
2372{
2373 return 0x3fU << 0U;
2374}
2375static inline u32 gr_gpccs_falcon_addr_lsb_v(u32 r)
2376{
2377 return (r >> 0U) & 0x3fU;
2378}
2379static inline u32 gr_gpccs_falcon_addr_lsb_init_v(void)
2380{
2381 return 0x00000000U;
2382}
2383static inline u32 gr_gpccs_falcon_addr_lsb_init_f(void)
2384{
2385 return 0x0U;
2386}
2387static inline u32 gr_gpccs_falcon_addr_msb_s(void)
2388{
2389 return 6U;
2390}
2391static inline u32 gr_gpccs_falcon_addr_msb_f(u32 v)
2392{
2393 return (v & 0x3fU) << 6U;
2394}
2395static inline u32 gr_gpccs_falcon_addr_msb_m(void)
2396{
2397 return 0x3fU << 6U;
2398}
2399static inline u32 gr_gpccs_falcon_addr_msb_v(u32 r)
2400{
2401 return (r >> 6U) & 0x3fU;
2402}
2403static inline u32 gr_gpccs_falcon_addr_msb_init_v(void)
2404{
2405 return 0x00000000U;
2406}
2407static inline u32 gr_gpccs_falcon_addr_msb_init_f(void)
2408{
2409 return 0x0U;
2410}
2411static inline u32 gr_gpccs_falcon_addr_ext_s(void)
2412{
2413 return 12U;
2414}
2415static inline u32 gr_gpccs_falcon_addr_ext_f(u32 v)
2416{
2417 return (v & 0xfffU) << 0U;
2418}
2419static inline u32 gr_gpccs_falcon_addr_ext_m(void)
2420{
2421 return 0xfffU << 0U;
2422}
2423static inline u32 gr_gpccs_falcon_addr_ext_v(u32 r)
2424{
2425 return (r >> 0U) & 0xfffU;
2426}
2427static inline u32 gr_gpccs_cpuctl_r(void)
2428{
2429 return 0x0041a100U;
2430}
2431static inline u32 gr_gpccs_cpuctl_startcpu_f(u32 v)
2432{
2433 return (v & 0x1U) << 1U;
2434}
2435static inline u32 gr_gpccs_dmactl_r(void)
2436{
2437 return 0x0041a10cU;
2438}
2439static inline u32 gr_gpccs_dmactl_require_ctx_f(u32 v)
2440{
2441 return (v & 0x1U) << 0U;
2442}
2443static inline u32 gr_gpccs_dmactl_dmem_scrubbing_m(void)
2444{
2445 return 0x1U << 1U;
2446}
2447static inline u32 gr_gpccs_dmactl_imem_scrubbing_m(void)
2448{
2449 return 0x1U << 2U;
2450}
2451static inline u32 gr_gpccs_imemc_r(u32 i)
2452{
2453 return 0x0041a180U + i*16U;
2454}
2455static inline u32 gr_gpccs_imemc_offs_f(u32 v)
2456{
2457 return (v & 0x3fU) << 2U;
2458}
2459static inline u32 gr_gpccs_imemc_blk_f(u32 v)
2460{
2461 return (v & 0xffU) << 8U;
2462}
2463static inline u32 gr_gpccs_imemc_aincw_f(u32 v)
2464{
2465 return (v & 0x1U) << 24U;
2466}
2467static inline u32 gr_gpccs_imemd_r(u32 i)
2468{
2469 return 0x0041a184U + i*16U;
2470}
2471static inline u32 gr_gpccs_imemt_r(u32 i)
2472{
2473 return 0x0041a188U + i*16U;
2474}
2475static inline u32 gr_gpccs_imemt__size_1_v(void)
2476{
2477 return 0x00000004U;
2478}
2479static inline u32 gr_gpccs_imemt_tag_f(u32 v)
2480{
2481 return (v & 0xffffU) << 0U;
2482}
2483static inline u32 gr_gpccs_dmemc_r(u32 i)
2484{
2485 return 0x0041a1c0U + i*8U;
2486}
2487static inline u32 gr_gpccs_dmemc_offs_f(u32 v)
2488{
2489 return (v & 0x3fU) << 2U;
2490}
2491static inline u32 gr_gpccs_dmemc_blk_f(u32 v)
2492{
2493 return (v & 0xffU) << 8U;
2494}
2495static inline u32 gr_gpccs_dmemc_aincw_f(u32 v)
2496{
2497 return (v & 0x1U) << 24U;
2498}
2499static inline u32 gr_gpccs_dmemd_r(u32 i)
2500{
2501 return 0x0041a1c4U + i*8U;
2502}
2503static inline u32 gr_gpccs_ctxsw_mailbox_r(u32 i)
2504{
2505 return 0x0041a800U + i*4U;
2506}
2507static inline u32 gr_gpccs_ctxsw_mailbox_value_f(u32 v)
2508{
2509 return (v & 0xffffffffU) << 0U;
2510}
2511static inline u32 gr_gpcs_swdx_bundle_cb_base_r(void)
2512{
2513 return 0x00418e24U;
2514}
2515static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_s(void)
2516{
2517 return 32U;
2518}
2519static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_f(u32 v)
2520{
2521 return (v & 0xffffffffU) << 0U;
2522}
2523static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_m(void)
2524{
2525 return 0xffffffffU << 0U;
2526}
2527static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_v(u32 r)
2528{
2529 return (r >> 0U) & 0xffffffffU;
2530}
2531static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_v(void)
2532{
2533 return 0x00000000U;
2534}
2535static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_f(void)
2536{
2537 return 0x0U;
2538}
2539static inline u32 gr_gpcs_swdx_bundle_cb_size_r(void)
2540{
2541 return 0x00418e28U;
2542}
2543static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_s(void)
2544{
2545 return 11U;
2546}
2547static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_f(u32 v)
2548{
2549 return (v & 0x7ffU) << 0U;
2550}
2551static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_m(void)
2552{
2553 return 0x7ffU << 0U;
2554}
2555static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_v(u32 r)
2556{
2557 return (r >> 0U) & 0x7ffU;
2558}
2559static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_v(void)
2560{
2561 return 0x00000018U;
2562}
2563static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_f(void)
2564{
2565 return 0x18U;
2566}
2567static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_s(void)
2568{
2569 return 1U;
2570}
2571static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_f(u32 v)
2572{
2573 return (v & 0x1U) << 31U;
2574}
2575static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_m(void)
2576{
2577 return 0x1U << 31U;
2578}
2579static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_v(u32 r)
2580{
2581 return (r >> 31U) & 0x1U;
2582}
2583static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_v(void)
2584{
2585 return 0x00000000U;
2586}
2587static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_f(void)
2588{
2589 return 0x0U;
2590}
2591static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_v(void)
2592{
2593 return 0x00000001U;
2594}
2595static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_f(void)
2596{
2597 return 0x80000000U;
2598}
2599static inline u32 gr_gpcs_swdx_tc_beta_cb_size_r(u32 i)
2600{
2601 return 0x00418ea0U + i*4U;
2602}
2603static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_f(u32 v)
2604{
2605 return (v & 0xffffU) << 0U;
2606}
2607static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_m(void)
2608{
2609 return 0xffffU << 0U;
2610}
2611static inline u32 gr_gpcs_swdx_tc_beta_cb_size_div3_f(u32 v)
2612{
2613 return (v & 0xffffU) << 16U;
2614}
2615static inline u32 gr_gpcs_swdx_tc_beta_cb_size_div3_m(void)
2616{
2617 return 0xffffU << 16U;
2618}
2619static inline u32 gr_gpcs_swdx_rm_pagepool_r(void)
2620{
2621 return 0x00418e30U;
2622}
2623static inline u32 gr_gpcs_swdx_rm_pagepool_total_pages_f(u32 v)
2624{
2625 return (v & 0xffU) << 0U;
2626}
2627static inline u32 gr_gpcs_swdx_rm_pagepool_valid_true_f(void)
2628{
2629 return 0x80000000U;
2630}
2631static inline u32 gr_gpcs_setup_attrib_cb_base_r(void)
2632{
2633 return 0x00418810U;
2634}
2635static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_f(u32 v)
2636{
2637 return (v & 0xfffffffU) << 0U;
2638}
2639static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_align_bits_v(void)
2640{
2641 return 0x0000000cU;
2642}
2643static inline u32 gr_gpcs_setup_attrib_cb_base_valid_true_f(void)
2644{
2645 return 0x80000000U;
2646}
2647static inline u32 gr_crstr_gpc_map0_r(void)
2648{
2649 return 0x00418b08U;
2650}
2651static inline u32 gr_crstr_gpc_map0_tile0_f(u32 v)
2652{
2653 return (v & 0x7U) << 0U;
2654}
2655static inline u32 gr_crstr_gpc_map0_tile1_f(u32 v)
2656{
2657 return (v & 0x7U) << 5U;
2658}
2659static inline u32 gr_crstr_gpc_map0_tile2_f(u32 v)
2660{
2661 return (v & 0x7U) << 10U;
2662}
2663static inline u32 gr_crstr_gpc_map0_tile3_f(u32 v)
2664{
2665 return (v & 0x7U) << 15U;
2666}
2667static inline u32 gr_crstr_gpc_map0_tile4_f(u32 v)
2668{
2669 return (v & 0x7U) << 20U;
2670}
2671static inline u32 gr_crstr_gpc_map0_tile5_f(u32 v)
2672{
2673 return (v & 0x7U) << 25U;
2674}
2675static inline u32 gr_crstr_gpc_map1_r(void)
2676{
2677 return 0x00418b0cU;
2678}
2679static inline u32 gr_crstr_gpc_map1_tile6_f(u32 v)
2680{
2681 return (v & 0x7U) << 0U;
2682}
2683static inline u32 gr_crstr_gpc_map1_tile7_f(u32 v)
2684{
2685 return (v & 0x7U) << 5U;
2686}
2687static inline u32 gr_crstr_gpc_map1_tile8_f(u32 v)
2688{
2689 return (v & 0x7U) << 10U;
2690}
2691static inline u32 gr_crstr_gpc_map1_tile9_f(u32 v)
2692{
2693 return (v & 0x7U) << 15U;
2694}
2695static inline u32 gr_crstr_gpc_map1_tile10_f(u32 v)
2696{
2697 return (v & 0x7U) << 20U;
2698}
2699static inline u32 gr_crstr_gpc_map1_tile11_f(u32 v)
2700{
2701 return (v & 0x7U) << 25U;
2702}
2703static inline u32 gr_crstr_gpc_map2_r(void)
2704{
2705 return 0x00418b10U;
2706}
2707static inline u32 gr_crstr_gpc_map2_tile12_f(u32 v)
2708{
2709 return (v & 0x7U) << 0U;
2710}
2711static inline u32 gr_crstr_gpc_map2_tile13_f(u32 v)
2712{
2713 return (v & 0x7U) << 5U;
2714}
2715static inline u32 gr_crstr_gpc_map2_tile14_f(u32 v)
2716{
2717 return (v & 0x7U) << 10U;
2718}
2719static inline u32 gr_crstr_gpc_map2_tile15_f(u32 v)
2720{
2721 return (v & 0x7U) << 15U;
2722}
2723static inline u32 gr_crstr_gpc_map2_tile16_f(u32 v)
2724{
2725 return (v & 0x7U) << 20U;
2726}
2727static inline u32 gr_crstr_gpc_map2_tile17_f(u32 v)
2728{
2729 return (v & 0x7U) << 25U;
2730}
2731static inline u32 gr_crstr_gpc_map3_r(void)
2732{
2733 return 0x00418b14U;
2734}
2735static inline u32 gr_crstr_gpc_map3_tile18_f(u32 v)
2736{
2737 return (v & 0x7U) << 0U;
2738}
2739static inline u32 gr_crstr_gpc_map3_tile19_f(u32 v)
2740{
2741 return (v & 0x7U) << 5U;
2742}
2743static inline u32 gr_crstr_gpc_map3_tile20_f(u32 v)
2744{
2745 return (v & 0x7U) << 10U;
2746}
2747static inline u32 gr_crstr_gpc_map3_tile21_f(u32 v)
2748{
2749 return (v & 0x7U) << 15U;
2750}
2751static inline u32 gr_crstr_gpc_map3_tile22_f(u32 v)
2752{
2753 return (v & 0x7U) << 20U;
2754}
2755static inline u32 gr_crstr_gpc_map3_tile23_f(u32 v)
2756{
2757 return (v & 0x7U) << 25U;
2758}
2759static inline u32 gr_crstr_gpc_map4_r(void)
2760{
2761 return 0x00418b18U;
2762}
2763static inline u32 gr_crstr_gpc_map4_tile24_f(u32 v)
2764{
2765 return (v & 0x7U) << 0U;
2766}
2767static inline u32 gr_crstr_gpc_map4_tile25_f(u32 v)
2768{
2769 return (v & 0x7U) << 5U;
2770}
2771static inline u32 gr_crstr_gpc_map4_tile26_f(u32 v)
2772{
2773 return (v & 0x7U) << 10U;
2774}
2775static inline u32 gr_crstr_gpc_map4_tile27_f(u32 v)
2776{
2777 return (v & 0x7U) << 15U;
2778}
2779static inline u32 gr_crstr_gpc_map4_tile28_f(u32 v)
2780{
2781 return (v & 0x7U) << 20U;
2782}
2783static inline u32 gr_crstr_gpc_map4_tile29_f(u32 v)
2784{
2785 return (v & 0x7U) << 25U;
2786}
2787static inline u32 gr_crstr_gpc_map5_r(void)
2788{
2789 return 0x00418b1cU;
2790}
2791static inline u32 gr_crstr_gpc_map5_tile30_f(u32 v)
2792{
2793 return (v & 0x7U) << 0U;
2794}
2795static inline u32 gr_crstr_gpc_map5_tile31_f(u32 v)
2796{
2797 return (v & 0x7U) << 5U;
2798}
2799static inline u32 gr_crstr_gpc_map5_tile32_f(u32 v)
2800{
2801 return (v & 0x7U) << 10U;
2802}
2803static inline u32 gr_crstr_gpc_map5_tile33_f(u32 v)
2804{
2805 return (v & 0x7U) << 15U;
2806}
2807static inline u32 gr_crstr_gpc_map5_tile34_f(u32 v)
2808{
2809 return (v & 0x7U) << 20U;
2810}
2811static inline u32 gr_crstr_gpc_map5_tile35_f(u32 v)
2812{
2813 return (v & 0x7U) << 25U;
2814}
2815static inline u32 gr_crstr_map_table_cfg_r(void)
2816{
2817 return 0x00418bb8U;
2818}
2819static inline u32 gr_crstr_map_table_cfg_row_offset_f(u32 v)
2820{
2821 return (v & 0xffU) << 0U;
2822}
2823static inline u32 gr_crstr_map_table_cfg_num_entries_f(u32 v)
2824{
2825 return (v & 0xffU) << 8U;
2826}
2827static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_r(void)
2828{
2829 return 0x00418980U;
2830}
2831static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_0_f(u32 v)
2832{
2833 return (v & 0x7U) << 0U;
2834}
2835static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_1_f(u32 v)
2836{
2837 return (v & 0x7U) << 4U;
2838}
2839static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_2_f(u32 v)
2840{
2841 return (v & 0x7U) << 8U;
2842}
2843static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_3_f(u32 v)
2844{
2845 return (v & 0x7U) << 12U;
2846}
2847static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_4_f(u32 v)
2848{
2849 return (v & 0x7U) << 16U;
2850}
2851static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_5_f(u32 v)
2852{
2853 return (v & 0x7U) << 20U;
2854}
2855static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_6_f(u32 v)
2856{
2857 return (v & 0x7U) << 24U;
2858}
2859static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_7_f(u32 v)
2860{
2861 return (v & 0x7U) << 28U;
2862}
2863static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_r(void)
2864{
2865 return 0x00418984U;
2866}
2867static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_8_f(u32 v)
2868{
2869 return (v & 0x7U) << 0U;
2870}
2871static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_9_f(u32 v)
2872{
2873 return (v & 0x7U) << 4U;
2874}
2875static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_10_f(u32 v)
2876{
2877 return (v & 0x7U) << 8U;
2878}
2879static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_11_f(u32 v)
2880{
2881 return (v & 0x7U) << 12U;
2882}
2883static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_12_f(u32 v)
2884{
2885 return (v & 0x7U) << 16U;
2886}
2887static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_13_f(u32 v)
2888{
2889 return (v & 0x7U) << 20U;
2890}
2891static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_14_f(u32 v)
2892{
2893 return (v & 0x7U) << 24U;
2894}
2895static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_15_f(u32 v)
2896{
2897 return (v & 0x7U) << 28U;
2898}
2899static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_r(void)
2900{
2901 return 0x00418988U;
2902}
2903static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_16_f(u32 v)
2904{
2905 return (v & 0x7U) << 0U;
2906}
2907static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_17_f(u32 v)
2908{
2909 return (v & 0x7U) << 4U;
2910}
2911static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_18_f(u32 v)
2912{
2913 return (v & 0x7U) << 8U;
2914}
2915static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_19_f(u32 v)
2916{
2917 return (v & 0x7U) << 12U;
2918}
2919static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_20_f(u32 v)
2920{
2921 return (v & 0x7U) << 16U;
2922}
2923static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_21_f(u32 v)
2924{
2925 return (v & 0x7U) << 20U;
2926}
2927static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_22_f(u32 v)
2928{
2929 return (v & 0x7U) << 24U;
2930}
2931static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_s(void)
2932{
2933 return 3U;
2934}
2935static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_f(u32 v)
2936{
2937 return (v & 0x7U) << 28U;
2938}
2939static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_m(void)
2940{
2941 return 0x7U << 28U;
2942}
2943static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_v(u32 r)
2944{
2945 return (r >> 28U) & 0x7U;
2946}
2947static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_r(void)
2948{
2949 return 0x0041898cU;
2950}
2951static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_24_f(u32 v)
2952{
2953 return (v & 0x7U) << 0U;
2954}
2955static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_25_f(u32 v)
2956{
2957 return (v & 0x7U) << 4U;
2958}
2959static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_26_f(u32 v)
2960{
2961 return (v & 0x7U) << 8U;
2962}
2963static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_27_f(u32 v)
2964{
2965 return (v & 0x7U) << 12U;
2966}
2967static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_28_f(u32 v)
2968{
2969 return (v & 0x7U) << 16U;
2970}
2971static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_29_f(u32 v)
2972{
2973 return (v & 0x7U) << 20U;
2974}
2975static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_30_f(u32 v)
2976{
2977 return (v & 0x7U) << 24U;
2978}
2979static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_31_f(u32 v)
2980{
2981 return (v & 0x7U) << 28U;
2982}
2983static inline u32 gr_gpcs_gpm_pd_cfg_r(void)
2984{
2985 return 0x00418c6cU;
2986}
2987static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_disable_f(void)
2988{
2989 return 0x0U;
2990}
2991static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_enable_f(void)
2992{
2993 return 0x1U;
2994}
2995static inline u32 gr_gpcs_gcc_pagepool_base_r(void)
2996{
2997 return 0x00419004U;
2998}
2999static inline u32 gr_gpcs_gcc_pagepool_base_addr_39_8_f(u32 v)
3000{
3001 return (v & 0xffffffffU) << 0U;
3002}
3003static inline u32 gr_gpcs_gcc_pagepool_r(void)
3004{
3005 return 0x00419008U;
3006}
3007static inline u32 gr_gpcs_gcc_pagepool_total_pages_f(u32 v)
3008{
3009 return (v & 0xffU) << 0U;
3010}
3011static inline u32 gr_gpcs_tpcs_pe_vaf_r(void)
3012{
3013 return 0x0041980cU;
3014}
3015static inline u32 gr_gpcs_tpcs_pe_vaf_fast_mode_switch_true_f(void)
3016{
3017 return 0x10U;
3018}
3019static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_r(void)
3020{
3021 return 0x00419848U;
3022}
3023static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_v_f(u32 v)
3024{
3025 return (v & 0xfffffffU) << 0U;
3026}
3027static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_f(u32 v)
3028{
3029 return (v & 0x1U) << 28U;
3030}
3031static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_true_f(void)
3032{
3033 return 0x10000000U;
3034}
3035static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_r(void)
3036{
3037 return 0x00419c00U;
3038}
3039static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_disabled_f(void)
3040{
3041 return 0x0U;
3042}
3043static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_enabled_f(void)
3044{
3045 return 0x8U;
3046}
3047static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_r(void)
3048{
3049 return 0x00419c2cU;
3050}
3051static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_v_f(u32 v)
3052{
3053 return (v & 0xfffffffU) << 0U;
3054}
3055static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_f(u32 v)
3056{
3057 return (v & 0x1U) << 28U;
3058}
3059static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_true_f(void)
3060{
3061 return 0x10000000U;
3062}
3063static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_r(void)
3064{
3065 return 0x00419e44U;
3066}
3067static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_stack_error_report_f(void)
3068{
3069 return 0x2U;
3070}
3071static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_api_stack_error_report_f(void)
3072{
3073 return 0x4U;
3074}
3075static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_ret_empty_stack_error_report_f(void)
3076{
3077 return 0x8U;
3078}
3079static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_wrap_report_f(void)
3080{
3081 return 0x10U;
3082}
3083static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_pc_report_f(void)
3084{
3085 return 0x20U;
3086}
3087static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_overflow_report_f(void)
3088{
3089 return 0x40U;
3090}
3091static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_immc_addr_report_f(void)
3092{
3093 return 0x80U;
3094}
3095static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_reg_report_f(void)
3096{
3097 return 0x100U;
3098}
3099static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_encoding_report_f(void)
3100{
3101 return 0x200U;
3102}
3103static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_sph_instr_combo_report_f(void)
3104{
3105 return 0x400U;
3106}
3107static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param_report_f(void)
3108{
3109 return 0x800U;
3110}
3111static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_report_f(void)
3112{
3113 return 0x1000U;
3114}
3115static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_reg_report_f(void)
3116{
3117 return 0x2000U;
3118}
3119static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_addr_report_f(void)
3120{
3121 return 0x4000U;
3122}
3123static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_addr_report_f(void)
3124{
3125 return 0x8000U;
3126}
3127static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_addr_space_report_f(void)
3128{
3129 return 0x10000U;
3130}
3131static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param2_report_f(void)
3132{
3133 return 0x20000U;
3134}
3135static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_ldc_report_f(void)
3136{
3137 return 0x40000U;
3138}
3139static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_mmu_fault_report_f(void)
3140{
3141 return 0x800000U;
3142}
3143static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_stack_overflow_report_f(void)
3144{
3145 return 0x400000U;
3146}
3147static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_geometry_sm_error_report_f(void)
3148{
3149 return 0x80000U;
3150}
3151static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_divergent_report_f(void)
3152{
3153 return 0x100000U;
3154}
3155static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_report_mask_r(void)
3156{
3157 return 0x00504644U;
3158}
3159static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_r(void)
3160{
3161 return 0x00419e4cU;
3162}
3163static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_sm_to_sm_fault_report_f(void)
3164{
3165 return 0x1U;
3166}
3167static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_l1_error_report_f(void)
3168{
3169 return 0x2U;
3170}
3171static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_multiple_warp_errors_report_f(void)
3172{
3173 return 0x4U;
3174}
3175static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_physical_stack_overflow_error_report_f(void)
3176{
3177 return 0x8U;
3178}
3179static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_int_report_f(void)
3180{
3181 return 0x10U;
3182}
3183static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_pause_report_f(void)
3184{
3185 return 0x20U;
3186}
3187static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_single_step_complete_report_f(void)
3188{
3189 return 0x40U;
3190}
3191static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_report_mask_r(void)
3192{
3193 return 0x0050464cU;
3194}
3195static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void)
3196{
3197 return 0x00419d0cU;
3198}
3199static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f(void)
3200{
3201 return 0x2U;
3202}
3203static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_tex_enabled_f(void)
3204{
3205 return 0x1U;
3206}
3207static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
3208{
3209 return 0x0050450cU;
3210}
3211static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_enabled_f(void)
3212{
3213 return 0x2U;
3214}
3215static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_v(u32 r)
3216{
3217 return (r >> 1U) & 0x1U;
3218}
3219static inline u32 gr_gpcs_gpccs_gpc_exception_en_r(void)
3220{
3221 return 0x0041ac94U;
3222}
3223static inline u32 gr_gpcs_gpccs_gpc_exception_en_tpc_f(u32 v)
3224{
3225 return (v & 0xffU) << 16U;
3226}
3227static inline u32 gr_gpc0_gpccs_gpc_exception_r(void)
3228{
3229 return 0x00502c90U;
3230}
3231static inline u32 gr_gpc0_gpccs_gpc_exception_gcc_v(u32 r)
3232{
3233 return (r >> 2U) & 0x1U;
3234}
3235static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_v(u32 r)
3236{
3237 return (r >> 16U) & 0xffU;
3238}
3239static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_0_pending_v(void)
3240{
3241 return 0x00000001U;
3242}
3243static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_r(void)
3244{
3245 return 0x00504508U;
3246}
3247static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_v(u32 r)
3248{
3249 return (r >> 0U) & 0x1U;
3250}
3251static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_pending_v(void)
3252{
3253 return 0x00000001U;
3254}
3255static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_v(u32 r)
3256{
3257 return (r >> 1U) & 0x1U;
3258}
3259static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_pending_v(void)
3260{
3261 return 0x00000001U;
3262}
3263static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_r(void)
3264{
3265 return 0x00504610U;
3266}
3267static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_m(void)
3268{
3269 return 0x1U << 0U;
3270}
3271static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_v(u32 r)
3272{
3273 return (r >> 0U) & 0x1U;
3274}
3275static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_on_v(void)
3276{
3277 return 0x00000001U;
3278}
3279static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_on_f(void)
3280{
3281 return 0x1U;
3282}
3283static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_off_v(void)
3284{
3285 return 0x00000000U;
3286}
3287static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_off_f(void)
3288{
3289 return 0x0U;
3290}
3291static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_enable_f(void)
3292{
3293 return 0x80000000U;
3294}
3295static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_disable_f(void)
3296{
3297 return 0x0U;
3298}
3299static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_single_step_mode_enable_f(void)
3300{
3301 return 0x8U;
3302}
3303static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_single_step_mode_disable_f(void)
3304{
3305 return 0x0U;
3306}
3307static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_run_trigger_task_f(void)
3308{
3309 return 0x40000000U;
3310}
3311static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_m(void)
3312{
3313 return 0x1U << 1U;
3314}
3315static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_v(u32 r)
3316{
3317 return (r >> 1U) & 0x1U;
3318}
3319static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_disable_f(void)
3320{
3321 return 0x0U;
3322}
3323static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_m(void)
3324{
3325 return 0x1U << 2U;
3326}
3327static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_v(u32 r)
3328{
3329 return (r >> 2U) & 0x1U;
3330}
3331static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_disable_f(void)
3332{
3333 return 0x0U;
3334}
3335static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_stop_on_any_warp_disable_v(void)
3336{
3337 return 0x00000000U;
3338}
3339static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_stop_on_any_sm_disable_v(void)
3340{
3341 return 0x00000000U;
3342}
3343static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_r(void)
3344{
3345 return 0x00504614U;
3346}
3347static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_1_r(void)
3348{
3349 return 0x00504618U;
3350}
3351static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_2_r(void)
3352{
3353 return 0x0050461cU;
3354}
3355static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_r(void)
3356{
3357 return 0x00504624U;
3358}
3359static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_1_r(void)
3360{
3361 return 0x00504628U;
3362}
3363static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_2_r(void)
3364{
3365 return 0x00504750U;
3366}
3367static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_r(void)
3368{
3369 return 0x00504634U;
3370}
3371static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_1_r(void)
3372{
3373 return 0x00504638U;
3374}
3375static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_2_r(void)
3376{
3377 return 0x00504758U;
3378}
3379static inline u32 gr_gpcs_tpcs_sm_dbgr_bpt_pause_mask_r(void)
3380{
3381 return 0x00419e24U;
3382}
3383static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_r(void)
3384{
3385 return 0x0050460cU;
3386}
3387static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_sm_in_trap_mode_v(u32 r)
3388{
3389 return (r >> 0U) & 0x1U;
3390}
3391static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_v(u32 r)
3392{
3393 return (r >> 4U) & 0x1U;
3394}
3395static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_true_v(void)
3396{
3397 return 0x00000001U;
3398}
3399static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_r(void)
3400{
3401 return 0x00419e50U;
3402}
3403static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_int_pending_f(void)
3404{
3405 return 0x10U;
3406}
3407static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_pause_pending_f(void)
3408{
3409 return 0x20U;
3410}
3411static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_single_step_complete_pending_f(void)
3412{
3413 return 0x40U;
3414}
3415static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_sm_to_sm_fault_pending_f(void)
3416{
3417 return 0x1U;
3418}
3419static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_l1_error_pending_f(void)
3420{
3421 return 0x2U;
3422}
3423static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_multiple_warp_errors_pending_f(void)
3424{
3425 return 0x4U;
3426}
3427static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_physical_stack_overflow_error_pending_f(void)
3428{
3429 return 0x8U;
3430}
3431static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_timeout_error_pending_f(void)
3432{
3433 return 0x80000000U;
3434}
3435static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_r(void)
3436{
3437 return 0x00504650U;
3438}
3439static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_int_pending_f(void)
3440{
3441 return 0x10U;
3442}
3443static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_pause_pending_f(void)
3444{
3445 return 0x20U;
3446}
3447static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_single_step_complete_pending_f(void)
3448{
3449 return 0x40U;
3450}
3451static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_sm_to_sm_fault_pending_f(void)
3452{
3453 return 0x1U;
3454}
3455static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_l1_error_pending_f(void)
3456{
3457 return 0x2U;
3458}
3459static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_multiple_warp_errors_pending_f(void)
3460{
3461 return 0x4U;
3462}
3463static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_physical_stack_overflow_error_pending_f(void)
3464{
3465 return 0x8U;
3466}
3467static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_timeout_error_pending_f(void)
3468{
3469 return 0x80000000U;
3470}
3471static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_r(void)
3472{
3473 return 0x00504224U;
3474}
3475static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_intr_pending_f(void)
3476{
3477 return 0x1U;
3478}
3479static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_r(void)
3480{
3481 return 0x00504648U;
3482}
3483static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_v(u32 r)
3484{
3485 return (r >> 0U) & 0xffffU;
3486}
3487static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_v(void)
3488{
3489 return 0x00000000U;
3490}
3491static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_f(void)
3492{
3493 return 0x0U;
3494}
3495static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_pc_r(void)
3496{
3497 return 0x00504654U;
3498}
3499static inline u32 gr_gpc0_tpc0_sm_halfctl_ctrl_r(void)
3500{
3501 return 0x00504770U;
3502}
3503static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_r(void)
3504{
3505 return 0x00419f70U;
3506}
3507static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_m(void)
3508{
3509 return 0x1U << 4U;
3510}
3511static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_f(u32 v)
3512{
3513 return (v & 0x1U) << 4U;
3514}
3515static inline u32 gr_gpc0_tpc0_sm_debug_sfe_control_r(void)
3516{
3517 return 0x0050477cU;
3518}
3519static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_r(void)
3520{
3521 return 0x00419f7cU;
3522}
3523static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_m(void)
3524{
3525 return 0x1U << 0U;
3526}
3527static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_f(u32 v)
3528{
3529 return (v & 0x1U) << 0U;
3530}
3531static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_r(void)
3532{
3533 return 0x0041be08U;
3534}
3535static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_fast_mode_switch_true_f(void)
3536{
3537 return 0x4U;
3538}
3539static inline u32 gr_ppcs_wwdx_map_gpc_map0_r(void)
3540{
3541 return 0x0041bf00U;
3542}
3543static inline u32 gr_ppcs_wwdx_map_gpc_map1_r(void)
3544{
3545 return 0x0041bf04U;
3546}
3547static inline u32 gr_ppcs_wwdx_map_gpc_map2_r(void)
3548{
3549 return 0x0041bf08U;
3550}
3551static inline u32 gr_ppcs_wwdx_map_gpc_map3_r(void)
3552{
3553 return 0x0041bf0cU;
3554}
3555static inline u32 gr_ppcs_wwdx_map_gpc_map4_r(void)
3556{
3557 return 0x0041bf10U;
3558}
3559static inline u32 gr_ppcs_wwdx_map_gpc_map5_r(void)
3560{
3561 return 0x0041bf14U;
3562}
3563static inline u32 gr_ppcs_wwdx_map_table_cfg_r(void)
3564{
3565 return 0x0041bfd0U;
3566}
3567static inline u32 gr_ppcs_wwdx_map_table_cfg_row_offset_f(u32 v)
3568{
3569 return (v & 0xffU) << 0U;
3570}
3571static inline u32 gr_ppcs_wwdx_map_table_cfg_num_entries_f(u32 v)
3572{
3573 return (v & 0xffU) << 8U;
3574}
3575static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_num_entries_f(u32 v)
3576{
3577 return (v & 0x1fU) << 16U;
3578}
3579static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_shift_value_f(u32 v)
3580{
3581 return (v & 0x7U) << 21U;
3582}
3583static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff5_mod_value_f(u32 v)
3584{
3585 return (v & 0x1fU) << 24U;
3586}
3587static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_r(void)
3588{
3589 return 0x0041bfd4U;
3590}
3591static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_conservative_f(u32 v)
3592{
3593 return (v & 0xffffffU) << 0U;
3594}
3595static inline u32 gr_ppcs_wwdx_map_table_cfg2_r(void)
3596{
3597 return 0x0041bfe4U;
3598}
3599static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff6_mod_value_f(u32 v)
3600{
3601 return (v & 0x1fU) << 0U;
3602}
3603static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff7_mod_value_f(u32 v)
3604{
3605 return (v & 0x1fU) << 5U;
3606}
3607static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff8_mod_value_f(u32 v)
3608{
3609 return (v & 0x1fU) << 10U;
3610}
3611static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff9_mod_value_f(u32 v)
3612{
3613 return (v & 0x1fU) << 15U;
3614}
3615static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff10_mod_value_f(u32 v)
3616{
3617 return (v & 0x1fU) << 20U;
3618}
3619static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff11_mod_value_f(u32 v)
3620{
3621 return (v & 0x1fU) << 25U;
3622}
3623static inline u32 gr_bes_zrop_settings_r(void)
3624{
3625 return 0x00408850U;
3626}
3627static inline u32 gr_bes_zrop_settings_num_active_ltcs_f(u32 v)
3628{
3629 return (v & 0xfU) << 0U;
3630}
3631static inline u32 gr_be0_crop_debug3_r(void)
3632{
3633 return 0x00410108U;
3634}
3635static inline u32 gr_bes_crop_debug3_r(void)
3636{
3637 return 0x00408908U;
3638}
3639static inline u32 gr_bes_crop_debug3_comp_vdc_4to2_disable_m(void)
3640{
3641 return 0x1U << 31U;
3642}
3643static inline u32 gr_bes_crop_settings_r(void)
3644{
3645 return 0x00408958U;
3646}
3647static inline u32 gr_bes_crop_settings_num_active_ltcs_f(u32 v)
3648{
3649 return (v & 0xfU) << 0U;
3650}
3651static inline u32 gr_zcull_bytes_per_aliquot_per_gpu_v(void)
3652{
3653 return 0x00000020U;
3654}
3655static inline u32 gr_zcull_save_restore_header_bytes_per_gpc_v(void)
3656{
3657 return 0x00000020U;
3658}
3659static inline u32 gr_zcull_save_restore_subregion_header_bytes_per_gpc_v(void)
3660{
3661 return 0x000000c0U;
3662}
3663static inline u32 gr_zcull_subregion_qty_v(void)
3664{
3665 return 0x00000010U;
3666}
3667static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel0_r(void)
3668{
3669 return 0x00504604U;
3670}
3671static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel1_r(void)
3672{
3673 return 0x00504608U;
3674}
3675static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control0_r(void)
3676{
3677 return 0x0050465cU;
3678}
3679static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control1_r(void)
3680{
3681 return 0x00504660U;
3682}
3683static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control2_r(void)
3684{
3685 return 0x00504664U;
3686}
3687static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control3_r(void)
3688{
3689 return 0x00504668U;
3690}
3691static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control4_r(void)
3692{
3693 return 0x0050466cU;
3694}
3695static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control5_r(void)
3696{
3697 return 0x00504658U;
3698}
3699static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_control_r(void)
3700{
3701 return 0x00504730U;
3702}
3703static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_control_r(void)
3704{
3705 return 0x00504734U;
3706}
3707static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_control_r(void)
3708{
3709 return 0x00504738U;
3710}
3711static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_control_r(void)
3712{
3713 return 0x0050473cU;
3714}
3715static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter4_control_r(void)
3716{
3717 return 0x00504740U;
3718}
3719static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter5_control_r(void)
3720{
3721 return 0x00504744U;
3722}
3723static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter6_control_r(void)
3724{
3725 return 0x00504748U;
3726}
3727static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter7_control_r(void)
3728{
3729 return 0x0050474cU;
3730}
3731static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status_s1_r(void)
3732{
3733 return 0x00504678U;
3734}
3735static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status1_r(void)
3736{
3737 return 0x00504694U;
3738}
3739static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_s0_r(void)
3740{
3741 return 0x005046f0U;
3742}
3743static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_s1_r(void)
3744{
3745 return 0x00504700U;
3746}
3747static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_s0_r(void)
3748{
3749 return 0x005046f4U;
3750}
3751static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_s1_r(void)
3752{
3753 return 0x00504704U;
3754}
3755static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_s0_r(void)
3756{
3757 return 0x005046f8U;
3758}
3759static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_s1_r(void)
3760{
3761 return 0x00504708U;
3762}
3763static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_s0_r(void)
3764{
3765 return 0x005046fcU;
3766}
3767static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_s1_r(void)
3768{
3769 return 0x0050470cU;
3770}
3771static inline u32 gr_fe_pwr_mode_r(void)
3772{
3773 return 0x00404170U;
3774}
3775static inline u32 gr_fe_pwr_mode_mode_auto_f(void)
3776{
3777 return 0x0U;
3778}
3779static inline u32 gr_fe_pwr_mode_mode_force_on_f(void)
3780{
3781 return 0x2U;
3782}
3783static inline u32 gr_fe_pwr_mode_req_v(u32 r)
3784{
3785 return (r >> 4U) & 0x1U;
3786}
3787static inline u32 gr_fe_pwr_mode_req_send_f(void)
3788{
3789 return 0x10U;
3790}
3791static inline u32 gr_fe_pwr_mode_req_done_v(void)
3792{
3793 return 0x00000000U;
3794}
3795static inline u32 gr_gpcs_pri_mmu_ctrl_r(void)
3796{
3797 return 0x00418880U;
3798}
3799static inline u32 gr_gpcs_pri_mmu_ctrl_vm_pg_size_m(void)
3800{
3801 return 0x1U << 0U;
3802}
3803static inline u32 gr_gpcs_pri_mmu_ctrl_use_pdb_big_page_size_m(void)
3804{
3805 return 0x1U << 11U;
3806}
3807static inline u32 gr_gpcs_pri_mmu_ctrl_use_full_comp_tag_line_m(void)
3808{
3809 return 0x1U << 12U;
3810}
3811static inline u32 gr_gpcs_pri_mmu_ctrl_vol_fault_m(void)
3812{
3813 return 0x1U << 1U;
3814}
3815static inline u32 gr_gpcs_pri_mmu_ctrl_comp_fault_m(void)
3816{
3817 return 0x1U << 2U;
3818}
3819static inline u32 gr_gpcs_pri_mmu_ctrl_miss_gran_m(void)
3820{
3821 return 0x3U << 3U;
3822}
3823static inline u32 gr_gpcs_pri_mmu_ctrl_cache_mode_m(void)
3824{
3825 return 0x3U << 5U;
3826}
3827static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_aperture_m(void)
3828{
3829 return 0x3U << 28U;
3830}
3831static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_vol_m(void)
3832{
3833 return 0x1U << 30U;
3834}
3835static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_disable_m(void)
3836{
3837 return 0x1U << 31U;
3838}
3839static inline u32 gr_gpcs_pri_mmu_pm_unit_mask_r(void)
3840{
3841 return 0x00418890U;
3842}
3843static inline u32 gr_gpcs_pri_mmu_pm_req_mask_r(void)
3844{
3845 return 0x00418894U;
3846}
3847static inline u32 gr_gpcs_pri_mmu_debug_ctrl_r(void)
3848{
3849 return 0x004188b0U;
3850}
3851static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_m(void)
3852{
3853 return 0x1U << 16U;
3854}
3855static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_v(u32 r)
3856{
3857 return (r >> 16U) & 0x1U;
3858}
3859static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(void)
3860{
3861 return 0x00000001U;
3862}
3863static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_f(void)
3864{
3865 return 0x10000U;
3866}
3867static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_disabled_v(void)
3868{
3869 return 0x00000000U;
3870}
3871static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_disabled_f(void)
3872{
3873 return 0x0U;
3874}
3875static inline u32 gr_gpcs_pri_mmu_debug_wr_r(void)
3876{
3877 return 0x004188b4U;
3878}
3879static inline u32 gr_gpcs_pri_mmu_debug_rd_r(void)
3880{
3881 return 0x004188b8U;
3882}
3883static inline u32 gr_gpcs_mmu_num_active_ltcs_r(void)
3884{
3885 return 0x004188acU;
3886}
3887static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_r(void)
3888{
3889 return 0x00419e10U;
3890}
3891static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_f(u32 v)
3892{
3893 return (v & 0x1U) << 0U;
3894}
3895static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_on_v(void)
3896{
3897 return 0x00000001U;
3898}
3899static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_m(void)
3900{
3901 return 0x1U << 31U;
3902}
3903static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_v(u32 r)
3904{
3905 return (r >> 31U) & 0x1U;
3906}
3907static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_enable_f(void)
3908{
3909 return 0x80000000U;
3910}
3911static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_disable_f(void)
3912{
3913 return 0x0U;
3914}
3915static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_m(void)
3916{
3917 return 0x1U << 3U;
3918}
3919static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_enable_f(void)
3920{
3921 return 0x8U;
3922}
3923static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_disable_f(void)
3924{
3925 return 0x0U;
3926}
3927static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_m(void)
3928{
3929 return 0x1U << 30U;
3930}
3931static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_v(u32 r)
3932{
3933 return (r >> 30U) & 0x1U;
3934}
3935static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_task_f(void)
3936{
3937 return 0x40000000U;
3938}
3939#endif
diff --git a/include/nvgpu/hw/gm20b/hw_ltc_gm20b.h b/include/nvgpu/hw/gm20b/hw_ltc_gm20b.h
deleted file mode 100644
index 2c3ebb4..0000000
--- a/include/nvgpu/hw/gm20b/hw_ltc_gm20b.h
+++ /dev/null
@@ -1,527 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ltc_gm20b_h_
57#define _hw_ltc_gm20b_h_
58
59static inline u32 ltc_pltcg_base_v(void)
60{
61 return 0x00140000U;
62}
63static inline u32 ltc_pltcg_extent_v(void)
64{
65 return 0x0017ffffU;
66}
67static inline u32 ltc_ltc0_ltss_v(void)
68{
69 return 0x00140200U;
70}
71static inline u32 ltc_ltc0_lts0_v(void)
72{
73 return 0x00140400U;
74}
75static inline u32 ltc_ltcs_ltss_v(void)
76{
77 return 0x0017e200U;
78}
79static inline u32 ltc_ltcs_lts0_cbc_ctrl1_r(void)
80{
81 return 0x0014046cU;
82}
83static inline u32 ltc_ltc0_lts0_dstg_cfg0_r(void)
84{
85 return 0x00140518U;
86}
87static inline u32 ltc_ltcs_ltss_dstg_cfg0_r(void)
88{
89 return 0x0017e318U;
90}
91static inline u32 ltc_ltcs_ltss_dstg_cfg0_vdc_4to2_disable_m(void)
92{
93 return 0x1U << 15U;
94}
95static inline u32 ltc_ltc0_lts0_tstg_cfg1_r(void)
96{
97 return 0x00140494U;
98}
99static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_ways_v(u32 r)
100{
101 return (r >> 0U) & 0xffffU;
102}
103static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_v(u32 r)
104{
105 return (r >> 16U) & 0x3U;
106}
107static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_all_v(void)
108{
109 return 0x00000000U;
110}
111static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_half_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v(void)
116{
117 return 0x00000002U;
118}
119static inline u32 ltc_ltcs_ltss_cbc_ctrl1_r(void)
120{
121 return 0x0017e26cU;
122}
123static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clean_active_f(void)
124{
125 return 0x1U;
126}
127static inline u32 ltc_ltcs_ltss_cbc_ctrl1_invalidate_active_f(void)
128{
129 return 0x2U;
130}
131static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_v(u32 r)
132{
133 return (r >> 2U) & 0x1U;
134}
135static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_v(void)
136{
137 return 0x00000001U;
138}
139static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_f(void)
140{
141 return 0x4U;
142}
143static inline u32 ltc_ltc0_lts0_cbc_ctrl1_r(void)
144{
145 return 0x0014046cU;
146}
147static inline u32 ltc_ltcs_ltss_cbc_ctrl2_r(void)
148{
149 return 0x0017e270U;
150}
151static inline u32 ltc_ltcs_ltss_cbc_ctrl2_clear_lower_bound_f(u32 v)
152{
153 return (v & 0x1ffffU) << 0U;
154}
155static inline u32 ltc_ltcs_ltss_cbc_ctrl3_r(void)
156{
157 return 0x0017e274U;
158}
159static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_f(u32 v)
160{
161 return (v & 0x1ffffU) << 0U;
162}
163static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_init_v(void)
164{
165 return 0x0001ffffU;
166}
167static inline u32 ltc_ltcs_ltss_cbc_base_r(void)
168{
169 return 0x0017e278U;
170}
171static inline u32 ltc_ltcs_ltss_cbc_base_alignment_shift_v(void)
172{
173 return 0x0000000bU;
174}
175static inline u32 ltc_ltcs_ltss_cbc_base_address_v(u32 r)
176{
177 return (r >> 0U) & 0x3ffffffU;
178}
179static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_r(void)
180{
181 return 0x0017e27cU;
182}
183static inline u32 ltc_ltcs_misc_ltc_num_active_ltcs_r(void)
184{
185 return 0x0017e000U;
186}
187static inline u32 ltc_ltcs_ltss_cbc_param_r(void)
188{
189 return 0x0017e280U;
190}
191static inline u32 ltc_ltcs_ltss_cbc_param_comptags_per_cache_line_v(u32 r)
192{
193 return (r >> 0U) & 0xffffU;
194}
195static inline u32 ltc_ltcs_ltss_cbc_param_cache_line_size_v(u32 r)
196{
197 return (r >> 24U) & 0xfU;
198}
199static inline u32 ltc_ltcs_ltss_cbc_param_slices_per_ltc_v(u32 r)
200{
201 return (r >> 28U) & 0xfU;
202}
203static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_r(void)
204{
205 return 0x0017e2acU;
206}
207static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(u32 v)
208{
209 return (v & 0x1fU) << 16U;
210}
211static inline u32 ltc_ltcs_ltss_dstg_zbc_index_r(void)
212{
213 return 0x0017e338U;
214}
215static inline u32 ltc_ltcs_ltss_dstg_zbc_index_address_f(u32 v)
216{
217 return (v & 0xfU) << 0U;
218}
219static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value_r(u32 i)
220{
221 return 0x0017e33cU + i*4U;
222}
223static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value__size_1_v(void)
224{
225 return 0x00000004U;
226}
227static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_r(void)
228{
229 return 0x0017e34cU;
230}
231static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_s(void)
232{
233 return 32U;
234}
235static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_f(u32 v)
236{
237 return (v & 0xffffffffU) << 0U;
238}
239static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_m(void)
240{
241 return 0xffffffffU << 0U;
242}
243static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_v(u32 r)
244{
245 return (r >> 0U) & 0xffffffffU;
246}
247static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_r(void)
248{
249 return 0x0017e2b0U;
250}
251static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_l2_bypass_mode_enabled_f(void)
252{
253 return 0x10000000U;
254}
255static inline u32 ltc_ltcs_ltss_g_elpg_r(void)
256{
257 return 0x0017e214U;
258}
259static inline u32 ltc_ltcs_ltss_g_elpg_flush_v(u32 r)
260{
261 return (r >> 0U) & 0x1U;
262}
263static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_v(void)
264{
265 return 0x00000001U;
266}
267static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_f(void)
268{
269 return 0x1U;
270}
271static inline u32 ltc_ltc0_ltss_g_elpg_r(void)
272{
273 return 0x00140214U;
274}
275static inline u32 ltc_ltc0_ltss_g_elpg_flush_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_v(void)
280{
281 return 0x00000001U;
282}
283static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_f(void)
284{
285 return 0x1U;
286}
287static inline u32 ltc_ltc1_ltss_g_elpg_r(void)
288{
289 return 0x00142214U;
290}
291static inline u32 ltc_ltc1_ltss_g_elpg_flush_v(u32 r)
292{
293 return (r >> 0U) & 0x1U;
294}
295static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_v(void)
296{
297 return 0x00000001U;
298}
299static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_f(void)
300{
301 return 0x1U;
302}
303static inline u32 ltc_ltcs_ltss_intr_r(void)
304{
305 return 0x0017e20cU;
306}
307static inline u32 ltc_ltcs_ltss_intr_en_evicted_cb_m(void)
308{
309 return 0x1U << 20U;
310}
311static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_access_m(void)
312{
313 return 0x1U << 30U;
314}
315static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_m(void)
316{
317 return 0x1U << 21U;
318}
319static inline u32 ltc_ltc0_lts0_intr_r(void)
320{
321 return 0x0014040cU;
322}
323static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_r(void)
324{
325 return 0x0017e2a0U;
326}
327static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_v(u32 r)
328{
329 return (r >> 0U) & 0x1U;
330}
331static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_v(void)
332{
333 return 0x00000001U;
334}
335static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_f(void)
336{
337 return 0x1U;
338}
339static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_v(u32 r)
340{
341 return (r >> 8U) & 0xfU;
342}
343static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_v(void)
344{
345 return 0x00000003U;
346}
347static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_f(void)
348{
349 return 0x300U;
350}
351static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_v(u32 r)
352{
353 return (r >> 28U) & 0x1U;
354}
355static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_v(void)
356{
357 return 0x00000001U;
358}
359static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_f(void)
360{
361 return 0x10000000U;
362}
363static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_v(u32 r)
364{
365 return (r >> 29U) & 0x1U;
366}
367static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_v(void)
368{
369 return 0x00000001U;
370}
371static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_f(void)
372{
373 return 0x20000000U;
374}
375static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_v(u32 r)
376{
377 return (r >> 30U) & 0x1U;
378}
379static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_f(void)
384{
385 return 0x40000000U;
386}
387static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_r(void)
388{
389 return 0x0017e2a4U;
390}
391static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_v(u32 r)
392{
393 return (r >> 0U) & 0x1U;
394}
395static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_v(void)
396{
397 return 0x00000001U;
398}
399static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_f(void)
400{
401 return 0x1U;
402}
403static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_v(u32 r)
404{
405 return (r >> 8U) & 0xfU;
406}
407static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_v(void)
408{
409 return 0x00000003U;
410}
411static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_f(void)
412{
413 return 0x300U;
414}
415static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_v(u32 r)
416{
417 return (r >> 16U) & 0x1U;
418}
419static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_v(void)
420{
421 return 0x00000001U;
422}
423static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_f(void)
424{
425 return 0x10000U;
426}
427static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_v(u32 r)
428{
429 return (r >> 28U) & 0x1U;
430}
431static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_v(void)
432{
433 return 0x00000001U;
434}
435static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_f(void)
436{
437 return 0x10000000U;
438}
439static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_v(u32 r)
440{
441 return (r >> 29U) & 0x1U;
442}
443static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_v(void)
444{
445 return 0x00000001U;
446}
447static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_f(void)
448{
449 return 0x20000000U;
450}
451static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_v(u32 r)
452{
453 return (r >> 30U) & 0x1U;
454}
455static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_v(void)
456{
457 return 0x00000001U;
458}
459static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_f(void)
460{
461 return 0x40000000U;
462}
463static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_r(void)
464{
465 return 0x001402a0U;
466}
467static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_v(u32 r)
468{
469 return (r >> 0U) & 0x1U;
470}
471static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_v(void)
472{
473 return 0x00000001U;
474}
475static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_f(void)
476{
477 return 0x1U;
478}
479static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_r(void)
480{
481 return 0x001402a4U;
482}
483static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_v(u32 r)
484{
485 return (r >> 0U) & 0x1U;
486}
487static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_v(void)
488{
489 return 0x00000001U;
490}
491static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_f(void)
492{
493 return 0x1U;
494}
495static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_r(void)
496{
497 return 0x001422a0U;
498}
499static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_v(u32 r)
500{
501 return (r >> 0U) & 0x1U;
502}
503static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_v(void)
504{
505 return 0x00000001U;
506}
507static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_f(void)
508{
509 return 0x1U;
510}
511static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_r(void)
512{
513 return 0x001422a4U;
514}
515static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_v(u32 r)
516{
517 return (r >> 0U) & 0x1U;
518}
519static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_v(void)
520{
521 return 0x00000001U;
522}
523static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_f(void)
524{
525 return 0x1U;
526}
527#endif
diff --git a/include/nvgpu/hw/gm20b/hw_mc_gm20b.h b/include/nvgpu/hw/gm20b/hw_mc_gm20b.h
deleted file mode 100644
index 0264803..0000000
--- a/include/nvgpu/hw/gm20b/hw_mc_gm20b.h
+++ /dev/null
@@ -1,287 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_mc_gm20b_h_
57#define _hw_mc_gm20b_h_
58
59static inline u32 mc_boot_0_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 mc_boot_0_architecture_v(u32 r)
64{
65 return (r >> 24U) & 0x1fU;
66}
67static inline u32 mc_boot_0_implementation_v(u32 r)
68{
69 return (r >> 20U) & 0xfU;
70}
71static inline u32 mc_boot_0_major_revision_v(u32 r)
72{
73 return (r >> 4U) & 0xfU;
74}
75static inline u32 mc_boot_0_minor_revision_v(u32 r)
76{
77 return (r >> 0U) & 0xfU;
78}
79static inline u32 mc_intr_r(u32 i)
80{
81 return 0x00000100U + i*4U;
82}
83static inline u32 mc_intr_pfifo_pending_f(void)
84{
85 return 0x100U;
86}
87static inline u32 mc_intr_pmu_pending_f(void)
88{
89 return 0x1000000U;
90}
91static inline u32 mc_intr_ltc_pending_f(void)
92{
93 return 0x2000000U;
94}
95static inline u32 mc_intr_priv_ring_pending_f(void)
96{
97 return 0x40000000U;
98}
99static inline u32 mc_intr_pbus_pending_f(void)
100{
101 return 0x10000000U;
102}
103static inline u32 mc_intr_mask_0_r(void)
104{
105 return 0x00000640U;
106}
107static inline u32 mc_intr_mask_0_pmu_enabled_f(void)
108{
109 return 0x1000000U;
110}
111static inline u32 mc_intr_en_0_r(void)
112{
113 return 0x00000140U;
114}
115static inline u32 mc_intr_en_0_inta_disabled_f(void)
116{
117 return 0x0U;
118}
119static inline u32 mc_intr_en_0_inta_hardware_f(void)
120{
121 return 0x1U;
122}
123static inline u32 mc_intr_mask_1_r(void)
124{
125 return 0x00000644U;
126}
127static inline u32 mc_intr_mask_1_pmu_s(void)
128{
129 return 1U;
130}
131static inline u32 mc_intr_mask_1_pmu_f(u32 v)
132{
133 return (v & 0x1U) << 24U;
134}
135static inline u32 mc_intr_mask_1_pmu_m(void)
136{
137 return 0x1U << 24U;
138}
139static inline u32 mc_intr_mask_1_pmu_v(u32 r)
140{
141 return (r >> 24U) & 0x1U;
142}
143static inline u32 mc_intr_mask_1_pmu_enabled_f(void)
144{
145 return 0x1000000U;
146}
147static inline u32 mc_intr_en_1_r(void)
148{
149 return 0x00000144U;
150}
151static inline u32 mc_intr_en_1_inta_disabled_f(void)
152{
153 return 0x0U;
154}
155static inline u32 mc_intr_en_1_inta_hardware_f(void)
156{
157 return 0x1U;
158}
159static inline u32 mc_enable_r(void)
160{
161 return 0x00000200U;
162}
163static inline u32 mc_enable_xbar_enabled_f(void)
164{
165 return 0x4U;
166}
167static inline u32 mc_enable_l2_enabled_f(void)
168{
169 return 0x8U;
170}
171static inline u32 mc_enable_pmedia_s(void)
172{
173 return 1U;
174}
175static inline u32 mc_enable_pmedia_f(u32 v)
176{
177 return (v & 0x1U) << 4U;
178}
179static inline u32 mc_enable_pmedia_m(void)
180{
181 return 0x1U << 4U;
182}
183static inline u32 mc_enable_pmedia_v(u32 r)
184{
185 return (r >> 4U) & 0x1U;
186}
187static inline u32 mc_enable_priv_ring_enabled_f(void)
188{
189 return 0x20U;
190}
191static inline u32 mc_enable_ce0_m(void)
192{
193 return 0x1U << 6U;
194}
195static inline u32 mc_enable_pfifo_enabled_f(void)
196{
197 return 0x100U;
198}
199static inline u32 mc_enable_pgraph_enabled_f(void)
200{
201 return 0x1000U;
202}
203static inline u32 mc_enable_pwr_v(u32 r)
204{
205 return (r >> 13U) & 0x1U;
206}
207static inline u32 mc_enable_pwr_disabled_v(void)
208{
209 return 0x00000000U;
210}
211static inline u32 mc_enable_pwr_enabled_f(void)
212{
213 return 0x2000U;
214}
215static inline u32 mc_enable_pfb_enabled_f(void)
216{
217 return 0x100000U;
218}
219static inline u32 mc_enable_ce2_m(void)
220{
221 return 0x1U << 21U;
222}
223static inline u32 mc_enable_ce2_enabled_f(void)
224{
225 return 0x200000U;
226}
227static inline u32 mc_enable_blg_enabled_f(void)
228{
229 return 0x8000000U;
230}
231static inline u32 mc_enable_perfmon_enabled_f(void)
232{
233 return 0x10000000U;
234}
235static inline u32 mc_enable_hub_enabled_f(void)
236{
237 return 0x20000000U;
238}
239static inline u32 mc_intr_ltc_r(void)
240{
241 return 0x0000017cU;
242}
243static inline u32 mc_enable_pb_r(void)
244{
245 return 0x00000204U;
246}
247static inline u32 mc_enable_pb_0_s(void)
248{
249 return 1U;
250}
251static inline u32 mc_enable_pb_0_f(u32 v)
252{
253 return (v & 0x1U) << 0U;
254}
255static inline u32 mc_enable_pb_0_m(void)
256{
257 return 0x1U << 0U;
258}
259static inline u32 mc_enable_pb_0_v(u32 r)
260{
261 return (r >> 0U) & 0x1U;
262}
263static inline u32 mc_enable_pb_0_enabled_v(void)
264{
265 return 0x00000001U;
266}
267static inline u32 mc_enable_pb_sel_f(u32 v, u32 i)
268{
269 return (v & 0x1U) << (0U + i*1U);
270}
271static inline u32 mc_elpg_enable_r(void)
272{
273 return 0x0000020cU;
274}
275static inline u32 mc_elpg_enable_xbar_enabled_f(void)
276{
277 return 0x4U;
278}
279static inline u32 mc_elpg_enable_pfb_enabled_f(void)
280{
281 return 0x100000U;
282}
283static inline u32 mc_elpg_enable_hub_enabled_f(void)
284{
285 return 0x20000000U;
286}
287#endif
diff --git a/include/nvgpu/hw/gm20b/hw_pbdma_gm20b.h b/include/nvgpu/hw/gm20b/hw_pbdma_gm20b.h
deleted file mode 100644
index 10ed9ec..0000000
--- a/include/nvgpu/hw/gm20b/hw_pbdma_gm20b.h
+++ /dev/null
@@ -1,579 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pbdma_gm20b_h_
57#define _hw_pbdma_gm20b_h_
58
59static inline u32 pbdma_gp_entry1_r(void)
60{
61 return 0x10000004U;
62}
63static inline u32 pbdma_gp_entry1_get_hi_v(u32 r)
64{
65 return (r >> 0U) & 0xffU;
66}
67static inline u32 pbdma_gp_entry1_length_f(u32 v)
68{
69 return (v & 0x1fffffU) << 10U;
70}
71static inline u32 pbdma_gp_entry1_length_v(u32 r)
72{
73 return (r >> 10U) & 0x1fffffU;
74}
75static inline u32 pbdma_gp_base_r(u32 i)
76{
77 return 0x00040048U + i*8192U;
78}
79static inline u32 pbdma_gp_base__size_1_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 pbdma_gp_base_offset_f(u32 v)
84{
85 return (v & 0x1fffffffU) << 3U;
86}
87static inline u32 pbdma_gp_base_rsvd_s(void)
88{
89 return 3U;
90}
91static inline u32 pbdma_gp_base_hi_r(u32 i)
92{
93 return 0x0004004cU + i*8192U;
94}
95static inline u32 pbdma_gp_base_hi_offset_f(u32 v)
96{
97 return (v & 0xffU) << 0U;
98}
99static inline u32 pbdma_gp_base_hi_limit2_f(u32 v)
100{
101 return (v & 0x1fU) << 16U;
102}
103static inline u32 pbdma_gp_fetch_r(u32 i)
104{
105 return 0x00040050U + i*8192U;
106}
107static inline u32 pbdma_gp_get_r(u32 i)
108{
109 return 0x00040014U + i*8192U;
110}
111static inline u32 pbdma_gp_put_r(u32 i)
112{
113 return 0x00040000U + i*8192U;
114}
115static inline u32 pbdma_pb_fetch_r(u32 i)
116{
117 return 0x00040054U + i*8192U;
118}
119static inline u32 pbdma_pb_fetch_hi_r(u32 i)
120{
121 return 0x00040058U + i*8192U;
122}
123static inline u32 pbdma_get_r(u32 i)
124{
125 return 0x00040018U + i*8192U;
126}
127static inline u32 pbdma_get_hi_r(u32 i)
128{
129 return 0x0004001cU + i*8192U;
130}
131static inline u32 pbdma_put_r(u32 i)
132{
133 return 0x0004005cU + i*8192U;
134}
135static inline u32 pbdma_put_hi_r(u32 i)
136{
137 return 0x00040060U + i*8192U;
138}
139static inline u32 pbdma_formats_r(u32 i)
140{
141 return 0x0004009cU + i*8192U;
142}
143static inline u32 pbdma_formats_gp_fermi0_f(void)
144{
145 return 0x0U;
146}
147static inline u32 pbdma_formats_pb_fermi1_f(void)
148{
149 return 0x100U;
150}
151static inline u32 pbdma_formats_mp_fermi0_f(void)
152{
153 return 0x0U;
154}
155static inline u32 pbdma_pb_header_r(u32 i)
156{
157 return 0x00040084U + i*8192U;
158}
159static inline u32 pbdma_pb_header_priv_user_f(void)
160{
161 return 0x0U;
162}
163static inline u32 pbdma_pb_header_method_zero_f(void)
164{
165 return 0x0U;
166}
167static inline u32 pbdma_pb_header_subchannel_zero_f(void)
168{
169 return 0x0U;
170}
171static inline u32 pbdma_pb_header_level_main_f(void)
172{
173 return 0x0U;
174}
175static inline u32 pbdma_pb_header_first_true_f(void)
176{
177 return 0x400000U;
178}
179static inline u32 pbdma_pb_header_type_inc_f(void)
180{
181 return 0x20000000U;
182}
183static inline u32 pbdma_pb_header_type_non_inc_f(void)
184{
185 return 0x60000000U;
186}
187static inline u32 pbdma_hdr_shadow_r(u32 i)
188{
189 return 0x00040118U + i*8192U;
190}
191static inline u32 pbdma_gp_shadow_0_r(u32 i)
192{
193 return 0x00040110U + i*8192U;
194}
195static inline u32 pbdma_gp_shadow_1_r(u32 i)
196{
197 return 0x00040114U + i*8192U;
198}
199static inline u32 pbdma_subdevice_r(u32 i)
200{
201 return 0x00040094U + i*8192U;
202}
203static inline u32 pbdma_subdevice_id_f(u32 v)
204{
205 return (v & 0xfffU) << 0U;
206}
207static inline u32 pbdma_subdevice_status_active_f(void)
208{
209 return 0x10000000U;
210}
211static inline u32 pbdma_subdevice_channel_dma_enable_f(void)
212{
213 return 0x20000000U;
214}
215static inline u32 pbdma_method0_r(u32 i)
216{
217 return 0x000400c0U + i*8192U;
218}
219static inline u32 pbdma_method0_fifo_size_v(void)
220{
221 return 0x00000004U;
222}
223static inline u32 pbdma_method0_addr_f(u32 v)
224{
225 return (v & 0xfffU) << 2U;
226}
227static inline u32 pbdma_method0_addr_v(u32 r)
228{
229 return (r >> 2U) & 0xfffU;
230}
231static inline u32 pbdma_method0_subch_v(u32 r)
232{
233 return (r >> 16U) & 0x7U;
234}
235static inline u32 pbdma_method0_first_true_f(void)
236{
237 return 0x400000U;
238}
239static inline u32 pbdma_method0_valid_true_f(void)
240{
241 return 0x80000000U;
242}
243static inline u32 pbdma_method1_r(u32 i)
244{
245 return 0x000400c8U + i*8192U;
246}
247static inline u32 pbdma_method2_r(u32 i)
248{
249 return 0x000400d0U + i*8192U;
250}
251static inline u32 pbdma_method3_r(u32 i)
252{
253 return 0x000400d8U + i*8192U;
254}
255static inline u32 pbdma_data0_r(u32 i)
256{
257 return 0x000400c4U + i*8192U;
258}
259static inline u32 pbdma_target_r(u32 i)
260{
261 return 0x000400acU + i*8192U;
262}
263static inline u32 pbdma_target_engine_sw_f(void)
264{
265 return 0x1fU;
266}
267static inline u32 pbdma_acquire_r(u32 i)
268{
269 return 0x00040030U + i*8192U;
270}
271static inline u32 pbdma_acquire_retry_man_2_f(void)
272{
273 return 0x2U;
274}
275static inline u32 pbdma_acquire_retry_exp_2_f(void)
276{
277 return 0x100U;
278}
279static inline u32 pbdma_acquire_timeout_exp_f(u32 v)
280{
281 return (v & 0xfU) << 11U;
282}
283static inline u32 pbdma_acquire_timeout_exp_max_v(void)
284{
285 return 0x0000000fU;
286}
287static inline u32 pbdma_acquire_timeout_exp_max_f(void)
288{
289 return 0x7800U;
290}
291static inline u32 pbdma_acquire_timeout_man_f(u32 v)
292{
293 return (v & 0xffffU) << 15U;
294}
295static inline u32 pbdma_acquire_timeout_man_max_v(void)
296{
297 return 0x0000ffffU;
298}
299static inline u32 pbdma_acquire_timeout_man_max_f(void)
300{
301 return 0x7fff8000U;
302}
303static inline u32 pbdma_acquire_timeout_en_enable_f(void)
304{
305 return 0x80000000U;
306}
307static inline u32 pbdma_acquire_timeout_en_disable_f(void)
308{
309 return 0x0U;
310}
311static inline u32 pbdma_status_r(u32 i)
312{
313 return 0x00040100U + i*8192U;
314}
315static inline u32 pbdma_channel_r(u32 i)
316{
317 return 0x00040120U + i*8192U;
318}
319static inline u32 pbdma_signature_r(u32 i)
320{
321 return 0x00040010U + i*8192U;
322}
323static inline u32 pbdma_signature_hw_valid_f(void)
324{
325 return 0xfaceU;
326}
327static inline u32 pbdma_signature_sw_zero_f(void)
328{
329 return 0x0U;
330}
331static inline u32 pbdma_userd_r(u32 i)
332{
333 return 0x00040008U + i*8192U;
334}
335static inline u32 pbdma_userd_target_vid_mem_f(void)
336{
337 return 0x0U;
338}
339static inline u32 pbdma_userd_target_sys_mem_coh_f(void)
340{
341 return 0x2U;
342}
343static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void)
344{
345 return 0x3U;
346}
347static inline u32 pbdma_userd_addr_f(u32 v)
348{
349 return (v & 0x7fffffU) << 9U;
350}
351static inline u32 pbdma_userd_hi_r(u32 i)
352{
353 return 0x0004000cU + i*8192U;
354}
355static inline u32 pbdma_userd_hi_addr_f(u32 v)
356{
357 return (v & 0xffU) << 0U;
358}
359static inline u32 pbdma_hce_ctrl_r(u32 i)
360{
361 return 0x000400e4U + i*8192U;
362}
363static inline u32 pbdma_hce_ctrl_hce_priv_mode_yes_f(void)
364{
365 return 0x20U;
366}
367static inline u32 pbdma_intr_0_r(u32 i)
368{
369 return 0x00040108U + i*8192U;
370}
371static inline u32 pbdma_intr_0_memreq_v(u32 r)
372{
373 return (r >> 0U) & 0x1U;
374}
375static inline u32 pbdma_intr_0_memreq_pending_f(void)
376{
377 return 0x1U;
378}
379static inline u32 pbdma_intr_0_memack_timeout_pending_f(void)
380{
381 return 0x2U;
382}
383static inline u32 pbdma_intr_0_memack_extra_pending_f(void)
384{
385 return 0x4U;
386}
387static inline u32 pbdma_intr_0_memdat_timeout_pending_f(void)
388{
389 return 0x8U;
390}
391static inline u32 pbdma_intr_0_memdat_extra_pending_f(void)
392{
393 return 0x10U;
394}
395static inline u32 pbdma_intr_0_memflush_pending_f(void)
396{
397 return 0x20U;
398}
399static inline u32 pbdma_intr_0_memop_pending_f(void)
400{
401 return 0x40U;
402}
403static inline u32 pbdma_intr_0_lbconnect_pending_f(void)
404{
405 return 0x80U;
406}
407static inline u32 pbdma_intr_0_lbreq_pending_f(void)
408{
409 return 0x100U;
410}
411static inline u32 pbdma_intr_0_lback_timeout_pending_f(void)
412{
413 return 0x200U;
414}
415static inline u32 pbdma_intr_0_lback_extra_pending_f(void)
416{
417 return 0x400U;
418}
419static inline u32 pbdma_intr_0_lbdat_timeout_pending_f(void)
420{
421 return 0x800U;
422}
423static inline u32 pbdma_intr_0_lbdat_extra_pending_f(void)
424{
425 return 0x1000U;
426}
427static inline u32 pbdma_intr_0_gpfifo_pending_f(void)
428{
429 return 0x2000U;
430}
431static inline u32 pbdma_intr_0_gpptr_pending_f(void)
432{
433 return 0x4000U;
434}
435static inline u32 pbdma_intr_0_gpentry_pending_f(void)
436{
437 return 0x8000U;
438}
439static inline u32 pbdma_intr_0_gpcrc_pending_f(void)
440{
441 return 0x10000U;
442}
443static inline u32 pbdma_intr_0_pbptr_pending_f(void)
444{
445 return 0x20000U;
446}
447static inline u32 pbdma_intr_0_pbentry_pending_f(void)
448{
449 return 0x40000U;
450}
451static inline u32 pbdma_intr_0_pbcrc_pending_f(void)
452{
453 return 0x80000U;
454}
455static inline u32 pbdma_intr_0_xbarconnect_pending_f(void)
456{
457 return 0x100000U;
458}
459static inline u32 pbdma_intr_0_method_pending_f(void)
460{
461 return 0x200000U;
462}
463static inline u32 pbdma_intr_0_methodcrc_pending_f(void)
464{
465 return 0x400000U;
466}
467static inline u32 pbdma_intr_0_device_pending_f(void)
468{
469 return 0x800000U;
470}
471static inline u32 pbdma_intr_0_semaphore_pending_f(void)
472{
473 return 0x2000000U;
474}
475static inline u32 pbdma_intr_0_acquire_pending_f(void)
476{
477 return 0x4000000U;
478}
479static inline u32 pbdma_intr_0_pri_pending_f(void)
480{
481 return 0x8000000U;
482}
483static inline u32 pbdma_intr_0_no_ctxsw_seg_pending_f(void)
484{
485 return 0x20000000U;
486}
487static inline u32 pbdma_intr_0_pbseg_pending_f(void)
488{
489 return 0x40000000U;
490}
491static inline u32 pbdma_intr_0_signature_pending_f(void)
492{
493 return 0x80000000U;
494}
495static inline u32 pbdma_intr_1_r(u32 i)
496{
497 return 0x00040148U + i*8192U;
498}
499static inline u32 pbdma_intr_en_0_r(u32 i)
500{
501 return 0x0004010cU + i*8192U;
502}
503static inline u32 pbdma_intr_en_0_lbreq_enabled_f(void)
504{
505 return 0x100U;
506}
507static inline u32 pbdma_intr_en_1_r(u32 i)
508{
509 return 0x0004014cU + i*8192U;
510}
511static inline u32 pbdma_intr_stall_r(u32 i)
512{
513 return 0x0004013cU + i*8192U;
514}
515static inline u32 pbdma_intr_stall_lbreq_enabled_f(void)
516{
517 return 0x100U;
518}
519static inline u32 pbdma_intr_stall_1_r(u32 i)
520{
521 return 0x00040140U + i*8192U;
522}
523static inline u32 pbdma_intr_stall_1_hce_illegal_op_enabled_f(void)
524{
525 return 0x1U;
526}
527static inline u32 pbdma_udma_nop_r(void)
528{
529 return 0x00000008U;
530}
531static inline u32 pbdma_syncpointa_r(u32 i)
532{
533 return 0x000400a4U + i*8192U;
534}
535static inline u32 pbdma_syncpointa_payload_v(u32 r)
536{
537 return (r >> 0U) & 0xffffffffU;
538}
539static inline u32 pbdma_syncpointb_r(u32 i)
540{
541 return 0x000400a8U + i*8192U;
542}
543static inline u32 pbdma_syncpointb_op_v(u32 r)
544{
545 return (r >> 0U) & 0x3U;
546}
547static inline u32 pbdma_syncpointb_op_wait_v(void)
548{
549 return 0x00000000U;
550}
551static inline u32 pbdma_syncpointb_wait_switch_v(u32 r)
552{
553 return (r >> 4U) & 0x1U;
554}
555static inline u32 pbdma_syncpointb_wait_switch_en_v(void)
556{
557 return 0x00000001U;
558}
559static inline u32 pbdma_syncpointb_syncpt_index_v(u32 r)
560{
561 return (r >> 8U) & 0xffU;
562}
563static inline u32 pbdma_runlist_timeslice_r(u32 i)
564{
565 return 0x000400f8U + i*8192U;
566}
567static inline u32 pbdma_runlist_timeslice_timeout_128_f(void)
568{
569 return 0x80U;
570}
571static inline u32 pbdma_runlist_timeslice_timescale_3_f(void)
572{
573 return 0x3000U;
574}
575static inline u32 pbdma_runlist_timeslice_enable_true_f(void)
576{
577 return 0x10000000U;
578}
579#endif
diff --git a/include/nvgpu/hw/gm20b/hw_perf_gm20b.h b/include/nvgpu/hw/gm20b/hw_perf_gm20b.h
deleted file mode 100644
index a94ba30..0000000
--- a/include/nvgpu/hw/gm20b/hw_perf_gm20b.h
+++ /dev/null
@@ -1,219 +0,0 @@
1/*
2 * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_perf_gm20b_h_
57#define _hw_perf_gm20b_h_
58
59static inline u32 perf_pmmsys_base_v(void)
60{
61 return 0x001b0000U;
62}
63static inline u32 perf_pmmsys_extent_v(void)
64{
65 return 0x001b0fffU;
66}
67static inline u32 perf_pmasys_control_r(void)
68{
69 return 0x001b4000U;
70}
71static inline u32 perf_pmasys_control_membuf_status_v(u32 r)
72{
73 return (r >> 4U) & 0x1U;
74}
75static inline u32 perf_pmasys_control_membuf_status_overflowed_v(void)
76{
77 return 0x00000001U;
78}
79static inline u32 perf_pmasys_control_membuf_status_overflowed_f(void)
80{
81 return 0x10U;
82}
83static inline u32 perf_pmasys_control_membuf_clear_status_f(u32 v)
84{
85 return (v & 0x1U) << 5U;
86}
87static inline u32 perf_pmasys_control_membuf_clear_status_v(u32 r)
88{
89 return (r >> 5U) & 0x1U;
90}
91static inline u32 perf_pmasys_control_membuf_clear_status_doit_v(void)
92{
93 return 0x00000001U;
94}
95static inline u32 perf_pmasys_control_membuf_clear_status_doit_f(void)
96{
97 return 0x20U;
98}
99static inline u32 perf_pmasys_mem_block_r(void)
100{
101 return 0x001b4070U;
102}
103static inline u32 perf_pmasys_mem_block_base_f(u32 v)
104{
105 return (v & 0xfffffffU) << 0U;
106}
107static inline u32 perf_pmasys_mem_block_target_f(u32 v)
108{
109 return (v & 0x3U) << 28U;
110}
111static inline u32 perf_pmasys_mem_block_target_v(u32 r)
112{
113 return (r >> 28U) & 0x3U;
114}
115static inline u32 perf_pmasys_mem_block_target_lfb_v(void)
116{
117 return 0x00000000U;
118}
119static inline u32 perf_pmasys_mem_block_target_lfb_f(void)
120{
121 return 0x0U;
122}
123static inline u32 perf_pmasys_mem_block_target_sys_coh_v(void)
124{
125 return 0x00000002U;
126}
127static inline u32 perf_pmasys_mem_block_target_sys_coh_f(void)
128{
129 return 0x20000000U;
130}
131static inline u32 perf_pmasys_mem_block_target_sys_ncoh_v(void)
132{
133 return 0x00000003U;
134}
135static inline u32 perf_pmasys_mem_block_target_sys_ncoh_f(void)
136{
137 return 0x30000000U;
138}
139static inline u32 perf_pmasys_mem_block_valid_f(u32 v)
140{
141 return (v & 0x1U) << 31U;
142}
143static inline u32 perf_pmasys_mem_block_valid_v(u32 r)
144{
145 return (r >> 31U) & 0x1U;
146}
147static inline u32 perf_pmasys_mem_block_valid_true_v(void)
148{
149 return 0x00000001U;
150}
151static inline u32 perf_pmasys_mem_block_valid_true_f(void)
152{
153 return 0x80000000U;
154}
155static inline u32 perf_pmasys_mem_block_valid_false_v(void)
156{
157 return 0x00000000U;
158}
159static inline u32 perf_pmasys_mem_block_valid_false_f(void)
160{
161 return 0x0U;
162}
163static inline u32 perf_pmasys_outbase_r(void)
164{
165 return 0x001b4074U;
166}
167static inline u32 perf_pmasys_outbase_ptr_f(u32 v)
168{
169 return (v & 0x7ffffffU) << 5U;
170}
171static inline u32 perf_pmasys_outbaseupper_r(void)
172{
173 return 0x001b4078U;
174}
175static inline u32 perf_pmasys_outbaseupper_ptr_f(u32 v)
176{
177 return (v & 0xffU) << 0U;
178}
179static inline u32 perf_pmasys_outsize_r(void)
180{
181 return 0x001b407cU;
182}
183static inline u32 perf_pmasys_outsize_numbytes_f(u32 v)
184{
185 return (v & 0x7ffffffU) << 5U;
186}
187static inline u32 perf_pmasys_mem_bytes_r(void)
188{
189 return 0x001b4084U;
190}
191static inline u32 perf_pmasys_mem_bytes_numbytes_f(u32 v)
192{
193 return (v & 0xfffffffU) << 4U;
194}
195static inline u32 perf_pmasys_mem_bump_r(void)
196{
197 return 0x001b4088U;
198}
199static inline u32 perf_pmasys_mem_bump_numbytes_f(u32 v)
200{
201 return (v & 0xfffffffU) << 4U;
202}
203static inline u32 perf_pmasys_enginestatus_r(void)
204{
205 return 0x001b40a4U;
206}
207static inline u32 perf_pmasys_enginestatus_rbufempty_f(u32 v)
208{
209 return (v & 0x1U) << 4U;
210}
211static inline u32 perf_pmasys_enginestatus_rbufempty_empty_v(void)
212{
213 return 0x00000001U;
214}
215static inline u32 perf_pmasys_enginestatus_rbufempty_empty_f(void)
216{
217 return 0x10U;
218}
219#endif
diff --git a/include/nvgpu/hw/gm20b/hw_pram_gm20b.h b/include/nvgpu/hw/gm20b/hw_pram_gm20b.h
deleted file mode 100644
index 47a6bfa..0000000
--- a/include/nvgpu/hw/gm20b/hw_pram_gm20b.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pram_gm20b_h_
57#define _hw_pram_gm20b_h_
58
59static inline u32 pram_data032_r(u32 i)
60{
61 return 0x00700000U + i*4U;
62}
63#endif
diff --git a/include/nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h b/include/nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h
deleted file mode 100644
index c6f08ed..0000000
--- a/include/nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringmaster_gm20b_h_
57#define _hw_pri_ringmaster_gm20b_h_
58
59static inline u32 pri_ringmaster_command_r(void)
60{
61 return 0x0012004cU;
62}
63static inline u32 pri_ringmaster_command_cmd_m(void)
64{
65 return 0x3fU << 0U;
66}
67static inline u32 pri_ringmaster_command_cmd_v(u32 r)
68{
69 return (r >> 0U) & 0x3fU;
70}
71static inline u32 pri_ringmaster_command_cmd_no_cmd_v(void)
72{
73 return 0x00000000U;
74}
75static inline u32 pri_ringmaster_command_cmd_start_ring_f(void)
76{
77 return 0x1U;
78}
79static inline u32 pri_ringmaster_command_cmd_ack_interrupt_f(void)
80{
81 return 0x2U;
82}
83static inline u32 pri_ringmaster_command_cmd_enumerate_stations_f(void)
84{
85 return 0x3U;
86}
87static inline u32 pri_ringmaster_command_cmd_enumerate_stations_bc_grp_all_f(void)
88{
89 return 0x0U;
90}
91static inline u32 pri_ringmaster_command_data_r(void)
92{
93 return 0x00120048U;
94}
95static inline u32 pri_ringmaster_start_results_r(void)
96{
97 return 0x00120050U;
98}
99static inline u32 pri_ringmaster_start_results_connectivity_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 pri_ringmaster_start_results_connectivity_pass_v(void)
104{
105 return 0x00000001U;
106}
107static inline u32 pri_ringmaster_intr_status0_r(void)
108{
109 return 0x00120058U;
110}
111static inline u32 pri_ringmaster_intr_status0_ring_start_conn_fault_v(u32 r)
112{
113 return (r >> 0U) & 0x1U;
114}
115static inline u32 pri_ringmaster_intr_status0_disconnect_fault_v(u32 r)
116{
117 return (r >> 1U) & 0x1U;
118}
119static inline u32 pri_ringmaster_intr_status0_overflow_fault_v(u32 r)
120{
121 return (r >> 2U) & 0x1U;
122}
123static inline u32 pri_ringmaster_intr_status0_gbl_write_error_sys_v(u32 r)
124{
125 return (r >> 8U) & 0x1U;
126}
127static inline u32 pri_ringmaster_intr_status1_r(void)
128{
129 return 0x0012005cU;
130}
131static inline u32 pri_ringmaster_global_ctl_r(void)
132{
133 return 0x00120060U;
134}
135static inline u32 pri_ringmaster_global_ctl_ring_reset_asserted_f(void)
136{
137 return 0x1U;
138}
139static inline u32 pri_ringmaster_global_ctl_ring_reset_deasserted_f(void)
140{
141 return 0x0U;
142}
143static inline u32 pri_ringmaster_enum_fbp_r(void)
144{
145 return 0x00120074U;
146}
147static inline u32 pri_ringmaster_enum_fbp_count_v(u32 r)
148{
149 return (r >> 0U) & 0x1fU;
150}
151static inline u32 pri_ringmaster_enum_gpc_r(void)
152{
153 return 0x00120078U;
154}
155static inline u32 pri_ringmaster_enum_gpc_count_v(u32 r)
156{
157 return (r >> 0U) & 0x1fU;
158}
159static inline u32 pri_ringmaster_enum_ltc_r(void)
160{
161 return 0x0012006cU;
162}
163static inline u32 pri_ringmaster_enum_ltc_count_v(u32 r)
164{
165 return (r >> 0U) & 0x1fU;
166}
167#endif
diff --git a/include/nvgpu/hw/gm20b/hw_pri_ringstation_gpc_gm20b.h b/include/nvgpu/hw/gm20b/hw_pri_ringstation_gpc_gm20b.h
deleted file mode 100644
index 8d1ffb2..0000000
--- a/include/nvgpu/hw/gm20b/hw_pri_ringstation_gpc_gm20b.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_gpc_gm20b_h_
57#define _hw_pri_ringstation_gpc_gm20b_h_
58
59static inline u32 pri_ringstation_gpc_master_config_r(u32 i)
60{
61 return 0x00128300U + i*4U;
62}
63static inline u32 pri_ringstation_gpc_gpc0_priv_error_adr_r(void)
64{
65 return 0x00128120U;
66}
67static inline u32 pri_ringstation_gpc_gpc0_priv_error_wrdat_r(void)
68{
69 return 0x00128124U;
70}
71static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_r(void)
72{
73 return 0x00128128U;
74}
75static inline u32 pri_ringstation_gpc_gpc0_priv_error_code_r(void)
76{
77 return 0x0012812cU;
78}
79#endif
diff --git a/include/nvgpu/hw/gm20b/hw_pri_ringstation_sys_gm20b.h b/include/nvgpu/hw/gm20b/hw_pri_ringstation_sys_gm20b.h
deleted file mode 100644
index ac1d245..0000000
--- a/include/nvgpu/hw/gm20b/hw_pri_ringstation_sys_gm20b.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_sys_gm20b_h_
57#define _hw_pri_ringstation_sys_gm20b_h_
58
59static inline u32 pri_ringstation_sys_master_config_r(u32 i)
60{
61 return 0x00122300U + i*4U;
62}
63static inline u32 pri_ringstation_sys_decode_config_r(void)
64{
65 return 0x00122204U;
66}
67static inline u32 pri_ringstation_sys_decode_config_ring_m(void)
68{
69 return 0x7U << 0U;
70}
71static inline u32 pri_ringstation_sys_decode_config_ring_drop_on_ring_not_started_f(void)
72{
73 return 0x1U;
74}
75static inline u32 pri_ringstation_sys_priv_error_adr_r(void)
76{
77 return 0x00122120U;
78}
79static inline u32 pri_ringstation_sys_priv_error_wrdat_r(void)
80{
81 return 0x00122124U;
82}
83static inline u32 pri_ringstation_sys_priv_error_info_r(void)
84{
85 return 0x00122128U;
86}
87static inline u32 pri_ringstation_sys_priv_error_code_r(void)
88{
89 return 0x0012212cU;
90}
91#endif
diff --git a/include/nvgpu/hw/gm20b/hw_proj_gm20b.h b/include/nvgpu/hw/gm20b/hw_proj_gm20b.h
deleted file mode 100644
index 8129ea6..0000000
--- a/include/nvgpu/hw/gm20b/hw_proj_gm20b.h
+++ /dev/null
@@ -1,171 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_proj_gm20b_h_
57#define _hw_proj_gm20b_h_
58
59static inline u32 proj_gpc_base_v(void)
60{
61 return 0x00500000U;
62}
63static inline u32 proj_gpc_shared_base_v(void)
64{
65 return 0x00418000U;
66}
67static inline u32 proj_gpc_stride_v(void)
68{
69 return 0x00008000U;
70}
71static inline u32 proj_gpc_priv_stride_v(void)
72{
73 return 0x00000800U;
74}
75static inline u32 proj_ltc_stride_v(void)
76{
77 return 0x00002000U;
78}
79static inline u32 proj_lts_stride_v(void)
80{
81 return 0x00000200U;
82}
83static inline u32 proj_fbpa_stride_v(void)
84{
85 return 0x00001000U;
86}
87static inline u32 proj_ppc_in_gpc_base_v(void)
88{
89 return 0x00003000U;
90}
91static inline u32 proj_ppc_in_gpc_shared_base_v(void)
92{
93 return 0x00003e00U;
94}
95static inline u32 proj_ppc_in_gpc_stride_v(void)
96{
97 return 0x00000200U;
98}
99static inline u32 proj_rop_base_v(void)
100{
101 return 0x00410000U;
102}
103static inline u32 proj_rop_shared_base_v(void)
104{
105 return 0x00408800U;
106}
107static inline u32 proj_rop_stride_v(void)
108{
109 return 0x00000400U;
110}
111static inline u32 proj_tpc_in_gpc_base_v(void)
112{
113 return 0x00004000U;
114}
115static inline u32 proj_tpc_in_gpc_stride_v(void)
116{
117 return 0x00000800U;
118}
119static inline u32 proj_tpc_in_gpc_shared_base_v(void)
120{
121 return 0x00001800U;
122}
123static inline u32 proj_host_num_engines_v(void)
124{
125 return 0x00000002U;
126}
127static inline u32 proj_host_num_pbdma_v(void)
128{
129 return 0x00000001U;
130}
131static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void)
132{
133 return 0x00000002U;
134}
135static inline u32 proj_scal_litter_num_sm_per_tpc_v(void)
136{
137 return 0x00000001U;
138}
139static inline u32 proj_scal_litter_num_fbps_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 proj_scal_litter_num_fbpas_v(void)
144{
145 return 0x00000001U;
146}
147static inline u32 proj_scal_litter_num_gpcs_v(void)
148{
149 return 0x00000001U;
150}
151static inline u32 proj_scal_litter_num_pes_per_gpc_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 proj_scal_litter_num_tpcs_per_pes_v(void)
156{
157 return 0x00000002U;
158}
159static inline u32 proj_scal_litter_num_zcull_banks_v(void)
160{
161 return 0x00000004U;
162}
163static inline u32 proj_scal_max_gpcs_v(void)
164{
165 return 0x00000020U;
166}
167static inline u32 proj_scal_max_tpc_per_gpc_v(void)
168{
169 return 0x00000008U;
170}
171#endif
diff --git a/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h b/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h
deleted file mode 100644
index a7c409d..0000000
--- a/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h
+++ /dev/null
@@ -1,879 +0,0 @@
1/*
2 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pwr_gm20b_h_
57#define _hw_pwr_gm20b_h_
58
59static inline u32 pwr_falcon_irqsset_r(void)
60{
61 return 0x0010a000U;
62}
63static inline u32 pwr_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 pwr_falcon_irqsclr_r(void)
68{
69 return 0x0010a004U;
70}
71static inline u32 pwr_falcon_irqstat_r(void)
72{
73 return 0x0010a008U;
74}
75static inline u32 pwr_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 pwr_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 pwr_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 pwr_falcon_irqmode_r(void)
88{
89 return 0x0010a00cU;
90}
91static inline u32 pwr_falcon_irqmset_r(void)
92{
93 return 0x0010a010U;
94}
95static inline u32 pwr_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 pwr_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 pwr_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 pwr_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 pwr_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 pwr_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 pwr_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 pwr_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 pwr_falcon_irqmclr_r(void)
128{
129 return 0x0010a014U;
130}
131static inline u32 pwr_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 pwr_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 pwr_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 pwr_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 pwr_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 pwr_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 pwr_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 pwr_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 pwr_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 pwr_falcon_irqmask_r(void)
168{
169 return 0x0010a018U;
170}
171static inline u32 pwr_falcon_irqdest_r(void)
172{
173 return 0x0010a01cU;
174}
175static inline u32 pwr_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 pwr_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 pwr_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 pwr_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 pwr_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 pwr_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 pwr_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 pwr_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 pwr_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 pwr_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 pwr_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 pwr_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 pwr_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 pwr_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 pwr_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 pwr_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 pwr_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 pwr_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 pwr_falcon_curctx_r(void)
248{
249 return 0x0010a050U;
250}
251static inline u32 pwr_falcon_nxtctx_r(void)
252{
253 return 0x0010a054U;
254}
255static inline u32 pwr_falcon_mailbox0_r(void)
256{
257 return 0x0010a040U;
258}
259static inline u32 pwr_falcon_mailbox1_r(void)
260{
261 return 0x0010a044U;
262}
263static inline u32 pwr_falcon_itfen_r(void)
264{
265 return 0x0010a048U;
266}
267static inline u32 pwr_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 pwr_falcon_idlestate_r(void)
272{
273 return 0x0010a04cU;
274}
275static inline u32 pwr_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 pwr_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 pwr_falcon_os_r(void)
284{
285 return 0x0010a080U;
286}
287static inline u32 pwr_falcon_engctl_r(void)
288{
289 return 0x0010a0a4U;
290}
291static inline u32 pwr_falcon_cpuctl_r(void)
292{
293 return 0x0010a100U;
294}
295static inline u32 pwr_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 pwr_falcon_cpuctl_halt_intr_f(u32 v)
300{
301 return (v & 0x1U) << 4U;
302}
303static inline u32 pwr_falcon_cpuctl_halt_intr_m(void)
304{
305 return 0x1U << 4U;
306}
307static inline u32 pwr_falcon_cpuctl_halt_intr_v(u32 r)
308{
309 return (r >> 4U) & 0x1U;
310}
311static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
312{
313 return (v & 0x1U) << 6U;
314}
315static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_m(void)
316{
317 return 0x1U << 6U;
318}
319static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
320{
321 return (r >> 6U) & 0x1U;
322}
323static inline u32 pwr_falcon_cpuctl_alias_r(void)
324{
325 return 0x0010a130U;
326}
327static inline u32 pwr_falcon_cpuctl_alias_startcpu_f(u32 v)
328{
329 return (v & 0x1U) << 1U;
330}
331static inline u32 pwr_pmu_scpctl_stat_r(void)
332{
333 return 0x0010ac08U;
334}
335static inline u32 pwr_pmu_scpctl_stat_debug_mode_f(u32 v)
336{
337 return (v & 0x1U) << 20U;
338}
339static inline u32 pwr_pmu_scpctl_stat_debug_mode_m(void)
340{
341 return 0x1U << 20U;
342}
343static inline u32 pwr_pmu_scpctl_stat_debug_mode_v(u32 r)
344{
345 return (r >> 20U) & 0x1U;
346}
347static inline u32 pwr_falcon_imemc_r(u32 i)
348{
349 return 0x0010a180U + i*16U;
350}
351static inline u32 pwr_falcon_imemc_offs_f(u32 v)
352{
353 return (v & 0x3fU) << 2U;
354}
355static inline u32 pwr_falcon_imemc_blk_f(u32 v)
356{
357 return (v & 0xffU) << 8U;
358}
359static inline u32 pwr_falcon_imemc_aincw_f(u32 v)
360{
361 return (v & 0x1U) << 24U;
362}
363static inline u32 pwr_falcon_imemd_r(u32 i)
364{
365 return 0x0010a184U + i*16U;
366}
367static inline u32 pwr_falcon_imemt_r(u32 i)
368{
369 return 0x0010a188U + i*16U;
370}
371static inline u32 pwr_falcon_sctl_r(void)
372{
373 return 0x0010a240U;
374}
375static inline u32 pwr_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 pwr_falcon_bootvec_r(void)
380{
381 return 0x0010a104U;
382}
383static inline u32 pwr_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 pwr_falcon_dmactl_r(void)
388{
389 return 0x0010a10cU;
390}
391static inline u32 pwr_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 pwr_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 pwr_falcon_hwcfg_r(void)
400{
401 return 0x0010a108U;
402}
403static inline u32 pwr_falcon_hwcfg_imem_size_v(u32 r)
404{
405 return (r >> 0U) & 0x1ffU;
406}
407static inline u32 pwr_falcon_hwcfg_dmem_size_v(u32 r)
408{
409 return (r >> 9U) & 0x1ffU;
410}
411static inline u32 pwr_falcon_dmatrfbase_r(void)
412{
413 return 0x0010a110U;
414}
415static inline u32 pwr_falcon_dmatrfmoffs_r(void)
416{
417 return 0x0010a114U;
418}
419static inline u32 pwr_falcon_dmatrfcmd_r(void)
420{
421 return 0x0010a118U;
422}
423static inline u32 pwr_falcon_dmatrfcmd_imem_f(u32 v)
424{
425 return (v & 0x1U) << 4U;
426}
427static inline u32 pwr_falcon_dmatrfcmd_write_f(u32 v)
428{
429 return (v & 0x1U) << 5U;
430}
431static inline u32 pwr_falcon_dmatrfcmd_size_f(u32 v)
432{
433 return (v & 0x7U) << 8U;
434}
435static inline u32 pwr_falcon_dmatrfcmd_ctxdma_f(u32 v)
436{
437 return (v & 0x7U) << 12U;
438}
439static inline u32 pwr_falcon_dmatrffboffs_r(void)
440{
441 return 0x0010a11cU;
442}
443static inline u32 pwr_falcon_exterraddr_r(void)
444{
445 return 0x0010a168U;
446}
447static inline u32 pwr_falcon_exterrstat_r(void)
448{
449 return 0x0010a16cU;
450}
451static inline u32 pwr_falcon_exterrstat_valid_m(void)
452{
453 return 0x1U << 31U;
454}
455static inline u32 pwr_falcon_exterrstat_valid_v(u32 r)
456{
457 return (r >> 31U) & 0x1U;
458}
459static inline u32 pwr_falcon_exterrstat_valid_true_v(void)
460{
461 return 0x00000001U;
462}
463static inline u32 pwr_pmu_falcon_icd_cmd_r(void)
464{
465 return 0x0010a200U;
466}
467static inline u32 pwr_pmu_falcon_icd_cmd_opc_s(void)
468{
469 return 4U;
470}
471static inline u32 pwr_pmu_falcon_icd_cmd_opc_f(u32 v)
472{
473 return (v & 0xfU) << 0U;
474}
475static inline u32 pwr_pmu_falcon_icd_cmd_opc_m(void)
476{
477 return 0xfU << 0U;
478}
479static inline u32 pwr_pmu_falcon_icd_cmd_opc_v(u32 r)
480{
481 return (r >> 0U) & 0xfU;
482}
483static inline u32 pwr_pmu_falcon_icd_cmd_opc_rreg_f(void)
484{
485 return 0x8U;
486}
487static inline u32 pwr_pmu_falcon_icd_cmd_opc_rstat_f(void)
488{
489 return 0xeU;
490}
491static inline u32 pwr_pmu_falcon_icd_cmd_idx_f(u32 v)
492{
493 return (v & 0x1fU) << 8U;
494}
495static inline u32 pwr_pmu_falcon_icd_rdata_r(void)
496{
497 return 0x0010a20cU;
498}
499static inline u32 pwr_falcon_dmemc_r(u32 i)
500{
501 return 0x0010a1c0U + i*8U;
502}
503static inline u32 pwr_falcon_dmemc_offs_f(u32 v)
504{
505 return (v & 0x3fU) << 2U;
506}
507static inline u32 pwr_falcon_dmemc_offs_m(void)
508{
509 return 0x3fU << 2U;
510}
511static inline u32 pwr_falcon_dmemc_blk_f(u32 v)
512{
513 return (v & 0xffU) << 8U;
514}
515static inline u32 pwr_falcon_dmemc_blk_m(void)
516{
517 return 0xffU << 8U;
518}
519static inline u32 pwr_falcon_dmemc_aincw_f(u32 v)
520{
521 return (v & 0x1U) << 24U;
522}
523static inline u32 pwr_falcon_dmemc_aincr_f(u32 v)
524{
525 return (v & 0x1U) << 25U;
526}
527static inline u32 pwr_falcon_dmemd_r(u32 i)
528{
529 return 0x0010a1c4U + i*8U;
530}
531static inline u32 pwr_pmu_new_instblk_r(void)
532{
533 return 0x0010a480U;
534}
535static inline u32 pwr_pmu_new_instblk_ptr_f(u32 v)
536{
537 return (v & 0xfffffffU) << 0U;
538}
539static inline u32 pwr_pmu_new_instblk_target_fb_f(void)
540{
541 return 0x0U;
542}
543static inline u32 pwr_pmu_new_instblk_target_sys_coh_f(void)
544{
545 return 0x20000000U;
546}
547static inline u32 pwr_pmu_new_instblk_target_sys_ncoh_f(void)
548{
549 return 0x30000000U;
550}
551static inline u32 pwr_pmu_new_instblk_valid_f(u32 v)
552{
553 return (v & 0x1U) << 30U;
554}
555static inline u32 pwr_pmu_mutex_id_r(void)
556{
557 return 0x0010a488U;
558}
559static inline u32 pwr_pmu_mutex_id_value_v(u32 r)
560{
561 return (r >> 0U) & 0xffU;
562}
563static inline u32 pwr_pmu_mutex_id_value_init_v(void)
564{
565 return 0x00000000U;
566}
567static inline u32 pwr_pmu_mutex_id_value_not_avail_v(void)
568{
569 return 0x000000ffU;
570}
571static inline u32 pwr_pmu_mutex_id_release_r(void)
572{
573 return 0x0010a48cU;
574}
575static inline u32 pwr_pmu_mutex_id_release_value_f(u32 v)
576{
577 return (v & 0xffU) << 0U;
578}
579static inline u32 pwr_pmu_mutex_id_release_value_m(void)
580{
581 return 0xffU << 0U;
582}
583static inline u32 pwr_pmu_mutex_id_release_value_init_v(void)
584{
585 return 0x00000000U;
586}
587static inline u32 pwr_pmu_mutex_id_release_value_init_f(void)
588{
589 return 0x0U;
590}
591static inline u32 pwr_pmu_mutex_r(u32 i)
592{
593 return 0x0010a580U + i*4U;
594}
595static inline u32 pwr_pmu_mutex__size_1_v(void)
596{
597 return 0x00000010U;
598}
599static inline u32 pwr_pmu_mutex_value_f(u32 v)
600{
601 return (v & 0xffU) << 0U;
602}
603static inline u32 pwr_pmu_mutex_value_v(u32 r)
604{
605 return (r >> 0U) & 0xffU;
606}
607static inline u32 pwr_pmu_mutex_value_initial_lock_f(void)
608{
609 return 0x0U;
610}
611static inline u32 pwr_pmu_queue_head_r(u32 i)
612{
613 return 0x0010a4a0U + i*4U;
614}
615static inline u32 pwr_pmu_queue_head__size_1_v(void)
616{
617 return 0x00000004U;
618}
619static inline u32 pwr_pmu_queue_head_address_f(u32 v)
620{
621 return (v & 0xffffffffU) << 0U;
622}
623static inline u32 pwr_pmu_queue_head_address_v(u32 r)
624{
625 return (r >> 0U) & 0xffffffffU;
626}
627static inline u32 pwr_pmu_queue_tail_r(u32 i)
628{
629 return 0x0010a4b0U + i*4U;
630}
631static inline u32 pwr_pmu_queue_tail__size_1_v(void)
632{
633 return 0x00000004U;
634}
635static inline u32 pwr_pmu_queue_tail_address_f(u32 v)
636{
637 return (v & 0xffffffffU) << 0U;
638}
639static inline u32 pwr_pmu_queue_tail_address_v(u32 r)
640{
641 return (r >> 0U) & 0xffffffffU;
642}
643static inline u32 pwr_pmu_msgq_head_r(void)
644{
645 return 0x0010a4c8U;
646}
647static inline u32 pwr_pmu_msgq_head_val_f(u32 v)
648{
649 return (v & 0xffffffffU) << 0U;
650}
651static inline u32 pwr_pmu_msgq_head_val_v(u32 r)
652{
653 return (r >> 0U) & 0xffffffffU;
654}
655static inline u32 pwr_pmu_msgq_tail_r(void)
656{
657 return 0x0010a4ccU;
658}
659static inline u32 pwr_pmu_msgq_tail_val_f(u32 v)
660{
661 return (v & 0xffffffffU) << 0U;
662}
663static inline u32 pwr_pmu_msgq_tail_val_v(u32 r)
664{
665 return (r >> 0U) & 0xffffffffU;
666}
667static inline u32 pwr_pmu_idle_mask_r(u32 i)
668{
669 return 0x0010a504U + i*16U;
670}
671static inline u32 pwr_pmu_idle_mask_gr_enabled_f(void)
672{
673 return 0x1U;
674}
675static inline u32 pwr_pmu_idle_mask_ce_2_enabled_f(void)
676{
677 return 0x200000U;
678}
679static inline u32 pwr_pmu_idle_mask_1_r(u32 i)
680{
681 return 0x0010aa34U + i*8U;
682}
683static inline u32 pwr_pmu_idle_count_r(u32 i)
684{
685 return 0x0010a508U + i*16U;
686}
687static inline u32 pwr_pmu_idle_count_value_f(u32 v)
688{
689 return (v & 0x7fffffffU) << 0U;
690}
691static inline u32 pwr_pmu_idle_count_value_v(u32 r)
692{
693 return (r >> 0U) & 0x7fffffffU;
694}
695static inline u32 pwr_pmu_idle_count_reset_f(u32 v)
696{
697 return (v & 0x1U) << 31U;
698}
699static inline u32 pwr_pmu_idle_ctrl_r(u32 i)
700{
701 return 0x0010a50cU + i*16U;
702}
703static inline u32 pwr_pmu_idle_ctrl_value_m(void)
704{
705 return 0x3U << 0U;
706}
707static inline u32 pwr_pmu_idle_ctrl_value_busy_f(void)
708{
709 return 0x2U;
710}
711static inline u32 pwr_pmu_idle_ctrl_value_always_f(void)
712{
713 return 0x3U;
714}
715static inline u32 pwr_pmu_idle_ctrl_filter_m(void)
716{
717 return 0x1U << 2U;
718}
719static inline u32 pwr_pmu_idle_ctrl_filter_disabled_f(void)
720{
721 return 0x0U;
722}
723static inline u32 pwr_pmu_idle_threshold_r(u32 i)
724{
725 return 0x0010a8a0U + i*4U;
726}
727static inline u32 pwr_pmu_idle_threshold_value_f(u32 v)
728{
729 return (v & 0x7fffffffU) << 0U;
730}
731static inline u32 pwr_pmu_idle_intr_r(void)
732{
733 return 0x0010a9e8U;
734}
735static inline u32 pwr_pmu_idle_intr_en_f(u32 v)
736{
737 return (v & 0x1U) << 0U;
738}
739static inline u32 pwr_pmu_idle_intr_en_disabled_v(void)
740{
741 return 0x00000000U;
742}
743static inline u32 pwr_pmu_idle_intr_en_enabled_v(void)
744{
745 return 0x00000001U;
746}
747static inline u32 pwr_pmu_idle_intr_status_r(void)
748{
749 return 0x0010a9ecU;
750}
751static inline u32 pwr_pmu_idle_intr_status_intr_f(u32 v)
752{
753 return (v & 0x1U) << 0U;
754}
755static inline u32 pwr_pmu_idle_intr_status_intr_m(void)
756{
757 return 0x1U << 0U;
758}
759static inline u32 pwr_pmu_idle_intr_status_intr_v(u32 r)
760{
761 return (r >> 0U) & 0x1U;
762}
763static inline u32 pwr_pmu_idle_intr_status_intr_pending_v(void)
764{
765 return 0x00000001U;
766}
767static inline u32 pwr_pmu_idle_intr_status_intr_clear_v(void)
768{
769 return 0x00000001U;
770}
771static inline u32 pwr_pmu_idle_mask_supp_r(u32 i)
772{
773 return 0x0010a9f0U + i*8U;
774}
775static inline u32 pwr_pmu_idle_mask_1_supp_r(u32 i)
776{
777 return 0x0010a9f4U + i*8U;
778}
779static inline u32 pwr_pmu_idle_ctrl_supp_r(u32 i)
780{
781 return 0x0010aa30U + i*8U;
782}
783static inline u32 pwr_pmu_debug_r(u32 i)
784{
785 return 0x0010a5c0U + i*4U;
786}
787static inline u32 pwr_pmu_debug__size_1_v(void)
788{
789 return 0x00000004U;
790}
791static inline u32 pwr_pmu_mailbox_r(u32 i)
792{
793 return 0x0010a450U + i*4U;
794}
795static inline u32 pwr_pmu_mailbox__size_1_v(void)
796{
797 return 0x0000000cU;
798}
799static inline u32 pwr_pmu_bar0_addr_r(void)
800{
801 return 0x0010a7a0U;
802}
803static inline u32 pwr_pmu_bar0_data_r(void)
804{
805 return 0x0010a7a4U;
806}
807static inline u32 pwr_pmu_bar0_ctl_r(void)
808{
809 return 0x0010a7acU;
810}
811static inline u32 pwr_pmu_bar0_timeout_r(void)
812{
813 return 0x0010a7a8U;
814}
815static inline u32 pwr_pmu_bar0_fecs_error_r(void)
816{
817 return 0x0010a988U;
818}
819static inline u32 pwr_pmu_bar0_error_status_r(void)
820{
821 return 0x0010a7b0U;
822}
823static inline u32 pwr_pmu_pg_idlefilth_r(u32 i)
824{
825 return 0x0010a6c0U + i*4U;
826}
827static inline u32 pwr_pmu_pg_ppuidlefilth_r(u32 i)
828{
829 return 0x0010a6e8U + i*4U;
830}
831static inline u32 pwr_pmu_pg_idle_cnt_r(u32 i)
832{
833 return 0x0010a710U + i*4U;
834}
835static inline u32 pwr_pmu_pg_intren_r(u32 i)
836{
837 return 0x0010a760U + i*4U;
838}
839static inline u32 pwr_fbif_transcfg_r(u32 i)
840{
841 return 0x0010ae00U + i*4U;
842}
843static inline u32 pwr_fbif_transcfg_target_local_fb_f(void)
844{
845 return 0x0U;
846}
847static inline u32 pwr_fbif_transcfg_target_coherent_sysmem_f(void)
848{
849 return 0x1U;
850}
851static inline u32 pwr_fbif_transcfg_target_noncoherent_sysmem_f(void)
852{
853 return 0x2U;
854}
855static inline u32 pwr_fbif_transcfg_mem_type_s(void)
856{
857 return 1U;
858}
859static inline u32 pwr_fbif_transcfg_mem_type_f(u32 v)
860{
861 return (v & 0x1U) << 2U;
862}
863static inline u32 pwr_fbif_transcfg_mem_type_m(void)
864{
865 return 0x1U << 2U;
866}
867static inline u32 pwr_fbif_transcfg_mem_type_v(u32 r)
868{
869 return (r >> 2U) & 0x1U;
870}
871static inline u32 pwr_fbif_transcfg_mem_type_virtual_f(void)
872{
873 return 0x0U;
874}
875static inline u32 pwr_fbif_transcfg_mem_type_physical_f(void)
876{
877 return 0x4U;
878}
879#endif
diff --git a/include/nvgpu/hw/gm20b/hw_ram_gm20b.h b/include/nvgpu/hw/gm20b/hw_ram_gm20b.h
deleted file mode 100644
index 2414abf..0000000
--- a/include/nvgpu/hw/gm20b/hw_ram_gm20b.h
+++ /dev/null
@@ -1,459 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ram_gm20b_h_
57#define _hw_ram_gm20b_h_
58
59static inline u32 ram_in_ramfc_s(void)
60{
61 return 4096U;
62}
63static inline u32 ram_in_ramfc_w(void)
64{
65 return 0U;
66}
67static inline u32 ram_in_page_dir_base_target_f(u32 v)
68{
69 return (v & 0x3U) << 0U;
70}
71static inline u32 ram_in_page_dir_base_target_w(void)
72{
73 return 128U;
74}
75static inline u32 ram_in_page_dir_base_target_vid_mem_f(void)
76{
77 return 0x0U;
78}
79static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void)
80{
81 return 0x2U;
82}
83static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void)
84{
85 return 0x3U;
86}
87static inline u32 ram_in_page_dir_base_vol_w(void)
88{
89 return 128U;
90}
91static inline u32 ram_in_page_dir_base_vol_true_f(void)
92{
93 return 0x4U;
94}
95static inline u32 ram_in_big_page_size_f(u32 v)
96{
97 return (v & 0x1U) << 11U;
98}
99static inline u32 ram_in_big_page_size_m(void)
100{
101 return 0x1U << 11U;
102}
103static inline u32 ram_in_big_page_size_w(void)
104{
105 return 128U;
106}
107static inline u32 ram_in_big_page_size_128kb_f(void)
108{
109 return 0x0U;
110}
111static inline u32 ram_in_big_page_size_64kb_f(void)
112{
113 return 0x800U;
114}
115static inline u32 ram_in_page_dir_base_lo_f(u32 v)
116{
117 return (v & 0xfffffU) << 12U;
118}
119static inline u32 ram_in_page_dir_base_lo_w(void)
120{
121 return 128U;
122}
123static inline u32 ram_in_page_dir_base_hi_f(u32 v)
124{
125 return (v & 0xffU) << 0U;
126}
127static inline u32 ram_in_page_dir_base_hi_w(void)
128{
129 return 129U;
130}
131static inline u32 ram_in_adr_limit_lo_f(u32 v)
132{
133 return (v & 0xfffffU) << 12U;
134}
135static inline u32 ram_in_adr_limit_lo_w(void)
136{
137 return 130U;
138}
139static inline u32 ram_in_adr_limit_hi_f(u32 v)
140{
141 return (v & 0xffU) << 0U;
142}
143static inline u32 ram_in_adr_limit_hi_w(void)
144{
145 return 131U;
146}
147static inline u32 ram_in_engine_cs_w(void)
148{
149 return 132U;
150}
151static inline u32 ram_in_engine_cs_wfi_v(void)
152{
153 return 0x00000000U;
154}
155static inline u32 ram_in_engine_cs_wfi_f(void)
156{
157 return 0x0U;
158}
159static inline u32 ram_in_engine_cs_fg_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 ram_in_engine_cs_fg_f(void)
164{
165 return 0x8U;
166}
167static inline u32 ram_in_gr_cs_w(void)
168{
169 return 132U;
170}
171static inline u32 ram_in_gr_cs_wfi_f(void)
172{
173 return 0x0U;
174}
175static inline u32 ram_in_gr_wfi_target_w(void)
176{
177 return 132U;
178}
179static inline u32 ram_in_gr_wfi_mode_w(void)
180{
181 return 132U;
182}
183static inline u32 ram_in_gr_wfi_mode_physical_v(void)
184{
185 return 0x00000000U;
186}
187static inline u32 ram_in_gr_wfi_mode_physical_f(void)
188{
189 return 0x0U;
190}
191static inline u32 ram_in_gr_wfi_mode_virtual_v(void)
192{
193 return 0x00000001U;
194}
195static inline u32 ram_in_gr_wfi_mode_virtual_f(void)
196{
197 return 0x4U;
198}
199static inline u32 ram_in_gr_wfi_ptr_lo_f(u32 v)
200{
201 return (v & 0xfffffU) << 12U;
202}
203static inline u32 ram_in_gr_wfi_ptr_lo_w(void)
204{
205 return 132U;
206}
207static inline u32 ram_in_gr_wfi_ptr_hi_f(u32 v)
208{
209 return (v & 0xffU) << 0U;
210}
211static inline u32 ram_in_gr_wfi_ptr_hi_w(void)
212{
213 return 133U;
214}
215static inline u32 ram_in_base_shift_v(void)
216{
217 return 0x0000000cU;
218}
219static inline u32 ram_in_alloc_size_v(void)
220{
221 return 0x00001000U;
222}
223static inline u32 ram_fc_size_val_v(void)
224{
225 return 0x00000200U;
226}
227static inline u32 ram_fc_gp_put_w(void)
228{
229 return 0U;
230}
231static inline u32 ram_fc_userd_w(void)
232{
233 return 2U;
234}
235static inline u32 ram_fc_userd_hi_w(void)
236{
237 return 3U;
238}
239static inline u32 ram_fc_signature_w(void)
240{
241 return 4U;
242}
243static inline u32 ram_fc_gp_get_w(void)
244{
245 return 5U;
246}
247static inline u32 ram_fc_pb_get_w(void)
248{
249 return 6U;
250}
251static inline u32 ram_fc_pb_get_hi_w(void)
252{
253 return 7U;
254}
255static inline u32 ram_fc_pb_top_level_get_w(void)
256{
257 return 8U;
258}
259static inline u32 ram_fc_pb_top_level_get_hi_w(void)
260{
261 return 9U;
262}
263static inline u32 ram_fc_acquire_w(void)
264{
265 return 12U;
266}
267static inline u32 ram_fc_semaphorea_w(void)
268{
269 return 14U;
270}
271static inline u32 ram_fc_semaphoreb_w(void)
272{
273 return 15U;
274}
275static inline u32 ram_fc_semaphorec_w(void)
276{
277 return 16U;
278}
279static inline u32 ram_fc_semaphored_w(void)
280{
281 return 17U;
282}
283static inline u32 ram_fc_gp_base_w(void)
284{
285 return 18U;
286}
287static inline u32 ram_fc_gp_base_hi_w(void)
288{
289 return 19U;
290}
291static inline u32 ram_fc_gp_fetch_w(void)
292{
293 return 20U;
294}
295static inline u32 ram_fc_pb_fetch_w(void)
296{
297 return 21U;
298}
299static inline u32 ram_fc_pb_fetch_hi_w(void)
300{
301 return 22U;
302}
303static inline u32 ram_fc_pb_put_w(void)
304{
305 return 23U;
306}
307static inline u32 ram_fc_pb_put_hi_w(void)
308{
309 return 24U;
310}
311static inline u32 ram_fc_pb_header_w(void)
312{
313 return 33U;
314}
315static inline u32 ram_fc_pb_count_w(void)
316{
317 return 34U;
318}
319static inline u32 ram_fc_subdevice_w(void)
320{
321 return 37U;
322}
323static inline u32 ram_fc_formats_w(void)
324{
325 return 39U;
326}
327static inline u32 ram_fc_syncpointa_w(void)
328{
329 return 41U;
330}
331static inline u32 ram_fc_syncpointb_w(void)
332{
333 return 42U;
334}
335static inline u32 ram_fc_target_w(void)
336{
337 return 43U;
338}
339static inline u32 ram_fc_hce_ctrl_w(void)
340{
341 return 57U;
342}
343static inline u32 ram_fc_chid_w(void)
344{
345 return 58U;
346}
347static inline u32 ram_fc_chid_id_f(u32 v)
348{
349 return (v & 0xfffU) << 0U;
350}
351static inline u32 ram_fc_chid_id_w(void)
352{
353 return 0U;
354}
355static inline u32 ram_fc_runlist_timeslice_w(void)
356{
357 return 62U;
358}
359static inline u32 ram_userd_base_shift_v(void)
360{
361 return 0x00000009U;
362}
363static inline u32 ram_userd_chan_size_v(void)
364{
365 return 0x00000200U;
366}
367static inline u32 ram_userd_put_w(void)
368{
369 return 16U;
370}
371static inline u32 ram_userd_get_w(void)
372{
373 return 17U;
374}
375static inline u32 ram_userd_ref_w(void)
376{
377 return 18U;
378}
379static inline u32 ram_userd_put_hi_w(void)
380{
381 return 19U;
382}
383static inline u32 ram_userd_ref_threshold_w(void)
384{
385 return 20U;
386}
387static inline u32 ram_userd_top_level_get_w(void)
388{
389 return 22U;
390}
391static inline u32 ram_userd_top_level_get_hi_w(void)
392{
393 return 23U;
394}
395static inline u32 ram_userd_get_hi_w(void)
396{
397 return 24U;
398}
399static inline u32 ram_userd_gp_get_w(void)
400{
401 return 34U;
402}
403static inline u32 ram_userd_gp_put_w(void)
404{
405 return 35U;
406}
407static inline u32 ram_userd_gp_top_level_get_w(void)
408{
409 return 22U;
410}
411static inline u32 ram_userd_gp_top_level_get_hi_w(void)
412{
413 return 23U;
414}
415static inline u32 ram_rl_entry_size_v(void)
416{
417 return 0x00000008U;
418}
419static inline u32 ram_rl_entry_chid_f(u32 v)
420{
421 return (v & 0xfffU) << 0U;
422}
423static inline u32 ram_rl_entry_id_f(u32 v)
424{
425 return (v & 0xfffU) << 0U;
426}
427static inline u32 ram_rl_entry_type_f(u32 v)
428{
429 return (v & 0x1U) << 13U;
430}
431static inline u32 ram_rl_entry_type_chid_f(void)
432{
433 return 0x0U;
434}
435static inline u32 ram_rl_entry_type_tsg_f(void)
436{
437 return 0x2000U;
438}
439static inline u32 ram_rl_entry_timeslice_scale_f(u32 v)
440{
441 return (v & 0xfU) << 14U;
442}
443static inline u32 ram_rl_entry_timeslice_scale_3_f(void)
444{
445 return 0xc000U;
446}
447static inline u32 ram_rl_entry_timeslice_timeout_f(u32 v)
448{
449 return (v & 0xffU) << 18U;
450}
451static inline u32 ram_rl_entry_timeslice_timeout_128_f(void)
452{
453 return 0x2000000U;
454}
455static inline u32 ram_rl_entry_tsg_length_f(u32 v)
456{
457 return (v & 0x3fU) << 26U;
458}
459#endif
diff --git a/include/nvgpu/hw/gm20b/hw_therm_gm20b.h b/include/nvgpu/hw/gm20b/hw_therm_gm20b.h
deleted file mode 100644
index fc1cd51..0000000
--- a/include/nvgpu/hw/gm20b/hw_therm_gm20b.h
+++ /dev/null
@@ -1,355 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_therm_gm20b_h_
57#define _hw_therm_gm20b_h_
58
59static inline u32 therm_use_a_r(void)
60{
61 return 0x00020798U;
62}
63static inline u32 therm_use_a_ext_therm_0_enable_f(void)
64{
65 return 0x1U;
66}
67static inline u32 therm_use_a_ext_therm_1_enable_f(void)
68{
69 return 0x2U;
70}
71static inline u32 therm_use_a_ext_therm_2_enable_f(void)
72{
73 return 0x4U;
74}
75static inline u32 therm_evt_ext_therm_0_r(void)
76{
77 return 0x00020700U;
78}
79static inline u32 therm_evt_ext_therm_0_slow_factor_f(u32 v)
80{
81 return (v & 0x3fU) << 8U;
82}
83static inline u32 therm_evt_ext_therm_0_slow_factor_init_v(void)
84{
85 return 0x00000000U;
86}
87static inline u32 therm_evt_ext_therm_1_r(void)
88{
89 return 0x00020704U;
90}
91static inline u32 therm_evt_ext_therm_1_slow_factor_f(u32 v)
92{
93 return (v & 0x3fU) << 8U;
94}
95static inline u32 therm_evt_ext_therm_1_slow_factor_init_v(void)
96{
97 return 0x00000000U;
98}
99static inline u32 therm_evt_ext_therm_2_r(void)
100{
101 return 0x00020708U;
102}
103static inline u32 therm_evt_ext_therm_2_slow_factor_f(u32 v)
104{
105 return (v & 0x3fU) << 8U;
106}
107static inline u32 therm_evt_ext_therm_2_slow_factor_init_v(void)
108{
109 return 0x00000000U;
110}
111static inline u32 therm_weight_1_r(void)
112{
113 return 0x00020024U;
114}
115static inline u32 therm_config1_r(void)
116{
117 return 0x00020050U;
118}
119static inline u32 therm_config2_r(void)
120{
121 return 0x00020130U;
122}
123static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
124{
125 return (v & 0x1U) << 24U;
126}
127static inline u32 therm_config2_grad_enable_f(u32 v)
128{
129 return (v & 0x1U) << 31U;
130}
131static inline u32 therm_gate_ctrl_r(u32 i)
132{
133 return 0x00020200U + i*4U;
134}
135static inline u32 therm_gate_ctrl_eng_clk_m(void)
136{
137 return 0x3U << 0U;
138}
139static inline u32 therm_gate_ctrl_eng_clk_run_f(void)
140{
141 return 0x0U;
142}
143static inline u32 therm_gate_ctrl_eng_clk_auto_f(void)
144{
145 return 0x1U;
146}
147static inline u32 therm_gate_ctrl_eng_clk_stop_f(void)
148{
149 return 0x2U;
150}
151static inline u32 therm_gate_ctrl_blk_clk_m(void)
152{
153 return 0x3U << 2U;
154}
155static inline u32 therm_gate_ctrl_blk_clk_run_f(void)
156{
157 return 0x0U;
158}
159static inline u32 therm_gate_ctrl_blk_clk_auto_f(void)
160{
161 return 0x4U;
162}
163static inline u32 therm_gate_ctrl_eng_pwr_m(void)
164{
165 return 0x3U << 4U;
166}
167static inline u32 therm_gate_ctrl_eng_pwr_auto_f(void)
168{
169 return 0x10U;
170}
171static inline u32 therm_gate_ctrl_eng_pwr_off_v(void)
172{
173 return 0x00000002U;
174}
175static inline u32 therm_gate_ctrl_eng_pwr_off_f(void)
176{
177 return 0x20U;
178}
179static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v)
180{
181 return (v & 0x1fU) << 8U;
182}
183static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void)
184{
185 return 0x1fU << 8U;
186}
187static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v)
188{
189 return (v & 0x7U) << 13U;
190}
191static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
192{
193 return 0x7U << 13U;
194}
195static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
196{
197 return (v & 0xfU) << 16U;
198}
199static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
200{
201 return 0xfU << 16U;
202}
203static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
204{
205 return (v & 0xfU) << 20U;
206}
207static inline u32 therm_gate_ctrl_eng_delay_after_m(void)
208{
209 return 0xfU << 20U;
210}
211static inline u32 therm_fecs_idle_filter_r(void)
212{
213 return 0x00020288U;
214}
215static inline u32 therm_fecs_idle_filter_value_m(void)
216{
217 return 0xffffffffU << 0U;
218}
219static inline u32 therm_hubmmu_idle_filter_r(void)
220{
221 return 0x0002028cU;
222}
223static inline u32 therm_hubmmu_idle_filter_value_m(void)
224{
225 return 0xffffffffU << 0U;
226}
227static inline u32 therm_clk_slowdown_r(u32 i)
228{
229 return 0x00020160U + i*4U;
230}
231static inline u32 therm_clk_slowdown_idle_factor_f(u32 v)
232{
233 return (v & 0x3fU) << 16U;
234}
235static inline u32 therm_clk_slowdown_idle_factor_m(void)
236{
237 return 0x3fU << 16U;
238}
239static inline u32 therm_clk_slowdown_idle_factor_v(u32 r)
240{
241 return (r >> 16U) & 0x3fU;
242}
243static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void)
244{
245 return 0x0U;
246}
247static inline u32 therm_grad_stepping_table_r(u32 i)
248{
249 return 0x000202c8U + i*4U;
250}
251static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
252{
253 return (v & 0x3fU) << 0U;
254}
255static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
256{
257 return 0x3fU << 0U;
258}
259static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
260{
261 return 0x1U;
262}
263static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
264{
265 return 0x2U;
266}
267static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
268{
269 return 0x6U;
270}
271static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
272{
273 return 0xeU;
274}
275static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
276{
277 return (v & 0x3fU) << 6U;
278}
279static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
280{
281 return 0x3fU << 6U;
282}
283static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
284{
285 return (v & 0x3fU) << 12U;
286}
287static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
288{
289 return 0x3fU << 12U;
290}
291static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
292{
293 return (v & 0x3fU) << 18U;
294}
295static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
296{
297 return 0x3fU << 18U;
298}
299static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
300{
301 return (v & 0x3fU) << 24U;
302}
303static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
304{
305 return 0x3fU << 24U;
306}
307static inline u32 therm_grad_stepping0_r(void)
308{
309 return 0x000202c0U;
310}
311static inline u32 therm_grad_stepping0_feature_s(void)
312{
313 return 1U;
314}
315static inline u32 therm_grad_stepping0_feature_f(u32 v)
316{
317 return (v & 0x1U) << 0U;
318}
319static inline u32 therm_grad_stepping0_feature_m(void)
320{
321 return 0x1U << 0U;
322}
323static inline u32 therm_grad_stepping0_feature_v(u32 r)
324{
325 return (r >> 0U) & 0x1U;
326}
327static inline u32 therm_grad_stepping0_feature_enable_f(void)
328{
329 return 0x1U;
330}
331static inline u32 therm_grad_stepping1_r(void)
332{
333 return 0x000202c4U;
334}
335static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
336{
337 return (v & 0x1ffffU) << 0U;
338}
339static inline u32 therm_clk_timing_r(u32 i)
340{
341 return 0x000203c0U + i*4U;
342}
343static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
344{
345 return (v & 0x1U) << 16U;
346}
347static inline u32 therm_clk_timing_grad_slowdown_m(void)
348{
349 return 0x1U << 16U;
350}
351static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
352{
353 return 0x10000U;
354}
355#endif
diff --git a/include/nvgpu/hw/gm20b/hw_timer_gm20b.h b/include/nvgpu/hw/gm20b/hw_timer_gm20b.h
deleted file mode 100644
index f409367..0000000
--- a/include/nvgpu/hw/gm20b/hw_timer_gm20b.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_timer_gm20b_h_
57#define _hw_timer_gm20b_h_
58
59static inline u32 timer_pri_timeout_r(void)
60{
61 return 0x00009080U;
62}
63static inline u32 timer_pri_timeout_period_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 timer_pri_timeout_period_m(void)
68{
69 return 0xffffffU << 0U;
70}
71static inline u32 timer_pri_timeout_period_v(u32 r)
72{
73 return (r >> 0U) & 0xffffffU;
74}
75static inline u32 timer_pri_timeout_en_f(u32 v)
76{
77 return (v & 0x1U) << 31U;
78}
79static inline u32 timer_pri_timeout_en_m(void)
80{
81 return 0x1U << 31U;
82}
83static inline u32 timer_pri_timeout_en_v(u32 r)
84{
85 return (r >> 31U) & 0x1U;
86}
87static inline u32 timer_pri_timeout_en_en_enabled_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 timer_pri_timeout_en_en_disabled_f(void)
92{
93 return 0x0U;
94}
95static inline u32 timer_pri_timeout_save_0_r(void)
96{
97 return 0x00009084U;
98}
99static inline u32 timer_pri_timeout_save_0_fecs_tgt_v(u32 r)
100{
101 return (r >> 31U) & 0x1U;
102}
103static inline u32 timer_pri_timeout_save_0_addr_v(u32 r)
104{
105 return (r >> 2U) & 0x3fffffU;
106}
107static inline u32 timer_pri_timeout_save_0_write_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 timer_pri_timeout_save_1_r(void)
112{
113 return 0x00009088U;
114}
115static inline u32 timer_pri_timeout_fecs_errcode_r(void)
116{
117 return 0x0000908cU;
118}
119static inline u32 timer_time_0_r(void)
120{
121 return 0x00009400U;
122}
123static inline u32 timer_time_1_r(void)
124{
125 return 0x00009410U;
126}
127#endif
diff --git a/include/nvgpu/hw/gm20b/hw_top_gm20b.h b/include/nvgpu/hw/gm20b/hw_top_gm20b.h
deleted file mode 100644
index 6d48839..0000000
--- a/include/nvgpu/hw/gm20b/hw_top_gm20b.h
+++ /dev/null
@@ -1,235 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_top_gm20b_h_
57#define _hw_top_gm20b_h_
58
59static inline u32 top_num_gpcs_r(void)
60{
61 return 0x00022430U;
62}
63static inline u32 top_num_gpcs_value_v(u32 r)
64{
65 return (r >> 0U) & 0x1fU;
66}
67static inline u32 top_tpc_per_gpc_r(void)
68{
69 return 0x00022434U;
70}
71static inline u32 top_tpc_per_gpc_value_v(u32 r)
72{
73 return (r >> 0U) & 0x1fU;
74}
75static inline u32 top_num_fbps_r(void)
76{
77 return 0x00022438U;
78}
79static inline u32 top_num_fbps_value_v(u32 r)
80{
81 return (r >> 0U) & 0x1fU;
82}
83static inline u32 top_ltc_per_fbp_r(void)
84{
85 return 0x00022450U;
86}
87static inline u32 top_ltc_per_fbp_value_v(u32 r)
88{
89 return (r >> 0U) & 0x1fU;
90}
91static inline u32 top_slices_per_ltc_r(void)
92{
93 return 0x0002245cU;
94}
95static inline u32 top_slices_per_ltc_value_v(u32 r)
96{
97 return (r >> 0U) & 0x1fU;
98}
99static inline u32 top_num_ltcs_r(void)
100{
101 return 0x00022454U;
102}
103static inline u32 top_device_info_r(u32 i)
104{
105 return 0x00022700U + i*4U;
106}
107static inline u32 top_device_info__size_1_v(void)
108{
109 return 0x00000040U;
110}
111static inline u32 top_device_info_chain_v(u32 r)
112{
113 return (r >> 31U) & 0x1U;
114}
115static inline u32 top_device_info_chain_enable_v(void)
116{
117 return 0x00000001U;
118}
119static inline u32 top_device_info_engine_enum_v(u32 r)
120{
121 return (r >> 26U) & 0xfU;
122}
123static inline u32 top_device_info_runlist_enum_v(u32 r)
124{
125 return (r >> 21U) & 0xfU;
126}
127static inline u32 top_device_info_intr_enum_v(u32 r)
128{
129 return (r >> 15U) & 0x1fU;
130}
131static inline u32 top_device_info_reset_enum_v(u32 r)
132{
133 return (r >> 9U) & 0x1fU;
134}
135static inline u32 top_device_info_type_enum_v(u32 r)
136{
137 return (r >> 2U) & 0x1fffffffU;
138}
139static inline u32 top_device_info_type_enum_graphics_v(void)
140{
141 return 0x00000000U;
142}
143static inline u32 top_device_info_type_enum_graphics_f(void)
144{
145 return 0x0U;
146}
147static inline u32 top_device_info_type_enum_copy0_v(void)
148{
149 return 0x00000001U;
150}
151static inline u32 top_device_info_type_enum_copy0_f(void)
152{
153 return 0x4U;
154}
155static inline u32 top_device_info_type_enum_copy1_v(void)
156{
157 return 0x00000002U;
158}
159static inline u32 top_device_info_type_enum_copy1_f(void)
160{
161 return 0x8U;
162}
163static inline u32 top_device_info_type_enum_copy2_v(void)
164{
165 return 0x00000003U;
166}
167static inline u32 top_device_info_type_enum_copy2_f(void)
168{
169 return 0xcU;
170}
171static inline u32 top_device_info_engine_v(u32 r)
172{
173 return (r >> 5U) & 0x1U;
174}
175static inline u32 top_device_info_runlist_v(u32 r)
176{
177 return (r >> 4U) & 0x1U;
178}
179static inline u32 top_device_info_intr_v(u32 r)
180{
181 return (r >> 3U) & 0x1U;
182}
183static inline u32 top_device_info_reset_v(u32 r)
184{
185 return (r >> 2U) & 0x1U;
186}
187static inline u32 top_device_info_entry_v(u32 r)
188{
189 return (r >> 0U) & 0x3U;
190}
191static inline u32 top_device_info_entry_not_valid_v(void)
192{
193 return 0x00000000U;
194}
195static inline u32 top_device_info_entry_enum_v(void)
196{
197 return 0x00000002U;
198}
199static inline u32 top_device_info_entry_engine_type_v(void)
200{
201 return 0x00000003U;
202}
203static inline u32 top_device_info_entry_data_v(void)
204{
205 return 0x00000001U;
206}
207static inline u32 top_device_info_data_type_v(u32 r)
208{
209 return (r >> 30U) & 0x1U;
210}
211static inline u32 top_device_info_data_type_enum2_v(void)
212{
213 return 0x00000000U;
214}
215static inline u32 top_device_info_data_pri_base_v(u32 r)
216{
217 return (r >> 12U) & 0x7ffU;
218}
219static inline u32 top_device_info_data_pri_base_align_v(void)
220{
221 return 0x0000000cU;
222}
223static inline u32 top_device_info_data_fault_id_enum_v(u32 r)
224{
225 return (r >> 3U) & 0x1fU;
226}
227static inline u32 top_device_info_data_fault_id_v(u32 r)
228{
229 return (r >> 2U) & 0x1U;
230}
231static inline u32 top_device_info_data_fault_id_valid_v(void)
232{
233 return 0x00000001U;
234}
235#endif
diff --git a/include/nvgpu/hw/gm20b/hw_trim_gm20b.h b/include/nvgpu/hw/gm20b/hw_trim_gm20b.h
deleted file mode 100644
index 8f0a77a..0000000
--- a/include/nvgpu/hw/gm20b/hw_trim_gm20b.h
+++ /dev/null
@@ -1,503 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_trim_gm20b_h_
57#define _hw_trim_gm20b_h_
58
59static inline u32 trim_sys_gpcpll_cfg_r(void)
60{
61 return 0x00137000U;
62}
63static inline u32 trim_sys_gpcpll_cfg_enable_m(void)
64{
65 return 0x1U << 0U;
66}
67static inline u32 trim_sys_gpcpll_cfg_enable_v(u32 r)
68{
69 return (r >> 0U) & 0x1U;
70}
71static inline u32 trim_sys_gpcpll_cfg_enable_no_f(void)
72{
73 return 0x0U;
74}
75static inline u32 trim_sys_gpcpll_cfg_enable_yes_f(void)
76{
77 return 0x1U;
78}
79static inline u32 trim_sys_gpcpll_cfg_iddq_m(void)
80{
81 return 0x1U << 1U;
82}
83static inline u32 trim_sys_gpcpll_cfg_iddq_v(u32 r)
84{
85 return (r >> 1U) & 0x1U;
86}
87static inline u32 trim_sys_gpcpll_cfg_iddq_power_on_v(void)
88{
89 return 0x00000000U;
90}
91static inline u32 trim_sys_gpcpll_cfg_sync_mode_m(void)
92{
93 return 0x1U << 2U;
94}
95static inline u32 trim_sys_gpcpll_cfg_sync_mode_v(u32 r)
96{
97 return (r >> 2U) & 0x1U;
98}
99static inline u32 trim_sys_gpcpll_cfg_sync_mode_enable_f(void)
100{
101 return 0x4U;
102}
103static inline u32 trim_sys_gpcpll_cfg_sync_mode_disable_f(void)
104{
105 return 0x0U;
106}
107static inline u32 trim_sys_gpcpll_cfg_enb_lckdet_m(void)
108{
109 return 0x1U << 4U;
110}
111static inline u32 trim_sys_gpcpll_cfg_enb_lckdet_power_on_f(void)
112{
113 return 0x0U;
114}
115static inline u32 trim_sys_gpcpll_cfg_enb_lckdet_power_off_f(void)
116{
117 return 0x10U;
118}
119static inline u32 trim_sys_gpcpll_cfg_pll_lock_v(u32 r)
120{
121 return (r >> 17U) & 0x1U;
122}
123static inline u32 trim_sys_gpcpll_cfg_pll_lock_true_f(void)
124{
125 return 0x20000U;
126}
127static inline u32 trim_sys_gpcpll_coeff_r(void)
128{
129 return 0x00137004U;
130}
131static inline u32 trim_sys_gpcpll_coeff_mdiv_f(u32 v)
132{
133 return (v & 0xffU) << 0U;
134}
135static inline u32 trim_sys_gpcpll_coeff_mdiv_m(void)
136{
137 return 0xffU << 0U;
138}
139static inline u32 trim_sys_gpcpll_coeff_mdiv_v(u32 r)
140{
141 return (r >> 0U) & 0xffU;
142}
143static inline u32 trim_sys_gpcpll_coeff_ndiv_f(u32 v)
144{
145 return (v & 0xffU) << 8U;
146}
147static inline u32 trim_sys_gpcpll_coeff_ndiv_m(void)
148{
149 return 0xffU << 8U;
150}
151static inline u32 trim_sys_gpcpll_coeff_ndiv_v(u32 r)
152{
153 return (r >> 8U) & 0xffU;
154}
155static inline u32 trim_sys_gpcpll_coeff_pldiv_f(u32 v)
156{
157 return (v & 0x3fU) << 16U;
158}
159static inline u32 trim_sys_gpcpll_coeff_pldiv_m(void)
160{
161 return 0x3fU << 16U;
162}
163static inline u32 trim_sys_gpcpll_coeff_pldiv_v(u32 r)
164{
165 return (r >> 16U) & 0x3fU;
166}
167static inline u32 trim_sys_sel_vco_r(void)
168{
169 return 0x00137100U;
170}
171static inline u32 trim_sys_sel_vco_gpc2clk_out_m(void)
172{
173 return 0x1U << 0U;
174}
175static inline u32 trim_sys_sel_vco_gpc2clk_out_init_v(void)
176{
177 return 0x00000000U;
178}
179static inline u32 trim_sys_sel_vco_gpc2clk_out_init_f(void)
180{
181 return 0x0U;
182}
183static inline u32 trim_sys_sel_vco_gpc2clk_out_bypass_f(void)
184{
185 return 0x0U;
186}
187static inline u32 trim_sys_sel_vco_gpc2clk_out_vco_f(void)
188{
189 return 0x1U;
190}
191static inline u32 trim_sys_gpc2clk_out_r(void)
192{
193 return 0x00137250U;
194}
195static inline u32 trim_sys_gpc2clk_out_bypdiv_s(void)
196{
197 return 6U;
198}
199static inline u32 trim_sys_gpc2clk_out_bypdiv_f(u32 v)
200{
201 return (v & 0x3fU) << 0U;
202}
203static inline u32 trim_sys_gpc2clk_out_bypdiv_m(void)
204{
205 return 0x3fU << 0U;
206}
207static inline u32 trim_sys_gpc2clk_out_bypdiv_v(u32 r)
208{
209 return (r >> 0U) & 0x3fU;
210}
211static inline u32 trim_sys_gpc2clk_out_bypdiv_by31_f(void)
212{
213 return 0x3cU;
214}
215static inline u32 trim_sys_gpc2clk_out_vcodiv_s(void)
216{
217 return 6U;
218}
219static inline u32 trim_sys_gpc2clk_out_vcodiv_f(u32 v)
220{
221 return (v & 0x3fU) << 8U;
222}
223static inline u32 trim_sys_gpc2clk_out_vcodiv_m(void)
224{
225 return 0x3fU << 8U;
226}
227static inline u32 trim_sys_gpc2clk_out_vcodiv_v(u32 r)
228{
229 return (r >> 8U) & 0x3fU;
230}
231static inline u32 trim_sys_gpc2clk_out_vcodiv_by1_f(void)
232{
233 return 0x0U;
234}
235static inline u32 trim_sys_gpc2clk_out_sdiv14_m(void)
236{
237 return 0x1U << 31U;
238}
239static inline u32 trim_sys_gpc2clk_out_sdiv14_indiv4_mode_f(void)
240{
241 return 0x80000000U;
242}
243static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_r(u32 i)
244{
245 return 0x00134124U + i*512U;
246}
247static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_noofipclks_f(u32 v)
248{
249 return (v & 0x3fffU) << 0U;
250}
251static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_write_en_asserted_f(void)
252{
253 return 0x10000U;
254}
255static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_enable_asserted_f(void)
256{
257 return 0x100000U;
258}
259static inline u32 trim_gpc_clk_cntr_ncgpcclk_cfg_reset_asserted_f(void)
260{
261 return 0x1000000U;
262}
263static inline u32 trim_gpc_clk_cntr_ncgpcclk_cnt_r(u32 i)
264{
265 return 0x00134128U + i*512U;
266}
267static inline u32 trim_gpc_clk_cntr_ncgpcclk_cnt_value_v(u32 r)
268{
269 return (r >> 0U) & 0xfffffU;
270}
271static inline u32 trim_sys_gpcpll_cfg2_r(void)
272{
273 return 0x0013700cU;
274}
275static inline u32 trim_sys_gpcpll_cfg2_sdm_din_f(u32 v)
276{
277 return (v & 0xffU) << 0U;
278}
279static inline u32 trim_sys_gpcpll_cfg2_sdm_din_m(void)
280{
281 return 0xffU << 0U;
282}
283static inline u32 trim_sys_gpcpll_cfg2_sdm_din_v(u32 r)
284{
285 return (r >> 0U) & 0xffU;
286}
287static inline u32 trim_sys_gpcpll_cfg2_sdm_din_new_f(u32 v)
288{
289 return (v & 0xffU) << 8U;
290}
291static inline u32 trim_sys_gpcpll_cfg2_sdm_din_new_m(void)
292{
293 return 0xffU << 8U;
294}
295static inline u32 trim_sys_gpcpll_cfg2_sdm_din_new_v(u32 r)
296{
297 return (r >> 8U) & 0xffU;
298}
299static inline u32 trim_sys_gpcpll_cfg2_pll_stepa_f(u32 v)
300{
301 return (v & 0xffU) << 24U;
302}
303static inline u32 trim_sys_gpcpll_cfg2_pll_stepa_m(void)
304{
305 return 0xffU << 24U;
306}
307static inline u32 trim_sys_gpcpll_cfg3_r(void)
308{
309 return 0x00137018U;
310}
311static inline u32 trim_sys_gpcpll_cfg3_vco_ctrl_f(u32 v)
312{
313 return (v & 0x1ffU) << 0U;
314}
315static inline u32 trim_sys_gpcpll_cfg3_vco_ctrl_m(void)
316{
317 return 0x1ffU << 0U;
318}
319static inline u32 trim_sys_gpcpll_cfg3_pll_stepb_f(u32 v)
320{
321 return (v & 0xffU) << 16U;
322}
323static inline u32 trim_sys_gpcpll_cfg3_pll_stepb_m(void)
324{
325 return 0xffU << 16U;
326}
327static inline u32 trim_sys_gpcpll_cfg3_dfs_testout_v(u32 r)
328{
329 return (r >> 24U) & 0x7fU;
330}
331static inline u32 trim_sys_gpcpll_dvfs0_r(void)
332{
333 return 0x00137010U;
334}
335static inline u32 trim_sys_gpcpll_dvfs0_dfs_coeff_f(u32 v)
336{
337 return (v & 0x7fU) << 0U;
338}
339static inline u32 trim_sys_gpcpll_dvfs0_dfs_coeff_m(void)
340{
341 return 0x7fU << 0U;
342}
343static inline u32 trim_sys_gpcpll_dvfs0_dfs_coeff_v(u32 r)
344{
345 return (r >> 0U) & 0x7fU;
346}
347static inline u32 trim_sys_gpcpll_dvfs0_dfs_det_max_f(u32 v)
348{
349 return (v & 0x7fU) << 8U;
350}
351static inline u32 trim_sys_gpcpll_dvfs0_dfs_det_max_m(void)
352{
353 return 0x7fU << 8U;
354}
355static inline u32 trim_sys_gpcpll_dvfs0_dfs_det_max_v(u32 r)
356{
357 return (r >> 8U) & 0x7fU;
358}
359static inline u32 trim_sys_gpcpll_dvfs0_dfs_dc_offset_f(u32 v)
360{
361 return (v & 0x3fU) << 16U;
362}
363static inline u32 trim_sys_gpcpll_dvfs0_dfs_dc_offset_m(void)
364{
365 return 0x3fU << 16U;
366}
367static inline u32 trim_sys_gpcpll_dvfs0_dfs_dc_offset_v(u32 r)
368{
369 return (r >> 16U) & 0x3fU;
370}
371static inline u32 trim_sys_gpcpll_dvfs0_mode_m(void)
372{
373 return 0x1U << 28U;
374}
375static inline u32 trim_sys_gpcpll_dvfs0_mode_dvfspll_f(void)
376{
377 return 0x0U;
378}
379static inline u32 trim_sys_gpcpll_dvfs1_r(void)
380{
381 return 0x00137014U;
382}
383static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_det_f(u32 v)
384{
385 return (v & 0x7fU) << 0U;
386}
387static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_det_m(void)
388{
389 return 0x7fU << 0U;
390}
391static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_det_v(u32 r)
392{
393 return (r >> 0U) & 0x7fU;
394}
395static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_strb_m(void)
396{
397 return 0x1U << 7U;
398}
399static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_cal_f(u32 v)
400{
401 return (v & 0x7fU) << 8U;
402}
403static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_cal_m(void)
404{
405 return 0x7fU << 8U;
406}
407static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_cal_v(u32 r)
408{
409 return (r >> 8U) & 0x7fU;
410}
411static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_sel_m(void)
412{
413 return 0x1U << 15U;
414}
415static inline u32 trim_sys_gpcpll_dvfs1_dfs_ctrl_f(u32 v)
416{
417 return (v & 0xfffU) << 16U;
418}
419static inline u32 trim_sys_gpcpll_dvfs1_dfs_ctrl_m(void)
420{
421 return 0xfffU << 16U;
422}
423static inline u32 trim_sys_gpcpll_dvfs1_dfs_ctrl_v(u32 r)
424{
425 return (r >> 16U) & 0xfffU;
426}
427static inline u32 trim_sys_gpcpll_dvfs1_en_sdm_m(void)
428{
429 return 0x1U << 28U;
430}
431static inline u32 trim_sys_gpcpll_dvfs1_en_dfs_m(void)
432{
433 return 0x1U << 29U;
434}
435static inline u32 trim_sys_gpcpll_dvfs1_en_dfs_cal_m(void)
436{
437 return 0x1U << 30U;
438}
439static inline u32 trim_sys_gpcpll_dvfs1_dfs_cal_done_v(u32 r)
440{
441 return (r >> 31U) & 0x1U;
442}
443static inline u32 trim_sys_gpcpll_dvfs2_r(void)
444{
445 return 0x00137020U;
446}
447static inline u32 trim_sys_gpcpll_ndiv_slowdown_r(void)
448{
449 return 0x0013701cU;
450}
451static inline u32 trim_sys_gpcpll_ndiv_slowdown_slowdown_using_pll_m(void)
452{
453 return 0x1U << 22U;
454}
455static inline u32 trim_sys_gpcpll_ndiv_slowdown_slowdown_using_pll_yes_f(void)
456{
457 return 0x400000U;
458}
459static inline u32 trim_sys_gpcpll_ndiv_slowdown_slowdown_using_pll_no_f(void)
460{
461 return 0x0U;
462}
463static inline u32 trim_sys_gpcpll_ndiv_slowdown_en_dynramp_m(void)
464{
465 return 0x1U << 31U;
466}
467static inline u32 trim_sys_gpcpll_ndiv_slowdown_en_dynramp_yes_f(void)
468{
469 return 0x80000000U;
470}
471static inline u32 trim_sys_gpcpll_ndiv_slowdown_en_dynramp_no_f(void)
472{
473 return 0x0U;
474}
475static inline u32 trim_gpc_bcast_gpcpll_ndiv_slowdown_debug_r(void)
476{
477 return 0x001328a0U;
478}
479static inline u32 trim_gpc_bcast_gpcpll_ndiv_slowdown_debug_pll_dynramp_done_synced_v(u32 r)
480{
481 return (r >> 24U) & 0x1U;
482}
483static inline u32 trim_gpc_bcast_gpcpll_dvfs2_r(void)
484{
485 return 0x00132820U;
486}
487static inline u32 trim_sys_bypassctrl_r(void)
488{
489 return 0x00137340U;
490}
491static inline u32 trim_sys_bypassctrl_gpcpll_m(void)
492{
493 return 0x1U << 0U;
494}
495static inline u32 trim_sys_bypassctrl_gpcpll_bypassclk_f(void)
496{
497 return 0x1U;
498}
499static inline u32 trim_sys_bypassctrl_gpcpll_vco_f(void)
500{
501 return 0x0U;
502}
503#endif
diff --git a/include/nvgpu/hw/gp106/hw_bus_gp106.h b/include/nvgpu/hw/gp106/hw_bus_gp106.h
deleted file mode 100644
index ce3aafd..0000000
--- a/include/nvgpu/hw/gp106/hw_bus_gp106.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_bus_gp106_h_
57#define _hw_bus_gp106_h_
58
59static inline u32 bus_bar0_window_r(void)
60{
61 return 0x00001700U;
62}
63static inline u32 bus_bar0_window_base_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 bus_bar0_window_target_vid_mem_f(void)
68{
69 return 0x0U;
70}
71static inline u32 bus_bar0_window_target_sys_mem_coherent_f(void)
72{
73 return 0x2000000U;
74}
75static inline u32 bus_bar0_window_target_sys_mem_noncoherent_f(void)
76{
77 return 0x3000000U;
78}
79static inline u32 bus_bar0_window_target_bar0_window_base_shift_v(void)
80{
81 return 0x00000010U;
82}
83static inline u32 bus_bar1_block_r(void)
84{
85 return 0x00001704U;
86}
87static inline u32 bus_bar1_block_ptr_f(u32 v)
88{
89 return (v & 0xfffffffU) << 0U;
90}
91static inline u32 bus_bar1_block_target_vid_mem_f(void)
92{
93 return 0x0U;
94}
95static inline u32 bus_bar1_block_target_sys_mem_coh_f(void)
96{
97 return 0x20000000U;
98}
99static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void)
100{
101 return 0x30000000U;
102}
103static inline u32 bus_bar1_block_mode_virtual_f(void)
104{
105 return 0x80000000U;
106}
107static inline u32 bus_bar2_block_r(void)
108{
109 return 0x00001714U;
110}
111static inline u32 bus_bar2_block_ptr_f(u32 v)
112{
113 return (v & 0xfffffffU) << 0U;
114}
115static inline u32 bus_bar2_block_target_vid_mem_f(void)
116{
117 return 0x0U;
118}
119static inline u32 bus_bar2_block_target_sys_mem_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void)
124{
125 return 0x30000000U;
126}
127static inline u32 bus_bar2_block_mode_virtual_f(void)
128{
129 return 0x80000000U;
130}
131static inline u32 bus_bar1_block_ptr_shift_v(void)
132{
133 return 0x0000000cU;
134}
135static inline u32 bus_bar2_block_ptr_shift_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 bus_bind_status_r(void)
140{
141 return 0x00001710U;
142}
143static inline u32 bus_bind_status_bar1_pending_v(u32 r)
144{
145 return (r >> 0U) & 0x1U;
146}
147static inline u32 bus_bind_status_bar1_pending_empty_f(void)
148{
149 return 0x0U;
150}
151static inline u32 bus_bind_status_bar1_pending_busy_f(void)
152{
153 return 0x1U;
154}
155static inline u32 bus_bind_status_bar1_outstanding_v(u32 r)
156{
157 return (r >> 1U) & 0x1U;
158}
159static inline u32 bus_bind_status_bar1_outstanding_false_f(void)
160{
161 return 0x0U;
162}
163static inline u32 bus_bind_status_bar1_outstanding_true_f(void)
164{
165 return 0x2U;
166}
167static inline u32 bus_bind_status_bar2_pending_v(u32 r)
168{
169 return (r >> 2U) & 0x1U;
170}
171static inline u32 bus_bind_status_bar2_pending_empty_f(void)
172{
173 return 0x0U;
174}
175static inline u32 bus_bind_status_bar2_pending_busy_f(void)
176{
177 return 0x4U;
178}
179static inline u32 bus_bind_status_bar2_outstanding_v(u32 r)
180{
181 return (r >> 3U) & 0x1U;
182}
183static inline u32 bus_bind_status_bar2_outstanding_false_f(void)
184{
185 return 0x0U;
186}
187static inline u32 bus_bind_status_bar2_outstanding_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 bus_intr_0_r(void)
192{
193 return 0x00001100U;
194}
195static inline u32 bus_intr_0_pri_squash_m(void)
196{
197 return 0x1U << 1U;
198}
199static inline u32 bus_intr_0_pri_fecserr_m(void)
200{
201 return 0x1U << 2U;
202}
203static inline u32 bus_intr_0_pri_timeout_m(void)
204{
205 return 0x1U << 3U;
206}
207static inline u32 bus_intr_en_0_r(void)
208{
209 return 0x00001140U;
210}
211static inline u32 bus_intr_en_0_pri_squash_m(void)
212{
213 return 0x1U << 1U;
214}
215static inline u32 bus_intr_en_0_pri_fecserr_m(void)
216{
217 return 0x1U << 2U;
218}
219static inline u32 bus_intr_en_0_pri_timeout_m(void)
220{
221 return 0x1U << 3U;
222}
223#endif
diff --git a/include/nvgpu/hw/gp106/hw_ccsr_gp106.h b/include/nvgpu/hw/gp106/hw_ccsr_gp106.h
deleted file mode 100644
index cd63777..0000000
--- a/include/nvgpu/hw/gp106/hw_ccsr_gp106.h
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ccsr_gp106_h_
57#define _hw_ccsr_gp106_h_
58
59static inline u32 ccsr_channel_inst_r(u32 i)
60{
61 return 0x00800000U + i*8U;
62}
63static inline u32 ccsr_channel_inst__size_1_v(void)
64{
65 return 0x00001000U;
66}
67static inline u32 ccsr_channel_inst_ptr_f(u32 v)
68{
69 return (v & 0xfffffffU) << 0U;
70}
71static inline u32 ccsr_channel_inst_target_vid_mem_f(void)
72{
73 return 0x0U;
74}
75static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void)
76{
77 return 0x20000000U;
78}
79static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void)
80{
81 return 0x30000000U;
82}
83static inline u32 ccsr_channel_inst_bind_false_f(void)
84{
85 return 0x0U;
86}
87static inline u32 ccsr_channel_inst_bind_true_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 ccsr_channel_r(u32 i)
92{
93 return 0x00800004U + i*8U;
94}
95static inline u32 ccsr_channel__size_1_v(void)
96{
97 return 0x00001000U;
98}
99static inline u32 ccsr_channel_enable_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 ccsr_channel_enable_set_f(u32 v)
104{
105 return (v & 0x1U) << 10U;
106}
107static inline u32 ccsr_channel_enable_set_true_f(void)
108{
109 return 0x400U;
110}
111static inline u32 ccsr_channel_enable_clr_true_f(void)
112{
113 return 0x800U;
114}
115static inline u32 ccsr_channel_status_v(u32 r)
116{
117 return (r >> 24U) & 0xfU;
118}
119static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
120{
121 return 0x00000002U;
122}
123static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
124{
125 return 0x00000004U;
126}
127static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
128{
129 return 0x0000000aU;
130}
131static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
132{
133 return 0x0000000bU;
134}
135static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
140{
141 return 0x0000000dU;
142}
143static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
144{
145 return 0x0000000eU;
146}
147static inline u32 ccsr_channel_next_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 ccsr_channel_next_true_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 ccsr_channel_force_ctx_reload_true_f(void)
156{
157 return 0x100U;
158}
159static inline u32 ccsr_channel_busy_v(u32 r)
160{
161 return (r >> 28U) & 0x1U;
162}
163#endif
diff --git a/include/nvgpu/hw/gp106/hw_ce_gp106.h b/include/nvgpu/hw/gp106/hw_ce_gp106.h
deleted file mode 100644
index 8892f42..0000000
--- a/include/nvgpu/hw/gp106/hw_ce_gp106.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ce_gp106_h_
57#define _hw_ce_gp106_h_
58
59static inline u32 ce_intr_status_r(u32 i)
60{
61 return 0x00104410U + i*128U;
62}
63static inline u32 ce_intr_status_blockpipe_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 ce_intr_status_blockpipe_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 ce_intr_status_nonblockpipe_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 ce_intr_status_nonblockpipe_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 ce_intr_status_launcherr_pending_f(void)
80{
81 return 0x4U;
82}
83static inline u32 ce_intr_status_launcherr_reset_f(void)
84{
85 return 0x4U;
86}
87#endif
diff --git a/include/nvgpu/hw/gp106/hw_ctxsw_prog_gp106.h b/include/nvgpu/hw/gp106/hw_ctxsw_prog_gp106.h
deleted file mode 100644
index 3387d23..0000000
--- a/include/nvgpu/hw/gp106/hw_ctxsw_prog_gp106.h
+++ /dev/null
@@ -1,295 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ctxsw_prog_gp106_h_
57#define _hw_ctxsw_prog_gp106_h_
58
59static inline u32 ctxsw_prog_fecs_header_v(void)
60{
61 return 0x00000100U;
62}
63static inline u32 ctxsw_prog_main_image_num_gpcs_o(void)
64{
65 return 0x00000008U;
66}
67static inline u32 ctxsw_prog_main_image_patch_count_o(void)
68{
69 return 0x00000010U;
70}
71static inline u32 ctxsw_prog_main_image_patch_adr_lo_o(void)
72{
73 return 0x00000014U;
74}
75static inline u32 ctxsw_prog_main_image_patch_adr_hi_o(void)
76{
77 return 0x00000018U;
78}
79static inline u32 ctxsw_prog_main_image_zcull_o(void)
80{
81 return 0x0000001cU;
82}
83static inline u32 ctxsw_prog_main_image_zcull_mode_no_ctxsw_v(void)
84{
85 return 0x00000001U;
86}
87static inline u32 ctxsw_prog_main_image_zcull_mode_separate_buffer_v(void)
88{
89 return 0x00000002U;
90}
91static inline u32 ctxsw_prog_main_image_zcull_ptr_o(void)
92{
93 return 0x00000020U;
94}
95static inline u32 ctxsw_prog_main_image_pm_o(void)
96{
97 return 0x00000028U;
98}
99static inline u32 ctxsw_prog_main_image_pm_mode_m(void)
100{
101 return 0x7U << 0U;
102}
103static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void)
104{
105 return 0x0U;
106}
107static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void)
108{
109 return 0x7U << 3U;
110}
111static inline u32 ctxsw_prog_main_image_pm_smpc_mode_ctxsw_f(void)
112{
113 return 0x8U;
114}
115static inline u32 ctxsw_prog_main_image_pm_smpc_mode_no_ctxsw_f(void)
116{
117 return 0x0U;
118}
119static inline u32 ctxsw_prog_main_image_pm_ptr_o(void)
120{
121 return 0x0000002cU;
122}
123static inline u32 ctxsw_prog_main_image_num_save_ops_o(void)
124{
125 return 0x000000f4U;
126}
127static inline u32 ctxsw_prog_main_image_num_wfi_save_ops_o(void)
128{
129 return 0x000000d0U;
130}
131static inline u32 ctxsw_prog_main_image_num_cta_save_ops_o(void)
132{
133 return 0x000000d4U;
134}
135static inline u32 ctxsw_prog_main_image_num_gfxp_save_ops_o(void)
136{
137 return 0x000000d8U;
138}
139static inline u32 ctxsw_prog_main_image_num_cilp_save_ops_o(void)
140{
141 return 0x000000dcU;
142}
143static inline u32 ctxsw_prog_main_image_num_restore_ops_o(void)
144{
145 return 0x000000f8U;
146}
147static inline u32 ctxsw_prog_main_image_magic_value_o(void)
148{
149 return 0x000000fcU;
150}
151static inline u32 ctxsw_prog_main_image_magic_value_v_value_v(void)
152{
153 return 0x600dc0deU;
154}
155static inline u32 ctxsw_prog_local_priv_register_ctl_o(void)
156{
157 return 0x0000000cU;
158}
159static inline u32 ctxsw_prog_local_priv_register_ctl_offset_v(u32 r)
160{
161 return (r >> 0U) & 0xffffU;
162}
163static inline u32 ctxsw_prog_local_image_ppc_info_o(void)
164{
165 return 0x000000f4U;
166}
167static inline u32 ctxsw_prog_local_image_ppc_info_num_ppcs_v(u32 r)
168{
169 return (r >> 0U) & 0xffffU;
170}
171static inline u32 ctxsw_prog_local_image_ppc_info_ppc_mask_v(u32 r)
172{
173 return (r >> 16U) & 0xffffU;
174}
175static inline u32 ctxsw_prog_local_image_num_tpcs_o(void)
176{
177 return 0x000000f8U;
178}
179static inline u32 ctxsw_prog_local_magic_value_o(void)
180{
181 return 0x000000fcU;
182}
183static inline u32 ctxsw_prog_local_magic_value_v_value_v(void)
184{
185 return 0xad0becabU;
186}
187static inline u32 ctxsw_prog_main_extended_buffer_ctl_o(void)
188{
189 return 0x000000ecU;
190}
191static inline u32 ctxsw_prog_main_extended_buffer_ctl_offset_v(u32 r)
192{
193 return (r >> 0U) & 0xffffU;
194}
195static inline u32 ctxsw_prog_main_extended_buffer_ctl_size_v(u32 r)
196{
197 return (r >> 16U) & 0xffU;
198}
199static inline u32 ctxsw_prog_extended_buffer_segments_size_in_bytes_v(void)
200{
201 return 0x00000100U;
202}
203static inline u32 ctxsw_prog_extended_marker_size_in_bytes_v(void)
204{
205 return 0x00000004U;
206}
207static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_register_stride_v(void)
208{
209 return 0x00000000U;
210}
211static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_control_register_stride_v(void)
212{
213 return 0x00000002U;
214}
215static inline u32 ctxsw_prog_main_image_priv_access_map_config_o(void)
216{
217 return 0x000000a0U;
218}
219static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_s(void)
220{
221 return 2U;
222}
223static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_f(u32 v)
224{
225 return (v & 0x3U) << 0U;
226}
227static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_m(void)
228{
229 return 0x3U << 0U;
230}
231static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_v(u32 r)
232{
233 return (r >> 0U) & 0x3U;
234}
235static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_allow_all_f(void)
236{
237 return 0x0U;
238}
239static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f(void)
240{
241 return 0x2U;
242}
243static inline u32 ctxsw_prog_main_image_priv_access_map_addr_lo_o(void)
244{
245 return 0x000000a4U;
246}
247static inline u32 ctxsw_prog_main_image_priv_access_map_addr_hi_o(void)
248{
249 return 0x000000a8U;
250}
251static inline u32 ctxsw_prog_main_image_misc_options_o(void)
252{
253 return 0x0000003cU;
254}
255static inline u32 ctxsw_prog_main_image_misc_options_verif_features_m(void)
256{
257 return 0x1U << 3U;
258}
259static inline u32 ctxsw_prog_main_image_misc_options_verif_features_disabled_f(void)
260{
261 return 0x0U;
262}
263static inline u32 ctxsw_prog_main_image_graphics_preemption_options_o(void)
264{
265 return 0x00000080U;
266}
267static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_f(u32 v)
268{
269 return (v & 0x3U) << 0U;
270}
271static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_gfxp_f(void)
272{
273 return 0x1U;
274}
275static inline u32 ctxsw_prog_main_image_full_preemption_ptr_o(void)
276{
277 return 0x00000068U;
278}
279static inline u32 ctxsw_prog_main_image_compute_preemption_options_o(void)
280{
281 return 0x00000084U;
282}
283static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_f(u32 v)
284{
285 return (v & 0x3U) << 0U;
286}
287static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cta_f(void)
288{
289 return 0x1U;
290}
291static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cilp_f(void)
292{
293 return 0x2U;
294}
295#endif
diff --git a/include/nvgpu/hw/gp106/hw_falcon_gp106.h b/include/nvgpu/hw/gp106/hw_falcon_gp106.h
deleted file mode 100644
index d899e3f..0000000
--- a/include/nvgpu/hw/gp106/hw_falcon_gp106.h
+++ /dev/null
@@ -1,603 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_falcon_gp106_h_
57#define _hw_falcon_gp106_h_
58
59static inline u32 falcon_falcon_irqsset_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 falcon_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 falcon_falcon_irqsclr_r(void)
68{
69 return 0x00000004U;
70}
71static inline u32 falcon_falcon_irqstat_r(void)
72{
73 return 0x00000008U;
74}
75static inline u32 falcon_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 falcon_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 falcon_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 falcon_falcon_irqmode_r(void)
88{
89 return 0x0000000cU;
90}
91static inline u32 falcon_falcon_irqmset_r(void)
92{
93 return 0x00000010U;
94}
95static inline u32 falcon_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 falcon_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 falcon_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 falcon_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 falcon_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 falcon_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 falcon_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 falcon_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 falcon_falcon_irqmclr_r(void)
128{
129 return 0x00000014U;
130}
131static inline u32 falcon_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 falcon_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 falcon_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 falcon_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 falcon_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 falcon_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 falcon_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 falcon_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 falcon_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 falcon_falcon_irqmask_r(void)
168{
169 return 0x00000018U;
170}
171static inline u32 falcon_falcon_irqdest_r(void)
172{
173 return 0x0000001cU;
174}
175static inline u32 falcon_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 falcon_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 falcon_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 falcon_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 falcon_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 falcon_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 falcon_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 falcon_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 falcon_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 falcon_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 falcon_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 falcon_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 falcon_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 falcon_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 falcon_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 falcon_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 falcon_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 falcon_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 falcon_falcon_curctx_r(void)
248{
249 return 0x00000050U;
250}
251static inline u32 falcon_falcon_nxtctx_r(void)
252{
253 return 0x00000054U;
254}
255static inline u32 falcon_falcon_mailbox0_r(void)
256{
257 return 0x00000040U;
258}
259static inline u32 falcon_falcon_mailbox1_r(void)
260{
261 return 0x00000044U;
262}
263static inline u32 falcon_falcon_itfen_r(void)
264{
265 return 0x00000048U;
266}
267static inline u32 falcon_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 falcon_falcon_idlestate_r(void)
272{
273 return 0x0000004cU;
274}
275static inline u32 falcon_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 falcon_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 falcon_falcon_os_r(void)
284{
285 return 0x00000080U;
286}
287static inline u32 falcon_falcon_engctl_r(void)
288{
289 return 0x000000a4U;
290}
291static inline u32 falcon_falcon_cpuctl_r(void)
292{
293 return 0x00000100U;
294}
295static inline u32 falcon_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 falcon_falcon_cpuctl_sreset_f(u32 v)
300{
301 return (v & 0x1U) << 2U;
302}
303static inline u32 falcon_falcon_cpuctl_hreset_f(u32 v)
304{
305 return (v & 0x1U) << 3U;
306}
307static inline u32 falcon_falcon_cpuctl_halt_intr_f(u32 v)
308{
309 return (v & 0x1U) << 4U;
310}
311static inline u32 falcon_falcon_cpuctl_halt_intr_m(void)
312{
313 return 0x1U << 4U;
314}
315static inline u32 falcon_falcon_cpuctl_halt_intr_v(u32 r)
316{
317 return (r >> 4U) & 0x1U;
318}
319static inline u32 falcon_falcon_cpuctl_stopped_m(void)
320{
321 return 0x1U << 5U;
322}
323static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
324{
325 return (v & 0x1U) << 6U;
326}
327static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_m(void)
328{
329 return 0x1U << 6U;
330}
331static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
332{
333 return (r >> 6U) & 0x1U;
334}
335static inline u32 falcon_falcon_cpuctl_alias_r(void)
336{
337 return 0x00000130U;
338}
339static inline u32 falcon_falcon_cpuctl_alias_startcpu_f(u32 v)
340{
341 return (v & 0x1U) << 1U;
342}
343static inline u32 falcon_falcon_imemc_r(u32 i)
344{
345 return 0x00000180U + i*16U;
346}
347static inline u32 falcon_falcon_imemc_offs_f(u32 v)
348{
349 return (v & 0x3fU) << 2U;
350}
351static inline u32 falcon_falcon_imemc_blk_f(u32 v)
352{
353 return (v & 0xffU) << 8U;
354}
355static inline u32 falcon_falcon_imemc_aincw_f(u32 v)
356{
357 return (v & 0x1U) << 24U;
358}
359static inline u32 falcon_falcon_imemc_secure_f(u32 v)
360{
361 return (v & 0x1U) << 28U;
362}
363static inline u32 falcon_falcon_imemd_r(u32 i)
364{
365 return 0x00000184U + i*16U;
366}
367static inline u32 falcon_falcon_imemt_r(u32 i)
368{
369 return 0x00000188U + i*16U;
370}
371static inline u32 falcon_falcon_sctl_r(void)
372{
373 return 0x00000240U;
374}
375static inline u32 falcon_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 falcon_falcon_bootvec_r(void)
380{
381 return 0x00000104U;
382}
383static inline u32 falcon_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 falcon_falcon_dmactl_r(void)
388{
389 return 0x0000010cU;
390}
391static inline u32 falcon_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 falcon_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 falcon_falcon_dmactl_require_ctx_f(u32 v)
400{
401 return (v & 0x1U) << 0U;
402}
403static inline u32 falcon_falcon_hwcfg_r(void)
404{
405 return 0x00000108U;
406}
407static inline u32 falcon_falcon_hwcfg_imem_size_v(u32 r)
408{
409 return (r >> 0U) & 0x1ffU;
410}
411static inline u32 falcon_falcon_hwcfg_dmem_size_v(u32 r)
412{
413 return (r >> 9U) & 0x1ffU;
414}
415static inline u32 falcon_falcon_dmatrfbase_r(void)
416{
417 return 0x00000110U;
418}
419static inline u32 falcon_falcon_dmatrfbase1_r(void)
420{
421 return 0x00000128U;
422}
423static inline u32 falcon_falcon_dmatrfmoffs_r(void)
424{
425 return 0x00000114U;
426}
427static inline u32 falcon_falcon_dmatrfcmd_r(void)
428{
429 return 0x00000118U;
430}
431static inline u32 falcon_falcon_dmatrfcmd_imem_f(u32 v)
432{
433 return (v & 0x1U) << 4U;
434}
435static inline u32 falcon_falcon_dmatrfcmd_write_f(u32 v)
436{
437 return (v & 0x1U) << 5U;
438}
439static inline u32 falcon_falcon_dmatrfcmd_size_f(u32 v)
440{
441 return (v & 0x7U) << 8U;
442}
443static inline u32 falcon_falcon_dmatrfcmd_ctxdma_f(u32 v)
444{
445 return (v & 0x7U) << 12U;
446}
447static inline u32 falcon_falcon_dmatrffboffs_r(void)
448{
449 return 0x0000011cU;
450}
451static inline u32 falcon_falcon_imctl_debug_r(void)
452{
453 return 0x0000015cU;
454}
455static inline u32 falcon_falcon_imctl_debug_addr_blk_f(u32 v)
456{
457 return (v & 0xffffffU) << 0U;
458}
459static inline u32 falcon_falcon_imctl_debug_cmd_f(u32 v)
460{
461 return (v & 0x7U) << 24U;
462}
463static inline u32 falcon_falcon_imstat_r(void)
464{
465 return 0x00000144U;
466}
467static inline u32 falcon_falcon_traceidx_r(void)
468{
469 return 0x00000148U;
470}
471static inline u32 falcon_falcon_traceidx_maxidx_v(u32 r)
472{
473 return (r >> 16U) & 0xffU;
474}
475static inline u32 falcon_falcon_traceidx_idx_f(u32 v)
476{
477 return (v & 0xffU) << 0U;
478}
479static inline u32 falcon_falcon_tracepc_r(void)
480{
481 return 0x0000014cU;
482}
483static inline u32 falcon_falcon_tracepc_pc_v(u32 r)
484{
485 return (r >> 0U) & 0xffffffU;
486}
487static inline u32 falcon_falcon_exterraddr_r(void)
488{
489 return 0x00000168U;
490}
491static inline u32 falcon_falcon_exterrstat_r(void)
492{
493 return 0x0000016cU;
494}
495static inline u32 falcon_falcon_exterrstat_valid_m(void)
496{
497 return 0x1U << 31U;
498}
499static inline u32 falcon_falcon_exterrstat_valid_v(u32 r)
500{
501 return (r >> 31U) & 0x1U;
502}
503static inline u32 falcon_falcon_exterrstat_valid_true_v(void)
504{
505 return 0x00000001U;
506}
507static inline u32 falcon_falcon_icd_cmd_r(void)
508{
509 return 0x00000200U;
510}
511static inline u32 falcon_falcon_icd_cmd_opc_s(void)
512{
513 return 4U;
514}
515static inline u32 falcon_falcon_icd_cmd_opc_f(u32 v)
516{
517 return (v & 0xfU) << 0U;
518}
519static inline u32 falcon_falcon_icd_cmd_opc_m(void)
520{
521 return 0xfU << 0U;
522}
523static inline u32 falcon_falcon_icd_cmd_opc_v(u32 r)
524{
525 return (r >> 0U) & 0xfU;
526}
527static inline u32 falcon_falcon_icd_cmd_opc_rreg_f(void)
528{
529 return 0x8U;
530}
531static inline u32 falcon_falcon_icd_cmd_opc_rstat_f(void)
532{
533 return 0xeU;
534}
535static inline u32 falcon_falcon_icd_cmd_idx_f(u32 v)
536{
537 return (v & 0x1fU) << 8U;
538}
539static inline u32 falcon_falcon_icd_rdata_r(void)
540{
541 return 0x0000020cU;
542}
543static inline u32 falcon_falcon_dmemc_r(u32 i)
544{
545 return 0x000001c0U + i*8U;
546}
547static inline u32 falcon_falcon_dmemc_offs_f(u32 v)
548{
549 return (v & 0x3fU) << 2U;
550}
551static inline u32 falcon_falcon_dmemc_offs_m(void)
552{
553 return 0x3fU << 2U;
554}
555static inline u32 falcon_falcon_dmemc_blk_f(u32 v)
556{
557 return (v & 0xffU) << 8U;
558}
559static inline u32 falcon_falcon_dmemc_blk_m(void)
560{
561 return 0xffU << 8U;
562}
563static inline u32 falcon_falcon_dmemc_aincw_f(u32 v)
564{
565 return (v & 0x1U) << 24U;
566}
567static inline u32 falcon_falcon_dmemc_aincr_f(u32 v)
568{
569 return (v & 0x1U) << 25U;
570}
571static inline u32 falcon_falcon_dmemd_r(u32 i)
572{
573 return 0x000001c4U + i*8U;
574}
575static inline u32 falcon_falcon_debug1_r(void)
576{
577 return 0x00000090U;
578}
579static inline u32 falcon_falcon_debug1_ctxsw_mode_s(void)
580{
581 return 1U;
582}
583static inline u32 falcon_falcon_debug1_ctxsw_mode_f(u32 v)
584{
585 return (v & 0x1U) << 16U;
586}
587static inline u32 falcon_falcon_debug1_ctxsw_mode_m(void)
588{
589 return 0x1U << 16U;
590}
591static inline u32 falcon_falcon_debug1_ctxsw_mode_v(u32 r)
592{
593 return (r >> 16U) & 0x1U;
594}
595static inline u32 falcon_falcon_debug1_ctxsw_mode_init_f(void)
596{
597 return 0x0U;
598}
599static inline u32 falcon_falcon_debuginfo_r(void)
600{
601 return 0x00000094U;
602}
603#endif
diff --git a/include/nvgpu/hw/gp106/hw_fb_gp106.h b/include/nvgpu/hw/gp106/hw_fb_gp106.h
deleted file mode 100644
index 1c2a1ac..0000000
--- a/include/nvgpu/hw/gp106/hw_fb_gp106.h
+++ /dev/null
@@ -1,563 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fb_gp106_h_
57#define _hw_fb_gp106_h_
58
59static inline u32 fb_fbhub_num_active_ltcs_r(void)
60{
61 return 0x00100800U;
62}
63static inline u32 fb_mmu_ctrl_r(void)
64{
65 return 0x00100c80U;
66}
67static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r)
68{
69 return (r >> 15U) & 0x1U;
70}
71static inline u32 fb_mmu_ctrl_pri_fifo_empty_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r)
76{
77 return (r >> 16U) & 0xffU;
78}
79static inline u32 fb_priv_mmu_phy_secure_r(void)
80{
81 return 0x00100ce4U;
82}
83static inline u32 fb_mmu_invalidate_pdb_r(void)
84{
85 return 0x00100cb8U;
86}
87static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void)
92{
93 return 0x2U;
94}
95static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v)
96{
97 return (v & 0xfffffffU) << 4U;
98}
99static inline u32 fb_mmu_invalidate_r(void)
100{
101 return 0x00100cbcU;
102}
103static inline u32 fb_mmu_invalidate_all_va_true_f(void)
104{
105 return 0x1U;
106}
107static inline u32 fb_mmu_invalidate_all_pdb_true_f(void)
108{
109 return 0x2U;
110}
111static inline u32 fb_mmu_invalidate_hubtlb_only_s(void)
112{
113 return 1U;
114}
115static inline u32 fb_mmu_invalidate_hubtlb_only_f(u32 v)
116{
117 return (v & 0x1U) << 2U;
118}
119static inline u32 fb_mmu_invalidate_hubtlb_only_m(void)
120{
121 return 0x1U << 2U;
122}
123static inline u32 fb_mmu_invalidate_hubtlb_only_v(u32 r)
124{
125 return (r >> 2U) & 0x1U;
126}
127static inline u32 fb_mmu_invalidate_hubtlb_only_true_f(void)
128{
129 return 0x4U;
130}
131static inline u32 fb_mmu_invalidate_replay_s(void)
132{
133 return 3U;
134}
135static inline u32 fb_mmu_invalidate_replay_f(u32 v)
136{
137 return (v & 0x7U) << 3U;
138}
139static inline u32 fb_mmu_invalidate_replay_m(void)
140{
141 return 0x7U << 3U;
142}
143static inline u32 fb_mmu_invalidate_replay_v(u32 r)
144{
145 return (r >> 3U) & 0x7U;
146}
147static inline u32 fb_mmu_invalidate_replay_none_f(void)
148{
149 return 0x0U;
150}
151static inline u32 fb_mmu_invalidate_replay_start_f(void)
152{
153 return 0x8U;
154}
155static inline u32 fb_mmu_invalidate_replay_start_ack_all_f(void)
156{
157 return 0x10U;
158}
159static inline u32 fb_mmu_invalidate_replay_cancel_targeted_f(void)
160{
161 return 0x18U;
162}
163static inline u32 fb_mmu_invalidate_replay_cancel_global_f(void)
164{
165 return 0x20U;
166}
167static inline u32 fb_mmu_invalidate_replay_cancel_f(void)
168{
169 return 0x20U;
170}
171static inline u32 fb_mmu_invalidate_sys_membar_s(void)
172{
173 return 1U;
174}
175static inline u32 fb_mmu_invalidate_sys_membar_f(u32 v)
176{
177 return (v & 0x1U) << 6U;
178}
179static inline u32 fb_mmu_invalidate_sys_membar_m(void)
180{
181 return 0x1U << 6U;
182}
183static inline u32 fb_mmu_invalidate_sys_membar_v(u32 r)
184{
185 return (r >> 6U) & 0x1U;
186}
187static inline u32 fb_mmu_invalidate_sys_membar_true_f(void)
188{
189 return 0x40U;
190}
191static inline u32 fb_mmu_invalidate_ack_s(void)
192{
193 return 2U;
194}
195static inline u32 fb_mmu_invalidate_ack_f(u32 v)
196{
197 return (v & 0x3U) << 7U;
198}
199static inline u32 fb_mmu_invalidate_ack_m(void)
200{
201 return 0x3U << 7U;
202}
203static inline u32 fb_mmu_invalidate_ack_v(u32 r)
204{
205 return (r >> 7U) & 0x3U;
206}
207static inline u32 fb_mmu_invalidate_ack_ack_none_required_f(void)
208{
209 return 0x0U;
210}
211static inline u32 fb_mmu_invalidate_ack_ack_intranode_f(void)
212{
213 return 0x100U;
214}
215static inline u32 fb_mmu_invalidate_ack_ack_globally_f(void)
216{
217 return 0x80U;
218}
219static inline u32 fb_mmu_invalidate_cancel_client_id_s(void)
220{
221 return 6U;
222}
223static inline u32 fb_mmu_invalidate_cancel_client_id_f(u32 v)
224{
225 return (v & 0x3fU) << 9U;
226}
227static inline u32 fb_mmu_invalidate_cancel_client_id_m(void)
228{
229 return 0x3fU << 9U;
230}
231static inline u32 fb_mmu_invalidate_cancel_client_id_v(u32 r)
232{
233 return (r >> 9U) & 0x3fU;
234}
235static inline u32 fb_mmu_invalidate_cancel_gpc_id_s(void)
236{
237 return 5U;
238}
239static inline u32 fb_mmu_invalidate_cancel_gpc_id_f(u32 v)
240{
241 return (v & 0x1fU) << 15U;
242}
243static inline u32 fb_mmu_invalidate_cancel_gpc_id_m(void)
244{
245 return 0x1fU << 15U;
246}
247static inline u32 fb_mmu_invalidate_cancel_gpc_id_v(u32 r)
248{
249 return (r >> 15U) & 0x1fU;
250}
251static inline u32 fb_mmu_invalidate_cancel_client_type_s(void)
252{
253 return 1U;
254}
255static inline u32 fb_mmu_invalidate_cancel_client_type_f(u32 v)
256{
257 return (v & 0x1U) << 20U;
258}
259static inline u32 fb_mmu_invalidate_cancel_client_type_m(void)
260{
261 return 0x1U << 20U;
262}
263static inline u32 fb_mmu_invalidate_cancel_client_type_v(u32 r)
264{
265 return (r >> 20U) & 0x1U;
266}
267static inline u32 fb_mmu_invalidate_cancel_client_type_gpc_f(void)
268{
269 return 0x0U;
270}
271static inline u32 fb_mmu_invalidate_cancel_client_type_hub_f(void)
272{
273 return 0x100000U;
274}
275static inline u32 fb_mmu_invalidate_cancel_cache_level_s(void)
276{
277 return 3U;
278}
279static inline u32 fb_mmu_invalidate_cancel_cache_level_f(u32 v)
280{
281 return (v & 0x7U) << 24U;
282}
283static inline u32 fb_mmu_invalidate_cancel_cache_level_m(void)
284{
285 return 0x7U << 24U;
286}
287static inline u32 fb_mmu_invalidate_cancel_cache_level_v(u32 r)
288{
289 return (r >> 24U) & 0x7U;
290}
291static inline u32 fb_mmu_invalidate_cancel_cache_level_all_f(void)
292{
293 return 0x0U;
294}
295static inline u32 fb_mmu_invalidate_cancel_cache_level_pte_only_f(void)
296{
297 return 0x1000000U;
298}
299static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde0_f(void)
300{
301 return 0x2000000U;
302}
303static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde1_f(void)
304{
305 return 0x3000000U;
306}
307static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde2_f(void)
308{
309 return 0x4000000U;
310}
311static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde3_f(void)
312{
313 return 0x5000000U;
314}
315static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde4_f(void)
316{
317 return 0x6000000U;
318}
319static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde5_f(void)
320{
321 return 0x7000000U;
322}
323static inline u32 fb_mmu_invalidate_trigger_s(void)
324{
325 return 1U;
326}
327static inline u32 fb_mmu_invalidate_trigger_f(u32 v)
328{
329 return (v & 0x1U) << 31U;
330}
331static inline u32 fb_mmu_invalidate_trigger_m(void)
332{
333 return 0x1U << 31U;
334}
335static inline u32 fb_mmu_invalidate_trigger_v(u32 r)
336{
337 return (r >> 31U) & 0x1U;
338}
339static inline u32 fb_mmu_invalidate_trigger_true_f(void)
340{
341 return 0x80000000U;
342}
343static inline u32 fb_mmu_debug_wr_r(void)
344{
345 return 0x00100cc8U;
346}
347static inline u32 fb_mmu_debug_wr_aperture_s(void)
348{
349 return 2U;
350}
351static inline u32 fb_mmu_debug_wr_aperture_f(u32 v)
352{
353 return (v & 0x3U) << 0U;
354}
355static inline u32 fb_mmu_debug_wr_aperture_m(void)
356{
357 return 0x3U << 0U;
358}
359static inline u32 fb_mmu_debug_wr_aperture_v(u32 r)
360{
361 return (r >> 0U) & 0x3U;
362}
363static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void)
364{
365 return 0x0U;
366}
367static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void)
368{
369 return 0x2U;
370}
371static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void)
372{
373 return 0x3U;
374}
375static inline u32 fb_mmu_debug_wr_vol_false_f(void)
376{
377 return 0x0U;
378}
379static inline u32 fb_mmu_debug_wr_vol_true_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 fb_mmu_debug_wr_vol_true_f(void)
384{
385 return 0x4U;
386}
387static inline u32 fb_mmu_debug_wr_addr_f(u32 v)
388{
389 return (v & 0xfffffffU) << 4U;
390}
391static inline u32 fb_mmu_debug_wr_addr_alignment_v(void)
392{
393 return 0x0000000cU;
394}
395static inline u32 fb_mmu_debug_rd_r(void)
396{
397 return 0x00100cccU;
398}
399static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void)
400{
401 return 0x0U;
402}
403static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void)
404{
405 return 0x2U;
406}
407static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void)
408{
409 return 0x3U;
410}
411static inline u32 fb_mmu_debug_rd_vol_false_f(void)
412{
413 return 0x0U;
414}
415static inline u32 fb_mmu_debug_rd_addr_f(u32 v)
416{
417 return (v & 0xfffffffU) << 4U;
418}
419static inline u32 fb_mmu_debug_rd_addr_alignment_v(void)
420{
421 return 0x0000000cU;
422}
423static inline u32 fb_mmu_debug_ctrl_r(void)
424{
425 return 0x00100cc4U;
426}
427static inline u32 fb_mmu_debug_ctrl_debug_v(u32 r)
428{
429 return (r >> 16U) & 0x1U;
430}
431static inline u32 fb_mmu_debug_ctrl_debug_m(void)
432{
433 return 0x1U << 16U;
434}
435static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void)
436{
437 return 0x00000001U;
438}
439static inline u32 fb_mmu_debug_ctrl_debug_enabled_f(void)
440{
441 return 0x10000U;
442}
443static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void)
444{
445 return 0x00000000U;
446}
447static inline u32 fb_mmu_debug_ctrl_debug_disabled_f(void)
448{
449 return 0x0U;
450}
451static inline u32 fb_mmu_priv_level_mask_r(void)
452{
453 return 0x00100cdcU;
454}
455static inline u32 fb_mmu_priv_level_mask_write_violation_m(void)
456{
457 return 0x1U << 7U;
458}
459static inline u32 fb_niso_flush_sysmem_addr_r(void)
460{
461 return 0x00100c10U;
462}
463static inline u32 fb_mmu_local_memory_range_r(void)
464{
465 return 0x00100ce0U;
466}
467static inline u32 fb_mmu_local_memory_range_lower_scale_v(u32 r)
468{
469 return (r >> 0U) & 0xfU;
470}
471static inline u32 fb_mmu_local_memory_range_lower_mag_v(u32 r)
472{
473 return (r >> 4U) & 0x3fU;
474}
475static inline u32 fb_mmu_local_memory_range_ecc_mode_v(u32 r)
476{
477 return (r >> 30U) & 0x1U;
478}
479static inline u32 fb_fbpa_fbio_delay_r(void)
480{
481 return 0x009a065cU;
482}
483static inline u32 fb_fbpa_fbio_delay_src_f(u32 v)
484{
485 return (v & 0xfU) << 0U;
486}
487static inline u32 fb_fbpa_fbio_delay_src_m(void)
488{
489 return 0xfU << 0U;
490}
491static inline u32 fb_fbpa_fbio_delay_src_v(u32 r)
492{
493 return (r >> 0U) & 0xfU;
494}
495static inline u32 fb_fbpa_fbio_delay_src_max_v(void)
496{
497 return 0x00000002U;
498}
499static inline u32 fb_fbpa_fbio_delay_priv_f(u32 v)
500{
501 return (v & 0xfU) << 4U;
502}
503static inline u32 fb_fbpa_fbio_delay_priv_m(void)
504{
505 return 0xfU << 4U;
506}
507static inline u32 fb_fbpa_fbio_delay_priv_v(u32 r)
508{
509 return (r >> 4U) & 0xfU;
510}
511static inline u32 fb_fbpa_fbio_delay_priv_max_v(void)
512{
513 return 0x00000002U;
514}
515static inline u32 fb_fbpa_fbio_cmd_delay_r(void)
516{
517 return 0x009a08e0U;
518}
519static inline u32 fb_fbpa_fbio_cmd_delay_cmd_src_f(u32 v)
520{
521 return (v & 0xfU) << 0U;
522}
523static inline u32 fb_fbpa_fbio_cmd_delay_cmd_src_m(void)
524{
525 return 0xfU << 0U;
526}
527static inline u32 fb_fbpa_fbio_cmd_delay_cmd_src_v(u32 r)
528{
529 return (r >> 0U) & 0xfU;
530}
531static inline u32 fb_fbpa_fbio_cmd_delay_cmd_src_max_v(void)
532{
533 return 0x00000001U;
534}
535static inline u32 fb_fbpa_fbio_cmd_delay_cmd_priv_f(u32 v)
536{
537 return (v & 0xfU) << 4U;
538}
539static inline u32 fb_fbpa_fbio_cmd_delay_cmd_priv_m(void)
540{
541 return 0xfU << 4U;
542}
543static inline u32 fb_fbpa_fbio_cmd_delay_cmd_priv_v(u32 r)
544{
545 return (r >> 4U) & 0xfU;
546}
547static inline u32 fb_fbpa_fbio_cmd_delay_cmd_priv_max_v(void)
548{
549 return 0x00000001U;
550}
551static inline u32 fb_niso_scrub_status_r(void)
552{
553 return 0x00100b20U;
554}
555static inline u32 fb_niso_scrub_status_flag_v(u32 r)
556{
557 return (r >> 0U) & 0x1U;
558}
559static inline u32 fb_fbpa_fbio_iref_byte_rx_ctrl_r(void)
560{
561 return 0x009a0eb0U;
562}
563#endif
diff --git a/include/nvgpu/hw/gp106/hw_fbpa_gp106.h b/include/nvgpu/hw/gp106/hw_fbpa_gp106.h
deleted file mode 100644
index 797a40c..0000000
--- a/include/nvgpu/hw/gp106/hw_fbpa_gp106.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fbpa_gp106_h_
57#define _hw_fbpa_gp106_h_
58
59static inline u32 fbpa_cstatus_r(void)
60{
61 return 0x009a020cU;
62}
63static inline u32 fbpa_cstatus_ramamount_v(u32 r)
64{
65 return (r >> 0U) & 0x1ffffU;
66}
67#endif
diff --git a/include/nvgpu/hw/gp106/hw_fifo_gp106.h b/include/nvgpu/hw/gp106/hw_fifo_gp106.h
deleted file mode 100644
index 804e9e4..0000000
--- a/include/nvgpu/hw/gp106/hw_fifo_gp106.h
+++ /dev/null
@@ -1,695 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fifo_gp106_h_
57#define _hw_fifo_gp106_h_
58
59static inline u32 fifo_bar1_base_r(void)
60{
61 return 0x00002254U;
62}
63static inline u32 fifo_bar1_base_ptr_f(u32 v)
64{
65 return (v & 0xfffffffU) << 0U;
66}
67static inline u32 fifo_bar1_base_ptr_align_shift_v(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 fifo_bar1_base_valid_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fifo_bar1_base_valid_true_f(void)
76{
77 return 0x10000000U;
78}
79static inline u32 fifo_runlist_base_r(void)
80{
81 return 0x00002270U;
82}
83static inline u32 fifo_runlist_base_ptr_f(u32 v)
84{
85 return (v & 0xfffffffU) << 0U;
86}
87static inline u32 fifo_runlist_base_target_vid_mem_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void)
92{
93 return 0x20000000U;
94}
95static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void)
96{
97 return 0x30000000U;
98}
99static inline u32 fifo_runlist_r(void)
100{
101 return 0x00002274U;
102}
103static inline u32 fifo_runlist_engine_f(u32 v)
104{
105 return (v & 0xfU) << 20U;
106}
107static inline u32 fifo_eng_runlist_base_r(u32 i)
108{
109 return 0x00002280U + i*8U;
110}
111static inline u32 fifo_eng_runlist_base__size_1_v(void)
112{
113 return 0x00000007U;
114}
115static inline u32 fifo_eng_runlist_r(u32 i)
116{
117 return 0x00002284U + i*8U;
118}
119static inline u32 fifo_eng_runlist__size_1_v(void)
120{
121 return 0x00000007U;
122}
123static inline u32 fifo_eng_runlist_length_f(u32 v)
124{
125 return (v & 0xffffU) << 0U;
126}
127static inline u32 fifo_eng_runlist_length_max_v(void)
128{
129 return 0x0000ffffU;
130}
131static inline u32 fifo_eng_runlist_pending_true_f(void)
132{
133 return 0x100000U;
134}
135static inline u32 fifo_pb_timeslice_r(u32 i)
136{
137 return 0x00002350U + i*4U;
138}
139static inline u32 fifo_pb_timeslice_timeout_16_f(void)
140{
141 return 0x10U;
142}
143static inline u32 fifo_pb_timeslice_timescale_0_f(void)
144{
145 return 0x0U;
146}
147static inline u32 fifo_pb_timeslice_enable_true_f(void)
148{
149 return 0x10000000U;
150}
151static inline u32 fifo_pbdma_map_r(u32 i)
152{
153 return 0x00002390U + i*4U;
154}
155static inline u32 fifo_intr_0_r(void)
156{
157 return 0x00002100U;
158}
159static inline u32 fifo_intr_0_bind_error_pending_f(void)
160{
161 return 0x1U;
162}
163static inline u32 fifo_intr_0_bind_error_reset_f(void)
164{
165 return 0x1U;
166}
167static inline u32 fifo_intr_0_sched_error_pending_f(void)
168{
169 return 0x100U;
170}
171static inline u32 fifo_intr_0_sched_error_reset_f(void)
172{
173 return 0x100U;
174}
175static inline u32 fifo_intr_0_chsw_error_pending_f(void)
176{
177 return 0x10000U;
178}
179static inline u32 fifo_intr_0_chsw_error_reset_f(void)
180{
181 return 0x10000U;
182}
183static inline u32 fifo_intr_0_fb_flush_timeout_pending_f(void)
184{
185 return 0x800000U;
186}
187static inline u32 fifo_intr_0_fb_flush_timeout_reset_f(void)
188{
189 return 0x800000U;
190}
191static inline u32 fifo_intr_0_lb_error_pending_f(void)
192{
193 return 0x1000000U;
194}
195static inline u32 fifo_intr_0_lb_error_reset_f(void)
196{
197 return 0x1000000U;
198}
199static inline u32 fifo_intr_0_replayable_fault_error_pending_f(void)
200{
201 return 0x2000000U;
202}
203static inline u32 fifo_intr_0_dropped_mmu_fault_pending_f(void)
204{
205 return 0x8000000U;
206}
207static inline u32 fifo_intr_0_dropped_mmu_fault_reset_f(void)
208{
209 return 0x8000000U;
210}
211static inline u32 fifo_intr_0_mmu_fault_pending_f(void)
212{
213 return 0x10000000U;
214}
215static inline u32 fifo_intr_0_pbdma_intr_pending_f(void)
216{
217 return 0x20000000U;
218}
219static inline u32 fifo_intr_0_runlist_event_pending_f(void)
220{
221 return 0x40000000U;
222}
223static inline u32 fifo_intr_0_channel_intr_pending_f(void)
224{
225 return 0x80000000U;
226}
227static inline u32 fifo_intr_en_0_r(void)
228{
229 return 0x00002140U;
230}
231static inline u32 fifo_intr_en_0_sched_error_f(u32 v)
232{
233 return (v & 0x1U) << 8U;
234}
235static inline u32 fifo_intr_en_0_sched_error_m(void)
236{
237 return 0x1U << 8U;
238}
239static inline u32 fifo_intr_en_0_mmu_fault_f(u32 v)
240{
241 return (v & 0x1U) << 28U;
242}
243static inline u32 fifo_intr_en_0_mmu_fault_m(void)
244{
245 return 0x1U << 28U;
246}
247static inline u32 fifo_intr_en_1_r(void)
248{
249 return 0x00002528U;
250}
251static inline u32 fifo_intr_bind_error_r(void)
252{
253 return 0x0000252cU;
254}
255static inline u32 fifo_intr_sched_error_r(void)
256{
257 return 0x0000254cU;
258}
259static inline u32 fifo_intr_sched_error_code_f(u32 v)
260{
261 return (v & 0xffU) << 0U;
262}
263static inline u32 fifo_intr_sched_error_code_ctxsw_timeout_v(void)
264{
265 return 0x0000000aU;
266}
267static inline u32 fifo_intr_chsw_error_r(void)
268{
269 return 0x0000256cU;
270}
271static inline u32 fifo_intr_mmu_fault_id_r(void)
272{
273 return 0x0000259cU;
274}
275static inline u32 fifo_intr_mmu_fault_eng_id_graphics_v(void)
276{
277 return 0x00000000U;
278}
279static inline u32 fifo_intr_mmu_fault_eng_id_graphics_f(void)
280{
281 return 0x0U;
282}
283static inline u32 fifo_intr_mmu_fault_inst_r(u32 i)
284{
285 return 0x00002800U + i*16U;
286}
287static inline u32 fifo_intr_mmu_fault_inst_ptr_v(u32 r)
288{
289 return (r >> 0U) & 0xfffffffU;
290}
291static inline u32 fifo_intr_mmu_fault_inst_ptr_align_shift_v(void)
292{
293 return 0x0000000cU;
294}
295static inline u32 fifo_intr_mmu_fault_lo_r(u32 i)
296{
297 return 0x00002804U + i*16U;
298}
299static inline u32 fifo_intr_mmu_fault_hi_r(u32 i)
300{
301 return 0x00002808U + i*16U;
302}
303static inline u32 fifo_intr_mmu_fault_info_r(u32 i)
304{
305 return 0x0000280cU + i*16U;
306}
307static inline u32 fifo_intr_mmu_fault_info_type_v(u32 r)
308{
309 return (r >> 0U) & 0x1fU;
310}
311static inline u32 fifo_intr_mmu_fault_info_client_type_v(u32 r)
312{
313 return (r >> 20U) & 0x1U;
314}
315static inline u32 fifo_intr_mmu_fault_info_client_type_gpc_v(void)
316{
317 return 0x00000000U;
318}
319static inline u32 fifo_intr_mmu_fault_info_client_type_hub_v(void)
320{
321 return 0x00000001U;
322}
323static inline u32 fifo_intr_mmu_fault_info_client_v(u32 r)
324{
325 return (r >> 8U) & 0x7fU;
326}
327static inline u32 fifo_intr_pbdma_id_r(void)
328{
329 return 0x000025a0U;
330}
331static inline u32 fifo_intr_pbdma_id_status_f(u32 v, u32 i)
332{
333 return (v & 0x1U) << (0U + i*1U);
334}
335static inline u32 fifo_intr_pbdma_id_status_v(u32 r, u32 i)
336{
337 return (r >> (0U + i*1U)) & 0x1U;
338}
339static inline u32 fifo_intr_pbdma_id_status__size_1_v(void)
340{
341 return 0x00000004U;
342}
343static inline u32 fifo_intr_runlist_r(void)
344{
345 return 0x00002a00U;
346}
347static inline u32 fifo_fb_timeout_r(void)
348{
349 return 0x00002a04U;
350}
351static inline u32 fifo_fb_timeout_period_m(void)
352{
353 return 0x3fffffffU << 0U;
354}
355static inline u32 fifo_fb_timeout_period_max_f(void)
356{
357 return 0x3fffffffU;
358}
359static inline u32 fifo_error_sched_disable_r(void)
360{
361 return 0x0000262cU;
362}
363static inline u32 fifo_sched_disable_r(void)
364{
365 return 0x00002630U;
366}
367static inline u32 fifo_sched_disable_runlist_f(u32 v, u32 i)
368{
369 return (v & 0x1U) << (0U + i*1U);
370}
371static inline u32 fifo_sched_disable_runlist_m(u32 i)
372{
373 return 0x1U << (0U + i*1U);
374}
375static inline u32 fifo_sched_disable_true_v(void)
376{
377 return 0x00000001U;
378}
379static inline u32 fifo_preempt_r(void)
380{
381 return 0x00002634U;
382}
383static inline u32 fifo_preempt_pending_true_f(void)
384{
385 return 0x100000U;
386}
387static inline u32 fifo_preempt_type_channel_f(void)
388{
389 return 0x0U;
390}
391static inline u32 fifo_preempt_type_tsg_f(void)
392{
393 return 0x1000000U;
394}
395static inline u32 fifo_preempt_chid_f(u32 v)
396{
397 return (v & 0xfffU) << 0U;
398}
399static inline u32 fifo_preempt_id_f(u32 v)
400{
401 return (v & 0xfffU) << 0U;
402}
403static inline u32 fifo_trigger_mmu_fault_r(u32 i)
404{
405 return 0x00002a30U + i*4U;
406}
407static inline u32 fifo_trigger_mmu_fault_id_f(u32 v)
408{
409 return (v & 0x1fU) << 0U;
410}
411static inline u32 fifo_trigger_mmu_fault_enable_f(u32 v)
412{
413 return (v & 0x1U) << 8U;
414}
415static inline u32 fifo_engine_status_r(u32 i)
416{
417 return 0x00002640U + i*8U;
418}
419static inline u32 fifo_engine_status__size_1_v(void)
420{
421 return 0x00000009U;
422}
423static inline u32 fifo_engine_status_id_v(u32 r)
424{
425 return (r >> 0U) & 0xfffU;
426}
427static inline u32 fifo_engine_status_id_type_v(u32 r)
428{
429 return (r >> 12U) & 0x1U;
430}
431static inline u32 fifo_engine_status_id_type_chid_v(void)
432{
433 return 0x00000000U;
434}
435static inline u32 fifo_engine_status_id_type_tsgid_v(void)
436{
437 return 0x00000001U;
438}
439static inline u32 fifo_engine_status_ctx_status_v(u32 r)
440{
441 return (r >> 13U) & 0x7U;
442}
443static inline u32 fifo_engine_status_ctx_status_invalid_v(void)
444{
445 return 0x00000000U;
446}
447static inline u32 fifo_engine_status_ctx_status_valid_v(void)
448{
449 return 0x00000001U;
450}
451static inline u32 fifo_engine_status_ctx_status_ctxsw_load_v(void)
452{
453 return 0x00000005U;
454}
455static inline u32 fifo_engine_status_ctx_status_ctxsw_save_v(void)
456{
457 return 0x00000006U;
458}
459static inline u32 fifo_engine_status_ctx_status_ctxsw_switch_v(void)
460{
461 return 0x00000007U;
462}
463static inline u32 fifo_engine_status_next_id_v(u32 r)
464{
465 return (r >> 16U) & 0xfffU;
466}
467static inline u32 fifo_engine_status_next_id_type_v(u32 r)
468{
469 return (r >> 28U) & 0x1U;
470}
471static inline u32 fifo_engine_status_next_id_type_chid_v(void)
472{
473 return 0x00000000U;
474}
475static inline u32 fifo_engine_status_faulted_v(u32 r)
476{
477 return (r >> 30U) & 0x1U;
478}
479static inline u32 fifo_engine_status_faulted_true_v(void)
480{
481 return 0x00000001U;
482}
483static inline u32 fifo_engine_status_engine_v(u32 r)
484{
485 return (r >> 31U) & 0x1U;
486}
487static inline u32 fifo_engine_status_engine_idle_v(void)
488{
489 return 0x00000000U;
490}
491static inline u32 fifo_engine_status_engine_busy_v(void)
492{
493 return 0x00000001U;
494}
495static inline u32 fifo_engine_status_ctxsw_v(u32 r)
496{
497 return (r >> 15U) & 0x1U;
498}
499static inline u32 fifo_engine_status_ctxsw_in_progress_v(void)
500{
501 return 0x00000001U;
502}
503static inline u32 fifo_engine_status_ctxsw_in_progress_f(void)
504{
505 return 0x8000U;
506}
507static inline u32 fifo_pbdma_status_r(u32 i)
508{
509 return 0x00003080U + i*4U;
510}
511static inline u32 fifo_pbdma_status__size_1_v(void)
512{
513 return 0x00000004U;
514}
515static inline u32 fifo_pbdma_status_id_v(u32 r)
516{
517 return (r >> 0U) & 0xfffU;
518}
519static inline u32 fifo_pbdma_status_id_type_v(u32 r)
520{
521 return (r >> 12U) & 0x1U;
522}
523static inline u32 fifo_pbdma_status_id_type_chid_v(void)
524{
525 return 0x00000000U;
526}
527static inline u32 fifo_pbdma_status_id_type_tsgid_v(void)
528{
529 return 0x00000001U;
530}
531static inline u32 fifo_pbdma_status_chan_status_v(u32 r)
532{
533 return (r >> 13U) & 0x7U;
534}
535static inline u32 fifo_pbdma_status_chan_status_valid_v(void)
536{
537 return 0x00000001U;
538}
539static inline u32 fifo_pbdma_status_chan_status_chsw_load_v(void)
540{
541 return 0x00000005U;
542}
543static inline u32 fifo_pbdma_status_chan_status_chsw_save_v(void)
544{
545 return 0x00000006U;
546}
547static inline u32 fifo_pbdma_status_chan_status_chsw_switch_v(void)
548{
549 return 0x00000007U;
550}
551static inline u32 fifo_pbdma_status_next_id_v(u32 r)
552{
553 return (r >> 16U) & 0xfffU;
554}
555static inline u32 fifo_pbdma_status_next_id_type_v(u32 r)
556{
557 return (r >> 28U) & 0x1U;
558}
559static inline u32 fifo_pbdma_status_next_id_type_chid_v(void)
560{
561 return 0x00000000U;
562}
563static inline u32 fifo_pbdma_status_chsw_v(u32 r)
564{
565 return (r >> 15U) & 0x1U;
566}
567static inline u32 fifo_pbdma_status_chsw_in_progress_v(void)
568{
569 return 0x00000001U;
570}
571static inline u32 fifo_replay_fault_buffer_lo_r(void)
572{
573 return 0x00002a70U;
574}
575static inline u32 fifo_replay_fault_buffer_lo_enable_v(u32 r)
576{
577 return (r >> 0U) & 0x1U;
578}
579static inline u32 fifo_replay_fault_buffer_lo_enable_true_v(void)
580{
581 return 0x00000001U;
582}
583static inline u32 fifo_replay_fault_buffer_lo_enable_false_v(void)
584{
585 return 0x00000000U;
586}
587static inline u32 fifo_replay_fault_buffer_lo_base_f(u32 v)
588{
589 return (v & 0xfffffU) << 12U;
590}
591static inline u32 fifo_replay_fault_buffer_lo_base_reset_v(void)
592{
593 return 0x00000000U;
594}
595static inline u32 fifo_replay_fault_buffer_hi_r(void)
596{
597 return 0x00002a74U;
598}
599static inline u32 fifo_replay_fault_buffer_hi_base_f(u32 v)
600{
601 return (v & 0xffU) << 0U;
602}
603static inline u32 fifo_replay_fault_buffer_hi_base_reset_v(void)
604{
605 return 0x00000000U;
606}
607static inline u32 fifo_replay_fault_buffer_size_r(void)
608{
609 return 0x00002a78U;
610}
611static inline u32 fifo_replay_fault_buffer_size_hw_f(u32 v)
612{
613 return (v & 0x3fffU) << 0U;
614}
615static inline u32 fifo_replay_fault_buffer_size_hw_entries_v(void)
616{
617 return 0x00001200U;
618}
619static inline u32 fifo_replay_fault_buffer_get_r(void)
620{
621 return 0x00002a7cU;
622}
623static inline u32 fifo_replay_fault_buffer_get_offset_hw_f(u32 v)
624{
625 return (v & 0x3fffU) << 0U;
626}
627static inline u32 fifo_replay_fault_buffer_get_offset_hw_init_v(void)
628{
629 return 0x00000000U;
630}
631static inline u32 fifo_replay_fault_buffer_put_r(void)
632{
633 return 0x00002a80U;
634}
635static inline u32 fifo_replay_fault_buffer_put_offset_hw_f(u32 v)
636{
637 return (v & 0x3fffU) << 0U;
638}
639static inline u32 fifo_replay_fault_buffer_put_offset_hw_init_v(void)
640{
641 return 0x00000000U;
642}
643static inline u32 fifo_replay_fault_buffer_info_r(void)
644{
645 return 0x00002a84U;
646}
647static inline u32 fifo_replay_fault_buffer_info_overflow_f(u32 v)
648{
649 return (v & 0x1U) << 0U;
650}
651static inline u32 fifo_replay_fault_buffer_info_overflow_false_v(void)
652{
653 return 0x00000000U;
654}
655static inline u32 fifo_replay_fault_buffer_info_overflow_true_v(void)
656{
657 return 0x00000001U;
658}
659static inline u32 fifo_replay_fault_buffer_info_overflow_clear_v(void)
660{
661 return 0x00000001U;
662}
663static inline u32 fifo_replay_fault_buffer_info_write_nack_f(u32 v)
664{
665 return (v & 0x1U) << 24U;
666}
667static inline u32 fifo_replay_fault_buffer_info_write_nack_false_v(void)
668{
669 return 0x00000000U;
670}
671static inline u32 fifo_replay_fault_buffer_info_write_nack_true_v(void)
672{
673 return 0x00000001U;
674}
675static inline u32 fifo_replay_fault_buffer_info_write_nack_clear_v(void)
676{
677 return 0x00000001U;
678}
679static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_f(u32 v)
680{
681 return (v & 0x1U) << 28U;
682}
683static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_false_v(void)
684{
685 return 0x00000000U;
686}
687static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_true_v(void)
688{
689 return 0x00000001U;
690}
691static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_clear_v(void)
692{
693 return 0x00000001U;
694}
695#endif
diff --git a/include/nvgpu/hw/gp106/hw_flush_gp106.h b/include/nvgpu/hw/gp106/hw_flush_gp106.h
deleted file mode 100644
index c4e1c32..0000000
--- a/include/nvgpu/hw/gp106/hw_flush_gp106.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_flush_gp106_h_
57#define _hw_flush_gp106_h_
58
59static inline u32 flush_l2_system_invalidate_r(void)
60{
61 return 0x00070004U;
62}
63static inline u32 flush_l2_system_invalidate_pending_v(u32 r)
64{
65 return (r >> 0U) & 0x1U;
66}
67static inline u32 flush_l2_system_invalidate_pending_busy_v(void)
68{
69 return 0x00000001U;
70}
71static inline u32 flush_l2_system_invalidate_pending_busy_f(void)
72{
73 return 0x1U;
74}
75static inline u32 flush_l2_system_invalidate_outstanding_v(u32 r)
76{
77 return (r >> 1U) & 0x1U;
78}
79static inline u32 flush_l2_system_invalidate_outstanding_true_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 flush_l2_flush_dirty_r(void)
84{
85 return 0x00070010U;
86}
87static inline u32 flush_l2_flush_dirty_pending_v(u32 r)
88{
89 return (r >> 0U) & 0x1U;
90}
91static inline u32 flush_l2_flush_dirty_pending_empty_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 flush_l2_flush_dirty_pending_empty_f(void)
96{
97 return 0x0U;
98}
99static inline u32 flush_l2_flush_dirty_pending_busy_v(void)
100{
101 return 0x00000001U;
102}
103static inline u32 flush_l2_flush_dirty_pending_busy_f(void)
104{
105 return 0x1U;
106}
107static inline u32 flush_l2_flush_dirty_outstanding_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 flush_l2_flush_dirty_outstanding_false_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 flush_l2_flush_dirty_outstanding_false_f(void)
116{
117 return 0x0U;
118}
119static inline u32 flush_l2_flush_dirty_outstanding_true_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 flush_l2_clean_comptags_r(void)
124{
125 return 0x0007000cU;
126}
127static inline u32 flush_l2_clean_comptags_pending_v(u32 r)
128{
129 return (r >> 0U) & 0x1U;
130}
131static inline u32 flush_l2_clean_comptags_pending_empty_v(void)
132{
133 return 0x00000000U;
134}
135static inline u32 flush_l2_clean_comptags_pending_empty_f(void)
136{
137 return 0x0U;
138}
139static inline u32 flush_l2_clean_comptags_pending_busy_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 flush_l2_clean_comptags_pending_busy_f(void)
144{
145 return 0x1U;
146}
147static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 flush_l2_clean_comptags_outstanding_false_v(void)
152{
153 return 0x00000000U;
154}
155static inline u32 flush_l2_clean_comptags_outstanding_false_f(void)
156{
157 return 0x0U;
158}
159static inline u32 flush_l2_clean_comptags_outstanding_true_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 flush_fb_flush_r(void)
164{
165 return 0x00070000U;
166}
167static inline u32 flush_fb_flush_pending_v(u32 r)
168{
169 return (r >> 0U) & 0x1U;
170}
171static inline u32 flush_fb_flush_pending_busy_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 flush_fb_flush_pending_busy_f(void)
176{
177 return 0x1U;
178}
179static inline u32 flush_fb_flush_outstanding_v(u32 r)
180{
181 return (r >> 1U) & 0x1U;
182}
183static inline u32 flush_fb_flush_outstanding_true_v(void)
184{
185 return 0x00000001U;
186}
187#endif
diff --git a/include/nvgpu/hw/gp106/hw_fuse_gp106.h b/include/nvgpu/hw/gp106/hw_fuse_gp106.h
deleted file mode 100644
index bfb19b9..0000000
--- a/include/nvgpu/hw/gp106/hw_fuse_gp106.h
+++ /dev/null
@@ -1,275 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fuse_gp106_h_
57#define _hw_fuse_gp106_h_
58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
64{
65 return 0x00021c38U + i*4U;
66}
67static inline u32 fuse_ctrl_opt_tpc_gpc_r(u32 i)
68{
69 return 0x00021838U + i*4U;
70}
71static inline u32 fuse_ctrl_opt_ram_svop_pdp_r(void)
72{
73 return 0x00021944U;
74}
75static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_f(u32 v)
76{
77 return (v & 0x3U) << 0U;
78}
79static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_m(void)
80{
81 return 0x3U << 0U;
82}
83static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_v(u32 r)
84{
85 return (r >> 0U) & 0x3U;
86}
87static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_r(void)
88{
89 return 0x00021948U;
90}
91static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_f(u32 v)
92{
93 return (v & 0x1U) << 0U;
94}
95static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_m(void)
96{
97 return 0x1U << 0U;
98}
99static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_yes_f(void)
104{
105 return 0x1U;
106}
107static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_no_f(void)
108{
109 return 0x0U;
110}
111static inline u32 fuse_status_opt_fbio_r(void)
112{
113 return 0x00021c14U;
114}
115static inline u32 fuse_status_opt_fbio_data_f(u32 v)
116{
117 return (v & 0xffffU) << 0U;
118}
119static inline u32 fuse_status_opt_fbio_data_m(void)
120{
121 return 0xffffU << 0U;
122}
123static inline u32 fuse_status_opt_fbio_data_v(u32 r)
124{
125 return (r >> 0U) & 0xffffU;
126}
127static inline u32 fuse_status_opt_rop_l2_fbp_r(u32 i)
128{
129 return 0x00021d70U + i*4U;
130}
131static inline u32 fuse_status_opt_fbp_r(void)
132{
133 return 0x00021d38U;
134}
135static inline u32 fuse_status_opt_fbp_idx_v(u32 r, u32 i)
136{
137 return (r >> (0U + i*1U)) & 0x1U;
138}
139static inline u32 fuse_vin_cal_fuse_rev_r(void)
140{
141 return 0x0002164cU;
142}
143static inline u32 fuse_vin_cal_fuse_rev_data_v(u32 r)
144{
145 return (r >> 0U) & 0x3U;
146}
147static inline u32 fuse_vin_cal_gpc0_r(void)
148{
149 return 0x00021650U;
150}
151static inline u32 fuse_vin_cal_gpc0_icpt_int_data_s(void)
152{
153 return 12U;
154}
155static inline u32 fuse_vin_cal_gpc0_icpt_int_data_v(u32 r)
156{
157 return (r >> 16U) & 0xfffU;
158}
159static inline u32 fuse_vin_cal_gpc0_icpt_frac_data_s(void)
160{
161 return 2U;
162}
163static inline u32 fuse_vin_cal_gpc0_icpt_frac_data_v(u32 r)
164{
165 return (r >> 14U) & 0x3U;
166}
167static inline u32 fuse_vin_cal_gpc0_slope_int_data_s(void)
168{
169 return 4U;
170}
171static inline u32 fuse_vin_cal_gpc0_slope_int_data_v(u32 r)
172{
173 return (r >> 10U) & 0xfU;
174}
175static inline u32 fuse_vin_cal_gpc0_slope_frac_data_s(void)
176{
177 return 10U;
178}
179static inline u32 fuse_vin_cal_gpc0_slope_frac_data_v(u32 r)
180{
181 return (r >> 0U) & 0x3ffU;
182}
183static inline u32 fuse_vin_cal_gpc1_delta_r(void)
184{
185 return 0x00021654U;
186}
187static inline u32 fuse_vin_cal_gpc1_delta_icpt_int_data_s(void)
188{
189 return 8U;
190}
191static inline u32 fuse_vin_cal_gpc1_delta_icpt_int_data_v(u32 r)
192{
193 return (r >> 14U) & 0xffU;
194}
195static inline u32 fuse_vin_cal_gpc1_delta_icpt_frac_data_s(void)
196{
197 return 2U;
198}
199static inline u32 fuse_vin_cal_gpc1_delta_icpt_frac_data_v(u32 r)
200{
201 return (r >> 12U) & 0x3U;
202}
203static inline u32 fuse_vin_cal_gpc1_delta_icpt_sign_data_s(void)
204{
205 return 1U;
206}
207static inline u32 fuse_vin_cal_gpc1_delta_icpt_sign_data_v(u32 r)
208{
209 return (r >> 22U) & 0x1U;
210}
211static inline u32 fuse_vin_cal_gpc1_delta_slope_int_data_s(void)
212{
213 return 1U;
214}
215static inline u32 fuse_vin_cal_gpc1_delta_slope_int_data_v(u32 r)
216{
217 return (r >> 10U) & 0x1U;
218}
219static inline u32 fuse_vin_cal_gpc1_delta_slope_frac_data_s(void)
220{
221 return 10U;
222}
223static inline u32 fuse_vin_cal_gpc1_delta_slope_frac_data_v(u32 r)
224{
225 return (r >> 0U) & 0x3ffU;
226}
227static inline u32 fuse_vin_cal_gpc1_delta_slope_sign_data_s(void)
228{
229 return 1U;
230}
231static inline u32 fuse_vin_cal_gpc1_delta_slope_sign_data_v(u32 r)
232{
233 return (r >> 11U) & 0x1U;
234}
235static inline u32 fuse_vin_cal_gpc2_delta_r(void)
236{
237 return 0x00021658U;
238}
239static inline u32 fuse_vin_cal_gpc3_delta_r(void)
240{
241 return 0x0002165cU;
242}
243static inline u32 fuse_vin_cal_gpc4_delta_r(void)
244{
245 return 0x00021660U;
246}
247static inline u32 fuse_vin_cal_gpc5_delta_r(void)
248{
249 return 0x00021664U;
250}
251static inline u32 fuse_vin_cal_shared_delta_r(void)
252{
253 return 0x00021668U;
254}
255static inline u32 fuse_vin_cal_sram_delta_r(void)
256{
257 return 0x0002166cU;
258}
259static inline u32 fuse_vin_cal_sram_delta_icpt_int_data_s(void)
260{
261 return 9U;
262}
263static inline u32 fuse_vin_cal_sram_delta_icpt_int_data_v(u32 r)
264{
265 return (r >> 13U) & 0x1ffU;
266}
267static inline u32 fuse_vin_cal_sram_delta_icpt_frac_data_s(void)
268{
269 return 1U;
270}
271static inline u32 fuse_vin_cal_sram_delta_icpt_frac_data_v(u32 r)
272{
273 return (r >> 12U) & 0x1U;
274}
275#endif
diff --git a/include/nvgpu/hw/gp106/hw_gc6_gp106.h b/include/nvgpu/hw/gp106/hw_gc6_gp106.h
deleted file mode 100644
index 91e9d7b..0000000
--- a/include/nvgpu/hw/gp106/hw_gc6_gp106.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gc6_gp106_h_
57#define _hw_gc6_gp106_h_
58static inline u32 gc6_sci_strap_r(void)
59{
60 return 0x00010ebb0;
61}
62#endif
diff --git a/include/nvgpu/hw/gp106/hw_gmmu_gp106.h b/include/nvgpu/hw/gp106/hw_gmmu_gp106.h
deleted file mode 100644
index 8369001..0000000
--- a/include/nvgpu/hw/gp106/hw_gmmu_gp106.h
+++ /dev/null
@@ -1,331 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gmmu_gp106_h_
57#define _hw_gmmu_gp106_h_
58
59static inline u32 gmmu_new_pde_is_pte_w(void)
60{
61 return 0U;
62}
63static inline u32 gmmu_new_pde_is_pte_false_f(void)
64{
65 return 0x0U;
66}
67static inline u32 gmmu_new_pde_aperture_w(void)
68{
69 return 0U;
70}
71static inline u32 gmmu_new_pde_aperture_invalid_f(void)
72{
73 return 0x0U;
74}
75static inline u32 gmmu_new_pde_aperture_video_memory_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gmmu_new_pde_aperture_sys_mem_coh_f(void)
80{
81 return 0x4U;
82}
83static inline u32 gmmu_new_pde_aperture_sys_mem_ncoh_f(void)
84{
85 return 0x6U;
86}
87static inline u32 gmmu_new_pde_address_sys_f(u32 v)
88{
89 return (v & 0xffffffU) << 8U;
90}
91static inline u32 gmmu_new_pde_address_sys_w(void)
92{
93 return 0U;
94}
95static inline u32 gmmu_new_pde_vol_w(void)
96{
97 return 0U;
98}
99static inline u32 gmmu_new_pde_vol_true_f(void)
100{
101 return 0x8U;
102}
103static inline u32 gmmu_new_pde_vol_false_f(void)
104{
105 return 0x0U;
106}
107static inline u32 gmmu_new_pde_address_shift_v(void)
108{
109 return 0x0000000cU;
110}
111static inline u32 gmmu_new_pde__size_v(void)
112{
113 return 0x00000008U;
114}
115static inline u32 gmmu_new_dual_pde_is_pte_w(void)
116{
117 return 0U;
118}
119static inline u32 gmmu_new_dual_pde_is_pte_false_f(void)
120{
121 return 0x0U;
122}
123static inline u32 gmmu_new_dual_pde_aperture_big_w(void)
124{
125 return 0U;
126}
127static inline u32 gmmu_new_dual_pde_aperture_big_invalid_f(void)
128{
129 return 0x0U;
130}
131static inline u32 gmmu_new_dual_pde_aperture_big_video_memory_f(void)
132{
133 return 0x2U;
134}
135static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_coh_f(void)
136{
137 return 0x4U;
138}
139static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f(void)
140{
141 return 0x6U;
142}
143static inline u32 gmmu_new_dual_pde_address_big_sys_f(u32 v)
144{
145 return (v & 0xfffffffU) << 4U;
146}
147static inline u32 gmmu_new_dual_pde_address_big_sys_w(void)
148{
149 return 0U;
150}
151static inline u32 gmmu_new_dual_pde_aperture_small_w(void)
152{
153 return 2U;
154}
155static inline u32 gmmu_new_dual_pde_aperture_small_invalid_f(void)
156{
157 return 0x0U;
158}
159static inline u32 gmmu_new_dual_pde_aperture_small_video_memory_f(void)
160{
161 return 0x2U;
162}
163static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_coh_f(void)
164{
165 return 0x4U;
166}
167static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f(void)
168{
169 return 0x6U;
170}
171static inline u32 gmmu_new_dual_pde_vol_small_w(void)
172{
173 return 2U;
174}
175static inline u32 gmmu_new_dual_pde_vol_small_true_f(void)
176{
177 return 0x8U;
178}
179static inline u32 gmmu_new_dual_pde_vol_small_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 gmmu_new_dual_pde_vol_big_w(void)
184{
185 return 0U;
186}
187static inline u32 gmmu_new_dual_pde_vol_big_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 gmmu_new_dual_pde_vol_big_false_f(void)
192{
193 return 0x0U;
194}
195static inline u32 gmmu_new_dual_pde_address_small_sys_f(u32 v)
196{
197 return (v & 0xffffffU) << 8U;
198}
199static inline u32 gmmu_new_dual_pde_address_small_sys_w(void)
200{
201 return 2U;
202}
203static inline u32 gmmu_new_dual_pde_address_shift_v(void)
204{
205 return 0x0000000cU;
206}
207static inline u32 gmmu_new_dual_pde_address_big_shift_v(void)
208{
209 return 0x00000008U;
210}
211static inline u32 gmmu_new_dual_pde__size_v(void)
212{
213 return 0x00000010U;
214}
215static inline u32 gmmu_new_pte__size_v(void)
216{
217 return 0x00000008U;
218}
219static inline u32 gmmu_new_pte_valid_w(void)
220{
221 return 0U;
222}
223static inline u32 gmmu_new_pte_valid_true_f(void)
224{
225 return 0x1U;
226}
227static inline u32 gmmu_new_pte_valid_false_f(void)
228{
229 return 0x0U;
230}
231static inline u32 gmmu_new_pte_privilege_w(void)
232{
233 return 0U;
234}
235static inline u32 gmmu_new_pte_privilege_true_f(void)
236{
237 return 0x20U;
238}
239static inline u32 gmmu_new_pte_privilege_false_f(void)
240{
241 return 0x0U;
242}
243static inline u32 gmmu_new_pte_address_sys_f(u32 v)
244{
245 return (v & 0xffffffU) << 8U;
246}
247static inline u32 gmmu_new_pte_address_sys_w(void)
248{
249 return 0U;
250}
251static inline u32 gmmu_new_pte_address_vid_f(u32 v)
252{
253 return (v & 0xffffffU) << 8U;
254}
255static inline u32 gmmu_new_pte_address_vid_w(void)
256{
257 return 0U;
258}
259static inline u32 gmmu_new_pte_vol_w(void)
260{
261 return 0U;
262}
263static inline u32 gmmu_new_pte_vol_true_f(void)
264{
265 return 0x8U;
266}
267static inline u32 gmmu_new_pte_vol_false_f(void)
268{
269 return 0x0U;
270}
271static inline u32 gmmu_new_pte_aperture_w(void)
272{
273 return 0U;
274}
275static inline u32 gmmu_new_pte_aperture_video_memory_f(void)
276{
277 return 0x0U;
278}
279static inline u32 gmmu_new_pte_aperture_sys_mem_coh_f(void)
280{
281 return 0x4U;
282}
283static inline u32 gmmu_new_pte_aperture_sys_mem_ncoh_f(void)
284{
285 return 0x6U;
286}
287static inline u32 gmmu_new_pte_read_only_w(void)
288{
289 return 0U;
290}
291static inline u32 gmmu_new_pte_read_only_true_f(void)
292{
293 return 0x40U;
294}
295static inline u32 gmmu_new_pte_comptagline_f(u32 v)
296{
297 return (v & 0x3ffffU) << 4U;
298}
299static inline u32 gmmu_new_pte_comptagline_w(void)
300{
301 return 1U;
302}
303static inline u32 gmmu_new_pte_kind_f(u32 v)
304{
305 return (v & 0xffU) << 24U;
306}
307static inline u32 gmmu_new_pte_kind_w(void)
308{
309 return 1U;
310}
311static inline u32 gmmu_new_pte_address_shift_v(void)
312{
313 return 0x0000000cU;
314}
315static inline u32 gmmu_pte_kind_f(u32 v)
316{
317 return (v & 0xffU) << 4U;
318}
319static inline u32 gmmu_pte_kind_w(void)
320{
321 return 1U;
322}
323static inline u32 gmmu_pte_kind_invalid_v(void)
324{
325 return 0x000000ffU;
326}
327static inline u32 gmmu_pte_kind_pitch_v(void)
328{
329 return 0x00000000U;
330}
331#endif
diff --git a/include/nvgpu/hw/gp106/hw_gr_gp106.h b/include/nvgpu/hw/gp106/hw_gr_gp106.h
deleted file mode 100644
index ac82901..0000000
--- a/include/nvgpu/hw/gp106/hw_gr_gp106.h
+++ /dev/null
@@ -1,4167 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gr_gp106_h_
57#define _hw_gr_gp106_h_
58
59static inline u32 gr_intr_r(void)
60{
61 return 0x00400100U;
62}
63static inline u32 gr_intr_notify_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 gr_intr_notify_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gr_intr_semaphore_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gr_intr_semaphore_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gr_intr_illegal_method_pending_f(void)
80{
81 return 0x10U;
82}
83static inline u32 gr_intr_illegal_method_reset_f(void)
84{
85 return 0x10U;
86}
87static inline u32 gr_intr_illegal_notify_pending_f(void)
88{
89 return 0x40U;
90}
91static inline u32 gr_intr_illegal_notify_reset_f(void)
92{
93 return 0x40U;
94}
95static inline u32 gr_intr_firmware_method_f(u32 v)
96{
97 return (v & 0x1U) << 8U;
98}
99static inline u32 gr_intr_firmware_method_pending_f(void)
100{
101 return 0x100U;
102}
103static inline u32 gr_intr_firmware_method_reset_f(void)
104{
105 return 0x100U;
106}
107static inline u32 gr_intr_illegal_class_pending_f(void)
108{
109 return 0x20U;
110}
111static inline u32 gr_intr_illegal_class_reset_f(void)
112{
113 return 0x20U;
114}
115static inline u32 gr_intr_fecs_error_pending_f(void)
116{
117 return 0x80000U;
118}
119static inline u32 gr_intr_fecs_error_reset_f(void)
120{
121 return 0x80000U;
122}
123static inline u32 gr_intr_class_error_pending_f(void)
124{
125 return 0x100000U;
126}
127static inline u32 gr_intr_class_error_reset_f(void)
128{
129 return 0x100000U;
130}
131static inline u32 gr_intr_exception_pending_f(void)
132{
133 return 0x200000U;
134}
135static inline u32 gr_intr_exception_reset_f(void)
136{
137 return 0x200000U;
138}
139static inline u32 gr_fecs_intr_r(void)
140{
141 return 0x00400144U;
142}
143static inline u32 gr_class_error_r(void)
144{
145 return 0x00400110U;
146}
147static inline u32 gr_class_error_code_v(u32 r)
148{
149 return (r >> 0U) & 0xffffU;
150}
151static inline u32 gr_intr_nonstall_r(void)
152{
153 return 0x00400120U;
154}
155static inline u32 gr_intr_nonstall_trap_pending_f(void)
156{
157 return 0x2U;
158}
159static inline u32 gr_intr_en_r(void)
160{
161 return 0x0040013cU;
162}
163static inline u32 gr_exception_r(void)
164{
165 return 0x00400108U;
166}
167static inline u32 gr_exception_fe_m(void)
168{
169 return 0x1U << 0U;
170}
171static inline u32 gr_exception_gpc_m(void)
172{
173 return 0x1U << 24U;
174}
175static inline u32 gr_exception_memfmt_m(void)
176{
177 return 0x1U << 1U;
178}
179static inline u32 gr_exception_ds_m(void)
180{
181 return 0x1U << 4U;
182}
183static inline u32 gr_exception_sked_m(void)
184{
185 return 0x1U << 8U;
186}
187static inline u32 gr_exception_pd_m(void)
188{
189 return 0x1U << 2U;
190}
191static inline u32 gr_exception_scc_m(void)
192{
193 return 0x1U << 3U;
194}
195static inline u32 gr_exception_ssync_m(void)
196{
197 return 0x1U << 5U;
198}
199static inline u32 gr_exception_mme_m(void)
200{
201 return 0x1U << 7U;
202}
203static inline u32 gr_exception1_r(void)
204{
205 return 0x00400118U;
206}
207static inline u32 gr_exception1_gpc_0_pending_f(void)
208{
209 return 0x1U;
210}
211static inline u32 gr_exception2_r(void)
212{
213 return 0x0040011cU;
214}
215static inline u32 gr_exception_en_r(void)
216{
217 return 0x00400138U;
218}
219static inline u32 gr_exception_en_fe_m(void)
220{
221 return 0x1U << 0U;
222}
223static inline u32 gr_exception1_en_r(void)
224{
225 return 0x00400130U;
226}
227static inline u32 gr_exception2_en_r(void)
228{
229 return 0x00400134U;
230}
231static inline u32 gr_gpfifo_ctl_r(void)
232{
233 return 0x00400500U;
234}
235static inline u32 gr_gpfifo_ctl_access_f(u32 v)
236{
237 return (v & 0x1U) << 0U;
238}
239static inline u32 gr_gpfifo_ctl_access_disabled_f(void)
240{
241 return 0x0U;
242}
243static inline u32 gr_gpfifo_ctl_access_enabled_f(void)
244{
245 return 0x1U;
246}
247static inline u32 gr_gpfifo_ctl_semaphore_access_f(u32 v)
248{
249 return (v & 0x1U) << 16U;
250}
251static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_v(void)
252{
253 return 0x00000001U;
254}
255static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_f(void)
256{
257 return 0x10000U;
258}
259static inline u32 gr_gpfifo_status_r(void)
260{
261 return 0x00400504U;
262}
263static inline u32 gr_trapped_addr_r(void)
264{
265 return 0x00400704U;
266}
267static inline u32 gr_trapped_addr_mthd_v(u32 r)
268{
269 return (r >> 2U) & 0xfffU;
270}
271static inline u32 gr_trapped_addr_subch_v(u32 r)
272{
273 return (r >> 16U) & 0x7U;
274}
275static inline u32 gr_trapped_addr_mme_generated_v(u32 r)
276{
277 return (r >> 20U) & 0x1U;
278}
279static inline u32 gr_trapped_addr_datahigh_v(u32 r)
280{
281 return (r >> 24U) & 0x1U;
282}
283static inline u32 gr_trapped_addr_priv_v(u32 r)
284{
285 return (r >> 28U) & 0x1U;
286}
287static inline u32 gr_trapped_addr_status_v(u32 r)
288{
289 return (r >> 31U) & 0x1U;
290}
291static inline u32 gr_trapped_data_lo_r(void)
292{
293 return 0x00400708U;
294}
295static inline u32 gr_trapped_data_hi_r(void)
296{
297 return 0x0040070cU;
298}
299static inline u32 gr_trapped_data_mme_r(void)
300{
301 return 0x00400710U;
302}
303static inline u32 gr_trapped_data_mme_pc_v(u32 r)
304{
305 return (r >> 0U) & 0xfffU;
306}
307static inline u32 gr_status_r(void)
308{
309 return 0x00400700U;
310}
311static inline u32 gr_status_fe_method_upper_v(u32 r)
312{
313 return (r >> 1U) & 0x1U;
314}
315static inline u32 gr_status_fe_method_lower_v(u32 r)
316{
317 return (r >> 2U) & 0x1U;
318}
319static inline u32 gr_status_fe_method_lower_idle_v(void)
320{
321 return 0x00000000U;
322}
323static inline u32 gr_status_fe_gi_v(u32 r)
324{
325 return (r >> 21U) & 0x1U;
326}
327static inline u32 gr_status_mask_r(void)
328{
329 return 0x00400610U;
330}
331static inline u32 gr_status_1_r(void)
332{
333 return 0x00400604U;
334}
335static inline u32 gr_status_2_r(void)
336{
337 return 0x00400608U;
338}
339static inline u32 gr_engine_status_r(void)
340{
341 return 0x0040060cU;
342}
343static inline u32 gr_engine_status_value_busy_f(void)
344{
345 return 0x1U;
346}
347static inline u32 gr_pri_be0_becs_be_exception_r(void)
348{
349 return 0x00410204U;
350}
351static inline u32 gr_pri_be0_becs_be_exception_en_r(void)
352{
353 return 0x00410208U;
354}
355static inline u32 gr_pri_gpc0_gpccs_gpc_exception_r(void)
356{
357 return 0x00502c90U;
358}
359static inline u32 gr_pri_gpc0_gpccs_gpc_exception_en_r(void)
360{
361 return 0x00502c94U;
362}
363static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_r(void)
364{
365 return 0x00504508U;
366}
367static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
368{
369 return 0x0050450cU;
370}
371static inline u32 gr_activity_0_r(void)
372{
373 return 0x00400380U;
374}
375static inline u32 gr_activity_1_r(void)
376{
377 return 0x00400384U;
378}
379static inline u32 gr_activity_2_r(void)
380{
381 return 0x00400388U;
382}
383static inline u32 gr_activity_4_r(void)
384{
385 return 0x00400390U;
386}
387static inline u32 gr_activity_4_gpc0_s(void)
388{
389 return 3U;
390}
391static inline u32 gr_activity_4_gpc0_f(u32 v)
392{
393 return (v & 0x7U) << 0U;
394}
395static inline u32 gr_activity_4_gpc0_m(void)
396{
397 return 0x7U << 0U;
398}
399static inline u32 gr_activity_4_gpc0_v(u32 r)
400{
401 return (r >> 0U) & 0x7U;
402}
403static inline u32 gr_activity_4_gpc0_empty_v(void)
404{
405 return 0x00000000U;
406}
407static inline u32 gr_activity_4_gpc0_preempted_v(void)
408{
409 return 0x00000004U;
410}
411static inline u32 gr_pri_gpc0_gcc_dbg_r(void)
412{
413 return 0x00501000U;
414}
415static inline u32 gr_pri_gpcs_gcc_dbg_r(void)
416{
417 return 0x00419000U;
418}
419static inline u32 gr_pri_gpcs_gcc_dbg_invalidate_m(void)
420{
421 return 0x1U << 1U;
422}
423static inline u32 gr_pri_gpc0_tpc0_sm_cache_control_r(void)
424{
425 return 0x005046a4U;
426}
427static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_r(void)
428{
429 return 0x00419ea4U;
430}
431static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_invalidate_cache_m(void)
432{
433 return 0x1U << 0U;
434}
435static inline u32 gr_pri_sked_activity_r(void)
436{
437 return 0x00407054U;
438}
439static inline u32 gr_pri_gpc0_gpccs_gpc_activity0_r(void)
440{
441 return 0x00502c80U;
442}
443static inline u32 gr_pri_gpc0_gpccs_gpc_activity1_r(void)
444{
445 return 0x00502c84U;
446}
447static inline u32 gr_pri_gpc0_gpccs_gpc_activity2_r(void)
448{
449 return 0x00502c88U;
450}
451static inline u32 gr_pri_gpc0_gpccs_gpc_activity3_r(void)
452{
453 return 0x00502c8cU;
454}
455static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r(void)
456{
457 return 0x00504500U;
458}
459static inline u32 gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r(void)
460{
461 return 0x00504d00U;
462}
463static inline u32 gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r(void)
464{
465 return 0x00501d00U;
466}
467static inline u32 gr_pri_gpcs_gpccs_gpc_activity_0_r(void)
468{
469 return 0x0041ac80U;
470}
471static inline u32 gr_pri_gpcs_gpccs_gpc_activity_1_r(void)
472{
473 return 0x0041ac84U;
474}
475static inline u32 gr_pri_gpcs_gpccs_gpc_activity_2_r(void)
476{
477 return 0x0041ac88U;
478}
479static inline u32 gr_pri_gpcs_gpccs_gpc_activity_3_r(void)
480{
481 return 0x0041ac8cU;
482}
483static inline u32 gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r(void)
484{
485 return 0x0041c500U;
486}
487static inline u32 gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r(void)
488{
489 return 0x0041cd00U;
490}
491static inline u32 gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r(void)
492{
493 return 0x00419d00U;
494}
495static inline u32 gr_pri_be0_becs_be_activity0_r(void)
496{
497 return 0x00410200U;
498}
499static inline u32 gr_pri_be1_becs_be_activity0_r(void)
500{
501 return 0x00410600U;
502}
503static inline u32 gr_pri_bes_becs_be_activity0_r(void)
504{
505 return 0x00408a00U;
506}
507static inline u32 gr_pri_ds_mpipe_status_r(void)
508{
509 return 0x00405858U;
510}
511static inline u32 gr_pri_fe_go_idle_info_r(void)
512{
513 return 0x00404194U;
514}
515static inline u32 gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r(void)
516{
517 return 0x00504238U;
518}
519static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_r(void)
520{
521 return 0x005046b8U;
522}
523static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp0_pending_f(void)
524{
525 return 0x10U;
526}
527static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp1_pending_f(void)
528{
529 return 0x20U;
530}
531static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp2_pending_f(void)
532{
533 return 0x40U;
534}
535static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp3_pending_f(void)
536{
537 return 0x80U;
538}
539static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp0_pending_f(void)
540{
541 return 0x100U;
542}
543static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp1_pending_f(void)
544{
545 return 0x200U;
546}
547static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp2_pending_f(void)
548{
549 return 0x400U;
550}
551static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp3_pending_f(void)
552{
553 return 0x800U;
554}
555static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_r(void)
556{
557 return 0x005044a0U;
558}
559static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_corrected_shm0_pending_f(void)
560{
561 return 0x1U;
562}
563static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_corrected_shm1_pending_f(void)
564{
565 return 0x2U;
566}
567static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_detected_shm0_pending_f(void)
568{
569 return 0x10U;
570}
571static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_detected_shm1_pending_f(void)
572{
573 return 0x20U;
574}
575static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_double_err_detected_shm0_pending_f(void)
576{
577 return 0x100U;
578}
579static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_double_err_detected_shm1_pending_f(void)
580{
581 return 0x200U;
582}
583static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_single_err_count_r(void)
584{
585 return 0x005046bcU;
586}
587static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_double_err_count_r(void)
588{
589 return 0x005046c0U;
590}
591static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_r(void)
592{
593 return 0x005044a4U;
594}
595static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_corrected_m(void)
596{
597 return 0xffU << 0U;
598}
599static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_corrected_v(u32 r)
600{
601 return (r >> 0U) & 0xffU;
602}
603static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_detected_m(void)
604{
605 return 0xffU << 8U;
606}
607static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_detected_v(u32 r)
608{
609 return (r >> 8U) & 0xffU;
610}
611static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_double_detected_m(void)
612{
613 return 0xffU << 16U;
614}
615static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_double_detected_v(u32 r)
616{
617 return (r >> 16U) & 0xffU;
618}
619static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_r(void)
620{
621 return 0x005042c4U;
622}
623static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_default_f(void)
624{
625 return 0x0U;
626}
627static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe0_f(void)
628{
629 return 0x1U;
630}
631static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe1_f(void)
632{
633 return 0x2U;
634}
635static inline u32 gr_pri_be0_crop_status1_r(void)
636{
637 return 0x00410134U;
638}
639static inline u32 gr_pri_bes_crop_status1_r(void)
640{
641 return 0x00408934U;
642}
643static inline u32 gr_pri_be0_zrop_status_r(void)
644{
645 return 0x00410048U;
646}
647static inline u32 gr_pri_be0_zrop_status2_r(void)
648{
649 return 0x0041004cU;
650}
651static inline u32 gr_pri_bes_zrop_status_r(void)
652{
653 return 0x00408848U;
654}
655static inline u32 gr_pri_bes_zrop_status2_r(void)
656{
657 return 0x0040884cU;
658}
659static inline u32 gr_pipe_bundle_address_r(void)
660{
661 return 0x00400200U;
662}
663static inline u32 gr_pipe_bundle_address_value_v(u32 r)
664{
665 return (r >> 0U) & 0xffffU;
666}
667static inline u32 gr_pipe_bundle_data_r(void)
668{
669 return 0x00400204U;
670}
671static inline u32 gr_pipe_bundle_config_r(void)
672{
673 return 0x00400208U;
674}
675static inline u32 gr_pipe_bundle_config_override_pipe_mode_disabled_f(void)
676{
677 return 0x0U;
678}
679static inline u32 gr_pipe_bundle_config_override_pipe_mode_enabled_f(void)
680{
681 return 0x80000000U;
682}
683static inline u32 gr_fe_hww_esr_r(void)
684{
685 return 0x00404000U;
686}
687static inline u32 gr_fe_hww_esr_reset_active_f(void)
688{
689 return 0x40000000U;
690}
691static inline u32 gr_fe_hww_esr_en_enable_f(void)
692{
693 return 0x80000000U;
694}
695static inline u32 gr_fe_hww_esr_info_r(void)
696{
697 return 0x004041b0U;
698}
699static inline u32 gr_fe_go_idle_timeout_r(void)
700{
701 return 0x00404154U;
702}
703static inline u32 gr_fe_go_idle_timeout_count_f(u32 v)
704{
705 return (v & 0xffffffffU) << 0U;
706}
707static inline u32 gr_fe_go_idle_timeout_count_disabled_f(void)
708{
709 return 0x0U;
710}
711static inline u32 gr_fe_go_idle_timeout_count_prod_f(void)
712{
713 return 0x1800U;
714}
715static inline u32 gr_fe_object_table_r(u32 i)
716{
717 return 0x00404200U + i*4U;
718}
719static inline u32 gr_fe_object_table_nvclass_v(u32 r)
720{
721 return (r >> 0U) & 0xffffU;
722}
723static inline u32 gr_fe_tpc_fs_r(void)
724{
725 return 0x004041c4U;
726}
727static inline u32 gr_pri_mme_shadow_raw_index_r(void)
728{
729 return 0x00404488U;
730}
731static inline u32 gr_pri_mme_shadow_raw_index_write_trigger_f(void)
732{
733 return 0x80000000U;
734}
735static inline u32 gr_pri_mme_shadow_raw_data_r(void)
736{
737 return 0x0040448cU;
738}
739static inline u32 gr_mme_hww_esr_r(void)
740{
741 return 0x00404490U;
742}
743static inline u32 gr_mme_hww_esr_reset_active_f(void)
744{
745 return 0x40000000U;
746}
747static inline u32 gr_mme_hww_esr_en_enable_f(void)
748{
749 return 0x80000000U;
750}
751static inline u32 gr_mme_hww_esr_info_r(void)
752{
753 return 0x00404494U;
754}
755static inline u32 gr_memfmt_hww_esr_r(void)
756{
757 return 0x00404600U;
758}
759static inline u32 gr_memfmt_hww_esr_reset_active_f(void)
760{
761 return 0x40000000U;
762}
763static inline u32 gr_memfmt_hww_esr_en_enable_f(void)
764{
765 return 0x80000000U;
766}
767static inline u32 gr_fecs_cpuctl_r(void)
768{
769 return 0x00409100U;
770}
771static inline u32 gr_fecs_cpuctl_startcpu_f(u32 v)
772{
773 return (v & 0x1U) << 1U;
774}
775static inline u32 gr_fecs_cpuctl_alias_r(void)
776{
777 return 0x00409130U;
778}
779static inline u32 gr_fecs_cpuctl_alias_startcpu_f(u32 v)
780{
781 return (v & 0x1U) << 1U;
782}
783static inline u32 gr_fecs_dmactl_r(void)
784{
785 return 0x0040910cU;
786}
787static inline u32 gr_fecs_dmactl_require_ctx_f(u32 v)
788{
789 return (v & 0x1U) << 0U;
790}
791static inline u32 gr_fecs_dmactl_dmem_scrubbing_m(void)
792{
793 return 0x1U << 1U;
794}
795static inline u32 gr_fecs_dmactl_imem_scrubbing_m(void)
796{
797 return 0x1U << 2U;
798}
799static inline u32 gr_fecs_os_r(void)
800{
801 return 0x00409080U;
802}
803static inline u32 gr_fecs_idlestate_r(void)
804{
805 return 0x0040904cU;
806}
807static inline u32 gr_fecs_mailbox0_r(void)
808{
809 return 0x00409040U;
810}
811static inline u32 gr_fecs_mailbox1_r(void)
812{
813 return 0x00409044U;
814}
815static inline u32 gr_fecs_irqstat_r(void)
816{
817 return 0x00409008U;
818}
819static inline u32 gr_fecs_irqmode_r(void)
820{
821 return 0x0040900cU;
822}
823static inline u32 gr_fecs_irqmask_r(void)
824{
825 return 0x00409018U;
826}
827static inline u32 gr_fecs_irqdest_r(void)
828{
829 return 0x0040901cU;
830}
831static inline u32 gr_fecs_curctx_r(void)
832{
833 return 0x00409050U;
834}
835static inline u32 gr_fecs_nxtctx_r(void)
836{
837 return 0x00409054U;
838}
839static inline u32 gr_fecs_engctl_r(void)
840{
841 return 0x004090a4U;
842}
843static inline u32 gr_fecs_debug1_r(void)
844{
845 return 0x00409090U;
846}
847static inline u32 gr_fecs_debuginfo_r(void)
848{
849 return 0x00409094U;
850}
851static inline u32 gr_fecs_icd_cmd_r(void)
852{
853 return 0x00409200U;
854}
855static inline u32 gr_fecs_icd_cmd_opc_s(void)
856{
857 return 4U;
858}
859static inline u32 gr_fecs_icd_cmd_opc_f(u32 v)
860{
861 return (v & 0xfU) << 0U;
862}
863static inline u32 gr_fecs_icd_cmd_opc_m(void)
864{
865 return 0xfU << 0U;
866}
867static inline u32 gr_fecs_icd_cmd_opc_v(u32 r)
868{
869 return (r >> 0U) & 0xfU;
870}
871static inline u32 gr_fecs_icd_cmd_opc_rreg_f(void)
872{
873 return 0x8U;
874}
875static inline u32 gr_fecs_icd_cmd_opc_rstat_f(void)
876{
877 return 0xeU;
878}
879static inline u32 gr_fecs_icd_cmd_idx_f(u32 v)
880{
881 return (v & 0x1fU) << 8U;
882}
883static inline u32 gr_fecs_icd_rdata_r(void)
884{
885 return 0x0040920cU;
886}
887static inline u32 gr_fecs_imemc_r(u32 i)
888{
889 return 0x00409180U + i*16U;
890}
891static inline u32 gr_fecs_imemc_offs_f(u32 v)
892{
893 return (v & 0x3fU) << 2U;
894}
895static inline u32 gr_fecs_imemc_blk_f(u32 v)
896{
897 return (v & 0xffU) << 8U;
898}
899static inline u32 gr_fecs_imemc_aincw_f(u32 v)
900{
901 return (v & 0x1U) << 24U;
902}
903static inline u32 gr_fecs_imemd_r(u32 i)
904{
905 return 0x00409184U + i*16U;
906}
907static inline u32 gr_fecs_imemt_r(u32 i)
908{
909 return 0x00409188U + i*16U;
910}
911static inline u32 gr_fecs_imemt_tag_f(u32 v)
912{
913 return (v & 0xffffU) << 0U;
914}
915static inline u32 gr_fecs_dmemc_r(u32 i)
916{
917 return 0x004091c0U + i*8U;
918}
919static inline u32 gr_fecs_dmemc_offs_s(void)
920{
921 return 6U;
922}
923static inline u32 gr_fecs_dmemc_offs_f(u32 v)
924{
925 return (v & 0x3fU) << 2U;
926}
927static inline u32 gr_fecs_dmemc_offs_m(void)
928{
929 return 0x3fU << 2U;
930}
931static inline u32 gr_fecs_dmemc_offs_v(u32 r)
932{
933 return (r >> 2U) & 0x3fU;
934}
935static inline u32 gr_fecs_dmemc_blk_f(u32 v)
936{
937 return (v & 0xffU) << 8U;
938}
939static inline u32 gr_fecs_dmemc_aincw_f(u32 v)
940{
941 return (v & 0x1U) << 24U;
942}
943static inline u32 gr_fecs_dmemd_r(u32 i)
944{
945 return 0x004091c4U + i*8U;
946}
947static inline u32 gr_fecs_dmatrfbase_r(void)
948{
949 return 0x00409110U;
950}
951static inline u32 gr_fecs_dmatrfmoffs_r(void)
952{
953 return 0x00409114U;
954}
955static inline u32 gr_fecs_dmatrffboffs_r(void)
956{
957 return 0x0040911cU;
958}
959static inline u32 gr_fecs_dmatrfcmd_r(void)
960{
961 return 0x00409118U;
962}
963static inline u32 gr_fecs_dmatrfcmd_imem_f(u32 v)
964{
965 return (v & 0x1U) << 4U;
966}
967static inline u32 gr_fecs_dmatrfcmd_write_f(u32 v)
968{
969 return (v & 0x1U) << 5U;
970}
971static inline u32 gr_fecs_dmatrfcmd_size_f(u32 v)
972{
973 return (v & 0x7U) << 8U;
974}
975static inline u32 gr_fecs_dmatrfcmd_ctxdma_f(u32 v)
976{
977 return (v & 0x7U) << 12U;
978}
979static inline u32 gr_fecs_bootvec_r(void)
980{
981 return 0x00409104U;
982}
983static inline u32 gr_fecs_bootvec_vec_f(u32 v)
984{
985 return (v & 0xffffffffU) << 0U;
986}
987static inline u32 gr_fecs_falcon_hwcfg_r(void)
988{
989 return 0x00409108U;
990}
991static inline u32 gr_gpcs_gpccs_falcon_hwcfg_r(void)
992{
993 return 0x0041a108U;
994}
995static inline u32 gr_fecs_falcon_rm_r(void)
996{
997 return 0x00409084U;
998}
999static inline u32 gr_fecs_current_ctx_r(void)
1000{
1001 return 0x00409b00U;
1002}
1003static inline u32 gr_fecs_current_ctx_ptr_f(u32 v)
1004{
1005 return (v & 0xfffffffU) << 0U;
1006}
1007static inline u32 gr_fecs_current_ctx_ptr_v(u32 r)
1008{
1009 return (r >> 0U) & 0xfffffffU;
1010}
1011static inline u32 gr_fecs_current_ctx_target_s(void)
1012{
1013 return 2U;
1014}
1015static inline u32 gr_fecs_current_ctx_target_f(u32 v)
1016{
1017 return (v & 0x3U) << 28U;
1018}
1019static inline u32 gr_fecs_current_ctx_target_m(void)
1020{
1021 return 0x3U << 28U;
1022}
1023static inline u32 gr_fecs_current_ctx_target_v(u32 r)
1024{
1025 return (r >> 28U) & 0x3U;
1026}
1027static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void)
1028{
1029 return 0x0U;
1030}
1031static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void)
1032{
1033 return 0x20000000U;
1034}
1035static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void)
1036{
1037 return 0x30000000U;
1038}
1039static inline u32 gr_fecs_current_ctx_valid_s(void)
1040{
1041 return 1U;
1042}
1043static inline u32 gr_fecs_current_ctx_valid_f(u32 v)
1044{
1045 return (v & 0x1U) << 31U;
1046}
1047static inline u32 gr_fecs_current_ctx_valid_m(void)
1048{
1049 return 0x1U << 31U;
1050}
1051static inline u32 gr_fecs_current_ctx_valid_v(u32 r)
1052{
1053 return (r >> 31U) & 0x1U;
1054}
1055static inline u32 gr_fecs_current_ctx_valid_false_f(void)
1056{
1057 return 0x0U;
1058}
1059static inline u32 gr_fecs_method_data_r(void)
1060{
1061 return 0x00409500U;
1062}
1063static inline u32 gr_fecs_method_push_r(void)
1064{
1065 return 0x00409504U;
1066}
1067static inline u32 gr_fecs_method_push_adr_f(u32 v)
1068{
1069 return (v & 0xfffU) << 0U;
1070}
1071static inline u32 gr_fecs_method_push_adr_bind_pointer_v(void)
1072{
1073 return 0x00000003U;
1074}
1075static inline u32 gr_fecs_method_push_adr_bind_pointer_f(void)
1076{
1077 return 0x3U;
1078}
1079static inline u32 gr_fecs_method_push_adr_discover_image_size_v(void)
1080{
1081 return 0x00000010U;
1082}
1083static inline u32 gr_fecs_method_push_adr_wfi_golden_save_v(void)
1084{
1085 return 0x00000009U;
1086}
1087static inline u32 gr_fecs_method_push_adr_restore_golden_v(void)
1088{
1089 return 0x00000015U;
1090}
1091static inline u32 gr_fecs_method_push_adr_discover_zcull_image_size_v(void)
1092{
1093 return 0x00000016U;
1094}
1095static inline u32 gr_fecs_method_push_adr_discover_pm_image_size_v(void)
1096{
1097 return 0x00000025U;
1098}
1099static inline u32 gr_fecs_method_push_adr_discover_reglist_image_size_v(void)
1100{
1101 return 0x00000030U;
1102}
1103static inline u32 gr_fecs_method_push_adr_set_reglist_bind_instance_v(void)
1104{
1105 return 0x00000031U;
1106}
1107static inline u32 gr_fecs_method_push_adr_set_reglist_virtual_address_v(void)
1108{
1109 return 0x00000032U;
1110}
1111static inline u32 gr_fecs_method_push_adr_stop_ctxsw_v(void)
1112{
1113 return 0x00000038U;
1114}
1115static inline u32 gr_fecs_method_push_adr_start_ctxsw_v(void)
1116{
1117 return 0x00000039U;
1118}
1119static inline u32 gr_fecs_method_push_adr_set_watchdog_timeout_f(void)
1120{
1121 return 0x21U;
1122}
1123static inline u32 gr_fecs_method_push_adr_discover_preemption_image_size_v(void)
1124{
1125 return 0x0000001aU;
1126}
1127static inline u32 gr_fecs_method_push_adr_halt_pipeline_v(void)
1128{
1129 return 0x00000004U;
1130}
1131static inline u32 gr_fecs_host_int_status_r(void)
1132{
1133 return 0x00409c18U;
1134}
1135static inline u32 gr_fecs_host_int_status_fault_during_ctxsw_f(u32 v)
1136{
1137 return (v & 0x1U) << 16U;
1138}
1139static inline u32 gr_fecs_host_int_status_umimp_firmware_method_f(u32 v)
1140{
1141 return (v & 0x1U) << 17U;
1142}
1143static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v)
1144{
1145 return (v & 0x1U) << 18U;
1146}
1147static inline u32 gr_fecs_host_int_clear_r(void)
1148{
1149 return 0x00409c20U;
1150}
1151static inline u32 gr_fecs_host_int_enable_r(void)
1152{
1153 return 0x00409c24U;
1154}
1155static inline u32 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f(void)
1156{
1157 return 0x10000U;
1158}
1159static inline u32 gr_fecs_host_int_enable_umimp_firmware_method_enable_f(void)
1160{
1161 return 0x20000U;
1162}
1163static inline u32 gr_fecs_host_int_enable_umimp_illegal_method_enable_f(void)
1164{
1165 return 0x40000U;
1166}
1167static inline u32 gr_fecs_host_int_enable_watchdog_enable_f(void)
1168{
1169 return 0x80000U;
1170}
1171static inline u32 gr_fecs_ctxsw_reset_ctl_r(void)
1172{
1173 return 0x00409614U;
1174}
1175static inline u32 gr_fecs_ctxsw_reset_ctl_sys_halt_disabled_f(void)
1176{
1177 return 0x0U;
1178}
1179static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_halt_disabled_f(void)
1180{
1181 return 0x0U;
1182}
1183static inline u32 gr_fecs_ctxsw_reset_ctl_be_halt_disabled_f(void)
1184{
1185 return 0x0U;
1186}
1187static inline u32 gr_fecs_ctxsw_reset_ctl_sys_engine_reset_disabled_f(void)
1188{
1189 return 0x10U;
1190}
1191static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_engine_reset_disabled_f(void)
1192{
1193 return 0x20U;
1194}
1195static inline u32 gr_fecs_ctxsw_reset_ctl_be_engine_reset_disabled_f(void)
1196{
1197 return 0x40U;
1198}
1199static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_enabled_f(void)
1200{
1201 return 0x0U;
1202}
1203static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_disabled_f(void)
1204{
1205 return 0x100U;
1206}
1207static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_enabled_f(void)
1208{
1209 return 0x0U;
1210}
1211static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_disabled_f(void)
1212{
1213 return 0x200U;
1214}
1215static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_s(void)
1216{
1217 return 1U;
1218}
1219static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_f(u32 v)
1220{
1221 return (v & 0x1U) << 10U;
1222}
1223static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_m(void)
1224{
1225 return 0x1U << 10U;
1226}
1227static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_v(u32 r)
1228{
1229 return (r >> 10U) & 0x1U;
1230}
1231static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_enabled_f(void)
1232{
1233 return 0x0U;
1234}
1235static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_disabled_f(void)
1236{
1237 return 0x400U;
1238}
1239static inline u32 gr_fecs_ctx_state_store_major_rev_id_r(void)
1240{
1241 return 0x0040960cU;
1242}
1243static inline u32 gr_fecs_ctxsw_mailbox_r(u32 i)
1244{
1245 return 0x00409800U + i*4U;
1246}
1247static inline u32 gr_fecs_ctxsw_mailbox__size_1_v(void)
1248{
1249 return 0x00000010U;
1250}
1251static inline u32 gr_fecs_ctxsw_mailbox_value_f(u32 v)
1252{
1253 return (v & 0xffffffffU) << 0U;
1254}
1255static inline u32 gr_fecs_ctxsw_mailbox_value_pass_v(void)
1256{
1257 return 0x00000001U;
1258}
1259static inline u32 gr_fecs_ctxsw_mailbox_value_fail_v(void)
1260{
1261 return 0x00000002U;
1262}
1263static inline u32 gr_fecs_ctxsw_mailbox_set_r(u32 i)
1264{
1265 return 0x004098c0U + i*4U;
1266}
1267static inline u32 gr_fecs_ctxsw_mailbox_set_value_f(u32 v)
1268{
1269 return (v & 0xffffffffU) << 0U;
1270}
1271static inline u32 gr_fecs_ctxsw_mailbox_clear_r(u32 i)
1272{
1273 return 0x00409840U + i*4U;
1274}
1275static inline u32 gr_fecs_ctxsw_mailbox_clear_value_f(u32 v)
1276{
1277 return (v & 0xffffffffU) << 0U;
1278}
1279static inline u32 gr_fecs_fs_r(void)
1280{
1281 return 0x00409604U;
1282}
1283static inline u32 gr_fecs_fs_num_available_gpcs_s(void)
1284{
1285 return 5U;
1286}
1287static inline u32 gr_fecs_fs_num_available_gpcs_f(u32 v)
1288{
1289 return (v & 0x1fU) << 0U;
1290}
1291static inline u32 gr_fecs_fs_num_available_gpcs_m(void)
1292{
1293 return 0x1fU << 0U;
1294}
1295static inline u32 gr_fecs_fs_num_available_gpcs_v(u32 r)
1296{
1297 return (r >> 0U) & 0x1fU;
1298}
1299static inline u32 gr_fecs_fs_num_available_fbps_s(void)
1300{
1301 return 5U;
1302}
1303static inline u32 gr_fecs_fs_num_available_fbps_f(u32 v)
1304{
1305 return (v & 0x1fU) << 16U;
1306}
1307static inline u32 gr_fecs_fs_num_available_fbps_m(void)
1308{
1309 return 0x1fU << 16U;
1310}
1311static inline u32 gr_fecs_fs_num_available_fbps_v(u32 r)
1312{
1313 return (r >> 16U) & 0x1fU;
1314}
1315static inline u32 gr_fecs_cfg_r(void)
1316{
1317 return 0x00409620U;
1318}
1319static inline u32 gr_fecs_cfg_imem_sz_v(u32 r)
1320{
1321 return (r >> 0U) & 0xffU;
1322}
1323static inline u32 gr_fecs_rc_lanes_r(void)
1324{
1325 return 0x00409880U;
1326}
1327static inline u32 gr_fecs_rc_lanes_num_chains_s(void)
1328{
1329 return 6U;
1330}
1331static inline u32 gr_fecs_rc_lanes_num_chains_f(u32 v)
1332{
1333 return (v & 0x3fU) << 0U;
1334}
1335static inline u32 gr_fecs_rc_lanes_num_chains_m(void)
1336{
1337 return 0x3fU << 0U;
1338}
1339static inline u32 gr_fecs_rc_lanes_num_chains_v(u32 r)
1340{
1341 return (r >> 0U) & 0x3fU;
1342}
1343static inline u32 gr_fecs_ctxsw_status_1_r(void)
1344{
1345 return 0x00409400U;
1346}
1347static inline u32 gr_fecs_ctxsw_status_1_arb_busy_s(void)
1348{
1349 return 1U;
1350}
1351static inline u32 gr_fecs_ctxsw_status_1_arb_busy_f(u32 v)
1352{
1353 return (v & 0x1U) << 12U;
1354}
1355static inline u32 gr_fecs_ctxsw_status_1_arb_busy_m(void)
1356{
1357 return 0x1U << 12U;
1358}
1359static inline u32 gr_fecs_ctxsw_status_1_arb_busy_v(u32 r)
1360{
1361 return (r >> 12U) & 0x1U;
1362}
1363static inline u32 gr_fecs_arb_ctx_adr_r(void)
1364{
1365 return 0x00409a24U;
1366}
1367static inline u32 gr_fecs_new_ctx_r(void)
1368{
1369 return 0x00409b04U;
1370}
1371static inline u32 gr_fecs_new_ctx_ptr_s(void)
1372{
1373 return 28U;
1374}
1375static inline u32 gr_fecs_new_ctx_ptr_f(u32 v)
1376{
1377 return (v & 0xfffffffU) << 0U;
1378}
1379static inline u32 gr_fecs_new_ctx_ptr_m(void)
1380{
1381 return 0xfffffffU << 0U;
1382}
1383static inline u32 gr_fecs_new_ctx_ptr_v(u32 r)
1384{
1385 return (r >> 0U) & 0xfffffffU;
1386}
1387static inline u32 gr_fecs_new_ctx_target_s(void)
1388{
1389 return 2U;
1390}
1391static inline u32 gr_fecs_new_ctx_target_f(u32 v)
1392{
1393 return (v & 0x3U) << 28U;
1394}
1395static inline u32 gr_fecs_new_ctx_target_m(void)
1396{
1397 return 0x3U << 28U;
1398}
1399static inline u32 gr_fecs_new_ctx_target_v(u32 r)
1400{
1401 return (r >> 28U) & 0x3U;
1402}
1403static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void)
1404{
1405 return 0x0U;
1406}
1407static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void)
1408{
1409 return 0x30000000U;
1410}
1411static inline u32 gr_fecs_new_ctx_target_sys_mem_coh_f(void)
1412{
1413 return 0x20000000U;
1414}
1415static inline u32 gr_fecs_new_ctx_valid_s(void)
1416{
1417 return 1U;
1418}
1419static inline u32 gr_fecs_new_ctx_valid_f(u32 v)
1420{
1421 return (v & 0x1U) << 31U;
1422}
1423static inline u32 gr_fecs_new_ctx_valid_m(void)
1424{
1425 return 0x1U << 31U;
1426}
1427static inline u32 gr_fecs_new_ctx_valid_v(u32 r)
1428{
1429 return (r >> 31U) & 0x1U;
1430}
1431static inline u32 gr_fecs_arb_ctx_ptr_r(void)
1432{
1433 return 0x00409a0cU;
1434}
1435static inline u32 gr_fecs_arb_ctx_ptr_ptr_s(void)
1436{
1437 return 28U;
1438}
1439static inline u32 gr_fecs_arb_ctx_ptr_ptr_f(u32 v)
1440{
1441 return (v & 0xfffffffU) << 0U;
1442}
1443static inline u32 gr_fecs_arb_ctx_ptr_ptr_m(void)
1444{
1445 return 0xfffffffU << 0U;
1446}
1447static inline u32 gr_fecs_arb_ctx_ptr_ptr_v(u32 r)
1448{
1449 return (r >> 0U) & 0xfffffffU;
1450}
1451static inline u32 gr_fecs_arb_ctx_ptr_target_s(void)
1452{
1453 return 2U;
1454}
1455static inline u32 gr_fecs_arb_ctx_ptr_target_f(u32 v)
1456{
1457 return (v & 0x3U) << 28U;
1458}
1459static inline u32 gr_fecs_arb_ctx_ptr_target_m(void)
1460{
1461 return 0x3U << 28U;
1462}
1463static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r)
1464{
1465 return (r >> 28U) & 0x3U;
1466}
1467static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void)
1468{
1469 return 0x0U;
1470}
1471static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void)
1472{
1473 return 0x30000000U;
1474}
1475static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_coh_f(void)
1476{
1477 return 0x20000000U;
1478}
1479static inline u32 gr_fecs_arb_ctx_cmd_r(void)
1480{
1481 return 0x00409a10U;
1482}
1483static inline u32 gr_fecs_arb_ctx_cmd_cmd_s(void)
1484{
1485 return 5U;
1486}
1487static inline u32 gr_fecs_arb_ctx_cmd_cmd_f(u32 v)
1488{
1489 return (v & 0x1fU) << 0U;
1490}
1491static inline u32 gr_fecs_arb_ctx_cmd_cmd_m(void)
1492{
1493 return 0x1fU << 0U;
1494}
1495static inline u32 gr_fecs_arb_ctx_cmd_cmd_v(u32 r)
1496{
1497 return (r >> 0U) & 0x1fU;
1498}
1499static inline u32 gr_fecs_ctxsw_status_fe_0_r(void)
1500{
1501 return 0x00409c00U;
1502}
1503static inline u32 gr_gpc0_gpccs_ctxsw_status_gpc_0_r(void)
1504{
1505 return 0x00502c04U;
1506}
1507static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void)
1508{
1509 return 0x00502400U;
1510}
1511static inline u32 gr_gpc0_gpccs_ctxsw_mailbox__size_1_v(void)
1512{
1513 return 0x00000010U;
1514}
1515static inline u32 gr_fecs_ctxsw_idlestate_r(void)
1516{
1517 return 0x00409420U;
1518}
1519static inline u32 gr_fecs_feature_override_ecc_r(void)
1520{
1521 return 0x00409658U;
1522}
1523static inline u32 gr_gpc0_gpccs_ctxsw_idlestate_r(void)
1524{
1525 return 0x00502420U;
1526}
1527static inline u32 gr_rstr2d_gpc_map0_r(void)
1528{
1529 return 0x0040780cU;
1530}
1531static inline u32 gr_rstr2d_gpc_map1_r(void)
1532{
1533 return 0x00407810U;
1534}
1535static inline u32 gr_rstr2d_gpc_map2_r(void)
1536{
1537 return 0x00407814U;
1538}
1539static inline u32 gr_rstr2d_gpc_map3_r(void)
1540{
1541 return 0x00407818U;
1542}
1543static inline u32 gr_rstr2d_gpc_map4_r(void)
1544{
1545 return 0x0040781cU;
1546}
1547static inline u32 gr_rstr2d_gpc_map5_r(void)
1548{
1549 return 0x00407820U;
1550}
1551static inline u32 gr_rstr2d_map_table_cfg_r(void)
1552{
1553 return 0x004078bcU;
1554}
1555static inline u32 gr_rstr2d_map_table_cfg_row_offset_f(u32 v)
1556{
1557 return (v & 0xffU) << 0U;
1558}
1559static inline u32 gr_rstr2d_map_table_cfg_num_entries_f(u32 v)
1560{
1561 return (v & 0xffU) << 8U;
1562}
1563static inline u32 gr_pd_hww_esr_r(void)
1564{
1565 return 0x00406018U;
1566}
1567static inline u32 gr_pd_hww_esr_reset_active_f(void)
1568{
1569 return 0x40000000U;
1570}
1571static inline u32 gr_pd_hww_esr_en_enable_f(void)
1572{
1573 return 0x80000000U;
1574}
1575static inline u32 gr_pd_num_tpc_per_gpc_r(u32 i)
1576{
1577 return 0x00406028U + i*4U;
1578}
1579static inline u32 gr_pd_num_tpc_per_gpc__size_1_v(void)
1580{
1581 return 0x00000004U;
1582}
1583static inline u32 gr_pd_num_tpc_per_gpc_count0_f(u32 v)
1584{
1585 return (v & 0xfU) << 0U;
1586}
1587static inline u32 gr_pd_num_tpc_per_gpc_count1_f(u32 v)
1588{
1589 return (v & 0xfU) << 4U;
1590}
1591static inline u32 gr_pd_num_tpc_per_gpc_count2_f(u32 v)
1592{
1593 return (v & 0xfU) << 8U;
1594}
1595static inline u32 gr_pd_num_tpc_per_gpc_count3_f(u32 v)
1596{
1597 return (v & 0xfU) << 12U;
1598}
1599static inline u32 gr_pd_num_tpc_per_gpc_count4_f(u32 v)
1600{
1601 return (v & 0xfU) << 16U;
1602}
1603static inline u32 gr_pd_num_tpc_per_gpc_count5_f(u32 v)
1604{
1605 return (v & 0xfU) << 20U;
1606}
1607static inline u32 gr_pd_num_tpc_per_gpc_count6_f(u32 v)
1608{
1609 return (v & 0xfU) << 24U;
1610}
1611static inline u32 gr_pd_num_tpc_per_gpc_count7_f(u32 v)
1612{
1613 return (v & 0xfU) << 28U;
1614}
1615static inline u32 gr_pd_ab_dist_cfg0_r(void)
1616{
1617 return 0x004064c0U;
1618}
1619static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_en_f(void)
1620{
1621 return 0x80000000U;
1622}
1623static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_dis_f(void)
1624{
1625 return 0x0U;
1626}
1627static inline u32 gr_pd_ab_dist_cfg1_r(void)
1628{
1629 return 0x004064c4U;
1630}
1631static inline u32 gr_pd_ab_dist_cfg1_max_batches_init_f(void)
1632{
1633 return 0xffffU;
1634}
1635static inline u32 gr_pd_ab_dist_cfg1_max_output_f(u32 v)
1636{
1637 return (v & 0xffffU) << 16U;
1638}
1639static inline u32 gr_pd_ab_dist_cfg1_max_output_granularity_v(void)
1640{
1641 return 0x00000080U;
1642}
1643static inline u32 gr_pd_ab_dist_cfg2_r(void)
1644{
1645 return 0x004064c8U;
1646}
1647static inline u32 gr_pd_ab_dist_cfg2_token_limit_f(u32 v)
1648{
1649 return (v & 0x1fffU) << 0U;
1650}
1651static inline u32 gr_pd_ab_dist_cfg2_token_limit_init_v(void)
1652{
1653 return 0x00000900U;
1654}
1655static inline u32 gr_pd_ab_dist_cfg2_state_limit_f(u32 v)
1656{
1657 return (v & 0x1fffU) << 16U;
1658}
1659static inline u32 gr_pd_ab_dist_cfg2_state_limit_scc_bundle_granularity_v(void)
1660{
1661 return 0x00000020U;
1662}
1663static inline u32 gr_pd_ab_dist_cfg2_state_limit_min_gpm_fifo_depths_v(void)
1664{
1665 return 0x00000900U;
1666}
1667static inline u32 gr_pd_dist_skip_table_r(u32 i)
1668{
1669 return 0x004064d0U + i*4U;
1670}
1671static inline u32 gr_pd_dist_skip_table__size_1_v(void)
1672{
1673 return 0x00000008U;
1674}
1675static inline u32 gr_pd_dist_skip_table_gpc_4n0_mask_f(u32 v)
1676{
1677 return (v & 0xffU) << 0U;
1678}
1679static inline u32 gr_pd_dist_skip_table_gpc_4n1_mask_f(u32 v)
1680{
1681 return (v & 0xffU) << 8U;
1682}
1683static inline u32 gr_pd_dist_skip_table_gpc_4n2_mask_f(u32 v)
1684{
1685 return (v & 0xffU) << 16U;
1686}
1687static inline u32 gr_pd_dist_skip_table_gpc_4n3_mask_f(u32 v)
1688{
1689 return (v & 0xffU) << 24U;
1690}
1691static inline u32 gr_ds_debug_r(void)
1692{
1693 return 0x00405800U;
1694}
1695static inline u32 gr_ds_debug_timeslice_mode_disable_f(void)
1696{
1697 return 0x0U;
1698}
1699static inline u32 gr_ds_debug_timeslice_mode_enable_f(void)
1700{
1701 return 0x8000000U;
1702}
1703static inline u32 gr_ds_zbc_color_r_r(void)
1704{
1705 return 0x00405804U;
1706}
1707static inline u32 gr_ds_zbc_color_r_val_f(u32 v)
1708{
1709 return (v & 0xffffffffU) << 0U;
1710}
1711static inline u32 gr_ds_zbc_color_g_r(void)
1712{
1713 return 0x00405808U;
1714}
1715static inline u32 gr_ds_zbc_color_g_val_f(u32 v)
1716{
1717 return (v & 0xffffffffU) << 0U;
1718}
1719static inline u32 gr_ds_zbc_color_b_r(void)
1720{
1721 return 0x0040580cU;
1722}
1723static inline u32 gr_ds_zbc_color_b_val_f(u32 v)
1724{
1725 return (v & 0xffffffffU) << 0U;
1726}
1727static inline u32 gr_ds_zbc_color_a_r(void)
1728{
1729 return 0x00405810U;
1730}
1731static inline u32 gr_ds_zbc_color_a_val_f(u32 v)
1732{
1733 return (v & 0xffffffffU) << 0U;
1734}
1735static inline u32 gr_ds_zbc_color_fmt_r(void)
1736{
1737 return 0x00405814U;
1738}
1739static inline u32 gr_ds_zbc_color_fmt_val_f(u32 v)
1740{
1741 return (v & 0x7fU) << 0U;
1742}
1743static inline u32 gr_ds_zbc_color_fmt_val_invalid_f(void)
1744{
1745 return 0x0U;
1746}
1747static inline u32 gr_ds_zbc_color_fmt_val_zero_v(void)
1748{
1749 return 0x00000001U;
1750}
1751static inline u32 gr_ds_zbc_color_fmt_val_unorm_one_v(void)
1752{
1753 return 0x00000002U;
1754}
1755static inline u32 gr_ds_zbc_color_fmt_val_rf32_gf32_bf32_af32_v(void)
1756{
1757 return 0x00000004U;
1758}
1759static inline u32 gr_ds_zbc_color_fmt_val_a8_b8_g8_r8_v(void)
1760{
1761 return 0x00000028U;
1762}
1763static inline u32 gr_ds_zbc_z_r(void)
1764{
1765 return 0x00405818U;
1766}
1767static inline u32 gr_ds_zbc_z_val_s(void)
1768{
1769 return 32U;
1770}
1771static inline u32 gr_ds_zbc_z_val_f(u32 v)
1772{
1773 return (v & 0xffffffffU) << 0U;
1774}
1775static inline u32 gr_ds_zbc_z_val_m(void)
1776{
1777 return 0xffffffffU << 0U;
1778}
1779static inline u32 gr_ds_zbc_z_val_v(u32 r)
1780{
1781 return (r >> 0U) & 0xffffffffU;
1782}
1783static inline u32 gr_ds_zbc_z_val__init_v(void)
1784{
1785 return 0x00000000U;
1786}
1787static inline u32 gr_ds_zbc_z_val__init_f(void)
1788{
1789 return 0x0U;
1790}
1791static inline u32 gr_ds_zbc_z_fmt_r(void)
1792{
1793 return 0x0040581cU;
1794}
1795static inline u32 gr_ds_zbc_z_fmt_val_f(u32 v)
1796{
1797 return (v & 0x1U) << 0U;
1798}
1799static inline u32 gr_ds_zbc_z_fmt_val_invalid_f(void)
1800{
1801 return 0x0U;
1802}
1803static inline u32 gr_ds_zbc_z_fmt_val_fp32_v(void)
1804{
1805 return 0x00000001U;
1806}
1807static inline u32 gr_ds_zbc_tbl_index_r(void)
1808{
1809 return 0x00405820U;
1810}
1811static inline u32 gr_ds_zbc_tbl_index_val_f(u32 v)
1812{
1813 return (v & 0xfU) << 0U;
1814}
1815static inline u32 gr_ds_zbc_tbl_ld_r(void)
1816{
1817 return 0x00405824U;
1818}
1819static inline u32 gr_ds_zbc_tbl_ld_select_c_f(void)
1820{
1821 return 0x0U;
1822}
1823static inline u32 gr_ds_zbc_tbl_ld_select_z_f(void)
1824{
1825 return 0x1U;
1826}
1827static inline u32 gr_ds_zbc_tbl_ld_action_write_f(void)
1828{
1829 return 0x0U;
1830}
1831static inline u32 gr_ds_zbc_tbl_ld_trigger_active_f(void)
1832{
1833 return 0x4U;
1834}
1835static inline u32 gr_ds_tga_constraintlogic_beta_r(void)
1836{
1837 return 0x00405830U;
1838}
1839static inline u32 gr_ds_tga_constraintlogic_beta_cbsize_f(u32 v)
1840{
1841 return (v & 0x3fffffU) << 0U;
1842}
1843static inline u32 gr_ds_tga_constraintlogic_alpha_r(void)
1844{
1845 return 0x0040585cU;
1846}
1847static inline u32 gr_ds_tga_constraintlogic_alpha_cbsize_f(u32 v)
1848{
1849 return (v & 0xffffU) << 0U;
1850}
1851static inline u32 gr_ds_hww_esr_r(void)
1852{
1853 return 0x00405840U;
1854}
1855static inline u32 gr_ds_hww_esr_reset_s(void)
1856{
1857 return 1U;
1858}
1859static inline u32 gr_ds_hww_esr_reset_f(u32 v)
1860{
1861 return (v & 0x1U) << 30U;
1862}
1863static inline u32 gr_ds_hww_esr_reset_m(void)
1864{
1865 return 0x1U << 30U;
1866}
1867static inline u32 gr_ds_hww_esr_reset_v(u32 r)
1868{
1869 return (r >> 30U) & 0x1U;
1870}
1871static inline u32 gr_ds_hww_esr_reset_task_v(void)
1872{
1873 return 0x00000001U;
1874}
1875static inline u32 gr_ds_hww_esr_reset_task_f(void)
1876{
1877 return 0x40000000U;
1878}
1879static inline u32 gr_ds_hww_esr_en_enabled_f(void)
1880{
1881 return 0x80000000U;
1882}
1883static inline u32 gr_ds_hww_esr_2_r(void)
1884{
1885 return 0x00405848U;
1886}
1887static inline u32 gr_ds_hww_esr_2_reset_s(void)
1888{
1889 return 1U;
1890}
1891static inline u32 gr_ds_hww_esr_2_reset_f(u32 v)
1892{
1893 return (v & 0x1U) << 30U;
1894}
1895static inline u32 gr_ds_hww_esr_2_reset_m(void)
1896{
1897 return 0x1U << 30U;
1898}
1899static inline u32 gr_ds_hww_esr_2_reset_v(u32 r)
1900{
1901 return (r >> 30U) & 0x1U;
1902}
1903static inline u32 gr_ds_hww_esr_2_reset_task_v(void)
1904{
1905 return 0x00000001U;
1906}
1907static inline u32 gr_ds_hww_esr_2_reset_task_f(void)
1908{
1909 return 0x40000000U;
1910}
1911static inline u32 gr_ds_hww_esr_2_en_enabled_f(void)
1912{
1913 return 0x80000000U;
1914}
1915static inline u32 gr_ds_hww_report_mask_r(void)
1916{
1917 return 0x00405844U;
1918}
1919static inline u32 gr_ds_hww_report_mask_sph0_err_report_f(void)
1920{
1921 return 0x1U;
1922}
1923static inline u32 gr_ds_hww_report_mask_sph1_err_report_f(void)
1924{
1925 return 0x2U;
1926}
1927static inline u32 gr_ds_hww_report_mask_sph2_err_report_f(void)
1928{
1929 return 0x4U;
1930}
1931static inline u32 gr_ds_hww_report_mask_sph3_err_report_f(void)
1932{
1933 return 0x8U;
1934}
1935static inline u32 gr_ds_hww_report_mask_sph4_err_report_f(void)
1936{
1937 return 0x10U;
1938}
1939static inline u32 gr_ds_hww_report_mask_sph5_err_report_f(void)
1940{
1941 return 0x20U;
1942}
1943static inline u32 gr_ds_hww_report_mask_sph6_err_report_f(void)
1944{
1945 return 0x40U;
1946}
1947static inline u32 gr_ds_hww_report_mask_sph7_err_report_f(void)
1948{
1949 return 0x80U;
1950}
1951static inline u32 gr_ds_hww_report_mask_sph8_err_report_f(void)
1952{
1953 return 0x100U;
1954}
1955static inline u32 gr_ds_hww_report_mask_sph9_err_report_f(void)
1956{
1957 return 0x200U;
1958}
1959static inline u32 gr_ds_hww_report_mask_sph10_err_report_f(void)
1960{
1961 return 0x400U;
1962}
1963static inline u32 gr_ds_hww_report_mask_sph11_err_report_f(void)
1964{
1965 return 0x800U;
1966}
1967static inline u32 gr_ds_hww_report_mask_sph12_err_report_f(void)
1968{
1969 return 0x1000U;
1970}
1971static inline u32 gr_ds_hww_report_mask_sph13_err_report_f(void)
1972{
1973 return 0x2000U;
1974}
1975static inline u32 gr_ds_hww_report_mask_sph14_err_report_f(void)
1976{
1977 return 0x4000U;
1978}
1979static inline u32 gr_ds_hww_report_mask_sph15_err_report_f(void)
1980{
1981 return 0x8000U;
1982}
1983static inline u32 gr_ds_hww_report_mask_sph16_err_report_f(void)
1984{
1985 return 0x10000U;
1986}
1987static inline u32 gr_ds_hww_report_mask_sph17_err_report_f(void)
1988{
1989 return 0x20000U;
1990}
1991static inline u32 gr_ds_hww_report_mask_sph18_err_report_f(void)
1992{
1993 return 0x40000U;
1994}
1995static inline u32 gr_ds_hww_report_mask_sph19_err_report_f(void)
1996{
1997 return 0x80000U;
1998}
1999static inline u32 gr_ds_hww_report_mask_sph20_err_report_f(void)
2000{
2001 return 0x100000U;
2002}
2003static inline u32 gr_ds_hww_report_mask_sph21_err_report_f(void)
2004{
2005 return 0x200000U;
2006}
2007static inline u32 gr_ds_hww_report_mask_sph22_err_report_f(void)
2008{
2009 return 0x400000U;
2010}
2011static inline u32 gr_ds_hww_report_mask_sph23_err_report_f(void)
2012{
2013 return 0x800000U;
2014}
2015static inline u32 gr_ds_hww_report_mask_2_r(void)
2016{
2017 return 0x0040584cU;
2018}
2019static inline u32 gr_ds_hww_report_mask_2_sph24_err_report_f(void)
2020{
2021 return 0x1U;
2022}
2023static inline u32 gr_ds_num_tpc_per_gpc_r(u32 i)
2024{
2025 return 0x00405870U + i*4U;
2026}
2027static inline u32 gr_scc_bundle_cb_base_r(void)
2028{
2029 return 0x00408004U;
2030}
2031static inline u32 gr_scc_bundle_cb_base_addr_39_8_f(u32 v)
2032{
2033 return (v & 0xffffffffU) << 0U;
2034}
2035static inline u32 gr_scc_bundle_cb_base_addr_39_8_align_bits_v(void)
2036{
2037 return 0x00000008U;
2038}
2039static inline u32 gr_scc_bundle_cb_size_r(void)
2040{
2041 return 0x00408008U;
2042}
2043static inline u32 gr_scc_bundle_cb_size_div_256b_f(u32 v)
2044{
2045 return (v & 0x7ffU) << 0U;
2046}
2047static inline u32 gr_scc_bundle_cb_size_div_256b__prod_v(void)
2048{
2049 return 0x00000030U;
2050}
2051static inline u32 gr_scc_bundle_cb_size_div_256b_byte_granularity_v(void)
2052{
2053 return 0x00000100U;
2054}
2055static inline u32 gr_scc_bundle_cb_size_valid_false_v(void)
2056{
2057 return 0x00000000U;
2058}
2059static inline u32 gr_scc_bundle_cb_size_valid_false_f(void)
2060{
2061 return 0x0U;
2062}
2063static inline u32 gr_scc_bundle_cb_size_valid_true_f(void)
2064{
2065 return 0x80000000U;
2066}
2067static inline u32 gr_scc_pagepool_base_r(void)
2068{
2069 return 0x0040800cU;
2070}
2071static inline u32 gr_scc_pagepool_base_addr_39_8_f(u32 v)
2072{
2073 return (v & 0xffffffffU) << 0U;
2074}
2075static inline u32 gr_scc_pagepool_base_addr_39_8_align_bits_v(void)
2076{
2077 return 0x00000008U;
2078}
2079static inline u32 gr_scc_pagepool_r(void)
2080{
2081 return 0x00408010U;
2082}
2083static inline u32 gr_scc_pagepool_total_pages_f(u32 v)
2084{
2085 return (v & 0x3ffU) << 0U;
2086}
2087static inline u32 gr_scc_pagepool_total_pages_hwmax_v(void)
2088{
2089 return 0x00000000U;
2090}
2091static inline u32 gr_scc_pagepool_total_pages_hwmax_value_v(void)
2092{
2093 return 0x00000200U;
2094}
2095static inline u32 gr_scc_pagepool_total_pages_byte_granularity_v(void)
2096{
2097 return 0x00000100U;
2098}
2099static inline u32 gr_scc_pagepool_max_valid_pages_s(void)
2100{
2101 return 10U;
2102}
2103static inline u32 gr_scc_pagepool_max_valid_pages_f(u32 v)
2104{
2105 return (v & 0x3ffU) << 10U;
2106}
2107static inline u32 gr_scc_pagepool_max_valid_pages_m(void)
2108{
2109 return 0x3ffU << 10U;
2110}
2111static inline u32 gr_scc_pagepool_max_valid_pages_v(u32 r)
2112{
2113 return (r >> 10U) & 0x3ffU;
2114}
2115static inline u32 gr_scc_pagepool_valid_true_f(void)
2116{
2117 return 0x80000000U;
2118}
2119static inline u32 gr_scc_init_r(void)
2120{
2121 return 0x0040802cU;
2122}
2123static inline u32 gr_scc_init_ram_trigger_f(void)
2124{
2125 return 0x1U;
2126}
2127static inline u32 gr_scc_hww_esr_r(void)
2128{
2129 return 0x00408030U;
2130}
2131static inline u32 gr_scc_hww_esr_reset_active_f(void)
2132{
2133 return 0x40000000U;
2134}
2135static inline u32 gr_scc_hww_esr_en_enable_f(void)
2136{
2137 return 0x80000000U;
2138}
2139static inline u32 gr_sked_hww_esr_r(void)
2140{
2141 return 0x00407020U;
2142}
2143static inline u32 gr_sked_hww_esr_reset_active_f(void)
2144{
2145 return 0x40000000U;
2146}
2147static inline u32 gr_cwd_fs_r(void)
2148{
2149 return 0x00405b00U;
2150}
2151static inline u32 gr_cwd_fs_num_gpcs_f(u32 v)
2152{
2153 return (v & 0xffU) << 0U;
2154}
2155static inline u32 gr_cwd_fs_num_tpcs_f(u32 v)
2156{
2157 return (v & 0xffU) << 8U;
2158}
2159static inline u32 gr_cwd_gpc_tpc_id_r(u32 i)
2160{
2161 return 0x00405b60U + i*4U;
2162}
2163static inline u32 gr_cwd_gpc_tpc_id_tpc0_s(void)
2164{
2165 return 4U;
2166}
2167static inline u32 gr_cwd_gpc_tpc_id_tpc0_f(u32 v)
2168{
2169 return (v & 0xfU) << 0U;
2170}
2171static inline u32 gr_cwd_gpc_tpc_id_gpc0_s(void)
2172{
2173 return 4U;
2174}
2175static inline u32 gr_cwd_gpc_tpc_id_gpc0_f(u32 v)
2176{
2177 return (v & 0xfU) << 4U;
2178}
2179static inline u32 gr_cwd_gpc_tpc_id_tpc1_f(u32 v)
2180{
2181 return (v & 0xfU) << 8U;
2182}
2183static inline u32 gr_cwd_sm_id_r(u32 i)
2184{
2185 return 0x00405ba0U + i*4U;
2186}
2187static inline u32 gr_cwd_sm_id__size_1_v(void)
2188{
2189 return 0x00000010U;
2190}
2191static inline u32 gr_cwd_sm_id_tpc0_f(u32 v)
2192{
2193 return (v & 0xffU) << 0U;
2194}
2195static inline u32 gr_cwd_sm_id_tpc1_f(u32 v)
2196{
2197 return (v & 0xffU) << 8U;
2198}
2199static inline u32 gr_gpc0_fs_gpc_r(void)
2200{
2201 return 0x00502608U;
2202}
2203static inline u32 gr_gpc0_fs_gpc_num_available_tpcs_v(u32 r)
2204{
2205 return (r >> 0U) & 0x1fU;
2206}
2207static inline u32 gr_gpc0_fs_gpc_num_available_zculls_v(u32 r)
2208{
2209 return (r >> 16U) & 0x1fU;
2210}
2211static inline u32 gr_gpc0_cfg_r(void)
2212{
2213 return 0x00502620U;
2214}
2215static inline u32 gr_gpc0_cfg_imem_sz_v(u32 r)
2216{
2217 return (r >> 0U) & 0xffU;
2218}
2219static inline u32 gr_gpccs_rc_lanes_r(void)
2220{
2221 return 0x00502880U;
2222}
2223static inline u32 gr_gpccs_rc_lanes_num_chains_s(void)
2224{
2225 return 6U;
2226}
2227static inline u32 gr_gpccs_rc_lanes_num_chains_f(u32 v)
2228{
2229 return (v & 0x3fU) << 0U;
2230}
2231static inline u32 gr_gpccs_rc_lanes_num_chains_m(void)
2232{
2233 return 0x3fU << 0U;
2234}
2235static inline u32 gr_gpccs_rc_lanes_num_chains_v(u32 r)
2236{
2237 return (r >> 0U) & 0x3fU;
2238}
2239static inline u32 gr_gpccs_rc_lane_size_r(void)
2240{
2241 return 0x00502910U;
2242}
2243static inline u32 gr_gpccs_rc_lane_size_v_s(void)
2244{
2245 return 24U;
2246}
2247static inline u32 gr_gpccs_rc_lane_size_v_f(u32 v)
2248{
2249 return (v & 0xffffffU) << 0U;
2250}
2251static inline u32 gr_gpccs_rc_lane_size_v_m(void)
2252{
2253 return 0xffffffU << 0U;
2254}
2255static inline u32 gr_gpccs_rc_lane_size_v_v(u32 r)
2256{
2257 return (r >> 0U) & 0xffffffU;
2258}
2259static inline u32 gr_gpccs_rc_lane_size_v_0_v(void)
2260{
2261 return 0x00000000U;
2262}
2263static inline u32 gr_gpccs_rc_lane_size_v_0_f(void)
2264{
2265 return 0x0U;
2266}
2267static inline u32 gr_gpc0_zcull_fs_r(void)
2268{
2269 return 0x00500910U;
2270}
2271static inline u32 gr_gpc0_zcull_fs_num_sms_f(u32 v)
2272{
2273 return (v & 0x1ffU) << 0U;
2274}
2275static inline u32 gr_gpc0_zcull_fs_num_active_banks_f(u32 v)
2276{
2277 return (v & 0xfU) << 16U;
2278}
2279static inline u32 gr_gpc0_zcull_ram_addr_r(void)
2280{
2281 return 0x00500914U;
2282}
2283static inline u32 gr_gpc0_zcull_ram_addr_tiles_per_hypertile_row_per_gpc_f(u32 v)
2284{
2285 return (v & 0xfU) << 0U;
2286}
2287static inline u32 gr_gpc0_zcull_ram_addr_row_offset_f(u32 v)
2288{
2289 return (v & 0xfU) << 8U;
2290}
2291static inline u32 gr_gpc0_zcull_sm_num_rcp_r(void)
2292{
2293 return 0x00500918U;
2294}
2295static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative_f(u32 v)
2296{
2297 return (v & 0xffffffU) << 0U;
2298}
2299static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative__max_v(void)
2300{
2301 return 0x00800000U;
2302}
2303static inline u32 gr_gpc0_zcull_total_ram_size_r(void)
2304{
2305 return 0x00500920U;
2306}
2307static inline u32 gr_gpc0_zcull_total_ram_size_num_aliquots_f(u32 v)
2308{
2309 return (v & 0xffffU) << 0U;
2310}
2311static inline u32 gr_gpc0_zcull_zcsize_r(u32 i)
2312{
2313 return 0x00500a04U + i*32U;
2314}
2315static inline u32 gr_gpc0_zcull_zcsize_height_subregion__multiple_v(void)
2316{
2317 return 0x00000040U;
2318}
2319static inline u32 gr_gpc0_zcull_zcsize_width_subregion__multiple_v(void)
2320{
2321 return 0x00000010U;
2322}
2323static inline u32 gr_gpc0_gpm_pd_sm_id_r(u32 i)
2324{
2325 return 0x00500c10U + i*4U;
2326}
2327static inline u32 gr_gpc0_gpm_pd_sm_id_id_f(u32 v)
2328{
2329 return (v & 0xffU) << 0U;
2330}
2331static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_r(u32 i)
2332{
2333 return 0x00500c30U + i*4U;
2334}
2335static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(u32 r)
2336{
2337 return (r >> 0U) & 0xffU;
2338}
2339static inline u32 gr_gpc0_tpc0_pe_cfg_smid_r(void)
2340{
2341 return 0x00504088U;
2342}
2343static inline u32 gr_gpc0_tpc0_pe_cfg_smid_value_f(u32 v)
2344{
2345 return (v & 0xffffU) << 0U;
2346}
2347static inline u32 gr_gpc0_tpc0_sm_cfg_r(void)
2348{
2349 return 0x00504698U;
2350}
2351static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_f(u32 v)
2352{
2353 return (v & 0xffffU) << 0U;
2354}
2355static inline u32 gr_gpc0_tpc0_sm_arch_r(void)
2356{
2357 return 0x0050469cU;
2358}
2359static inline u32 gr_gpc0_tpc0_sm_arch_warp_count_v(u32 r)
2360{
2361 return (r >> 0U) & 0xffU;
2362}
2363static inline u32 gr_gpc0_tpc0_sm_arch_spa_version_v(u32 r)
2364{
2365 return (r >> 8U) & 0xfffU;
2366}
2367static inline u32 gr_gpc0_tpc0_sm_arch_sm_version_v(u32 r)
2368{
2369 return (r >> 20U) & 0xfffU;
2370}
2371static inline u32 gr_gpc0_ppc0_pes_vsc_strem_r(void)
2372{
2373 return 0x00503018U;
2374}
2375static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_m(void)
2376{
2377 return 0x1U << 0U;
2378}
2379static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_true_f(void)
2380{
2381 return 0x1U;
2382}
2383static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_r(void)
2384{
2385 return 0x005030c0U;
2386}
2387static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_f(u32 v)
2388{
2389 return (v & 0x3fffffU) << 0U;
2390}
2391static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_m(void)
2392{
2393 return 0x3fffffU << 0U;
2394}
2395static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_default_v(void)
2396{
2397 return 0x00000320U;
2398}
2399static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_gfxp_v(void)
2400{
2401 return 0x00000ba8U;
2402}
2403static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v(void)
2404{
2405 return 0x00000020U;
2406}
2407static inline u32 gr_gpc0_ppc0_cbm_beta_cb_offset_r(void)
2408{
2409 return 0x005030f4U;
2410}
2411static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_r(void)
2412{
2413 return 0x005030e4U;
2414}
2415static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(u32 v)
2416{
2417 return (v & 0xffffU) << 0U;
2418}
2419static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_m(void)
2420{
2421 return 0xffffU << 0U;
2422}
2423static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_default_v(void)
2424{
2425 return 0x00000800U;
2426}
2427static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_granularity_v(void)
2428{
2429 return 0x00000020U;
2430}
2431static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_offset_r(void)
2432{
2433 return 0x005030f8U;
2434}
2435static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_r(void)
2436{
2437 return 0x005030f0U;
2438}
2439static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_f(u32 v)
2440{
2441 return (v & 0x3fffffU) << 0U;
2442}
2443static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_default_v(void)
2444{
2445 return 0x00000320U;
2446}
2447static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_r(void)
2448{
2449 return 0x00419b00U;
2450}
2451static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_base_addr_43_12_f(u32 v)
2452{
2453 return (v & 0xffffffffU) << 0U;
2454}
2455static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_r(void)
2456{
2457 return 0x00419b04U;
2458}
2459static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_s(void)
2460{
2461 return 21U;
2462}
2463static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_f(u32 v)
2464{
2465 return (v & 0x1fffffU) << 0U;
2466}
2467static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_m(void)
2468{
2469 return 0x1fffffU << 0U;
2470}
2471static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_v(u32 r)
2472{
2473 return (r >> 0U) & 0x1fffffU;
2474}
2475static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_granularity_f(void)
2476{
2477 return 0x80U;
2478}
2479static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_s(void)
2480{
2481 return 1U;
2482}
2483static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_f(u32 v)
2484{
2485 return (v & 0x1U) << 31U;
2486}
2487static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_m(void)
2488{
2489 return 0x1U << 31U;
2490}
2491static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_v(u32 r)
2492{
2493 return (r >> 31U) & 0x1U;
2494}
2495static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_true_f(void)
2496{
2497 return 0x80000000U;
2498}
2499static inline u32 gr_gpccs_falcon_addr_r(void)
2500{
2501 return 0x0041a0acU;
2502}
2503static inline u32 gr_gpccs_falcon_addr_lsb_s(void)
2504{
2505 return 6U;
2506}
2507static inline u32 gr_gpccs_falcon_addr_lsb_f(u32 v)
2508{
2509 return (v & 0x3fU) << 0U;
2510}
2511static inline u32 gr_gpccs_falcon_addr_lsb_m(void)
2512{
2513 return 0x3fU << 0U;
2514}
2515static inline u32 gr_gpccs_falcon_addr_lsb_v(u32 r)
2516{
2517 return (r >> 0U) & 0x3fU;
2518}
2519static inline u32 gr_gpccs_falcon_addr_lsb_init_v(void)
2520{
2521 return 0x00000000U;
2522}
2523static inline u32 gr_gpccs_falcon_addr_lsb_init_f(void)
2524{
2525 return 0x0U;
2526}
2527static inline u32 gr_gpccs_falcon_addr_msb_s(void)
2528{
2529 return 6U;
2530}
2531static inline u32 gr_gpccs_falcon_addr_msb_f(u32 v)
2532{
2533 return (v & 0x3fU) << 6U;
2534}
2535static inline u32 gr_gpccs_falcon_addr_msb_m(void)
2536{
2537 return 0x3fU << 6U;
2538}
2539static inline u32 gr_gpccs_falcon_addr_msb_v(u32 r)
2540{
2541 return (r >> 6U) & 0x3fU;
2542}
2543static inline u32 gr_gpccs_falcon_addr_msb_init_v(void)
2544{
2545 return 0x00000000U;
2546}
2547static inline u32 gr_gpccs_falcon_addr_msb_init_f(void)
2548{
2549 return 0x0U;
2550}
2551static inline u32 gr_gpccs_falcon_addr_ext_s(void)
2552{
2553 return 12U;
2554}
2555static inline u32 gr_gpccs_falcon_addr_ext_f(u32 v)
2556{
2557 return (v & 0xfffU) << 0U;
2558}
2559static inline u32 gr_gpccs_falcon_addr_ext_m(void)
2560{
2561 return 0xfffU << 0U;
2562}
2563static inline u32 gr_gpccs_falcon_addr_ext_v(u32 r)
2564{
2565 return (r >> 0U) & 0xfffU;
2566}
2567static inline u32 gr_gpccs_cpuctl_r(void)
2568{
2569 return 0x0041a100U;
2570}
2571static inline u32 gr_gpccs_cpuctl_startcpu_f(u32 v)
2572{
2573 return (v & 0x1U) << 1U;
2574}
2575static inline u32 gr_gpccs_dmactl_r(void)
2576{
2577 return 0x0041a10cU;
2578}
2579static inline u32 gr_gpccs_dmactl_require_ctx_f(u32 v)
2580{
2581 return (v & 0x1U) << 0U;
2582}
2583static inline u32 gr_gpccs_dmactl_dmem_scrubbing_m(void)
2584{
2585 return 0x1U << 1U;
2586}
2587static inline u32 gr_gpccs_dmactl_imem_scrubbing_m(void)
2588{
2589 return 0x1U << 2U;
2590}
2591static inline u32 gr_gpccs_imemc_r(u32 i)
2592{
2593 return 0x0041a180U + i*16U;
2594}
2595static inline u32 gr_gpccs_imemc_offs_f(u32 v)
2596{
2597 return (v & 0x3fU) << 2U;
2598}
2599static inline u32 gr_gpccs_imemc_blk_f(u32 v)
2600{
2601 return (v & 0xffU) << 8U;
2602}
2603static inline u32 gr_gpccs_imemc_aincw_f(u32 v)
2604{
2605 return (v & 0x1U) << 24U;
2606}
2607static inline u32 gr_gpccs_imemd_r(u32 i)
2608{
2609 return 0x0041a184U + i*16U;
2610}
2611static inline u32 gr_gpccs_imemt_r(u32 i)
2612{
2613 return 0x0041a188U + i*16U;
2614}
2615static inline u32 gr_gpccs_imemt__size_1_v(void)
2616{
2617 return 0x00000004U;
2618}
2619static inline u32 gr_gpccs_imemt_tag_f(u32 v)
2620{
2621 return (v & 0xffffU) << 0U;
2622}
2623static inline u32 gr_gpccs_dmemc_r(u32 i)
2624{
2625 return 0x0041a1c0U + i*8U;
2626}
2627static inline u32 gr_gpccs_dmemc_offs_f(u32 v)
2628{
2629 return (v & 0x3fU) << 2U;
2630}
2631static inline u32 gr_gpccs_dmemc_blk_f(u32 v)
2632{
2633 return (v & 0xffU) << 8U;
2634}
2635static inline u32 gr_gpccs_dmemc_aincw_f(u32 v)
2636{
2637 return (v & 0x1U) << 24U;
2638}
2639static inline u32 gr_gpccs_dmemd_r(u32 i)
2640{
2641 return 0x0041a1c4U + i*8U;
2642}
2643static inline u32 gr_gpccs_ctxsw_mailbox_r(u32 i)
2644{
2645 return 0x0041a800U + i*4U;
2646}
2647static inline u32 gr_gpccs_ctxsw_mailbox_value_f(u32 v)
2648{
2649 return (v & 0xffffffffU) << 0U;
2650}
2651static inline u32 gr_gpcs_swdx_bundle_cb_base_r(void)
2652{
2653 return 0x00418e24U;
2654}
2655static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_s(void)
2656{
2657 return 32U;
2658}
2659static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_f(u32 v)
2660{
2661 return (v & 0xffffffffU) << 0U;
2662}
2663static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_m(void)
2664{
2665 return 0xffffffffU << 0U;
2666}
2667static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_v(u32 r)
2668{
2669 return (r >> 0U) & 0xffffffffU;
2670}
2671static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_v(void)
2672{
2673 return 0x00000000U;
2674}
2675static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_f(void)
2676{
2677 return 0x0U;
2678}
2679static inline u32 gr_gpcs_swdx_bundle_cb_size_r(void)
2680{
2681 return 0x00418e28U;
2682}
2683static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_s(void)
2684{
2685 return 11U;
2686}
2687static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_f(u32 v)
2688{
2689 return (v & 0x7ffU) << 0U;
2690}
2691static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_m(void)
2692{
2693 return 0x7ffU << 0U;
2694}
2695static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_v(u32 r)
2696{
2697 return (r >> 0U) & 0x7ffU;
2698}
2699static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_v(void)
2700{
2701 return 0x00000030U;
2702}
2703static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_f(void)
2704{
2705 return 0x30U;
2706}
2707static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_s(void)
2708{
2709 return 1U;
2710}
2711static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_f(u32 v)
2712{
2713 return (v & 0x1U) << 31U;
2714}
2715static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_m(void)
2716{
2717 return 0x1U << 31U;
2718}
2719static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_v(u32 r)
2720{
2721 return (r >> 31U) & 0x1U;
2722}
2723static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_v(void)
2724{
2725 return 0x00000000U;
2726}
2727static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_f(void)
2728{
2729 return 0x0U;
2730}
2731static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_v(void)
2732{
2733 return 0x00000001U;
2734}
2735static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_f(void)
2736{
2737 return 0x80000000U;
2738}
2739static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_r(void)
2740{
2741 return 0x005001dcU;
2742}
2743static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_f(u32 v)
2744{
2745 return (v & 0xffffU) << 0U;
2746}
2747static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_default_v(void)
2748{
2749 return 0x00000de0U;
2750}
2751static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_byte_granularity_v(void)
2752{
2753 return 0x00000100U;
2754}
2755static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_r(void)
2756{
2757 return 0x005001d8U;
2758}
2759static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_f(u32 v)
2760{
2761 return (v & 0xffffffffU) << 0U;
2762}
2763static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_align_bits_v(void)
2764{
2765 return 0x00000008U;
2766}
2767static inline u32 gr_gpcs_swdx_beta_cb_ctrl_r(void)
2768{
2769 return 0x004181e4U;
2770}
2771static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_f(u32 v)
2772{
2773 return (v & 0xfffU) << 0U;
2774}
2775static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_gfxp_v(void)
2776{
2777 return 0x00000100U;
2778}
2779static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_r(void)
2780{
2781 return 0x0041befcU;
2782}
2783static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_cbes_reserve_f(u32 v)
2784{
2785 return (v & 0xfffU) << 0U;
2786}
2787static inline u32 gr_gpcs_swdx_tc_beta_cb_size_r(u32 i)
2788{
2789 return 0x00418ea0U + i*4U;
2790}
2791static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_f(u32 v)
2792{
2793 return (v & 0x3fffffU) << 0U;
2794}
2795static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_m(void)
2796{
2797 return 0x3fffffU << 0U;
2798}
2799static inline u32 gr_gpcs_swdx_dss_zbc_color_r_r(u32 i)
2800{
2801 return 0x00418010U + i*4U;
2802}
2803static inline u32 gr_gpcs_swdx_dss_zbc_color_r_val_f(u32 v)
2804{
2805 return (v & 0xffffffffU) << 0U;
2806}
2807static inline u32 gr_gpcs_swdx_dss_zbc_color_g_r(u32 i)
2808{
2809 return 0x0041804cU + i*4U;
2810}
2811static inline u32 gr_gpcs_swdx_dss_zbc_color_g_val_f(u32 v)
2812{
2813 return (v & 0xffffffffU) << 0U;
2814}
2815static inline u32 gr_gpcs_swdx_dss_zbc_color_b_r(u32 i)
2816{
2817 return 0x00418088U + i*4U;
2818}
2819static inline u32 gr_gpcs_swdx_dss_zbc_color_b_val_f(u32 v)
2820{
2821 return (v & 0xffffffffU) << 0U;
2822}
2823static inline u32 gr_gpcs_swdx_dss_zbc_color_a_r(u32 i)
2824{
2825 return 0x004180c4U + i*4U;
2826}
2827static inline u32 gr_gpcs_swdx_dss_zbc_color_a_val_f(u32 v)
2828{
2829 return (v & 0xffffffffU) << 0U;
2830}
2831static inline u32 gr_gpcs_swdx_dss_zbc_c_01_to_04_format_r(void)
2832{
2833 return 0x00500100U;
2834}
2835static inline u32 gr_gpcs_swdx_dss_zbc_z_r(u32 i)
2836{
2837 return 0x00418110U + i*4U;
2838}
2839static inline u32 gr_gpcs_swdx_dss_zbc_z_val_f(u32 v)
2840{
2841 return (v & 0xffffffffU) << 0U;
2842}
2843static inline u32 gr_gpcs_swdx_dss_zbc_z_01_to_04_format_r(void)
2844{
2845 return 0x0050014cU;
2846}
2847static inline u32 gr_gpcs_setup_attrib_cb_base_r(void)
2848{
2849 return 0x00418810U;
2850}
2851static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_f(u32 v)
2852{
2853 return (v & 0xfffffffU) << 0U;
2854}
2855static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_align_bits_v(void)
2856{
2857 return 0x0000000cU;
2858}
2859static inline u32 gr_gpcs_setup_attrib_cb_base_valid_true_f(void)
2860{
2861 return 0x80000000U;
2862}
2863static inline u32 gr_crstr_gpc_map0_r(void)
2864{
2865 return 0x00418b08U;
2866}
2867static inline u32 gr_crstr_gpc_map0_tile0_f(u32 v)
2868{
2869 return (v & 0x7U) << 0U;
2870}
2871static inline u32 gr_crstr_gpc_map0_tile1_f(u32 v)
2872{
2873 return (v & 0x7U) << 5U;
2874}
2875static inline u32 gr_crstr_gpc_map0_tile2_f(u32 v)
2876{
2877 return (v & 0x7U) << 10U;
2878}
2879static inline u32 gr_crstr_gpc_map0_tile3_f(u32 v)
2880{
2881 return (v & 0x7U) << 15U;
2882}
2883static inline u32 gr_crstr_gpc_map0_tile4_f(u32 v)
2884{
2885 return (v & 0x7U) << 20U;
2886}
2887static inline u32 gr_crstr_gpc_map0_tile5_f(u32 v)
2888{
2889 return (v & 0x7U) << 25U;
2890}
2891static inline u32 gr_crstr_gpc_map1_r(void)
2892{
2893 return 0x00418b0cU;
2894}
2895static inline u32 gr_crstr_gpc_map1_tile6_f(u32 v)
2896{
2897 return (v & 0x7U) << 0U;
2898}
2899static inline u32 gr_crstr_gpc_map1_tile7_f(u32 v)
2900{
2901 return (v & 0x7U) << 5U;
2902}
2903static inline u32 gr_crstr_gpc_map1_tile8_f(u32 v)
2904{
2905 return (v & 0x7U) << 10U;
2906}
2907static inline u32 gr_crstr_gpc_map1_tile9_f(u32 v)
2908{
2909 return (v & 0x7U) << 15U;
2910}
2911static inline u32 gr_crstr_gpc_map1_tile10_f(u32 v)
2912{
2913 return (v & 0x7U) << 20U;
2914}
2915static inline u32 gr_crstr_gpc_map1_tile11_f(u32 v)
2916{
2917 return (v & 0x7U) << 25U;
2918}
2919static inline u32 gr_crstr_gpc_map2_r(void)
2920{
2921 return 0x00418b10U;
2922}
2923static inline u32 gr_crstr_gpc_map2_tile12_f(u32 v)
2924{
2925 return (v & 0x7U) << 0U;
2926}
2927static inline u32 gr_crstr_gpc_map2_tile13_f(u32 v)
2928{
2929 return (v & 0x7U) << 5U;
2930}
2931static inline u32 gr_crstr_gpc_map2_tile14_f(u32 v)
2932{
2933 return (v & 0x7U) << 10U;
2934}
2935static inline u32 gr_crstr_gpc_map2_tile15_f(u32 v)
2936{
2937 return (v & 0x7U) << 15U;
2938}
2939static inline u32 gr_crstr_gpc_map2_tile16_f(u32 v)
2940{
2941 return (v & 0x7U) << 20U;
2942}
2943static inline u32 gr_crstr_gpc_map2_tile17_f(u32 v)
2944{
2945 return (v & 0x7U) << 25U;
2946}
2947static inline u32 gr_crstr_gpc_map3_r(void)
2948{
2949 return 0x00418b14U;
2950}
2951static inline u32 gr_crstr_gpc_map3_tile18_f(u32 v)
2952{
2953 return (v & 0x7U) << 0U;
2954}
2955static inline u32 gr_crstr_gpc_map3_tile19_f(u32 v)
2956{
2957 return (v & 0x7U) << 5U;
2958}
2959static inline u32 gr_crstr_gpc_map3_tile20_f(u32 v)
2960{
2961 return (v & 0x7U) << 10U;
2962}
2963static inline u32 gr_crstr_gpc_map3_tile21_f(u32 v)
2964{
2965 return (v & 0x7U) << 15U;
2966}
2967static inline u32 gr_crstr_gpc_map3_tile22_f(u32 v)
2968{
2969 return (v & 0x7U) << 20U;
2970}
2971static inline u32 gr_crstr_gpc_map3_tile23_f(u32 v)
2972{
2973 return (v & 0x7U) << 25U;
2974}
2975static inline u32 gr_crstr_gpc_map4_r(void)
2976{
2977 return 0x00418b18U;
2978}
2979static inline u32 gr_crstr_gpc_map4_tile24_f(u32 v)
2980{
2981 return (v & 0x7U) << 0U;
2982}
2983static inline u32 gr_crstr_gpc_map4_tile25_f(u32 v)
2984{
2985 return (v & 0x7U) << 5U;
2986}
2987static inline u32 gr_crstr_gpc_map4_tile26_f(u32 v)
2988{
2989 return (v & 0x7U) << 10U;
2990}
2991static inline u32 gr_crstr_gpc_map4_tile27_f(u32 v)
2992{
2993 return (v & 0x7U) << 15U;
2994}
2995static inline u32 gr_crstr_gpc_map4_tile28_f(u32 v)
2996{
2997 return (v & 0x7U) << 20U;
2998}
2999static inline u32 gr_crstr_gpc_map4_tile29_f(u32 v)
3000{
3001 return (v & 0x7U) << 25U;
3002}
3003static inline u32 gr_crstr_gpc_map5_r(void)
3004{
3005 return 0x00418b1cU;
3006}
3007static inline u32 gr_crstr_gpc_map5_tile30_f(u32 v)
3008{
3009 return (v & 0x7U) << 0U;
3010}
3011static inline u32 gr_crstr_gpc_map5_tile31_f(u32 v)
3012{
3013 return (v & 0x7U) << 5U;
3014}
3015static inline u32 gr_crstr_gpc_map5_tile32_f(u32 v)
3016{
3017 return (v & 0x7U) << 10U;
3018}
3019static inline u32 gr_crstr_gpc_map5_tile33_f(u32 v)
3020{
3021 return (v & 0x7U) << 15U;
3022}
3023static inline u32 gr_crstr_gpc_map5_tile34_f(u32 v)
3024{
3025 return (v & 0x7U) << 20U;
3026}
3027static inline u32 gr_crstr_gpc_map5_tile35_f(u32 v)
3028{
3029 return (v & 0x7U) << 25U;
3030}
3031static inline u32 gr_crstr_map_table_cfg_r(void)
3032{
3033 return 0x00418bb8U;
3034}
3035static inline u32 gr_crstr_map_table_cfg_row_offset_f(u32 v)
3036{
3037 return (v & 0xffU) << 0U;
3038}
3039static inline u32 gr_crstr_map_table_cfg_num_entries_f(u32 v)
3040{
3041 return (v & 0xffU) << 8U;
3042}
3043static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_r(void)
3044{
3045 return 0x00418980U;
3046}
3047static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_0_f(u32 v)
3048{
3049 return (v & 0x7U) << 0U;
3050}
3051static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_1_f(u32 v)
3052{
3053 return (v & 0x7U) << 4U;
3054}
3055static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_2_f(u32 v)
3056{
3057 return (v & 0x7U) << 8U;
3058}
3059static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_3_f(u32 v)
3060{
3061 return (v & 0x7U) << 12U;
3062}
3063static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_4_f(u32 v)
3064{
3065 return (v & 0x7U) << 16U;
3066}
3067static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_5_f(u32 v)
3068{
3069 return (v & 0x7U) << 20U;
3070}
3071static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_6_f(u32 v)
3072{
3073 return (v & 0x7U) << 24U;
3074}
3075static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_7_f(u32 v)
3076{
3077 return (v & 0x7U) << 28U;
3078}
3079static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_r(void)
3080{
3081 return 0x00418984U;
3082}
3083static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_8_f(u32 v)
3084{
3085 return (v & 0x7U) << 0U;
3086}
3087static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_9_f(u32 v)
3088{
3089 return (v & 0x7U) << 4U;
3090}
3091static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_10_f(u32 v)
3092{
3093 return (v & 0x7U) << 8U;
3094}
3095static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_11_f(u32 v)
3096{
3097 return (v & 0x7U) << 12U;
3098}
3099static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_12_f(u32 v)
3100{
3101 return (v & 0x7U) << 16U;
3102}
3103static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_13_f(u32 v)
3104{
3105 return (v & 0x7U) << 20U;
3106}
3107static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_14_f(u32 v)
3108{
3109 return (v & 0x7U) << 24U;
3110}
3111static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_15_f(u32 v)
3112{
3113 return (v & 0x7U) << 28U;
3114}
3115static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_r(void)
3116{
3117 return 0x00418988U;
3118}
3119static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_16_f(u32 v)
3120{
3121 return (v & 0x7U) << 0U;
3122}
3123static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_17_f(u32 v)
3124{
3125 return (v & 0x7U) << 4U;
3126}
3127static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_18_f(u32 v)
3128{
3129 return (v & 0x7U) << 8U;
3130}
3131static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_19_f(u32 v)
3132{
3133 return (v & 0x7U) << 12U;
3134}
3135static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_20_f(u32 v)
3136{
3137 return (v & 0x7U) << 16U;
3138}
3139static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_21_f(u32 v)
3140{
3141 return (v & 0x7U) << 20U;
3142}
3143static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_22_f(u32 v)
3144{
3145 return (v & 0x7U) << 24U;
3146}
3147static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_s(void)
3148{
3149 return 3U;
3150}
3151static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_f(u32 v)
3152{
3153 return (v & 0x7U) << 28U;
3154}
3155static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_m(void)
3156{
3157 return 0x7U << 28U;
3158}
3159static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_v(u32 r)
3160{
3161 return (r >> 28U) & 0x7U;
3162}
3163static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_r(void)
3164{
3165 return 0x0041898cU;
3166}
3167static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_24_f(u32 v)
3168{
3169 return (v & 0x7U) << 0U;
3170}
3171static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_25_f(u32 v)
3172{
3173 return (v & 0x7U) << 4U;
3174}
3175static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_26_f(u32 v)
3176{
3177 return (v & 0x7U) << 8U;
3178}
3179static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_27_f(u32 v)
3180{
3181 return (v & 0x7U) << 12U;
3182}
3183static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_28_f(u32 v)
3184{
3185 return (v & 0x7U) << 16U;
3186}
3187static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_29_f(u32 v)
3188{
3189 return (v & 0x7U) << 20U;
3190}
3191static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_30_f(u32 v)
3192{
3193 return (v & 0x7U) << 24U;
3194}
3195static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_31_f(u32 v)
3196{
3197 return (v & 0x7U) << 28U;
3198}
3199static inline u32 gr_gpcs_gpm_pd_cfg_r(void)
3200{
3201 return 0x00418c6cU;
3202}
3203static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_disable_f(void)
3204{
3205 return 0x0U;
3206}
3207static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_enable_f(void)
3208{
3209 return 0x1U;
3210}
3211static inline u32 gr_gpcs_gcc_pagepool_base_r(void)
3212{
3213 return 0x00419004U;
3214}
3215static inline u32 gr_gpcs_gcc_pagepool_base_addr_39_8_f(u32 v)
3216{
3217 return (v & 0xffffffffU) << 0U;
3218}
3219static inline u32 gr_gpcs_gcc_pagepool_r(void)
3220{
3221 return 0x00419008U;
3222}
3223static inline u32 gr_gpcs_gcc_pagepool_total_pages_f(u32 v)
3224{
3225 return (v & 0x3ffU) << 0U;
3226}
3227static inline u32 gr_gpcs_tpcs_pe_vaf_r(void)
3228{
3229 return 0x0041980cU;
3230}
3231static inline u32 gr_gpcs_tpcs_pe_vaf_fast_mode_switch_true_f(void)
3232{
3233 return 0x10U;
3234}
3235static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_r(void)
3236{
3237 return 0x00419848U;
3238}
3239static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_v_f(u32 v)
3240{
3241 return (v & 0xfffffffU) << 0U;
3242}
3243static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_f(u32 v)
3244{
3245 return (v & 0x1U) << 28U;
3246}
3247static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_true_f(void)
3248{
3249 return 0x10000000U;
3250}
3251static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_r(void)
3252{
3253 return 0x00419c00U;
3254}
3255static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_disabled_f(void)
3256{
3257 return 0x0U;
3258}
3259static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_enabled_f(void)
3260{
3261 return 0x8U;
3262}
3263static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_r(void)
3264{
3265 return 0x00419c2cU;
3266}
3267static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_v_f(u32 v)
3268{
3269 return (v & 0xfffffffU) << 0U;
3270}
3271static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_f(u32 v)
3272{
3273 return (v & 0x1U) << 28U;
3274}
3275static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_true_f(void)
3276{
3277 return 0x10000000U;
3278}
3279static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_r(void)
3280{
3281 return 0x00419e44U;
3282}
3283static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_stack_error_report_f(void)
3284{
3285 return 0x2U;
3286}
3287static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_api_stack_error_report_f(void)
3288{
3289 return 0x4U;
3290}
3291static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_ret_empty_stack_error_report_f(void)
3292{
3293 return 0x8U;
3294}
3295static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_wrap_report_f(void)
3296{
3297 return 0x10U;
3298}
3299static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_pc_report_f(void)
3300{
3301 return 0x20U;
3302}
3303static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_overflow_report_f(void)
3304{
3305 return 0x40U;
3306}
3307static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_immc_addr_report_f(void)
3308{
3309 return 0x80U;
3310}
3311static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_reg_report_f(void)
3312{
3313 return 0x100U;
3314}
3315static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_encoding_report_f(void)
3316{
3317 return 0x200U;
3318}
3319static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_sph_instr_combo_report_f(void)
3320{
3321 return 0x400U;
3322}
3323static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param_report_f(void)
3324{
3325 return 0x800U;
3326}
3327static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_report_f(void)
3328{
3329 return 0x1000U;
3330}
3331static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_reg_report_f(void)
3332{
3333 return 0x2000U;
3334}
3335static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_addr_report_f(void)
3336{
3337 return 0x4000U;
3338}
3339static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_addr_report_f(void)
3340{
3341 return 0x8000U;
3342}
3343static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_addr_space_report_f(void)
3344{
3345 return 0x10000U;
3346}
3347static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param2_report_f(void)
3348{
3349 return 0x20000U;
3350}
3351static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_ldc_report_f(void)
3352{
3353 return 0x40000U;
3354}
3355static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_mmu_fault_report_f(void)
3356{
3357 return 0x800000U;
3358}
3359static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_stack_overflow_report_f(void)
3360{
3361 return 0x400000U;
3362}
3363static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_geometry_sm_error_report_f(void)
3364{
3365 return 0x80000U;
3366}
3367static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_divergent_report_f(void)
3368{
3369 return 0x100000U;
3370}
3371static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_report_mask_r(void)
3372{
3373 return 0x00504644U;
3374}
3375static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_r(void)
3376{
3377 return 0x00419e4cU;
3378}
3379static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_sm_to_sm_fault_report_f(void)
3380{
3381 return 0x1U;
3382}
3383static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_l1_error_report_f(void)
3384{
3385 return 0x2U;
3386}
3387static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_multiple_warp_errors_report_f(void)
3388{
3389 return 0x4U;
3390}
3391static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_physical_stack_overflow_error_report_f(void)
3392{
3393 return 0x8U;
3394}
3395static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_int_report_f(void)
3396{
3397 return 0x10U;
3398}
3399static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_ecc_sec_error_report_f(void)
3400{
3401 return 0x20000000U;
3402}
3403static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_ecc_ded_error_report_f(void)
3404{
3405 return 0x40000000U;
3406}
3407static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_pause_report_f(void)
3408{
3409 return 0x20U;
3410}
3411static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_single_step_complete_report_f(void)
3412{
3413 return 0x40U;
3414}
3415static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_report_mask_r(void)
3416{
3417 return 0x0050464cU;
3418}
3419static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void)
3420{
3421 return 0x00419d0cU;
3422}
3423static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f(void)
3424{
3425 return 0x2U;
3426}
3427static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_tex_enabled_f(void)
3428{
3429 return 0x1U;
3430}
3431static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
3432{
3433 return 0x0050450cU;
3434}
3435static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_v(u32 r)
3436{
3437 return (r >> 1U) & 0x1U;
3438}
3439static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_enabled_f(void)
3440{
3441 return 0x2U;
3442}
3443static inline u32 gr_gpcs_gpccs_gpc_exception_en_r(void)
3444{
3445 return 0x0041ac94U;
3446}
3447static inline u32 gr_gpcs_gpccs_gpc_exception_en_tpc_f(u32 v)
3448{
3449 return (v & 0xffU) << 16U;
3450}
3451static inline u32 gr_gpc0_gpccs_gpc_exception_r(void)
3452{
3453 return 0x00502c90U;
3454}
3455static inline u32 gr_gpc0_gpccs_gpc_exception_gcc_v(u32 r)
3456{
3457 return (r >> 2U) & 0x1U;
3458}
3459static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_v(u32 r)
3460{
3461 return (r >> 16U) & 0xffU;
3462}
3463static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_0_pending_v(void)
3464{
3465 return 0x00000001U;
3466}
3467static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_r(void)
3468{
3469 return 0x00504508U;
3470}
3471static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_v(u32 r)
3472{
3473 return (r >> 0U) & 0x1U;
3474}
3475static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_pending_v(void)
3476{
3477 return 0x00000001U;
3478}
3479static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_v(u32 r)
3480{
3481 return (r >> 1U) & 0x1U;
3482}
3483static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_pending_v(void)
3484{
3485 return 0x00000001U;
3486}
3487static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_r(void)
3488{
3489 return 0x00504610U;
3490}
3491static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_m(void)
3492{
3493 return 0x1U << 0U;
3494}
3495static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_v(u32 r)
3496{
3497 return (r >> 0U) & 0x1U;
3498}
3499static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_on_v(void)
3500{
3501 return 0x00000001U;
3502}
3503static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_on_f(void)
3504{
3505 return 0x1U;
3506}
3507static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_off_v(void)
3508{
3509 return 0x00000000U;
3510}
3511static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_off_f(void)
3512{
3513 return 0x0U;
3514}
3515static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_enable_f(void)
3516{
3517 return 0x80000000U;
3518}
3519static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_disable_f(void)
3520{
3521 return 0x0U;
3522}
3523static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_run_trigger_task_f(void)
3524{
3525 return 0x40000000U;
3526}
3527static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_m(void)
3528{
3529 return 0x1U << 1U;
3530}
3531static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_v(u32 r)
3532{
3533 return (r >> 1U) & 0x1U;
3534}
3535static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_disable_f(void)
3536{
3537 return 0x0U;
3538}
3539static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_m(void)
3540{
3541 return 0x1U << 2U;
3542}
3543static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_v(u32 r)
3544{
3545 return (r >> 2U) & 0x1U;
3546}
3547static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_disable_f(void)
3548{
3549 return 0x0U;
3550}
3551static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_r(void)
3552{
3553 return 0x00504614U;
3554}
3555static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_1_r(void)
3556{
3557 return 0x00504618U;
3558}
3559static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_r(void)
3560{
3561 return 0x00504624U;
3562}
3563static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_1_r(void)
3564{
3565 return 0x00504628U;
3566}
3567static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_r(void)
3568{
3569 return 0x00504634U;
3570}
3571static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_1_r(void)
3572{
3573 return 0x00504638U;
3574}
3575static inline u32 gr_gpcs_tpcs_sm_dbgr_bpt_pause_mask_r(void)
3576{
3577 return 0x00419e24U;
3578}
3579static inline u32 gr_gpcs_tpcs_sm_dbgr_bpt_pause_mask_stop_on_any_warp_disable_v(void)
3580{
3581 return 0x00000000U;
3582}
3583static inline u32 gr_gpcs_tpcs_sm_dbgr_bpt_pause_mask_stop_on_any_sm_disable_v(void)
3584{
3585 return 0x00000000U;
3586}
3587static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_r(void)
3588{
3589 return 0x0050460cU;
3590}
3591static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_sm_in_trap_mode_v(u32 r)
3592{
3593 return (r >> 0U) & 0x1U;
3594}
3595static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_v(u32 r)
3596{
3597 return (r >> 4U) & 0x1U;
3598}
3599static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_true_v(void)
3600{
3601 return 0x00000001U;
3602}
3603static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_r(void)
3604{
3605 return 0x00419e50U;
3606}
3607static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_int_pending_f(void)
3608{
3609 return 0x10U;
3610}
3611static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_pause_pending_f(void)
3612{
3613 return 0x20U;
3614}
3615static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_single_step_complete_pending_f(void)
3616{
3617 return 0x40U;
3618}
3619static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_r(void)
3620{
3621 return 0x00504650U;
3622}
3623static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_int_pending_f(void)
3624{
3625 return 0x10U;
3626}
3627static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_ecc_sec_error_pending_f(void)
3628{
3629 return 0x20000000U;
3630}
3631static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_ecc_ded_error_pending_f(void)
3632{
3633 return 0x40000000U;
3634}
3635static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_pause_pending_f(void)
3636{
3637 return 0x20U;
3638}
3639static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_single_step_complete_pending_f(void)
3640{
3641 return 0x40U;
3642}
3643static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_r(void)
3644{
3645 return 0x00504224U;
3646}
3647static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_intr_pending_f(void)
3648{
3649 return 0x1U;
3650}
3651static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_r(void)
3652{
3653 return 0x00504648U;
3654}
3655static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_v(u32 r)
3656{
3657 return (r >> 0U) & 0xffffU;
3658}
3659static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_v(void)
3660{
3661 return 0x00000000U;
3662}
3663static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_f(void)
3664{
3665 return 0x0U;
3666}
3667static inline u32 gr_gpc0_tpc0_sm_halfctl_ctrl_r(void)
3668{
3669 return 0x00504770U;
3670}
3671static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_r(void)
3672{
3673 return 0x00419f70U;
3674}
3675static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_m(void)
3676{
3677 return 0x1U << 4U;
3678}
3679static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_f(u32 v)
3680{
3681 return (v & 0x1U) << 4U;
3682}
3683static inline u32 gr_gpc0_tpc0_sm_debug_sfe_control_r(void)
3684{
3685 return 0x0050477cU;
3686}
3687static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_r(void)
3688{
3689 return 0x00419f7cU;
3690}
3691static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_m(void)
3692{
3693 return 0x1U << 0U;
3694}
3695static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_f(u32 v)
3696{
3697 return (v & 0x1U) << 0U;
3698}
3699static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_r(void)
3700{
3701 return 0x0041be08U;
3702}
3703static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_fast_mode_switch_true_f(void)
3704{
3705 return 0x4U;
3706}
3707static inline u32 gr_ppcs_wwdx_map_gpc_map0_r(void)
3708{
3709 return 0x0041bf00U;
3710}
3711static inline u32 gr_ppcs_wwdx_map_gpc_map1_r(void)
3712{
3713 return 0x0041bf04U;
3714}
3715static inline u32 gr_ppcs_wwdx_map_gpc_map2_r(void)
3716{
3717 return 0x0041bf08U;
3718}
3719static inline u32 gr_ppcs_wwdx_map_gpc_map3_r(void)
3720{
3721 return 0x0041bf0cU;
3722}
3723static inline u32 gr_ppcs_wwdx_map_gpc_map4_r(void)
3724{
3725 return 0x0041bf10U;
3726}
3727static inline u32 gr_ppcs_wwdx_map_gpc_map5_r(void)
3728{
3729 return 0x0041bf14U;
3730}
3731static inline u32 gr_ppcs_wwdx_map_table_cfg_r(void)
3732{
3733 return 0x0041bfd0U;
3734}
3735static inline u32 gr_ppcs_wwdx_map_table_cfg_row_offset_f(u32 v)
3736{
3737 return (v & 0xffU) << 0U;
3738}
3739static inline u32 gr_ppcs_wwdx_map_table_cfg_num_entries_f(u32 v)
3740{
3741 return (v & 0xffU) << 8U;
3742}
3743static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_num_entries_f(u32 v)
3744{
3745 return (v & 0x1fU) << 16U;
3746}
3747static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_shift_value_f(u32 v)
3748{
3749 return (v & 0x7U) << 21U;
3750}
3751static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff5_mod_value_f(u32 v)
3752{
3753 return (v & 0x1fU) << 24U;
3754}
3755static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_r(void)
3756{
3757 return 0x0041bfd4U;
3758}
3759static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_conservative_f(u32 v)
3760{
3761 return (v & 0xffffffU) << 0U;
3762}
3763static inline u32 gr_ppcs_wwdx_map_table_cfg2_r(void)
3764{
3765 return 0x0041bfe4U;
3766}
3767static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff6_mod_value_f(u32 v)
3768{
3769 return (v & 0x1fU) << 0U;
3770}
3771static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff7_mod_value_f(u32 v)
3772{
3773 return (v & 0x1fU) << 5U;
3774}
3775static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff8_mod_value_f(u32 v)
3776{
3777 return (v & 0x1fU) << 10U;
3778}
3779static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff9_mod_value_f(u32 v)
3780{
3781 return (v & 0x1fU) << 15U;
3782}
3783static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff10_mod_value_f(u32 v)
3784{
3785 return (v & 0x1fU) << 20U;
3786}
3787static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff11_mod_value_f(u32 v)
3788{
3789 return (v & 0x1fU) << 25U;
3790}
3791static inline u32 gr_bes_zrop_settings_r(void)
3792{
3793 return 0x00408850U;
3794}
3795static inline u32 gr_bes_zrop_settings_num_active_ltcs_f(u32 v)
3796{
3797 return (v & 0xfU) << 0U;
3798}
3799static inline u32 gr_be0_crop_debug3_r(void)
3800{
3801 return 0x00410108U;
3802}
3803static inline u32 gr_bes_crop_debug3_r(void)
3804{
3805 return 0x00408908U;
3806}
3807static inline u32 gr_bes_crop_debug3_comp_vdc_4to2_disable_m(void)
3808{
3809 return 0x1U << 31U;
3810}
3811static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_m(void)
3812{
3813 return 0x1U << 1U;
3814}
3815static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_disabled_f(void)
3816{
3817 return 0x0U;
3818}
3819static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_enabled_f(void)
3820{
3821 return 0x2U;
3822}
3823static inline u32 gr_bes_crop_debug3_blendopt_fill_override_m(void)
3824{
3825 return 0x1U << 2U;
3826}
3827static inline u32 gr_bes_crop_debug3_blendopt_fill_override_disabled_f(void)
3828{
3829 return 0x0U;
3830}
3831static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
3832{
3833 return 0x4U;
3834}
3835static inline u32 gr_bes_crop_debug4_r(void)
3836{
3837 return 0x0040894cU;
3838}
3839static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
3840{
3841 return 0x1U << 18U;
3842}
3843static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
3844{
3845 return 0x0U;
3846}
3847static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
3848{
3849 return 0x40000U;
3850}
3851static inline u32 gr_bes_crop_settings_r(void)
3852{
3853 return 0x00408958U;
3854}
3855static inline u32 gr_bes_crop_settings_num_active_ltcs_f(u32 v)
3856{
3857 return (v & 0xfU) << 0U;
3858}
3859static inline u32 gr_zcull_bytes_per_aliquot_per_gpu_v(void)
3860{
3861 return 0x00000020U;
3862}
3863static inline u32 gr_zcull_save_restore_header_bytes_per_gpc_v(void)
3864{
3865 return 0x00000020U;
3866}
3867static inline u32 gr_zcull_save_restore_subregion_header_bytes_per_gpc_v(void)
3868{
3869 return 0x000000c0U;
3870}
3871static inline u32 gr_zcull_subregion_qty_v(void)
3872{
3873 return 0x00000010U;
3874}
3875static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel0_r(void)
3876{
3877 return 0x00504604U;
3878}
3879static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel1_r(void)
3880{
3881 return 0x00504608U;
3882}
3883static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control0_r(void)
3884{
3885 return 0x0050465cU;
3886}
3887static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control1_r(void)
3888{
3889 return 0x00504660U;
3890}
3891static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control2_r(void)
3892{
3893 return 0x00504664U;
3894}
3895static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control3_r(void)
3896{
3897 return 0x00504668U;
3898}
3899static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control4_r(void)
3900{
3901 return 0x0050466cU;
3902}
3903static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control5_r(void)
3904{
3905 return 0x00504658U;
3906}
3907static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_control_r(void)
3908{
3909 return 0x00504730U;
3910}
3911static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_control_r(void)
3912{
3913 return 0x00504734U;
3914}
3915static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_control_r(void)
3916{
3917 return 0x00504738U;
3918}
3919static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_control_r(void)
3920{
3921 return 0x0050473cU;
3922}
3923static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter4_control_r(void)
3924{
3925 return 0x00504740U;
3926}
3927static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter5_control_r(void)
3928{
3929 return 0x00504744U;
3930}
3931static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter6_control_r(void)
3932{
3933 return 0x00504748U;
3934}
3935static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter7_control_r(void)
3936{
3937 return 0x0050474cU;
3938}
3939static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status_s1_r(void)
3940{
3941 return 0x00504678U;
3942}
3943static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status1_r(void)
3944{
3945 return 0x00504694U;
3946}
3947static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_s0_r(void)
3948{
3949 return 0x005046f0U;
3950}
3951static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_s1_r(void)
3952{
3953 return 0x00504700U;
3954}
3955static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_s0_r(void)
3956{
3957 return 0x005046f4U;
3958}
3959static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_s1_r(void)
3960{
3961 return 0x00504704U;
3962}
3963static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_s0_r(void)
3964{
3965 return 0x005046f8U;
3966}
3967static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_s1_r(void)
3968{
3969 return 0x00504708U;
3970}
3971static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_s0_r(void)
3972{
3973 return 0x005046fcU;
3974}
3975static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_s1_r(void)
3976{
3977 return 0x0050470cU;
3978}
3979static inline u32 gr_fe_pwr_mode_r(void)
3980{
3981 return 0x00404170U;
3982}
3983static inline u32 gr_fe_pwr_mode_mode_auto_f(void)
3984{
3985 return 0x0U;
3986}
3987static inline u32 gr_fe_pwr_mode_mode_force_on_f(void)
3988{
3989 return 0x2U;
3990}
3991static inline u32 gr_fe_pwr_mode_req_v(u32 r)
3992{
3993 return (r >> 4U) & 0x1U;
3994}
3995static inline u32 gr_fe_pwr_mode_req_send_f(void)
3996{
3997 return 0x10U;
3998}
3999static inline u32 gr_fe_pwr_mode_req_done_v(void)
4000{
4001 return 0x00000000U;
4002}
4003static inline u32 gr_gpcs_pri_mmu_ctrl_r(void)
4004{
4005 return 0x00418880U;
4006}
4007static inline u32 gr_gpcs_pri_mmu_ctrl_vm_pg_size_m(void)
4008{
4009 return 0x1U << 0U;
4010}
4011static inline u32 gr_gpcs_pri_mmu_ctrl_use_pdb_big_page_size_m(void)
4012{
4013 return 0x1U << 11U;
4014}
4015static inline u32 gr_gpcs_pri_mmu_ctrl_vol_fault_m(void)
4016{
4017 return 0x1U << 1U;
4018}
4019static inline u32 gr_gpcs_pri_mmu_ctrl_comp_fault_m(void)
4020{
4021 return 0x1U << 2U;
4022}
4023static inline u32 gr_gpcs_pri_mmu_ctrl_miss_gran_m(void)
4024{
4025 return 0x3U << 3U;
4026}
4027static inline u32 gr_gpcs_pri_mmu_ctrl_cache_mode_m(void)
4028{
4029 return 0x3U << 5U;
4030}
4031static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_aperture_m(void)
4032{
4033 return 0x3U << 28U;
4034}
4035static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_vol_m(void)
4036{
4037 return 0x1U << 30U;
4038}
4039static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_disable_m(void)
4040{
4041 return 0x1U << 31U;
4042}
4043static inline u32 gr_gpcs_pri_mmu_pm_unit_mask_r(void)
4044{
4045 return 0x00418890U;
4046}
4047static inline u32 gr_gpcs_pri_mmu_pm_req_mask_r(void)
4048{
4049 return 0x00418894U;
4050}
4051static inline u32 gr_gpcs_pri_mmu_debug_ctrl_r(void)
4052{
4053 return 0x004188b0U;
4054}
4055static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_v(u32 r)
4056{
4057 return (r >> 16U) & 0x1U;
4058}
4059static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(void)
4060{
4061 return 0x00000001U;
4062}
4063static inline u32 gr_gpcs_pri_mmu_debug_wr_r(void)
4064{
4065 return 0x004188b4U;
4066}
4067static inline u32 gr_gpcs_pri_mmu_debug_rd_r(void)
4068{
4069 return 0x004188b8U;
4070}
4071static inline u32 gr_gpcs_mmu_num_active_ltcs_r(void)
4072{
4073 return 0x004188acU;
4074}
4075static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_r(void)
4076{
4077 return 0x00419e10U;
4078}
4079static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_f(u32 v)
4080{
4081 return (v & 0x1U) << 0U;
4082}
4083static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_on_v(void)
4084{
4085 return 0x00000001U;
4086}
4087static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_m(void)
4088{
4089 return 0x1U << 31U;
4090}
4091static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_v(u32 r)
4092{
4093 return (r >> 31U) & 0x1U;
4094}
4095static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_enable_f(void)
4096{
4097 return 0x80000000U;
4098}
4099static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_disable_f(void)
4100{
4101 return 0x0U;
4102}
4103static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_m(void)
4104{
4105 return 0x1U << 30U;
4106}
4107static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_v(u32 r)
4108{
4109 return (r >> 30U) & 0x1U;
4110}
4111static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_task_f(void)
4112{
4113 return 0x40000000U;
4114}
4115static inline u32 gr_fe_gfxp_wfi_timeout_r(void)
4116{
4117 return 0x004041c0U;
4118}
4119static inline u32 gr_fe_gfxp_wfi_timeout_count_f(u32 v)
4120{
4121 return (v & 0xffffffffU) << 0U;
4122}
4123static inline u32 gr_fe_gfxp_wfi_timeout_count_disabled_f(void)
4124{
4125 return 0x0U;
4126}
4127static inline u32 gr_gpcs_tpcs_sm_texio_control_r(void)
4128{
4129 return 0x00419c84U;
4130}
4131static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_f(u32 v)
4132{
4133 return (v & 0x7U) << 8U;
4134}
4135static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_m(void)
4136{
4137 return 0x7U << 8U;
4138}
4139static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_arm_63_48_match_f(void)
4140{
4141 return 0x100U;
4142}
4143static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_r(void)
4144{
4145 return 0x00419f78U;
4146}
4147static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_m(void)
4148{
4149 return 0x3U << 11U;
4150}
4151static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_disable_f(void)
4152{
4153 return 0x1000U;
4154}
4155static inline u32 gr_gpcs_tc_debug0_r(void)
4156{
4157 return 0x00418708U;
4158}
4159static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_f(u32 v)
4160{
4161 return (v & 0x1ffU) << 0U;
4162}
4163static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_m(void)
4164{
4165 return 0x1ffU << 0U;
4166}
4167#endif
diff --git a/include/nvgpu/hw/gp106/hw_ltc_gp106.h b/include/nvgpu/hw/gp106/hw_ltc_gp106.h
deleted file mode 100644
index e4e87aa..0000000
--- a/include/nvgpu/hw/gp106/hw_ltc_gp106.h
+++ /dev/null
@@ -1,559 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ltc_gp106_h_
57#define _hw_ltc_gp106_h_
58
59static inline u32 ltc_ltcs_lts0_cbc_ctrl1_r(void)
60{
61 return 0x0014046cU;
62}
63static inline u32 ltc_ltc0_lts0_dstg_cfg0_r(void)
64{
65 return 0x00140518U;
66}
67static inline u32 ltc_ltcs_ltss_dstg_cfg0_r(void)
68{
69 return 0x0017e318U;
70}
71static inline u32 ltc_ltcs_ltss_dstg_cfg0_vdc_4to2_disable_m(void)
72{
73 return 0x1U << 15U;
74}
75static inline u32 ltc_ltc0_lts0_tstg_cfg1_r(void)
76{
77 return 0x00140494U;
78}
79static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_ways_v(u32 r)
80{
81 return (r >> 0U) & 0xffffU;
82}
83static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_v(u32 r)
84{
85 return (r >> 16U) & 0x3U;
86}
87static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_all_v(void)
88{
89 return 0x00000000U;
90}
91static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_half_v(void)
92{
93 return 0x00000001U;
94}
95static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v(void)
96{
97 return 0x00000002U;
98}
99static inline u32 ltc_ltcs_ltss_cbc_ctrl1_r(void)
100{
101 return 0x0017e26cU;
102}
103static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clean_active_f(void)
104{
105 return 0x1U;
106}
107static inline u32 ltc_ltcs_ltss_cbc_ctrl1_invalidate_active_f(void)
108{
109 return 0x2U;
110}
111static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_v(u32 r)
112{
113 return (r >> 2U) & 0x1U;
114}
115static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_v(void)
116{
117 return 0x00000001U;
118}
119static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_f(void)
120{
121 return 0x4U;
122}
123static inline u32 ltc_ltc0_lts0_cbc_ctrl1_r(void)
124{
125 return 0x0014046cU;
126}
127static inline u32 ltc_ltcs_ltss_cbc_ctrl2_r(void)
128{
129 return 0x0017e270U;
130}
131static inline u32 ltc_ltcs_ltss_cbc_ctrl2_clear_lower_bound_f(u32 v)
132{
133 return (v & 0x3ffffU) << 0U;
134}
135static inline u32 ltc_ltcs_ltss_cbc_ctrl3_r(void)
136{
137 return 0x0017e274U;
138}
139static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_f(u32 v)
140{
141 return (v & 0x3ffffU) << 0U;
142}
143static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_init_v(void)
144{
145 return 0x0003ffffU;
146}
147static inline u32 ltc_ltcs_ltss_cbc_base_r(void)
148{
149 return 0x0017e278U;
150}
151static inline u32 ltc_ltcs_ltss_cbc_base_alignment_shift_v(void)
152{
153 return 0x0000000bU;
154}
155static inline u32 ltc_ltcs_ltss_cbc_base_address_v(u32 r)
156{
157 return (r >> 0U) & 0x3ffffffU;
158}
159static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_r(void)
160{
161 return 0x0017e27cU;
162}
163static inline u32 ltc_ltcs_misc_ltc_num_active_ltcs_r(void)
164{
165 return 0x0017e000U;
166}
167static inline u32 ltc_ltcs_ltss_cbc_param_r(void)
168{
169 return 0x0017e280U;
170}
171static inline u32 ltc_ltcs_ltss_cbc_param_comptags_per_cache_line_v(u32 r)
172{
173 return (r >> 0U) & 0xffffU;
174}
175static inline u32 ltc_ltcs_ltss_cbc_param_cache_line_size_v(u32 r)
176{
177 return (r >> 24U) & 0xfU;
178}
179static inline u32 ltc_ltcs_ltss_cbc_param_slices_per_ltc_v(u32 r)
180{
181 return (r >> 28U) & 0xfU;
182}
183static inline u32 ltc_ltcs_ltss_cbc_param2_r(void)
184{
185 return 0x0017e3f4U;
186}
187static inline u32 ltc_ltcs_ltss_cbc_param2_gobs_per_comptagline_per_slice_v(u32 r)
188{
189 return (r >> 0U) & 0xffffU;
190}
191static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_r(void)
192{
193 return 0x0017e2acU;
194}
195static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(u32 v)
196{
197 return (v & 0x1fU) << 16U;
198}
199static inline u32 ltc_ltcs_ltss_dstg_zbc_index_r(void)
200{
201 return 0x0017e338U;
202}
203static inline u32 ltc_ltcs_ltss_dstg_zbc_index_address_f(u32 v)
204{
205 return (v & 0xfU) << 0U;
206}
207static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value_r(u32 i)
208{
209 return 0x0017e33cU + i*4U;
210}
211static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value__size_1_v(void)
212{
213 return 0x00000004U;
214}
215static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_r(void)
216{
217 return 0x0017e34cU;
218}
219static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_s(void)
220{
221 return 32U;
222}
223static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_f(u32 v)
224{
225 return (v & 0xffffffffU) << 0U;
226}
227static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_m(void)
228{
229 return 0xffffffffU << 0U;
230}
231static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_v(u32 r)
232{
233 return (r >> 0U) & 0xffffffffU;
234}
235static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_r(void)
236{
237 return 0x0017e2b0U;
238}
239static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_l2_bypass_mode_enabled_f(void)
240{
241 return 0x10000000U;
242}
243static inline u32 ltc_ltcs_ltss_g_elpg_r(void)
244{
245 return 0x0017e214U;
246}
247static inline u32 ltc_ltcs_ltss_g_elpg_flush_v(u32 r)
248{
249 return (r >> 0U) & 0x1U;
250}
251static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_v(void)
252{
253 return 0x00000001U;
254}
255static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_f(void)
256{
257 return 0x1U;
258}
259static inline u32 ltc_ltc0_ltss_g_elpg_r(void)
260{
261 return 0x00140214U;
262}
263static inline u32 ltc_ltc0_ltss_g_elpg_flush_v(u32 r)
264{
265 return (r >> 0U) & 0x1U;
266}
267static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_v(void)
268{
269 return 0x00000001U;
270}
271static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_f(void)
272{
273 return 0x1U;
274}
275static inline u32 ltc_ltc1_ltss_g_elpg_r(void)
276{
277 return 0x00142214U;
278}
279static inline u32 ltc_ltc1_ltss_g_elpg_flush_v(u32 r)
280{
281 return (r >> 0U) & 0x1U;
282}
283static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_v(void)
284{
285 return 0x00000001U;
286}
287static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_f(void)
288{
289 return 0x1U;
290}
291static inline u32 ltc_ltcs_ltss_intr_r(void)
292{
293 return 0x0017e20cU;
294}
295static inline u32 ltc_ltcs_ltss_intr_ecc_sec_error_pending_f(void)
296{
297 return 0x100U;
298}
299static inline u32 ltc_ltcs_ltss_intr_ecc_ded_error_pending_f(void)
300{
301 return 0x200U;
302}
303static inline u32 ltc_ltcs_ltss_intr_en_evicted_cb_m(void)
304{
305 return 0x1U << 20U;
306}
307static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_access_m(void)
308{
309 return 0x1U << 30U;
310}
311static inline u32 ltc_ltcs_ltss_intr_en_ecc_sec_error_enabled_f(void)
312{
313 return 0x1000000U;
314}
315static inline u32 ltc_ltcs_ltss_intr_en_ecc_ded_error_enabled_f(void)
316{
317 return 0x2000000U;
318}
319static inline u32 ltc_ltc0_lts0_intr_r(void)
320{
321 return 0x0014040cU;
322}
323static inline u32 ltc_ltc0_lts0_dstg_ecc_report_r(void)
324{
325 return 0x0014051cU;
326}
327static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_m(void)
328{
329 return 0xffU << 0U;
330}
331static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_v(u32 r)
332{
333 return (r >> 0U) & 0xffU;
334}
335static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_m(void)
336{
337 return 0xffU << 16U;
338}
339static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_v(u32 r)
340{
341 return (r >> 16U) & 0xffU;
342}
343static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_r(void)
344{
345 return 0x0017e2a0U;
346}
347static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_v(u32 r)
348{
349 return (r >> 0U) & 0x1U;
350}
351static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_v(void)
352{
353 return 0x00000001U;
354}
355static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_f(void)
356{
357 return 0x1U;
358}
359static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_v(u32 r)
360{
361 return (r >> 8U) & 0xfU;
362}
363static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_v(void)
364{
365 return 0x00000003U;
366}
367static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_f(void)
368{
369 return 0x300U;
370}
371static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_v(u32 r)
372{
373 return (r >> 28U) & 0x1U;
374}
375static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_v(void)
376{
377 return 0x00000001U;
378}
379static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_f(void)
380{
381 return 0x10000000U;
382}
383static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_v(u32 r)
384{
385 return (r >> 29U) & 0x1U;
386}
387static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_v(void)
388{
389 return 0x00000001U;
390}
391static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_f(void)
392{
393 return 0x20000000U;
394}
395static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_v(u32 r)
396{
397 return (r >> 30U) & 0x1U;
398}
399static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_v(void)
400{
401 return 0x00000001U;
402}
403static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_f(void)
404{
405 return 0x40000000U;
406}
407static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_r(void)
408{
409 return 0x0017e2a4U;
410}
411static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_v(u32 r)
412{
413 return (r >> 0U) & 0x1U;
414}
415static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_v(void)
416{
417 return 0x00000001U;
418}
419static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_f(void)
420{
421 return 0x1U;
422}
423static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_v(u32 r)
424{
425 return (r >> 8U) & 0xfU;
426}
427static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_v(void)
428{
429 return 0x00000003U;
430}
431static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_f(void)
432{
433 return 0x300U;
434}
435static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_v(u32 r)
436{
437 return (r >> 16U) & 0x1U;
438}
439static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_v(void)
440{
441 return 0x00000001U;
442}
443static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_f(void)
444{
445 return 0x10000U;
446}
447static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_v(u32 r)
448{
449 return (r >> 28U) & 0x1U;
450}
451static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_v(void)
452{
453 return 0x00000001U;
454}
455static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_f(void)
456{
457 return 0x10000000U;
458}
459static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_v(u32 r)
460{
461 return (r >> 29U) & 0x1U;
462}
463static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_v(void)
464{
465 return 0x00000001U;
466}
467static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_f(void)
468{
469 return 0x20000000U;
470}
471static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_v(u32 r)
472{
473 return (r >> 30U) & 0x1U;
474}
475static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_v(void)
476{
477 return 0x00000001U;
478}
479static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_f(void)
480{
481 return 0x40000000U;
482}
483static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_r(void)
484{
485 return 0x001402a0U;
486}
487static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_v(u32 r)
488{
489 return (r >> 0U) & 0x1U;
490}
491static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_v(void)
492{
493 return 0x00000001U;
494}
495static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_f(void)
496{
497 return 0x1U;
498}
499static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_r(void)
500{
501 return 0x001402a4U;
502}
503static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_v(u32 r)
504{
505 return (r >> 0U) & 0x1U;
506}
507static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_v(void)
508{
509 return 0x00000001U;
510}
511static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_f(void)
512{
513 return 0x1U;
514}
515static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_r(void)
516{
517 return 0x001422a0U;
518}
519static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_v(u32 r)
520{
521 return (r >> 0U) & 0x1U;
522}
523static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_v(void)
524{
525 return 0x00000001U;
526}
527static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_f(void)
528{
529 return 0x1U;
530}
531static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_r(void)
532{
533 return 0x001422a4U;
534}
535static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_v(u32 r)
536{
537 return (r >> 0U) & 0x1U;
538}
539static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_v(void)
540{
541 return 0x00000001U;
542}
543static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_f(void)
544{
545 return 0x1U;
546}
547static inline u32 ltc_ltc0_lts0_tstg_info_1_r(void)
548{
549 return 0x0014058cU;
550}
551static inline u32 ltc_ltc0_lts0_tstg_info_1_slice_size_in_kb_v(u32 r)
552{
553 return (r >> 0U) & 0xffffU;
554}
555static inline u32 ltc_ltc0_lts0_tstg_info_1_slices_per_l2_v(u32 r)
556{
557 return (r >> 16U) & 0x1fU;
558}
559#endif
diff --git a/include/nvgpu/hw/gp106/hw_mc_gp106.h b/include/nvgpu/hw/gp106/hw_mc_gp106.h
deleted file mode 100644
index 349e2d7..0000000
--- a/include/nvgpu/hw/gp106/hw_mc_gp106.h
+++ /dev/null
@@ -1,251 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_mc_gp106_h_
57#define _hw_mc_gp106_h_
58
59static inline u32 mc_boot_0_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 mc_boot_0_architecture_v(u32 r)
64{
65 return (r >> 24U) & 0x1fU;
66}
67static inline u32 mc_boot_0_implementation_v(u32 r)
68{
69 return (r >> 20U) & 0xfU;
70}
71static inline u32 mc_boot_0_major_revision_v(u32 r)
72{
73 return (r >> 4U) & 0xfU;
74}
75static inline u32 mc_boot_0_minor_revision_v(u32 r)
76{
77 return (r >> 0U) & 0xfU;
78}
79static inline u32 mc_intr_r(u32 i)
80{
81 return 0x00000100U + i*4U;
82}
83static inline u32 mc_intr_pfifo_pending_f(void)
84{
85 return 0x100U;
86}
87static inline u32 mc_intr_replayable_fault_pending_f(void)
88{
89 return 0x200U;
90}
91static inline u32 mc_intr_pgraph_pending_f(void)
92{
93 return 0x1000U;
94}
95static inline u32 mc_intr_pmu_pending_f(void)
96{
97 return 0x1000000U;
98}
99static inline u32 mc_intr_ltc_pending_f(void)
100{
101 return 0x2000000U;
102}
103static inline u32 mc_intr_priv_ring_pending_f(void)
104{
105 return 0x40000000U;
106}
107static inline u32 mc_intr_pbus_pending_f(void)
108{
109 return 0x10000000U;
110}
111static inline u32 mc_intr_en_r(u32 i)
112{
113 return 0x00000140U + i*4U;
114}
115static inline u32 mc_intr_en_set_r(u32 i)
116{
117 return 0x00000160U + i*4U;
118}
119static inline u32 mc_intr_en_clear_r(u32 i)
120{
121 return 0x00000180U + i*4U;
122}
123static inline u32 mc_enable_r(void)
124{
125 return 0x00000200U;
126}
127static inline u32 mc_enable_xbar_enabled_f(void)
128{
129 return 0x4U;
130}
131static inline u32 mc_enable_l2_enabled_f(void)
132{
133 return 0x8U;
134}
135static inline u32 mc_enable_pmedia_s(void)
136{
137 return 1U;
138}
139static inline u32 mc_enable_pmedia_f(u32 v)
140{
141 return (v & 0x1U) << 4U;
142}
143static inline u32 mc_enable_pmedia_m(void)
144{
145 return 0x1U << 4U;
146}
147static inline u32 mc_enable_pmedia_v(u32 r)
148{
149 return (r >> 4U) & 0x1U;
150}
151static inline u32 mc_enable_priv_ring_enabled_f(void)
152{
153 return 0x20U;
154}
155static inline u32 mc_enable_ce0_m(void)
156{
157 return 0x1U << 6U;
158}
159static inline u32 mc_enable_pfifo_enabled_f(void)
160{
161 return 0x100U;
162}
163static inline u32 mc_enable_pgraph_enabled_f(void)
164{
165 return 0x1000U;
166}
167static inline u32 mc_enable_pwr_v(u32 r)
168{
169 return (r >> 13U) & 0x1U;
170}
171static inline u32 mc_enable_pwr_disabled_v(void)
172{
173 return 0x00000000U;
174}
175static inline u32 mc_enable_pwr_enabled_f(void)
176{
177 return 0x2000U;
178}
179static inline u32 mc_enable_pfb_enabled_f(void)
180{
181 return 0x100000U;
182}
183static inline u32 mc_enable_ce2_m(void)
184{
185 return 0x1U << 21U;
186}
187static inline u32 mc_enable_ce2_enabled_f(void)
188{
189 return 0x200000U;
190}
191static inline u32 mc_enable_blg_enabled_f(void)
192{
193 return 0x8000000U;
194}
195static inline u32 mc_enable_perfmon_enabled_f(void)
196{
197 return 0x10000000U;
198}
199static inline u32 mc_enable_hub_enabled_f(void)
200{
201 return 0x20000000U;
202}
203static inline u32 mc_intr_ltc_r(void)
204{
205 return 0x000001c0U;
206}
207static inline u32 mc_enable_pb_r(void)
208{
209 return 0x00000204U;
210}
211static inline u32 mc_enable_pb_0_s(void)
212{
213 return 1U;
214}
215static inline u32 mc_enable_pb_0_f(u32 v)
216{
217 return (v & 0x1U) << 0U;
218}
219static inline u32 mc_enable_pb_0_m(void)
220{
221 return 0x1U << 0U;
222}
223static inline u32 mc_enable_pb_0_v(u32 r)
224{
225 return (r >> 0U) & 0x1U;
226}
227static inline u32 mc_enable_pb_0_enabled_v(void)
228{
229 return 0x00000001U;
230}
231static inline u32 mc_enable_pb_sel_f(u32 v, u32 i)
232{
233 return (v & 0x1U) << (0U + i*1U);
234}
235static inline u32 mc_elpg_enable_r(void)
236{
237 return 0x0000020cU;
238}
239static inline u32 mc_elpg_enable_xbar_enabled_f(void)
240{
241 return 0x4U;
242}
243static inline u32 mc_elpg_enable_pfb_enabled_f(void)
244{
245 return 0x100000U;
246}
247static inline u32 mc_elpg_enable_hub_enabled_f(void)
248{
249 return 0x20000000U;
250}
251#endif
diff --git a/include/nvgpu/hw/gp106/hw_pbdma_gp106.h b/include/nvgpu/hw/gp106/hw_pbdma_gp106.h
deleted file mode 100644
index 1005c5a..0000000
--- a/include/nvgpu/hw/gp106/hw_pbdma_gp106.h
+++ /dev/null
@@ -1,535 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pbdma_gp106_h_
57#define _hw_pbdma_gp106_h_
58
59static inline u32 pbdma_gp_entry1_r(void)
60{
61 return 0x10000004U;
62}
63static inline u32 pbdma_gp_entry1_get_hi_v(u32 r)
64{
65 return (r >> 0U) & 0xffU;
66}
67static inline u32 pbdma_gp_entry1_length_f(u32 v)
68{
69 return (v & 0x1fffffU) << 10U;
70}
71static inline u32 pbdma_gp_entry1_length_v(u32 r)
72{
73 return (r >> 10U) & 0x1fffffU;
74}
75static inline u32 pbdma_gp_base_r(u32 i)
76{
77 return 0x00040048U + i*8192U;
78}
79static inline u32 pbdma_gp_base__size_1_v(void)
80{
81 return 0x00000004U;
82}
83static inline u32 pbdma_gp_base_offset_f(u32 v)
84{
85 return (v & 0x1fffffffU) << 3U;
86}
87static inline u32 pbdma_gp_base_rsvd_s(void)
88{
89 return 3U;
90}
91static inline u32 pbdma_gp_base_hi_r(u32 i)
92{
93 return 0x0004004cU + i*8192U;
94}
95static inline u32 pbdma_gp_base_hi_offset_f(u32 v)
96{
97 return (v & 0xffU) << 0U;
98}
99static inline u32 pbdma_gp_base_hi_limit2_f(u32 v)
100{
101 return (v & 0x1fU) << 16U;
102}
103static inline u32 pbdma_gp_fetch_r(u32 i)
104{
105 return 0x00040050U + i*8192U;
106}
107static inline u32 pbdma_gp_get_r(u32 i)
108{
109 return 0x00040014U + i*8192U;
110}
111static inline u32 pbdma_gp_put_r(u32 i)
112{
113 return 0x00040000U + i*8192U;
114}
115static inline u32 pbdma_pb_fetch_r(u32 i)
116{
117 return 0x00040054U + i*8192U;
118}
119static inline u32 pbdma_pb_fetch_hi_r(u32 i)
120{
121 return 0x00040058U + i*8192U;
122}
123static inline u32 pbdma_get_r(u32 i)
124{
125 return 0x00040018U + i*8192U;
126}
127static inline u32 pbdma_get_hi_r(u32 i)
128{
129 return 0x0004001cU + i*8192U;
130}
131static inline u32 pbdma_put_r(u32 i)
132{
133 return 0x0004005cU + i*8192U;
134}
135static inline u32 pbdma_put_hi_r(u32 i)
136{
137 return 0x00040060U + i*8192U;
138}
139static inline u32 pbdma_formats_r(u32 i)
140{
141 return 0x0004009cU + i*8192U;
142}
143static inline u32 pbdma_formats_gp_fermi0_f(void)
144{
145 return 0x0U;
146}
147static inline u32 pbdma_formats_pb_fermi1_f(void)
148{
149 return 0x100U;
150}
151static inline u32 pbdma_formats_mp_fermi0_f(void)
152{
153 return 0x0U;
154}
155static inline u32 pbdma_pb_header_r(u32 i)
156{
157 return 0x00040084U + i*8192U;
158}
159static inline u32 pbdma_pb_header_priv_user_f(void)
160{
161 return 0x0U;
162}
163static inline u32 pbdma_pb_header_method_zero_f(void)
164{
165 return 0x0U;
166}
167static inline u32 pbdma_pb_header_subchannel_zero_f(void)
168{
169 return 0x0U;
170}
171static inline u32 pbdma_pb_header_level_main_f(void)
172{
173 return 0x0U;
174}
175static inline u32 pbdma_pb_header_first_true_f(void)
176{
177 return 0x400000U;
178}
179static inline u32 pbdma_pb_header_type_inc_f(void)
180{
181 return 0x20000000U;
182}
183static inline u32 pbdma_pb_header_type_non_inc_f(void)
184{
185 return 0x60000000U;
186}
187static inline u32 pbdma_hdr_shadow_r(u32 i)
188{
189 return 0x00040118U + i*8192U;
190}
191static inline u32 pbdma_gp_shadow_0_r(u32 i)
192{
193 return 0x00040110U + i*8192U;
194}
195static inline u32 pbdma_gp_shadow_1_r(u32 i)
196{
197 return 0x00040114U + i*8192U;
198}
199static inline u32 pbdma_subdevice_r(u32 i)
200{
201 return 0x00040094U + i*8192U;
202}
203static inline u32 pbdma_subdevice_id_f(u32 v)
204{
205 return (v & 0xfffU) << 0U;
206}
207static inline u32 pbdma_subdevice_status_active_f(void)
208{
209 return 0x10000000U;
210}
211static inline u32 pbdma_subdevice_channel_dma_enable_f(void)
212{
213 return 0x20000000U;
214}
215static inline u32 pbdma_method0_r(u32 i)
216{
217 return 0x000400c0U + i*8192U;
218}
219static inline u32 pbdma_method0_fifo_size_v(void)
220{
221 return 0x00000004U;
222}
223static inline u32 pbdma_method0_addr_f(u32 v)
224{
225 return (v & 0xfffU) << 2U;
226}
227static inline u32 pbdma_method0_addr_v(u32 r)
228{
229 return (r >> 2U) & 0xfffU;
230}
231static inline u32 pbdma_method0_subch_v(u32 r)
232{
233 return (r >> 16U) & 0x7U;
234}
235static inline u32 pbdma_method0_first_true_f(void)
236{
237 return 0x400000U;
238}
239static inline u32 pbdma_method0_valid_true_f(void)
240{
241 return 0x80000000U;
242}
243static inline u32 pbdma_method1_r(u32 i)
244{
245 return 0x000400c8U + i*8192U;
246}
247static inline u32 pbdma_method2_r(u32 i)
248{
249 return 0x000400d0U + i*8192U;
250}
251static inline u32 pbdma_method3_r(u32 i)
252{
253 return 0x000400d8U + i*8192U;
254}
255static inline u32 pbdma_data0_r(u32 i)
256{
257 return 0x000400c4U + i*8192U;
258}
259static inline u32 pbdma_target_r(u32 i)
260{
261 return 0x000400acU + i*8192U;
262}
263static inline u32 pbdma_target_engine_sw_f(void)
264{
265 return 0x1fU;
266}
267static inline u32 pbdma_acquire_r(u32 i)
268{
269 return 0x00040030U + i*8192U;
270}
271static inline u32 pbdma_acquire_retry_man_2_f(void)
272{
273 return 0x2U;
274}
275static inline u32 pbdma_acquire_retry_exp_2_f(void)
276{
277 return 0x100U;
278}
279static inline u32 pbdma_acquire_timeout_exp_max_f(void)
280{
281 return 0x7800U;
282}
283static inline u32 pbdma_acquire_timeout_man_max_f(void)
284{
285 return 0x7fff8000U;
286}
287static inline u32 pbdma_acquire_timeout_en_disable_f(void)
288{
289 return 0x0U;
290}
291static inline u32 pbdma_status_r(u32 i)
292{
293 return 0x00040100U + i*8192U;
294}
295static inline u32 pbdma_channel_r(u32 i)
296{
297 return 0x00040120U + i*8192U;
298}
299static inline u32 pbdma_signature_r(u32 i)
300{
301 return 0x00040010U + i*8192U;
302}
303static inline u32 pbdma_signature_hw_valid_f(void)
304{
305 return 0xfaceU;
306}
307static inline u32 pbdma_signature_sw_zero_f(void)
308{
309 return 0x0U;
310}
311static inline u32 pbdma_userd_r(u32 i)
312{
313 return 0x00040008U + i*8192U;
314}
315static inline u32 pbdma_userd_target_vid_mem_f(void)
316{
317 return 0x0U;
318}
319static inline u32 pbdma_userd_target_sys_mem_coh_f(void)
320{
321 return 0x2U;
322}
323static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void)
324{
325 return 0x3U;
326}
327static inline u32 pbdma_userd_addr_f(u32 v)
328{
329 return (v & 0x7fffffU) << 9U;
330}
331static inline u32 pbdma_userd_hi_r(u32 i)
332{
333 return 0x0004000cU + i*8192U;
334}
335static inline u32 pbdma_userd_hi_addr_f(u32 v)
336{
337 return (v & 0xffU) << 0U;
338}
339static inline u32 pbdma_config_r(u32 i)
340{
341 return 0x000400f4U + i*8192U;
342}
343static inline u32 pbdma_config_auth_level_privileged_f(void)
344{
345 return 0x100U;
346}
347static inline u32 pbdma_hce_ctrl_r(u32 i)
348{
349 return 0x000400e4U + i*8192U;
350}
351static inline u32 pbdma_hce_ctrl_hce_priv_mode_yes_f(void)
352{
353 return 0x20U;
354}
355static inline u32 pbdma_intr_0_r(u32 i)
356{
357 return 0x00040108U + i*8192U;
358}
359static inline u32 pbdma_intr_0_memreq_v(u32 r)
360{
361 return (r >> 0U) & 0x1U;
362}
363static inline u32 pbdma_intr_0_memreq_pending_f(void)
364{
365 return 0x1U;
366}
367static inline u32 pbdma_intr_0_memack_timeout_pending_f(void)
368{
369 return 0x2U;
370}
371static inline u32 pbdma_intr_0_memack_extra_pending_f(void)
372{
373 return 0x4U;
374}
375static inline u32 pbdma_intr_0_memdat_timeout_pending_f(void)
376{
377 return 0x8U;
378}
379static inline u32 pbdma_intr_0_memdat_extra_pending_f(void)
380{
381 return 0x10U;
382}
383static inline u32 pbdma_intr_0_memflush_pending_f(void)
384{
385 return 0x20U;
386}
387static inline u32 pbdma_intr_0_memop_pending_f(void)
388{
389 return 0x40U;
390}
391static inline u32 pbdma_intr_0_lbconnect_pending_f(void)
392{
393 return 0x80U;
394}
395static inline u32 pbdma_intr_0_lbreq_pending_f(void)
396{
397 return 0x100U;
398}
399static inline u32 pbdma_intr_0_lback_timeout_pending_f(void)
400{
401 return 0x200U;
402}
403static inline u32 pbdma_intr_0_lback_extra_pending_f(void)
404{
405 return 0x400U;
406}
407static inline u32 pbdma_intr_0_lbdat_timeout_pending_f(void)
408{
409 return 0x800U;
410}
411static inline u32 pbdma_intr_0_lbdat_extra_pending_f(void)
412{
413 return 0x1000U;
414}
415static inline u32 pbdma_intr_0_gpfifo_pending_f(void)
416{
417 return 0x2000U;
418}
419static inline u32 pbdma_intr_0_gpptr_pending_f(void)
420{
421 return 0x4000U;
422}
423static inline u32 pbdma_intr_0_gpentry_pending_f(void)
424{
425 return 0x8000U;
426}
427static inline u32 pbdma_intr_0_gpcrc_pending_f(void)
428{
429 return 0x10000U;
430}
431static inline u32 pbdma_intr_0_pbptr_pending_f(void)
432{
433 return 0x20000U;
434}
435static inline u32 pbdma_intr_0_pbentry_pending_f(void)
436{
437 return 0x40000U;
438}
439static inline u32 pbdma_intr_0_pbcrc_pending_f(void)
440{
441 return 0x80000U;
442}
443static inline u32 pbdma_intr_0_xbarconnect_pending_f(void)
444{
445 return 0x100000U;
446}
447static inline u32 pbdma_intr_0_method_pending_f(void)
448{
449 return 0x200000U;
450}
451static inline u32 pbdma_intr_0_methodcrc_pending_f(void)
452{
453 return 0x400000U;
454}
455static inline u32 pbdma_intr_0_device_pending_f(void)
456{
457 return 0x800000U;
458}
459static inline u32 pbdma_intr_0_semaphore_pending_f(void)
460{
461 return 0x2000000U;
462}
463static inline u32 pbdma_intr_0_acquire_pending_f(void)
464{
465 return 0x4000000U;
466}
467static inline u32 pbdma_intr_0_pri_pending_f(void)
468{
469 return 0x8000000U;
470}
471static inline u32 pbdma_intr_0_no_ctxsw_seg_pending_f(void)
472{
473 return 0x20000000U;
474}
475static inline u32 pbdma_intr_0_pbseg_pending_f(void)
476{
477 return 0x40000000U;
478}
479static inline u32 pbdma_intr_0_signature_pending_f(void)
480{
481 return 0x80000000U;
482}
483static inline u32 pbdma_intr_1_r(u32 i)
484{
485 return 0x00040148U + i*8192U;
486}
487static inline u32 pbdma_intr_en_0_r(u32 i)
488{
489 return 0x0004010cU + i*8192U;
490}
491static inline u32 pbdma_intr_en_0_lbreq_enabled_f(void)
492{
493 return 0x100U;
494}
495static inline u32 pbdma_intr_en_1_r(u32 i)
496{
497 return 0x0004014cU + i*8192U;
498}
499static inline u32 pbdma_intr_stall_r(u32 i)
500{
501 return 0x0004013cU + i*8192U;
502}
503static inline u32 pbdma_intr_stall_lbreq_enabled_f(void)
504{
505 return 0x100U;
506}
507static inline u32 pbdma_intr_stall_1_r(u32 i)
508{
509 return 0x00040140U + i*8192U;
510}
511static inline u32 pbdma_intr_stall_1_hce_illegal_op_enabled_f(void)
512{
513 return 0x1U;
514}
515static inline u32 pbdma_udma_nop_r(void)
516{
517 return 0x00000008U;
518}
519static inline u32 pbdma_runlist_timeslice_r(u32 i)
520{
521 return 0x000400f8U + i*8192U;
522}
523static inline u32 pbdma_runlist_timeslice_timeout_128_f(void)
524{
525 return 0x80U;
526}
527static inline u32 pbdma_runlist_timeslice_timescale_3_f(void)
528{
529 return 0x3000U;
530}
531static inline u32 pbdma_runlist_timeslice_enable_true_f(void)
532{
533 return 0x10000000U;
534}
535#endif
diff --git a/include/nvgpu/hw/gp106/hw_perf_gp106.h b/include/nvgpu/hw/gp106/hw_perf_gp106.h
deleted file mode 100644
index 334cd20..0000000
--- a/include/nvgpu/hw/gp106/hw_perf_gp106.h
+++ /dev/null
@@ -1,219 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_perf_gp106_h_
57#define _hw_perf_gp106_h_
58
59static inline u32 perf_pmmsys_base_v(void)
60{
61 return 0x001b0000U;
62}
63static inline u32 perf_pmmsys_extent_v(void)
64{
65 return 0x001b0fffU;
66}
67static inline u32 perf_pmasys_control_r(void)
68{
69 return 0x001b4000U;
70}
71static inline u32 perf_pmasys_control_membuf_status_v(u32 r)
72{
73 return (r >> 4U) & 0x1U;
74}
75static inline u32 perf_pmasys_control_membuf_status_overflowed_v(void)
76{
77 return 0x00000001U;
78}
79static inline u32 perf_pmasys_control_membuf_status_overflowed_f(void)
80{
81 return 0x10U;
82}
83static inline u32 perf_pmasys_control_membuf_clear_status_f(u32 v)
84{
85 return (v & 0x1U) << 5U;
86}
87static inline u32 perf_pmasys_control_membuf_clear_status_v(u32 r)
88{
89 return (r >> 5U) & 0x1U;
90}
91static inline u32 perf_pmasys_control_membuf_clear_status_doit_v(void)
92{
93 return 0x00000001U;
94}
95static inline u32 perf_pmasys_control_membuf_clear_status_doit_f(void)
96{
97 return 0x20U;
98}
99static inline u32 perf_pmasys_mem_block_r(void)
100{
101 return 0x001b4070U;
102}
103static inline u32 perf_pmasys_mem_block_base_f(u32 v)
104{
105 return (v & 0xfffffffU) << 0U;
106}
107static inline u32 perf_pmasys_mem_block_target_f(u32 v)
108{
109 return (v & 0x3U) << 28U;
110}
111static inline u32 perf_pmasys_mem_block_target_v(u32 r)
112{
113 return (r >> 28U) & 0x3U;
114}
115static inline u32 perf_pmasys_mem_block_target_lfb_v(void)
116{
117 return 0x00000000U;
118}
119static inline u32 perf_pmasys_mem_block_target_lfb_f(void)
120{
121 return 0x0U;
122}
123static inline u32 perf_pmasys_mem_block_target_sys_coh_v(void)
124{
125 return 0x00000002U;
126}
127static inline u32 perf_pmasys_mem_block_target_sys_coh_f(void)
128{
129 return 0x20000000U;
130}
131static inline u32 perf_pmasys_mem_block_target_sys_ncoh_v(void)
132{
133 return 0x00000003U;
134}
135static inline u32 perf_pmasys_mem_block_target_sys_ncoh_f(void)
136{
137 return 0x30000000U;
138}
139static inline u32 perf_pmasys_mem_block_valid_f(u32 v)
140{
141 return (v & 0x1U) << 31U;
142}
143static inline u32 perf_pmasys_mem_block_valid_v(u32 r)
144{
145 return (r >> 31U) & 0x1U;
146}
147static inline u32 perf_pmasys_mem_block_valid_true_v(void)
148{
149 return 0x00000001U;
150}
151static inline u32 perf_pmasys_mem_block_valid_true_f(void)
152{
153 return 0x80000000U;
154}
155static inline u32 perf_pmasys_mem_block_valid_false_v(void)
156{
157 return 0x00000000U;
158}
159static inline u32 perf_pmasys_mem_block_valid_false_f(void)
160{
161 return 0x0U;
162}
163static inline u32 perf_pmasys_outbase_r(void)
164{
165 return 0x001b4074U;
166}
167static inline u32 perf_pmasys_outbase_ptr_f(u32 v)
168{
169 return (v & 0x7ffffffU) << 5U;
170}
171static inline u32 perf_pmasys_outbaseupper_r(void)
172{
173 return 0x001b4078U;
174}
175static inline u32 perf_pmasys_outbaseupper_ptr_f(u32 v)
176{
177 return (v & 0xffU) << 0U;
178}
179static inline u32 perf_pmasys_outsize_r(void)
180{
181 return 0x001b407cU;
182}
183static inline u32 perf_pmasys_outsize_numbytes_f(u32 v)
184{
185 return (v & 0x7ffffffU) << 5U;
186}
187static inline u32 perf_pmasys_mem_bytes_r(void)
188{
189 return 0x001b4084U;
190}
191static inline u32 perf_pmasys_mem_bytes_numbytes_f(u32 v)
192{
193 return (v & 0xfffffffU) << 4U;
194}
195static inline u32 perf_pmasys_mem_bump_r(void)
196{
197 return 0x001b4088U;
198}
199static inline u32 perf_pmasys_mem_bump_numbytes_f(u32 v)
200{
201 return (v & 0xfffffffU) << 4U;
202}
203static inline u32 perf_pmasys_enginestatus_r(void)
204{
205 return 0x001b40a4U;
206}
207static inline u32 perf_pmasys_enginestatus_rbufempty_f(u32 v)
208{
209 return (v & 0x1U) << 4U;
210}
211static inline u32 perf_pmasys_enginestatus_rbufempty_empty_v(void)
212{
213 return 0x00000001U;
214}
215static inline u32 perf_pmasys_enginestatus_rbufempty_empty_f(void)
216{
217 return 0x10U;
218}
219#endif
diff --git a/include/nvgpu/hw/gp106/hw_pram_gp106.h b/include/nvgpu/hw/gp106/hw_pram_gp106.h
deleted file mode 100644
index 7e33e71..0000000
--- a/include/nvgpu/hw/gp106/hw_pram_gp106.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pram_gp106_h_
57#define _hw_pram_gp106_h_
58
59static inline u32 pram_data032_r(u32 i)
60{
61 return 0x00700000U + i*4U;
62}
63#endif
diff --git a/include/nvgpu/hw/gp106/hw_pri_ringmaster_gp106.h b/include/nvgpu/hw/gp106/hw_pri_ringmaster_gp106.h
deleted file mode 100644
index efdedc3..0000000
--- a/include/nvgpu/hw/gp106/hw_pri_ringmaster_gp106.h
+++ /dev/null
@@ -1,151 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringmaster_gp106_h_
57#define _hw_pri_ringmaster_gp106_h_
58
59static inline u32 pri_ringmaster_command_r(void)
60{
61 return 0x0012004cU;
62}
63static inline u32 pri_ringmaster_command_cmd_m(void)
64{
65 return 0x3fU << 0U;
66}
67static inline u32 pri_ringmaster_command_cmd_v(u32 r)
68{
69 return (r >> 0U) & 0x3fU;
70}
71static inline u32 pri_ringmaster_command_cmd_no_cmd_v(void)
72{
73 return 0x00000000U;
74}
75static inline u32 pri_ringmaster_command_cmd_start_ring_f(void)
76{
77 return 0x1U;
78}
79static inline u32 pri_ringmaster_command_cmd_ack_interrupt_f(void)
80{
81 return 0x2U;
82}
83static inline u32 pri_ringmaster_command_cmd_enumerate_stations_f(void)
84{
85 return 0x3U;
86}
87static inline u32 pri_ringmaster_command_cmd_enumerate_stations_bc_grp_all_f(void)
88{
89 return 0x0U;
90}
91static inline u32 pri_ringmaster_command_data_r(void)
92{
93 return 0x00120048U;
94}
95static inline u32 pri_ringmaster_start_results_r(void)
96{
97 return 0x00120050U;
98}
99static inline u32 pri_ringmaster_start_results_connectivity_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 pri_ringmaster_start_results_connectivity_pass_v(void)
104{
105 return 0x00000001U;
106}
107static inline u32 pri_ringmaster_intr_status0_r(void)
108{
109 return 0x00120058U;
110}
111static inline u32 pri_ringmaster_intr_status1_r(void)
112{
113 return 0x0012005cU;
114}
115static inline u32 pri_ringmaster_global_ctl_r(void)
116{
117 return 0x00120060U;
118}
119static inline u32 pri_ringmaster_global_ctl_ring_reset_asserted_f(void)
120{
121 return 0x1U;
122}
123static inline u32 pri_ringmaster_global_ctl_ring_reset_deasserted_f(void)
124{
125 return 0x0U;
126}
127static inline u32 pri_ringmaster_enum_fbp_r(void)
128{
129 return 0x00120074U;
130}
131static inline u32 pri_ringmaster_enum_fbp_count_v(u32 r)
132{
133 return (r >> 0U) & 0x1fU;
134}
135static inline u32 pri_ringmaster_enum_gpc_r(void)
136{
137 return 0x00120078U;
138}
139static inline u32 pri_ringmaster_enum_gpc_count_v(u32 r)
140{
141 return (r >> 0U) & 0x1fU;
142}
143static inline u32 pri_ringmaster_enum_ltc_r(void)
144{
145 return 0x0012006cU;
146}
147static inline u32 pri_ringmaster_enum_ltc_count_v(u32 r)
148{
149 return (r >> 0U) & 0x1fU;
150}
151#endif
diff --git a/include/nvgpu/hw/gp106/hw_pri_ringstation_gpc_gp106.h b/include/nvgpu/hw/gp106/hw_pri_ringstation_gpc_gp106.h
deleted file mode 100644
index 711938d..0000000
--- a/include/nvgpu/hw/gp106/hw_pri_ringstation_gpc_gp106.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_gpc_gp106_h_
57#define _hw_pri_ringstation_gpc_gp106_h_
58
59static inline u32 pri_ringstation_gpc_master_config_r(u32 i)
60{
61 return 0x00128300U + i*4U;
62}
63static inline u32 pri_ringstation_gpc_gpc0_priv_error_adr_r(void)
64{
65 return 0x00128120U;
66}
67static inline u32 pri_ringstation_gpc_gpc0_priv_error_wrdat_r(void)
68{
69 return 0x00128124U;
70}
71static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_r(void)
72{
73 return 0x00128128U;
74}
75static inline u32 pri_ringstation_gpc_gpc0_priv_error_code_r(void)
76{
77 return 0x0012812cU;
78}
79#endif
diff --git a/include/nvgpu/hw/gp106/hw_pri_ringstation_sys_gp106.h b/include/nvgpu/hw/gp106/hw_pri_ringstation_sys_gp106.h
deleted file mode 100644
index a3a1447..0000000
--- a/include/nvgpu/hw/gp106/hw_pri_ringstation_sys_gp106.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_sys_gp106_h_
57#define _hw_pri_ringstation_sys_gp106_h_
58
59static inline u32 pri_ringstation_sys_master_config_r(u32 i)
60{
61 return 0x00122300U + i*4U;
62}
63static inline u32 pri_ringstation_sys_decode_config_r(void)
64{
65 return 0x00122204U;
66}
67static inline u32 pri_ringstation_sys_decode_config_ring_m(void)
68{
69 return 0x7U << 0U;
70}
71static inline u32 pri_ringstation_sys_decode_config_ring_drop_on_ring_not_started_f(void)
72{
73 return 0x1U;
74}
75static inline u32 pri_ringstation_sys_priv_error_adr_r(void)
76{
77 return 0x00122120U;
78}
79static inline u32 pri_ringstation_sys_priv_error_wrdat_r(void)
80{
81 return 0x00122124U;
82}
83static inline u32 pri_ringstation_sys_priv_error_info_r(void)
84{
85 return 0x00122128U;
86}
87static inline u32 pri_ringstation_sys_priv_error_code_r(void)
88{
89 return 0x0012212cU;
90}
91#endif
diff --git a/include/nvgpu/hw/gp106/hw_proj_gp106.h b/include/nvgpu/hw/gp106/hw_proj_gp106.h
deleted file mode 100644
index 866bc7b..0000000
--- a/include/nvgpu/hw/gp106/hw_proj_gp106.h
+++ /dev/null
@@ -1,179 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_proj_gp106_h_
57#define _hw_proj_gp106_h_
58
59static inline u32 proj_gpc_base_v(void)
60{
61 return 0x00500000U;
62}
63static inline u32 proj_gpc_shared_base_v(void)
64{
65 return 0x00418000U;
66}
67static inline u32 proj_gpc_stride_v(void)
68{
69 return 0x00008000U;
70}
71static inline u32 proj_gpc_priv_stride_v(void)
72{
73 return 0x00000800U;
74}
75static inline u32 proj_ltc_stride_v(void)
76{
77 return 0x00002000U;
78}
79static inline u32 proj_lts_stride_v(void)
80{
81 return 0x00000200U;
82}
83static inline u32 proj_fbpa_base_v(void)
84{
85 return 0x00900000U;
86}
87static inline u32 proj_fbpa_shared_base_v(void)
88{
89 return 0x009a0000U;
90}
91static inline u32 proj_fbpa_stride_v(void)
92{
93 return 0x00004000U;
94}
95static inline u32 proj_ppc_in_gpc_base_v(void)
96{
97 return 0x00003000U;
98}
99static inline u32 proj_ppc_in_gpc_shared_base_v(void)
100{
101 return 0x00003e00U;
102}
103static inline u32 proj_ppc_in_gpc_stride_v(void)
104{
105 return 0x00000200U;
106}
107static inline u32 proj_rop_base_v(void)
108{
109 return 0x00410000U;
110}
111static inline u32 proj_rop_shared_base_v(void)
112{
113 return 0x00408800U;
114}
115static inline u32 proj_rop_stride_v(void)
116{
117 return 0x00000400U;
118}
119static inline u32 proj_tpc_in_gpc_base_v(void)
120{
121 return 0x00004000U;
122}
123static inline u32 proj_tpc_in_gpc_stride_v(void)
124{
125 return 0x00000800U;
126}
127static inline u32 proj_tpc_in_gpc_shared_base_v(void)
128{
129 return 0x00001800U;
130}
131static inline u32 proj_host_num_engines_v(void)
132{
133 return 0x00000009U;
134}
135static inline u32 proj_host_num_pbdma_v(void)
136{
137 return 0x00000004U;
138}
139static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void)
140{
141 return 0x00000005U;
142}
143static inline u32 proj_scal_litter_num_sm_per_tpc_v(void)
144{
145 return 0x00000001U;
146}
147static inline u32 proj_scal_litter_num_fbps_v(void)
148{
149 return 0x00000006U;
150}
151static inline u32 proj_scal_litter_num_fbpas_v(void)
152{
153 return 0x00000006U;
154}
155static inline u32 proj_scal_litter_num_gpcs_v(void)
156{
157 return 0x00000006U;
158}
159static inline u32 proj_scal_litter_num_pes_per_gpc_v(void)
160{
161 return 0x00000003U;
162}
163static inline u32 proj_scal_litter_num_tpcs_per_pes_v(void)
164{
165 return 0x00000002U;
166}
167static inline u32 proj_scal_litter_num_zcull_banks_v(void)
168{
169 return 0x00000004U;
170}
171static inline u32 proj_scal_max_gpcs_v(void)
172{
173 return 0x00000020U;
174}
175static inline u32 proj_scal_max_tpc_per_gpc_v(void)
176{
177 return 0x00000008U;
178}
179#endif
diff --git a/include/nvgpu/hw/gp106/hw_psec_gp106.h b/include/nvgpu/hw/gp106/hw_psec_gp106.h
deleted file mode 100644
index b91c09b..0000000
--- a/include/nvgpu/hw/gp106/hw_psec_gp106.h
+++ /dev/null
@@ -1,615 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_psec_gp106_h_
57#define _hw_psec_gp106_h_
58
59static inline u32 psec_falcon_irqsset_r(void)
60{
61 return 0x00087000U;
62}
63static inline u32 psec_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 psec_falcon_irqsclr_r(void)
68{
69 return 0x00087004U;
70}
71static inline u32 psec_falcon_irqstat_r(void)
72{
73 return 0x00087008U;
74}
75static inline u32 psec_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 psec_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 psec_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 psec_falcon_irqmode_r(void)
88{
89 return 0x0008700cU;
90}
91static inline u32 psec_falcon_irqmset_r(void)
92{
93 return 0x00087010U;
94}
95static inline u32 psec_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 psec_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 psec_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 psec_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 psec_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 psec_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 psec_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 psec_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 psec_falcon_irqmclr_r(void)
128{
129 return 0x00087014U;
130}
131static inline u32 psec_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 psec_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 psec_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 psec_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 psec_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 psec_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 psec_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 psec_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 psec_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 psec_falcon_irqmask_r(void)
168{
169 return 0x00087018U;
170}
171static inline u32 psec_falcon_irqdest_r(void)
172{
173 return 0x0008701cU;
174}
175static inline u32 psec_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 psec_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 psec_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 psec_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 psec_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 psec_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 psec_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 psec_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 psec_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 psec_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 psec_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 psec_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 psec_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 psec_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 psec_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 psec_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 psec_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 psec_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 psec_falcon_curctx_r(void)
248{
249 return 0x00087050U;
250}
251static inline u32 psec_falcon_nxtctx_r(void)
252{
253 return 0x00087054U;
254}
255static inline u32 psec_falcon_mailbox0_r(void)
256{
257 return 0x00087040U;
258}
259static inline u32 psec_falcon_mailbox1_r(void)
260{
261 return 0x00087044U;
262}
263static inline u32 psec_falcon_itfen_r(void)
264{
265 return 0x00087048U;
266}
267static inline u32 psec_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 psec_falcon_idlestate_r(void)
272{
273 return 0x0008704cU;
274}
275static inline u32 psec_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 psec_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 psec_falcon_os_r(void)
284{
285 return 0x00087080U;
286}
287static inline u32 psec_falcon_engctl_r(void)
288{
289 return 0x000870a4U;
290}
291static inline u32 psec_falcon_cpuctl_r(void)
292{
293 return 0x00087100U;
294}
295static inline u32 psec_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 psec_falcon_cpuctl_halt_intr_f(u32 v)
300{
301 return (v & 0x1U) << 4U;
302}
303static inline u32 psec_falcon_cpuctl_halt_intr_m(void)
304{
305 return 0x1U << 4U;
306}
307static inline u32 psec_falcon_cpuctl_halt_intr_v(u32 r)
308{
309 return (r >> 4U) & 0x1U;
310}
311static inline u32 psec_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
312{
313 return (v & 0x1U) << 6U;
314}
315static inline u32 psec_falcon_cpuctl_cpuctl_alias_en_m(void)
316{
317 return 0x1U << 6U;
318}
319static inline u32 psec_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
320{
321 return (r >> 6U) & 0x1U;
322}
323static inline u32 psec_falcon_cpuctl_alias_r(void)
324{
325 return 0x00087130U;
326}
327static inline u32 psec_falcon_cpuctl_alias_startcpu_f(u32 v)
328{
329 return (v & 0x1U) << 1U;
330}
331static inline u32 psec_falcon_imemc_r(u32 i)
332{
333 return 0x00087180U + i*16U;
334}
335static inline u32 psec_falcon_imemc_offs_f(u32 v)
336{
337 return (v & 0x3fU) << 2U;
338}
339static inline u32 psec_falcon_imemc_blk_f(u32 v)
340{
341 return (v & 0xffU) << 8U;
342}
343static inline u32 psec_falcon_imemc_aincw_f(u32 v)
344{
345 return (v & 0x1U) << 24U;
346}
347static inline u32 psec_falcon_imemd_r(u32 i)
348{
349 return 0x00087184U + i*16U;
350}
351static inline u32 psec_falcon_imemt_r(u32 i)
352{
353 return 0x00087188U + i*16U;
354}
355static inline u32 psec_falcon_sctl_r(void)
356{
357 return 0x00087240U;
358}
359static inline u32 psec_falcon_mmu_phys_sec_r(void)
360{
361 return 0x00100ce4U;
362}
363static inline u32 psec_falcon_bootvec_r(void)
364{
365 return 0x00087104U;
366}
367static inline u32 psec_falcon_bootvec_vec_f(u32 v)
368{
369 return (v & 0xffffffffU) << 0U;
370}
371static inline u32 psec_falcon_dmactl_r(void)
372{
373 return 0x0008710cU;
374}
375static inline u32 psec_falcon_dmactl_dmem_scrubbing_m(void)
376{
377 return 0x1U << 1U;
378}
379static inline u32 psec_falcon_dmactl_imem_scrubbing_m(void)
380{
381 return 0x1U << 2U;
382}
383static inline u32 psec_falcon_dmactl_require_ctx_f(u32 v)
384{
385 return (v & 0x1U) << 0U;
386}
387static inline u32 psec_falcon_hwcfg_r(void)
388{
389 return 0x00087108U;
390}
391static inline u32 psec_falcon_hwcfg_imem_size_v(u32 r)
392{
393 return (r >> 0U) & 0x1ffU;
394}
395static inline u32 psec_falcon_hwcfg_dmem_size_v(u32 r)
396{
397 return (r >> 9U) & 0x1ffU;
398}
399static inline u32 psec_falcon_dmatrfbase_r(void)
400{
401 return 0x00087110U;
402}
403static inline u32 psec_falcon_dmatrfbase1_r(void)
404{
405 return 0x00087128U;
406}
407static inline u32 psec_falcon_dmatrfmoffs_r(void)
408{
409 return 0x00087114U;
410}
411static inline u32 psec_falcon_dmatrfcmd_r(void)
412{
413 return 0x00087118U;
414}
415static inline u32 psec_falcon_dmatrfcmd_imem_f(u32 v)
416{
417 return (v & 0x1U) << 4U;
418}
419static inline u32 psec_falcon_dmatrfcmd_write_f(u32 v)
420{
421 return (v & 0x1U) << 5U;
422}
423static inline u32 psec_falcon_dmatrfcmd_size_f(u32 v)
424{
425 return (v & 0x7U) << 8U;
426}
427static inline u32 psec_falcon_dmatrfcmd_ctxdma_f(u32 v)
428{
429 return (v & 0x7U) << 12U;
430}
431static inline u32 psec_falcon_dmatrffboffs_r(void)
432{
433 return 0x0008711cU;
434}
435static inline u32 psec_falcon_exterraddr_r(void)
436{
437 return 0x00087168U;
438}
439static inline u32 psec_falcon_exterrstat_r(void)
440{
441 return 0x0008716cU;
442}
443static inline u32 psec_falcon_exterrstat_valid_m(void)
444{
445 return 0x1U << 31U;
446}
447static inline u32 psec_falcon_exterrstat_valid_v(u32 r)
448{
449 return (r >> 31U) & 0x1U;
450}
451static inline u32 psec_falcon_exterrstat_valid_true_v(void)
452{
453 return 0x00000001U;
454}
455static inline u32 psec_sec2_falcon_icd_cmd_r(void)
456{
457 return 0x00087200U;
458}
459static inline u32 psec_sec2_falcon_icd_cmd_opc_s(void)
460{
461 return 4U;
462}
463static inline u32 psec_sec2_falcon_icd_cmd_opc_f(u32 v)
464{
465 return (v & 0xfU) << 0U;
466}
467static inline u32 psec_sec2_falcon_icd_cmd_opc_m(void)
468{
469 return 0xfU << 0U;
470}
471static inline u32 psec_sec2_falcon_icd_cmd_opc_v(u32 r)
472{
473 return (r >> 0U) & 0xfU;
474}
475static inline u32 psec_sec2_falcon_icd_cmd_opc_rreg_f(void)
476{
477 return 0x8U;
478}
479static inline u32 psec_sec2_falcon_icd_cmd_opc_rstat_f(void)
480{
481 return 0xeU;
482}
483static inline u32 psec_sec2_falcon_icd_cmd_idx_f(u32 v)
484{
485 return (v & 0x1fU) << 8U;
486}
487static inline u32 psec_sec2_falcon_icd_rdata_r(void)
488{
489 return 0x0008720cU;
490}
491static inline u32 psec_falcon_dmemc_r(u32 i)
492{
493 return 0x000871c0U + i*8U;
494}
495static inline u32 psec_falcon_dmemc_offs_f(u32 v)
496{
497 return (v & 0x3fU) << 2U;
498}
499static inline u32 psec_falcon_dmemc_offs_m(void)
500{
501 return 0x3fU << 2U;
502}
503static inline u32 psec_falcon_dmemc_blk_f(u32 v)
504{
505 return (v & 0xffU) << 8U;
506}
507static inline u32 psec_falcon_dmemc_blk_m(void)
508{
509 return 0xffU << 8U;
510}
511static inline u32 psec_falcon_dmemc_aincw_f(u32 v)
512{
513 return (v & 0x1U) << 24U;
514}
515static inline u32 psec_falcon_dmemc_aincr_f(u32 v)
516{
517 return (v & 0x1U) << 25U;
518}
519static inline u32 psec_falcon_dmemd_r(u32 i)
520{
521 return 0x000871c4U + i*8U;
522}
523static inline u32 psec_falcon_debug1_r(void)
524{
525 return 0x00087090U;
526}
527static inline u32 psec_falcon_debug1_ctxsw_mode_s(void)
528{
529 return 1U;
530}
531static inline u32 psec_falcon_debug1_ctxsw_mode_f(u32 v)
532{
533 return (v & 0x1U) << 16U;
534}
535static inline u32 psec_falcon_debug1_ctxsw_mode_m(void)
536{
537 return 0x1U << 16U;
538}
539static inline u32 psec_falcon_debug1_ctxsw_mode_v(u32 r)
540{
541 return (r >> 16U) & 0x1U;
542}
543static inline u32 psec_falcon_debug1_ctxsw_mode_init_f(void)
544{
545 return 0x0U;
546}
547static inline u32 psec_fbif_transcfg_r(u32 i)
548{
549 return 0x00087600U + i*4U;
550}
551static inline u32 psec_fbif_transcfg_target_local_fb_f(void)
552{
553 return 0x0U;
554}
555static inline u32 psec_fbif_transcfg_target_coherent_sysmem_f(void)
556{
557 return 0x1U;
558}
559static inline u32 psec_fbif_transcfg_target_noncoherent_sysmem_f(void)
560{
561 return 0x2U;
562}
563static inline u32 psec_fbif_transcfg_mem_type_s(void)
564{
565 return 1U;
566}
567static inline u32 psec_fbif_transcfg_mem_type_f(u32 v)
568{
569 return (v & 0x1U) << 2U;
570}
571static inline u32 psec_fbif_transcfg_mem_type_m(void)
572{
573 return 0x1U << 2U;
574}
575static inline u32 psec_fbif_transcfg_mem_type_v(u32 r)
576{
577 return (r >> 2U) & 0x1U;
578}
579static inline u32 psec_fbif_transcfg_mem_type_virtual_f(void)
580{
581 return 0x0U;
582}
583static inline u32 psec_fbif_transcfg_mem_type_physical_f(void)
584{
585 return 0x4U;
586}
587static inline u32 psec_falcon_engine_r(void)
588{
589 return 0x000873c0U;
590}
591static inline u32 psec_falcon_engine_reset_true_f(void)
592{
593 return 0x1U;
594}
595static inline u32 psec_falcon_engine_reset_false_f(void)
596{
597 return 0x0U;
598}
599static inline u32 psec_fbif_ctl_r(void)
600{
601 return 0x00087624U;
602}
603static inline u32 psec_fbif_ctl_allow_phys_no_ctx_init_f(void)
604{
605 return 0x0U;
606}
607static inline u32 psec_fbif_ctl_allow_phys_no_ctx_disallow_f(void)
608{
609 return 0x0U;
610}
611static inline u32 psec_fbif_ctl_allow_phys_no_ctx_allow_f(void)
612{
613 return 0x80U;
614}
615#endif
diff --git a/include/nvgpu/hw/gp106/hw_pwr_gp106.h b/include/nvgpu/hw/gp106/hw_pwr_gp106.h
deleted file mode 100644
index 2e75fa6..0000000
--- a/include/nvgpu/hw/gp106/hw_pwr_gp106.h
+++ /dev/null
@@ -1,895 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pwr_gp106_h_
57#define _hw_pwr_gp106_h_
58
59static inline u32 pwr_falcon_irqsset_r(void)
60{
61 return 0x0010a000U;
62}
63static inline u32 pwr_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 pwr_falcon_irqsclr_r(void)
68{
69 return 0x0010a004U;
70}
71static inline u32 pwr_falcon_irqstat_r(void)
72{
73 return 0x0010a008U;
74}
75static inline u32 pwr_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 pwr_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 pwr_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 pwr_falcon_irqmode_r(void)
88{
89 return 0x0010a00cU;
90}
91static inline u32 pwr_falcon_irqmset_r(void)
92{
93 return 0x0010a010U;
94}
95static inline u32 pwr_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 pwr_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 pwr_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 pwr_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 pwr_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 pwr_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 pwr_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 pwr_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 pwr_falcon_irqmclr_r(void)
128{
129 return 0x0010a014U;
130}
131static inline u32 pwr_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 pwr_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 pwr_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 pwr_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 pwr_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 pwr_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 pwr_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 pwr_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 pwr_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 pwr_falcon_irqmask_r(void)
168{
169 return 0x0010a018U;
170}
171static inline u32 pwr_falcon_irqdest_r(void)
172{
173 return 0x0010a01cU;
174}
175static inline u32 pwr_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 pwr_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 pwr_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 pwr_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 pwr_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 pwr_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 pwr_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 pwr_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 pwr_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 pwr_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 pwr_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 pwr_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 pwr_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 pwr_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 pwr_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 pwr_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 pwr_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 pwr_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 pwr_falcon_curctx_r(void)
248{
249 return 0x0010a050U;
250}
251static inline u32 pwr_falcon_nxtctx_r(void)
252{
253 return 0x0010a054U;
254}
255static inline u32 pwr_falcon_mailbox0_r(void)
256{
257 return 0x0010a040U;
258}
259static inline u32 pwr_falcon_mailbox1_r(void)
260{
261 return 0x0010a044U;
262}
263static inline u32 pwr_falcon_itfen_r(void)
264{
265 return 0x0010a048U;
266}
267static inline u32 pwr_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 pwr_falcon_idlestate_r(void)
272{
273 return 0x0010a04cU;
274}
275static inline u32 pwr_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 pwr_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 pwr_falcon_os_r(void)
284{
285 return 0x0010a080U;
286}
287static inline u32 pwr_falcon_engctl_r(void)
288{
289 return 0x0010a0a4U;
290}
291static inline u32 pwr_falcon_cpuctl_r(void)
292{
293 return 0x0010a100U;
294}
295static inline u32 pwr_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 pwr_falcon_cpuctl_halt_intr_f(u32 v)
300{
301 return (v & 0x1U) << 4U;
302}
303static inline u32 pwr_falcon_cpuctl_halt_intr_m(void)
304{
305 return 0x1U << 4U;
306}
307static inline u32 pwr_falcon_cpuctl_halt_intr_v(u32 r)
308{
309 return (r >> 4U) & 0x1U;
310}
311static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
312{
313 return (v & 0x1U) << 6U;
314}
315static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_m(void)
316{
317 return 0x1U << 6U;
318}
319static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
320{
321 return (r >> 6U) & 0x1U;
322}
323static inline u32 pwr_falcon_cpuctl_alias_r(void)
324{
325 return 0x0010a130U;
326}
327static inline u32 pwr_falcon_cpuctl_alias_startcpu_f(u32 v)
328{
329 return (v & 0x1U) << 1U;
330}
331static inline u32 pwr_pmu_scpctl_stat_r(void)
332{
333 return 0x0010ac08U;
334}
335static inline u32 pwr_pmu_scpctl_stat_debug_mode_f(u32 v)
336{
337 return (v & 0x1U) << 20U;
338}
339static inline u32 pwr_pmu_scpctl_stat_debug_mode_m(void)
340{
341 return 0x1U << 20U;
342}
343static inline u32 pwr_pmu_scpctl_stat_debug_mode_v(u32 r)
344{
345 return (r >> 20U) & 0x1U;
346}
347static inline u32 pwr_falcon_imemc_r(u32 i)
348{
349 return 0x0010a180U + i*16U;
350}
351static inline u32 pwr_falcon_imemc_offs_f(u32 v)
352{
353 return (v & 0x3fU) << 2U;
354}
355static inline u32 pwr_falcon_imemc_blk_f(u32 v)
356{
357 return (v & 0xffU) << 8U;
358}
359static inline u32 pwr_falcon_imemc_aincw_f(u32 v)
360{
361 return (v & 0x1U) << 24U;
362}
363static inline u32 pwr_falcon_imemd_r(u32 i)
364{
365 return 0x0010a184U + i*16U;
366}
367static inline u32 pwr_falcon_imemt_r(u32 i)
368{
369 return 0x0010a188U + i*16U;
370}
371static inline u32 pwr_falcon_sctl_r(void)
372{
373 return 0x0010a240U;
374}
375static inline u32 pwr_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 pwr_falcon_bootvec_r(void)
380{
381 return 0x0010a104U;
382}
383static inline u32 pwr_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 pwr_falcon_dmactl_r(void)
388{
389 return 0x0010a10cU;
390}
391static inline u32 pwr_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 pwr_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 pwr_falcon_dmactl_require_ctx_f(u32 v)
400{
401 return (v & 0x1U) << 0U;
402}
403static inline u32 pwr_falcon_hwcfg_r(void)
404{
405 return 0x0010a108U;
406}
407static inline u32 pwr_falcon_hwcfg_imem_size_v(u32 r)
408{
409 return (r >> 0U) & 0x1ffU;
410}
411static inline u32 pwr_falcon_hwcfg_dmem_size_v(u32 r)
412{
413 return (r >> 9U) & 0x1ffU;
414}
415static inline u32 pwr_falcon_dmatrfbase_r(void)
416{
417 return 0x0010a110U;
418}
419static inline u32 pwr_falcon_dmatrfbase1_r(void)
420{
421 return 0x0010a128U;
422}
423static inline u32 pwr_falcon_dmatrfmoffs_r(void)
424{
425 return 0x0010a114U;
426}
427static inline u32 pwr_falcon_dmatrfcmd_r(void)
428{
429 return 0x0010a118U;
430}
431static inline u32 pwr_falcon_dmatrfcmd_imem_f(u32 v)
432{
433 return (v & 0x1U) << 4U;
434}
435static inline u32 pwr_falcon_dmatrfcmd_write_f(u32 v)
436{
437 return (v & 0x1U) << 5U;
438}
439static inline u32 pwr_falcon_dmatrfcmd_size_f(u32 v)
440{
441 return (v & 0x7U) << 8U;
442}
443static inline u32 pwr_falcon_dmatrfcmd_ctxdma_f(u32 v)
444{
445 return (v & 0x7U) << 12U;
446}
447static inline u32 pwr_falcon_dmatrffboffs_r(void)
448{
449 return 0x0010a11cU;
450}
451static inline u32 pwr_falcon_exterraddr_r(void)
452{
453 return 0x0010a168U;
454}
455static inline u32 pwr_falcon_exterrstat_r(void)
456{
457 return 0x0010a16cU;
458}
459static inline u32 pwr_falcon_exterrstat_valid_m(void)
460{
461 return 0x1U << 31U;
462}
463static inline u32 pwr_falcon_exterrstat_valid_v(u32 r)
464{
465 return (r >> 31U) & 0x1U;
466}
467static inline u32 pwr_falcon_exterrstat_valid_true_v(void)
468{
469 return 0x00000001U;
470}
471static inline u32 pwr_pmu_falcon_icd_cmd_r(void)
472{
473 return 0x0010a200U;
474}
475static inline u32 pwr_pmu_falcon_icd_cmd_opc_s(void)
476{
477 return 4U;
478}
479static inline u32 pwr_pmu_falcon_icd_cmd_opc_f(u32 v)
480{
481 return (v & 0xfU) << 0U;
482}
483static inline u32 pwr_pmu_falcon_icd_cmd_opc_m(void)
484{
485 return 0xfU << 0U;
486}
487static inline u32 pwr_pmu_falcon_icd_cmd_opc_v(u32 r)
488{
489 return (r >> 0U) & 0xfU;
490}
491static inline u32 pwr_pmu_falcon_icd_cmd_opc_rreg_f(void)
492{
493 return 0x8U;
494}
495static inline u32 pwr_pmu_falcon_icd_cmd_opc_rstat_f(void)
496{
497 return 0xeU;
498}
499static inline u32 pwr_pmu_falcon_icd_cmd_idx_f(u32 v)
500{
501 return (v & 0x1fU) << 8U;
502}
503static inline u32 pwr_pmu_falcon_icd_rdata_r(void)
504{
505 return 0x0010a20cU;
506}
507static inline u32 pwr_falcon_dmemc_r(u32 i)
508{
509 return 0x0010a1c0U + i*8U;
510}
511static inline u32 pwr_falcon_dmemc_offs_f(u32 v)
512{
513 return (v & 0x3fU) << 2U;
514}
515static inline u32 pwr_falcon_dmemc_offs_m(void)
516{
517 return 0x3fU << 2U;
518}
519static inline u32 pwr_falcon_dmemc_blk_f(u32 v)
520{
521 return (v & 0xffU) << 8U;
522}
523static inline u32 pwr_falcon_dmemc_blk_m(void)
524{
525 return 0xffU << 8U;
526}
527static inline u32 pwr_falcon_dmemc_aincw_f(u32 v)
528{
529 return (v & 0x1U) << 24U;
530}
531static inline u32 pwr_falcon_dmemc_aincr_f(u32 v)
532{
533 return (v & 0x1U) << 25U;
534}
535static inline u32 pwr_falcon_dmemd_r(u32 i)
536{
537 return 0x0010a1c4U + i*8U;
538}
539static inline u32 pwr_pmu_new_instblk_r(void)
540{
541 return 0x0010a480U;
542}
543static inline u32 pwr_pmu_new_instblk_ptr_f(u32 v)
544{
545 return (v & 0xfffffffU) << 0U;
546}
547static inline u32 pwr_pmu_new_instblk_target_fb_f(void)
548{
549 return 0x0U;
550}
551static inline u32 pwr_pmu_new_instblk_target_sys_coh_f(void)
552{
553 return 0x20000000U;
554}
555static inline u32 pwr_pmu_new_instblk_target_sys_ncoh_f(void)
556{
557 return 0x30000000U;
558}
559static inline u32 pwr_pmu_new_instblk_valid_f(u32 v)
560{
561 return (v & 0x1U) << 30U;
562}
563static inline u32 pwr_pmu_mutex_id_r(void)
564{
565 return 0x0010a488U;
566}
567static inline u32 pwr_pmu_mutex_id_value_v(u32 r)
568{
569 return (r >> 0U) & 0xffU;
570}
571static inline u32 pwr_pmu_mutex_id_value_init_v(void)
572{
573 return 0x00000000U;
574}
575static inline u32 pwr_pmu_mutex_id_value_not_avail_v(void)
576{
577 return 0x000000ffU;
578}
579static inline u32 pwr_pmu_mutex_id_release_r(void)
580{
581 return 0x0010a48cU;
582}
583static inline u32 pwr_pmu_mutex_id_release_value_f(u32 v)
584{
585 return (v & 0xffU) << 0U;
586}
587static inline u32 pwr_pmu_mutex_id_release_value_m(void)
588{
589 return 0xffU << 0U;
590}
591static inline u32 pwr_pmu_mutex_id_release_value_init_v(void)
592{
593 return 0x00000000U;
594}
595static inline u32 pwr_pmu_mutex_id_release_value_init_f(void)
596{
597 return 0x0U;
598}
599static inline u32 pwr_pmu_mutex_r(u32 i)
600{
601 return 0x0010a580U + i*4U;
602}
603static inline u32 pwr_pmu_mutex__size_1_v(void)
604{
605 return 0x00000010U;
606}
607static inline u32 pwr_pmu_mutex_value_f(u32 v)
608{
609 return (v & 0xffU) << 0U;
610}
611static inline u32 pwr_pmu_mutex_value_v(u32 r)
612{
613 return (r >> 0U) & 0xffU;
614}
615static inline u32 pwr_pmu_mutex_value_initial_lock_f(void)
616{
617 return 0x0U;
618}
619static inline u32 pwr_pmu_queue_head_r(u32 i)
620{
621 return 0x0010a4a0U + i*4U;
622}
623static inline u32 pwr_pmu_queue_head__size_1_v(void)
624{
625 return 0x00000004U;
626}
627static inline u32 pwr_pmu_queue_head_address_f(u32 v)
628{
629 return (v & 0xffffffffU) << 0U;
630}
631static inline u32 pwr_pmu_queue_head_address_v(u32 r)
632{
633 return (r >> 0U) & 0xffffffffU;
634}
635static inline u32 pwr_pmu_queue_tail_r(u32 i)
636{
637 return 0x0010a4b0U + i*4U;
638}
639static inline u32 pwr_pmu_queue_tail__size_1_v(void)
640{
641 return 0x00000004U;
642}
643static inline u32 pwr_pmu_queue_tail_address_f(u32 v)
644{
645 return (v & 0xffffffffU) << 0U;
646}
647static inline u32 pwr_pmu_queue_tail_address_v(u32 r)
648{
649 return (r >> 0U) & 0xffffffffU;
650}
651static inline u32 pwr_pmu_msgq_head_r(void)
652{
653 return 0x0010a4c8U;
654}
655static inline u32 pwr_pmu_msgq_head_val_f(u32 v)
656{
657 return (v & 0xffffffffU) << 0U;
658}
659static inline u32 pwr_pmu_msgq_head_val_v(u32 r)
660{
661 return (r >> 0U) & 0xffffffffU;
662}
663static inline u32 pwr_pmu_msgq_tail_r(void)
664{
665 return 0x0010a4ccU;
666}
667static inline u32 pwr_pmu_msgq_tail_val_f(u32 v)
668{
669 return (v & 0xffffffffU) << 0U;
670}
671static inline u32 pwr_pmu_msgq_tail_val_v(u32 r)
672{
673 return (r >> 0U) & 0xffffffffU;
674}
675static inline u32 pwr_pmu_idle_mask_r(u32 i)
676{
677 return 0x0010a504U + i*16U;
678}
679static inline u32 pwr_pmu_idle_mask_gr_enabled_f(void)
680{
681 return 0x1U;
682}
683static inline u32 pwr_pmu_idle_mask_ce_2_enabled_f(void)
684{
685 return 0x200000U;
686}
687static inline u32 pwr_pmu_idle_count_r(u32 i)
688{
689 return 0x0010a508U + i*16U;
690}
691static inline u32 pwr_pmu_idle_count_value_f(u32 v)
692{
693 return (v & 0x7fffffffU) << 0U;
694}
695static inline u32 pwr_pmu_idle_count_value_v(u32 r)
696{
697 return (r >> 0U) & 0x7fffffffU;
698}
699static inline u32 pwr_pmu_idle_count_reset_f(u32 v)
700{
701 return (v & 0x1U) << 31U;
702}
703static inline u32 pwr_pmu_idle_ctrl_r(u32 i)
704{
705 return 0x0010a50cU + i*16U;
706}
707static inline u32 pwr_pmu_idle_ctrl_value_m(void)
708{
709 return 0x3U << 0U;
710}
711static inline u32 pwr_pmu_idle_ctrl_value_busy_f(void)
712{
713 return 0x2U;
714}
715static inline u32 pwr_pmu_idle_ctrl_value_always_f(void)
716{
717 return 0x3U;
718}
719static inline u32 pwr_pmu_idle_ctrl_filter_m(void)
720{
721 return 0x1U << 2U;
722}
723static inline u32 pwr_pmu_idle_ctrl_filter_disabled_f(void)
724{
725 return 0x0U;
726}
727static inline u32 pwr_pmu_idle_threshold_r(u32 i)
728{
729 return 0x0010a8a0U + i*4U;
730}
731static inline u32 pwr_pmu_idle_threshold_value_f(u32 v)
732{
733 return (v & 0x7fffffffU) << 0U;
734}
735static inline u32 pwr_pmu_idle_intr_r(void)
736{
737 return 0x0010a9e8U;
738}
739static inline u32 pwr_pmu_idle_intr_en_f(u32 v)
740{
741 return (v & 0x1U) << 0U;
742}
743static inline u32 pwr_pmu_idle_intr_en_disabled_v(void)
744{
745 return 0x00000000U;
746}
747static inline u32 pwr_pmu_idle_intr_en_enabled_v(void)
748{
749 return 0x00000001U;
750}
751static inline u32 pwr_pmu_idle_intr_status_r(void)
752{
753 return 0x0010a9ecU;
754}
755static inline u32 pwr_pmu_idle_intr_status_intr_f(u32 v)
756{
757 return (v & 0x1U) << 0U;
758}
759static inline u32 pwr_pmu_idle_intr_status_intr_m(void)
760{
761 return U32(0x1U) << 0U;
762}
763static inline u32 pwr_pmu_idle_intr_status_intr_v(u32 r)
764{
765 return (r >> 0U) & 0x1U;
766}
767static inline u32 pwr_pmu_idle_intr_status_intr_pending_v(void)
768{
769 return 0x00000001U;
770}
771static inline u32 pwr_pmu_idle_intr_status_intr_clear_v(void)
772{
773 return 0x00000001U;
774}
775static inline u32 pwr_pmu_idle_mask_supp_r(u32 i)
776{
777 return 0x0010a9f0U + i*8U;
778}
779static inline u32 pwr_pmu_idle_mask_1_supp_r(u32 i)
780{
781 return 0x0010a9f4U + i*8U;
782}
783static inline u32 pwr_pmu_idle_ctrl_supp_r(u32 i)
784{
785 return 0x0010aa30U + i*8U;
786}
787static inline u32 pwr_pmu_debug_r(u32 i)
788{
789 return 0x0010a5c0U + i*4U;
790}
791static inline u32 pwr_pmu_debug__size_1_v(void)
792{
793 return 0x00000004U;
794}
795static inline u32 pwr_pmu_mailbox_r(u32 i)
796{
797 return 0x0010a450U + i*4U;
798}
799static inline u32 pwr_pmu_mailbox__size_1_v(void)
800{
801 return 0x0000000cU;
802}
803static inline u32 pwr_pmu_bar0_addr_r(void)
804{
805 return 0x0010a7a0U;
806}
807static inline u32 pwr_pmu_bar0_data_r(void)
808{
809 return 0x0010a7a4U;
810}
811static inline u32 pwr_pmu_bar0_ctl_r(void)
812{
813 return 0x0010a7acU;
814}
815static inline u32 pwr_pmu_bar0_timeout_r(void)
816{
817 return 0x0010a7a8U;
818}
819static inline u32 pwr_pmu_bar0_fecs_error_r(void)
820{
821 return 0x0010a988U;
822}
823static inline u32 pwr_pmu_bar0_error_status_r(void)
824{
825 return 0x0010a7b0U;
826}
827static inline u32 pwr_pmu_pg_idlefilth_r(u32 i)
828{
829 return 0x0010a6c0U + i*4U;
830}
831static inline u32 pwr_pmu_pg_ppuidlefilth_r(u32 i)
832{
833 return 0x0010a6e8U + i*4U;
834}
835static inline u32 pwr_pmu_pg_idle_cnt_r(u32 i)
836{
837 return 0x0010a710U + i*4U;
838}
839static inline u32 pwr_pmu_pg_intren_r(u32 i)
840{
841 return 0x0010a760U + i*4U;
842}
843static inline u32 pwr_fbif_transcfg_r(u32 i)
844{
845 return 0x0010ae00U + i*4U;
846}
847static inline u32 pwr_fbif_transcfg_target_local_fb_f(void)
848{
849 return 0x0U;
850}
851static inline u32 pwr_fbif_transcfg_target_coherent_sysmem_f(void)
852{
853 return 0x1U;
854}
855static inline u32 pwr_fbif_transcfg_target_noncoherent_sysmem_f(void)
856{
857 return 0x2U;
858}
859static inline u32 pwr_fbif_transcfg_mem_type_s(void)
860{
861 return 1U;
862}
863static inline u32 pwr_fbif_transcfg_mem_type_f(u32 v)
864{
865 return (v & 0x1U) << 2U;
866}
867static inline u32 pwr_fbif_transcfg_mem_type_m(void)
868{
869 return 0x1U << 2U;
870}
871static inline u32 pwr_fbif_transcfg_mem_type_v(u32 r)
872{
873 return (r >> 2U) & 0x1U;
874}
875static inline u32 pwr_fbif_transcfg_mem_type_virtual_f(void)
876{
877 return 0x0U;
878}
879static inline u32 pwr_fbif_transcfg_mem_type_physical_f(void)
880{
881 return 0x4U;
882}
883static inline u32 pwr_falcon_engine_r(void)
884{
885 return 0x0010a3c0U;
886}
887static inline u32 pwr_falcon_engine_reset_true_f(void)
888{
889 return 0x1U;
890}
891static inline u32 pwr_falcon_engine_reset_false_f(void)
892{
893 return 0x0U;
894}
895#endif
diff --git a/include/nvgpu/hw/gp106/hw_ram_gp106.h b/include/nvgpu/hw/gp106/hw_ram_gp106.h
deleted file mode 100644
index 1de8aa2..0000000
--- a/include/nvgpu/hw/gp106/hw_ram_gp106.h
+++ /dev/null
@@ -1,507 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ram_gp106_h_
57#define _hw_ram_gp106_h_
58
59static inline u32 ram_in_ramfc_s(void)
60{
61 return 4096U;
62}
63static inline u32 ram_in_ramfc_w(void)
64{
65 return 0U;
66}
67static inline u32 ram_in_page_dir_base_target_f(u32 v)
68{
69 return (v & 0x3U) << 0U;
70}
71static inline u32 ram_in_page_dir_base_target_w(void)
72{
73 return 128U;
74}
75static inline u32 ram_in_page_dir_base_target_vid_mem_f(void)
76{
77 return 0x0U;
78}
79static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void)
80{
81 return 0x2U;
82}
83static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void)
84{
85 return 0x3U;
86}
87static inline u32 ram_in_page_dir_base_vol_w(void)
88{
89 return 128U;
90}
91static inline u32 ram_in_page_dir_base_vol_true_f(void)
92{
93 return 0x4U;
94}
95static inline u32 ram_in_page_dir_base_fault_replay_tex_f(u32 v)
96{
97 return (v & 0x1U) << 4U;
98}
99static inline u32 ram_in_page_dir_base_fault_replay_tex_m(void)
100{
101 return 0x1U << 4U;
102}
103static inline u32 ram_in_page_dir_base_fault_replay_tex_w(void)
104{
105 return 128U;
106}
107static inline u32 ram_in_page_dir_base_fault_replay_tex_true_f(void)
108{
109 return 0x10U;
110}
111static inline u32 ram_in_page_dir_base_fault_replay_gcc_f(u32 v)
112{
113 return (v & 0x1U) << 5U;
114}
115static inline u32 ram_in_page_dir_base_fault_replay_gcc_m(void)
116{
117 return 0x1U << 5U;
118}
119static inline u32 ram_in_page_dir_base_fault_replay_gcc_w(void)
120{
121 return 128U;
122}
123static inline u32 ram_in_page_dir_base_fault_replay_gcc_true_f(void)
124{
125 return 0x20U;
126}
127static inline u32 ram_in_use_ver2_pt_format_f(u32 v)
128{
129 return (v & 0x1U) << 10U;
130}
131static inline u32 ram_in_use_ver2_pt_format_m(void)
132{
133 return 0x1U << 10U;
134}
135static inline u32 ram_in_use_ver2_pt_format_w(void)
136{
137 return 128U;
138}
139static inline u32 ram_in_use_ver2_pt_format_true_f(void)
140{
141 return 0x400U;
142}
143static inline u32 ram_in_use_ver2_pt_format_false_f(void)
144{
145 return 0x0U;
146}
147static inline u32 ram_in_big_page_size_f(u32 v)
148{
149 return (v & 0x1U) << 11U;
150}
151static inline u32 ram_in_big_page_size_m(void)
152{
153 return 0x1U << 11U;
154}
155static inline u32 ram_in_big_page_size_w(void)
156{
157 return 128U;
158}
159static inline u32 ram_in_big_page_size_128kb_f(void)
160{
161 return 0x0U;
162}
163static inline u32 ram_in_big_page_size_64kb_f(void)
164{
165 return 0x800U;
166}
167static inline u32 ram_in_page_dir_base_lo_f(u32 v)
168{
169 return (v & 0xfffffU) << 12U;
170}
171static inline u32 ram_in_page_dir_base_lo_w(void)
172{
173 return 128U;
174}
175static inline u32 ram_in_page_dir_base_hi_f(u32 v)
176{
177 return (v & 0xffffffffU) << 0U;
178}
179static inline u32 ram_in_page_dir_base_hi_w(void)
180{
181 return 129U;
182}
183static inline u32 ram_in_adr_limit_lo_f(u32 v)
184{
185 return (v & 0xfffffU) << 12U;
186}
187static inline u32 ram_in_adr_limit_lo_w(void)
188{
189 return 130U;
190}
191static inline u32 ram_in_adr_limit_hi_f(u32 v)
192{
193 return (v & 0xffffffffU) << 0U;
194}
195static inline u32 ram_in_adr_limit_hi_w(void)
196{
197 return 131U;
198}
199static inline u32 ram_in_engine_cs_w(void)
200{
201 return 132U;
202}
203static inline u32 ram_in_engine_cs_wfi_v(void)
204{
205 return 0x00000000U;
206}
207static inline u32 ram_in_engine_cs_wfi_f(void)
208{
209 return 0x0U;
210}
211static inline u32 ram_in_engine_cs_fg_v(void)
212{
213 return 0x00000001U;
214}
215static inline u32 ram_in_engine_cs_fg_f(void)
216{
217 return 0x8U;
218}
219static inline u32 ram_in_gr_cs_w(void)
220{
221 return 132U;
222}
223static inline u32 ram_in_gr_cs_wfi_f(void)
224{
225 return 0x0U;
226}
227static inline u32 ram_in_gr_wfi_target_w(void)
228{
229 return 132U;
230}
231static inline u32 ram_in_gr_wfi_mode_w(void)
232{
233 return 132U;
234}
235static inline u32 ram_in_gr_wfi_mode_physical_v(void)
236{
237 return 0x00000000U;
238}
239static inline u32 ram_in_gr_wfi_mode_physical_f(void)
240{
241 return 0x0U;
242}
243static inline u32 ram_in_gr_wfi_mode_virtual_v(void)
244{
245 return 0x00000001U;
246}
247static inline u32 ram_in_gr_wfi_mode_virtual_f(void)
248{
249 return 0x4U;
250}
251static inline u32 ram_in_gr_wfi_ptr_lo_f(u32 v)
252{
253 return (v & 0xfffffU) << 12U;
254}
255static inline u32 ram_in_gr_wfi_ptr_lo_w(void)
256{
257 return 132U;
258}
259static inline u32 ram_in_gr_wfi_ptr_hi_f(u32 v)
260{
261 return (v & 0xffU) << 0U;
262}
263static inline u32 ram_in_gr_wfi_ptr_hi_w(void)
264{
265 return 133U;
266}
267static inline u32 ram_in_base_shift_v(void)
268{
269 return 0x0000000cU;
270}
271static inline u32 ram_in_alloc_size_v(void)
272{
273 return 0x00001000U;
274}
275static inline u32 ram_fc_size_val_v(void)
276{
277 return 0x00000200U;
278}
279static inline u32 ram_fc_gp_put_w(void)
280{
281 return 0U;
282}
283static inline u32 ram_fc_userd_w(void)
284{
285 return 2U;
286}
287static inline u32 ram_fc_userd_hi_w(void)
288{
289 return 3U;
290}
291static inline u32 ram_fc_signature_w(void)
292{
293 return 4U;
294}
295static inline u32 ram_fc_gp_get_w(void)
296{
297 return 5U;
298}
299static inline u32 ram_fc_pb_get_w(void)
300{
301 return 6U;
302}
303static inline u32 ram_fc_pb_get_hi_w(void)
304{
305 return 7U;
306}
307static inline u32 ram_fc_pb_top_level_get_w(void)
308{
309 return 8U;
310}
311static inline u32 ram_fc_pb_top_level_get_hi_w(void)
312{
313 return 9U;
314}
315static inline u32 ram_fc_acquire_w(void)
316{
317 return 12U;
318}
319static inline u32 ram_fc_semaphorea_w(void)
320{
321 return 14U;
322}
323static inline u32 ram_fc_semaphoreb_w(void)
324{
325 return 15U;
326}
327static inline u32 ram_fc_semaphorec_w(void)
328{
329 return 16U;
330}
331static inline u32 ram_fc_semaphored_w(void)
332{
333 return 17U;
334}
335static inline u32 ram_fc_gp_base_w(void)
336{
337 return 18U;
338}
339static inline u32 ram_fc_gp_base_hi_w(void)
340{
341 return 19U;
342}
343static inline u32 ram_fc_gp_fetch_w(void)
344{
345 return 20U;
346}
347static inline u32 ram_fc_pb_fetch_w(void)
348{
349 return 21U;
350}
351static inline u32 ram_fc_pb_fetch_hi_w(void)
352{
353 return 22U;
354}
355static inline u32 ram_fc_pb_put_w(void)
356{
357 return 23U;
358}
359static inline u32 ram_fc_pb_put_hi_w(void)
360{
361 return 24U;
362}
363static inline u32 ram_fc_pb_header_w(void)
364{
365 return 33U;
366}
367static inline u32 ram_fc_pb_count_w(void)
368{
369 return 34U;
370}
371static inline u32 ram_fc_subdevice_w(void)
372{
373 return 37U;
374}
375static inline u32 ram_fc_formats_w(void)
376{
377 return 39U;
378}
379static inline u32 ram_fc_target_w(void)
380{
381 return 43U;
382}
383static inline u32 ram_fc_hce_ctrl_w(void)
384{
385 return 57U;
386}
387static inline u32 ram_fc_chid_w(void)
388{
389 return 58U;
390}
391static inline u32 ram_fc_chid_id_f(u32 v)
392{
393 return (v & 0xfffU) << 0U;
394}
395static inline u32 ram_fc_chid_id_w(void)
396{
397 return 0U;
398}
399static inline u32 ram_fc_config_w(void)
400{
401 return 61U;
402}
403static inline u32 ram_fc_runlist_timeslice_w(void)
404{
405 return 62U;
406}
407static inline u32 ram_userd_base_shift_v(void)
408{
409 return 0x00000009U;
410}
411static inline u32 ram_userd_chan_size_v(void)
412{
413 return 0x00000200U;
414}
415static inline u32 ram_userd_put_w(void)
416{
417 return 16U;
418}
419static inline u32 ram_userd_get_w(void)
420{
421 return 17U;
422}
423static inline u32 ram_userd_ref_w(void)
424{
425 return 18U;
426}
427static inline u32 ram_userd_put_hi_w(void)
428{
429 return 19U;
430}
431static inline u32 ram_userd_ref_threshold_w(void)
432{
433 return 20U;
434}
435static inline u32 ram_userd_top_level_get_w(void)
436{
437 return 22U;
438}
439static inline u32 ram_userd_top_level_get_hi_w(void)
440{
441 return 23U;
442}
443static inline u32 ram_userd_get_hi_w(void)
444{
445 return 24U;
446}
447static inline u32 ram_userd_gp_get_w(void)
448{
449 return 34U;
450}
451static inline u32 ram_userd_gp_put_w(void)
452{
453 return 35U;
454}
455static inline u32 ram_userd_gp_top_level_get_w(void)
456{
457 return 22U;
458}
459static inline u32 ram_userd_gp_top_level_get_hi_w(void)
460{
461 return 23U;
462}
463static inline u32 ram_rl_entry_size_v(void)
464{
465 return 0x00000008U;
466}
467static inline u32 ram_rl_entry_chid_f(u32 v)
468{
469 return (v & 0xfffU) << 0U;
470}
471static inline u32 ram_rl_entry_id_f(u32 v)
472{
473 return (v & 0xfffU) << 0U;
474}
475static inline u32 ram_rl_entry_type_f(u32 v)
476{
477 return (v & 0x1U) << 13U;
478}
479static inline u32 ram_rl_entry_type_chid_f(void)
480{
481 return 0x0U;
482}
483static inline u32 ram_rl_entry_type_tsg_f(void)
484{
485 return 0x2000U;
486}
487static inline u32 ram_rl_entry_timeslice_scale_f(u32 v)
488{
489 return (v & 0xfU) << 14U;
490}
491static inline u32 ram_rl_entry_timeslice_scale_3_f(void)
492{
493 return 0xc000U;
494}
495static inline u32 ram_rl_entry_timeslice_timeout_f(u32 v)
496{
497 return (v & 0xffU) << 18U;
498}
499static inline u32 ram_rl_entry_timeslice_timeout_128_f(void)
500{
501 return 0x2000000U;
502}
503static inline u32 ram_rl_entry_tsg_length_f(u32 v)
504{
505 return (v & 0x3fU) << 26U;
506}
507#endif
diff --git a/include/nvgpu/hw/gp106/hw_therm_gp106.h b/include/nvgpu/hw/gp106/hw_therm_gp106.h
deleted file mode 100644
index ee58032..0000000
--- a/include/nvgpu/hw/gp106/hw_therm_gp106.h
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_therm_gp106_h_
57#define _hw_therm_gp106_h_
58
59static inline u32 therm_temp_sensor_tsense_r(void)
60{
61 return 0x00020460U;
62}
63static inline u32 therm_temp_sensor_tsense_fixed_point_f(u32 v)
64{
65 return (v & 0x3fffU) << 3U;
66}
67static inline u32 therm_temp_sensor_tsense_fixed_point_m(void)
68{
69 return 0x3fffU << 3U;
70}
71static inline u32 therm_temp_sensor_tsense_fixed_point_v(u32 r)
72{
73 return (r >> 3U) & 0x3fffU;
74}
75static inline u32 therm_temp_sensor_tsense_fixed_point_min_v(void)
76{
77 return 0x00003b00U;
78}
79static inline u32 therm_temp_sensor_tsense_fixed_point_max_v(void)
80{
81 return 0x000010e0U;
82}
83static inline u32 therm_temp_sensor_tsense_state_f(u32 v)
84{
85 return (v & 0x3U) << 29U;
86}
87static inline u32 therm_temp_sensor_tsense_state_m(void)
88{
89 return 0x3U << 29U;
90}
91static inline u32 therm_temp_sensor_tsense_state_v(u32 r)
92{
93 return (r >> 29U) & 0x3U;
94}
95static inline u32 therm_temp_sensor_tsense_state_valid_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 therm_temp_sensor_tsense_state_shadow_v(void)
100{
101 return 0x00000002U;
102}
103static inline u32 therm_gate_ctrl_r(u32 i)
104{
105 return 0x00020200U + i*4U;
106}
107static inline u32 therm_gate_ctrl_eng_clk_m(void)
108{
109 return 0x3U << 0U;
110}
111static inline u32 therm_gate_ctrl_eng_clk_run_f(void)
112{
113 return 0x0U;
114}
115static inline u32 therm_gate_ctrl_eng_clk_auto_f(void)
116{
117 return 0x1U;
118}
119static inline u32 therm_gate_ctrl_eng_clk_stop_f(void)
120{
121 return 0x2U;
122}
123static inline u32 therm_gate_ctrl_blk_clk_m(void)
124{
125 return 0x3U << 2U;
126}
127static inline u32 therm_gate_ctrl_blk_clk_run_f(void)
128{
129 return 0x0U;
130}
131static inline u32 therm_gate_ctrl_blk_clk_auto_f(void)
132{
133 return 0x4U;
134}
135static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v)
136{
137 return (v & 0x1fU) << 8U;
138}
139static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void)
140{
141 return 0x1fU << 8U;
142}
143static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v)
144{
145 return (v & 0x7U) << 13U;
146}
147static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
148{
149 return 0x7U << 13U;
150}
151static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
152{
153 return (v & 0xfU) << 16U;
154}
155static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
156{
157 return 0xfU << 16U;
158}
159static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
160{
161 return (v & 0xfU) << 20U;
162}
163static inline u32 therm_gate_ctrl_eng_delay_after_m(void)
164{
165 return 0xfU << 20U;
166}
167static inline u32 therm_fecs_idle_filter_r(void)
168{
169 return 0x00020288U;
170}
171static inline u32 therm_fecs_idle_filter_value_m(void)
172{
173 return 0xffffffffU << 0U;
174}
175static inline u32 therm_hubmmu_idle_filter_r(void)
176{
177 return 0x0002028cU;
178}
179static inline u32 therm_hubmmu_idle_filter_value_m(void)
180{
181 return 0xffffffffU << 0U;
182}
183#endif
diff --git a/include/nvgpu/hw/gp106/hw_timer_gp106.h b/include/nvgpu/hw/gp106/hw_timer_gp106.h
deleted file mode 100644
index 7fd722f..0000000
--- a/include/nvgpu/hw/gp106/hw_timer_gp106.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_timer_gp106_h_
57#define _hw_timer_gp106_h_
58
59static inline u32 timer_pri_timeout_r(void)
60{
61 return 0x00009080U;
62}
63static inline u32 timer_pri_timeout_period_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 timer_pri_timeout_period_m(void)
68{
69 return 0xffffffU << 0U;
70}
71static inline u32 timer_pri_timeout_period_v(u32 r)
72{
73 return (r >> 0U) & 0xffffffU;
74}
75static inline u32 timer_pri_timeout_en_f(u32 v)
76{
77 return (v & 0x1U) << 31U;
78}
79static inline u32 timer_pri_timeout_en_m(void)
80{
81 return 0x1U << 31U;
82}
83static inline u32 timer_pri_timeout_en_v(u32 r)
84{
85 return (r >> 31U) & 0x1U;
86}
87static inline u32 timer_pri_timeout_en_en_enabled_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 timer_pri_timeout_en_en_disabled_f(void)
92{
93 return 0x0U;
94}
95static inline u32 timer_pri_timeout_save_0_r(void)
96{
97 return 0x00009084U;
98}
99static inline u32 timer_pri_timeout_save_1_r(void)
100{
101 return 0x00009088U;
102}
103static inline u32 timer_pri_timeout_fecs_errcode_r(void)
104{
105 return 0x0000908cU;
106}
107static inline u32 timer_time_0_r(void)
108{
109 return 0x00009400U;
110}
111static inline u32 timer_time_1_r(void)
112{
113 return 0x00009410U;
114}
115#endif
diff --git a/include/nvgpu/hw/gp106/hw_top_gp106.h b/include/nvgpu/hw/gp106/hw_top_gp106.h
deleted file mode 100644
index 749f66e..0000000
--- a/include/nvgpu/hw/gp106/hw_top_gp106.h
+++ /dev/null
@@ -1,255 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_top_gp106_h_
57#define _hw_top_gp106_h_
58
59static inline u32 top_num_gpcs_r(void)
60{
61 return 0x00022430U;
62}
63static inline u32 top_num_gpcs_value_v(u32 r)
64{
65 return (r >> 0U) & 0x1fU;
66}
67static inline u32 top_tpc_per_gpc_r(void)
68{
69 return 0x00022434U;
70}
71static inline u32 top_tpc_per_gpc_value_v(u32 r)
72{
73 return (r >> 0U) & 0x1fU;
74}
75static inline u32 top_num_fbps_r(void)
76{
77 return 0x00022438U;
78}
79static inline u32 top_num_fbps_value_v(u32 r)
80{
81 return (r >> 0U) & 0x1fU;
82}
83static inline u32 top_num_fbpas_r(void)
84{
85 return 0x0002243cU;
86}
87static inline u32 top_num_fbpas_value_v(u32 r)
88{
89 return (r >> 0U) & 0x1fU;
90}
91static inline u32 top_ltc_per_fbp_r(void)
92{
93 return 0x00022450U;
94}
95static inline u32 top_ltc_per_fbp_value_v(u32 r)
96{
97 return (r >> 0U) & 0x1fU;
98}
99static inline u32 top_slices_per_ltc_r(void)
100{
101 return 0x0002245cU;
102}
103static inline u32 top_slices_per_ltc_value_v(u32 r)
104{
105 return (r >> 0U) & 0x1fU;
106}
107static inline u32 top_num_ltcs_r(void)
108{
109 return 0x00022454U;
110}
111static inline u32 top_device_info_r(u32 i)
112{
113 return 0x00022700U + i*4U;
114}
115static inline u32 top_device_info__size_1_v(void)
116{
117 return 0x00000040U;
118}
119static inline u32 top_device_info_chain_v(u32 r)
120{
121 return (r >> 31U) & 0x1U;
122}
123static inline u32 top_device_info_chain_enable_v(void)
124{
125 return 0x00000001U;
126}
127static inline u32 top_device_info_engine_enum_v(u32 r)
128{
129 return (r >> 26U) & 0xfU;
130}
131static inline u32 top_device_info_runlist_enum_v(u32 r)
132{
133 return (r >> 21U) & 0xfU;
134}
135static inline u32 top_device_info_intr_enum_v(u32 r)
136{
137 return (r >> 15U) & 0x1fU;
138}
139static inline u32 top_device_info_reset_enum_v(u32 r)
140{
141 return (r >> 9U) & 0x1fU;
142}
143static inline u32 top_device_info_type_enum_v(u32 r)
144{
145 return (r >> 2U) & 0x1fffffffU;
146}
147static inline u32 top_device_info_type_enum_graphics_v(void)
148{
149 return 0x00000000U;
150}
151static inline u32 top_device_info_type_enum_graphics_f(void)
152{
153 return 0x0U;
154}
155static inline u32 top_device_info_type_enum_copy0_v(void)
156{
157 return 0x00000001U;
158}
159static inline u32 top_device_info_type_enum_copy0_f(void)
160{
161 return 0x4U;
162}
163static inline u32 top_device_info_type_enum_copy2_v(void)
164{
165 return 0x00000003U;
166}
167static inline u32 top_device_info_type_enum_copy2_f(void)
168{
169 return 0xcU;
170}
171static inline u32 top_device_info_type_enum_lce_v(void)
172{
173 return 0x00000013U;
174}
175static inline u32 top_device_info_type_enum_lce_f(void)
176{
177 return 0x4cU;
178}
179static inline u32 top_device_info_engine_v(u32 r)
180{
181 return (r >> 5U) & 0x1U;
182}
183static inline u32 top_device_info_runlist_v(u32 r)
184{
185 return (r >> 4U) & 0x1U;
186}
187static inline u32 top_device_info_intr_v(u32 r)
188{
189 return (r >> 3U) & 0x1U;
190}
191static inline u32 top_device_info_reset_v(u32 r)
192{
193 return (r >> 2U) & 0x1U;
194}
195static inline u32 top_device_info_entry_v(u32 r)
196{
197 return (r >> 0U) & 0x3U;
198}
199static inline u32 top_device_info_entry_not_valid_v(void)
200{
201 return 0x00000000U;
202}
203static inline u32 top_device_info_entry_enum_v(void)
204{
205 return 0x00000002U;
206}
207static inline u32 top_device_info_entry_engine_type_v(void)
208{
209 return 0x00000003U;
210}
211static inline u32 top_device_info_entry_data_v(void)
212{
213 return 0x00000001U;
214}
215static inline u32 top_device_info_data_type_v(u32 r)
216{
217 return (r >> 30U) & 0x1U;
218}
219static inline u32 top_device_info_data_type_enum2_v(void)
220{
221 return 0x00000000U;
222}
223static inline u32 top_device_info_data_inst_id_v(u32 r)
224{
225 return (r >> 26U) & 0xfU;
226}
227static inline u32 top_device_info_data_pri_base_v(u32 r)
228{
229 return (r >> 12U) & 0xfffU;
230}
231static inline u32 top_device_info_data_pri_base_align_v(void)
232{
233 return 0x0000000cU;
234}
235static inline u32 top_device_info_data_fault_id_enum_v(u32 r)
236{
237 return (r >> 3U) & 0x1fU;
238}
239static inline u32 top_device_info_data_fault_id_v(u32 r)
240{
241 return (r >> 2U) & 0x1U;
242}
243static inline u32 top_device_info_data_fault_id_valid_v(void)
244{
245 return 0x00000001U;
246}
247static inline u32 top_scratch1_r(void)
248{
249 return 0x0002240cU;
250}
251static inline u32 top_scratch1_devinit_completed_v(u32 r)
252{
253 return (r >> 1U) & 0x1U;
254}
255#endif
diff --git a/include/nvgpu/hw/gp106/hw_trim_gp106.h b/include/nvgpu/hw/gp106/hw_trim_gp106.h
deleted file mode 100644
index cebb6d4..0000000
--- a/include/nvgpu/hw/gp106/hw_trim_gp106.h
+++ /dev/null
@@ -1,195 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_trim_gp106_h_
57#define _hw_trim_gp106_h_
58
59static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_r(void)
60{
61 return 0x00132924U;
62}
63static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_noofipclks_s(void)
64{
65 return 16U;
66}
67static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_noofipclks_f(u32 v)
68{
69 return (v & 0xffffU) << 0U;
70}
71static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_noofipclks_m(void)
72{
73 return 0xffffU << 0U;
74}
75static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_noofipclks_v(u32 r)
76{
77 return (r >> 0U) & 0xffffU;
78}
79static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_write_en_s(void)
80{
81 return 1U;
82}
83static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_write_en_f(u32 v)
84{
85 return (v & 0x1U) << 16U;
86}
87static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_write_en_m(void)
88{
89 return 0x1U << 16U;
90}
91static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_write_en_v(u32 r)
92{
93 return (r >> 16U) & 0x1U;
94}
95static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_write_en_deasserted_f(void)
96{
97 return 0x0U;
98}
99static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_write_en_asserted_f(void)
100{
101 return 0x10000U;
102}
103static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_enable_s(void)
104{
105 return 1U;
106}
107static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_enable_f(u32 v)
108{
109 return (v & 0x1U) << 20U;
110}
111static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_enable_m(void)
112{
113 return 0x1U << 20U;
114}
115static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_enable_v(u32 r)
116{
117 return (r >> 20U) & 0x1U;
118}
119static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_enable_deasserted_f(void)
120{
121 return 0x0U;
122}
123static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_enable_asserted_f(void)
124{
125 return 0x100000U;
126}
127static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_reset_s(void)
128{
129 return 1U;
130}
131static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_reset_f(u32 v)
132{
133 return (v & 0x1U) << 24U;
134}
135static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_reset_m(void)
136{
137 return 0x1U << 24U;
138}
139static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_reset_v(u32 r)
140{
141 return (r >> 24U) & 0x1U;
142}
143static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_reset_deasserted_f(void)
144{
145 return 0x0U;
146}
147static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_reset_asserted_f(void)
148{
149 return 0x1000000U;
150}
151static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cfg_source_gpc2clk_f(void)
152{
153 return 0x70000000U;
154}
155static inline u32 trim_gpc_bcast_clk_cntr_ncgpcclk_cnt_r(void)
156{
157 return 0x00132928U;
158}
159static inline u32 trim_fbpa_bcast_clk_cntr_ncltcclk_cfg_r(void)
160{
161 return 0x00132128U;
162}
163static inline u32 trim_fbpa_bcast_clk_cntr_ncltcclk_cfg_source_dramdiv4_rec_clk1_f(void)
164{
165 return 0x30000000U;
166}
167static inline u32 trim_fbpa_bcast_clk_cntr_ncltcclk_cnt_r(void)
168{
169 return 0x0013212cU;
170}
171static inline u32 trim_sys_clk_cntr_ncltcpll_cfg_r(void)
172{
173 return 0x001373c0U;
174}
175static inline u32 trim_sys_clk_cntr_ncltcpll_cfg_source_xbar2clk_f(void)
176{
177 return 0x20000000U;
178}
179static inline u32 trim_sys_clk_cntr_ncltcpll_cnt_r(void)
180{
181 return 0x001373c4U;
182}
183static inline u32 trim_sys_clk_cntr_ncsyspll_cfg_r(void)
184{
185 return 0x001373b0U;
186}
187static inline u32 trim_sys_clk_cntr_ncsyspll_cfg_source_sys2clk_f(void)
188{
189 return 0x0U;
190}
191static inline u32 trim_sys_clk_cntr_ncsyspll_cnt_r(void)
192{
193 return 0x001373b4U;
194}
195#endif
diff --git a/include/nvgpu/hw/gp106/hw_xp_gp106.h b/include/nvgpu/hw/gp106/hw_xp_gp106.h
deleted file mode 100644
index f6c843c..0000000
--- a/include/nvgpu/hw/gp106/hw_xp_gp106.h
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_xp_gp106_h_
57#define _hw_xp_gp106_h_
58
59static inline u32 xp_dl_mgr_r(u32 i)
60{
61 return 0x0008b8c0U + i*4U;
62}
63static inline u32 xp_dl_mgr_safe_timing_f(u32 v)
64{
65 return (v & 0x1U) << 2U;
66}
67static inline u32 xp_pl_link_config_r(u32 i)
68{
69 return 0x0008c040U + i*4U;
70}
71static inline u32 xp_pl_link_config_ltssm_status_f(u32 v)
72{
73 return (v & 0x1U) << 4U;
74}
75static inline u32 xp_pl_link_config_ltssm_status_idle_v(void)
76{
77 return 0x00000000U;
78}
79static inline u32 xp_pl_link_config_ltssm_directive_f(u32 v)
80{
81 return (v & 0xfU) << 0U;
82}
83static inline u32 xp_pl_link_config_ltssm_directive_m(void)
84{
85 return 0xfU << 0U;
86}
87static inline u32 xp_pl_link_config_ltssm_directive_normal_operations_v(void)
88{
89 return 0x00000000U;
90}
91static inline u32 xp_pl_link_config_ltssm_directive_change_speed_v(void)
92{
93 return 0x00000001U;
94}
95static inline u32 xp_pl_link_config_max_link_rate_f(u32 v)
96{
97 return (v & 0x3U) << 18U;
98}
99static inline u32 xp_pl_link_config_max_link_rate_m(void)
100{
101 return 0x3U << 18U;
102}
103static inline u32 xp_pl_link_config_max_link_rate_2500_mtps_v(void)
104{
105 return 0x00000002U;
106}
107static inline u32 xp_pl_link_config_max_link_rate_5000_mtps_v(void)
108{
109 return 0x00000001U;
110}
111static inline u32 xp_pl_link_config_max_link_rate_8000_mtps_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 xp_pl_link_config_target_tx_width_f(u32 v)
116{
117 return (v & 0x7U) << 20U;
118}
119static inline u32 xp_pl_link_config_target_tx_width_m(void)
120{
121 return 0x7U << 20U;
122}
123static inline u32 xp_pl_link_config_target_tx_width_x1_v(void)
124{
125 return 0x00000007U;
126}
127static inline u32 xp_pl_link_config_target_tx_width_x2_v(void)
128{
129 return 0x00000006U;
130}
131static inline u32 xp_pl_link_config_target_tx_width_x4_v(void)
132{
133 return 0x00000005U;
134}
135static inline u32 xp_pl_link_config_target_tx_width_x8_v(void)
136{
137 return 0x00000004U;
138}
139static inline u32 xp_pl_link_config_target_tx_width_x16_v(void)
140{
141 return 0x00000000U;
142}
143#endif
diff --git a/include/nvgpu/hw/gp106/hw_xve_gp106.h b/include/nvgpu/hw/gp106/hw_xve_gp106.h
deleted file mode 100644
index e61d13f..0000000
--- a/include/nvgpu/hw/gp106/hw_xve_gp106.h
+++ /dev/null
@@ -1,207 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_xve_gp106_h_
57#define _hw_xve_gp106_h_
58
59static inline u32 xve_rom_ctrl_r(void)
60{
61 return 0x00000050U;
62}
63static inline u32 xve_rom_ctrl_rom_shadow_f(u32 v)
64{
65 return (v & 0x1U) << 0U;
66}
67static inline u32 xve_rom_ctrl_rom_shadow_disabled_f(void)
68{
69 return 0x0U;
70}
71static inline u32 xve_rom_ctrl_rom_shadow_enabled_f(void)
72{
73 return 0x1U;
74}
75static inline u32 xve_link_control_status_r(void)
76{
77 return 0x00000088U;
78}
79static inline u32 xve_link_control_status_link_speed_m(void)
80{
81 return 0xfU << 16U;
82}
83static inline u32 xve_link_control_status_link_speed_v(u32 r)
84{
85 return (r >> 16U) & 0xfU;
86}
87static inline u32 xve_link_control_status_link_speed_link_speed_2p5_v(void)
88{
89 return 0x00000001U;
90}
91static inline u32 xve_link_control_status_link_speed_link_speed_5p0_v(void)
92{
93 return 0x00000002U;
94}
95static inline u32 xve_link_control_status_link_speed_link_speed_8p0_v(void)
96{
97 return 0x00000003U;
98}
99static inline u32 xve_link_control_status_link_width_m(void)
100{
101 return 0x3fU << 20U;
102}
103static inline u32 xve_link_control_status_link_width_v(u32 r)
104{
105 return (r >> 20U) & 0x3fU;
106}
107static inline u32 xve_link_control_status_link_width_x1_v(void)
108{
109 return 0x00000001U;
110}
111static inline u32 xve_link_control_status_link_width_x2_v(void)
112{
113 return 0x00000002U;
114}
115static inline u32 xve_link_control_status_link_width_x4_v(void)
116{
117 return 0x00000004U;
118}
119static inline u32 xve_link_control_status_link_width_x8_v(void)
120{
121 return 0x00000008U;
122}
123static inline u32 xve_link_control_status_link_width_x16_v(void)
124{
125 return 0x00000010U;
126}
127static inline u32 xve_priv_xv_r(void)
128{
129 return 0x00000150U;
130}
131static inline u32 xve_priv_xv_cya_l0s_enable_f(u32 v)
132{
133 return (v & 0x1U) << 7U;
134}
135static inline u32 xve_priv_xv_cya_l0s_enable_m(void)
136{
137 return 0x1U << 7U;
138}
139static inline u32 xve_priv_xv_cya_l0s_enable_v(u32 r)
140{
141 return (r >> 7U) & 0x1U;
142}
143static inline u32 xve_priv_xv_cya_l1_enable_f(u32 v)
144{
145 return (v & 0x1U) << 8U;
146}
147static inline u32 xve_priv_xv_cya_l1_enable_m(void)
148{
149 return 0x1U << 8U;
150}
151static inline u32 xve_priv_xv_cya_l1_enable_v(u32 r)
152{
153 return (r >> 8U) & 0x1U;
154}
155static inline u32 xve_cya_2_r(void)
156{
157 return 0x00000704U;
158}
159static inline u32 xve_reset_r(void)
160{
161 return 0x00000718U;
162}
163static inline u32 xve_reset_reset_m(void)
164{
165 return 0x1U << 0U;
166}
167static inline u32 xve_reset_gpu_on_sw_reset_m(void)
168{
169 return 0x1U << 1U;
170}
171static inline u32 xve_reset_counter_en_m(void)
172{
173 return 0x1U << 2U;
174}
175static inline u32 xve_reset_counter_val_f(u32 v)
176{
177 return (v & 0x7ffU) << 4U;
178}
179static inline u32 xve_reset_counter_val_m(void)
180{
181 return 0x7ffU << 4U;
182}
183static inline u32 xve_reset_counter_val_v(u32 r)
184{
185 return (r >> 4U) & 0x7ffU;
186}
187static inline u32 xve_reset_clock_on_sw_reset_m(void)
188{
189 return 0x1U << 15U;
190}
191static inline u32 xve_reset_clock_counter_en_m(void)
192{
193 return 0x1U << 16U;
194}
195static inline u32 xve_reset_clock_counter_val_f(u32 v)
196{
197 return (v & 0x7ffU) << 17U;
198}
199static inline u32 xve_reset_clock_counter_val_m(void)
200{
201 return 0x7ffU << 17U;
202}
203static inline u32 xve_reset_clock_counter_val_v(u32 r)
204{
205 return (r >> 17U) & 0x7ffU;
206}
207#endif
diff --git a/include/nvgpu/hw/gp10b/hw_bus_gp10b.h b/include/nvgpu/hw/gp10b/hw_bus_gp10b.h
deleted file mode 100644
index b06ea66..0000000
--- a/include/nvgpu/hw/gp10b/hw_bus_gp10b.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_bus_gp10b_h_
57#define _hw_bus_gp10b_h_
58
59static inline u32 bus_bar0_window_r(void)
60{
61 return 0x00001700U;
62}
63static inline u32 bus_bar0_window_base_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 bus_bar0_window_target_vid_mem_f(void)
68{
69 return 0x0U;
70}
71static inline u32 bus_bar0_window_target_sys_mem_coherent_f(void)
72{
73 return 0x2000000U;
74}
75static inline u32 bus_bar0_window_target_sys_mem_noncoherent_f(void)
76{
77 return 0x3000000U;
78}
79static inline u32 bus_bar0_window_target_bar0_window_base_shift_v(void)
80{
81 return 0x00000010U;
82}
83static inline u32 bus_bar1_block_r(void)
84{
85 return 0x00001704U;
86}
87static inline u32 bus_bar1_block_ptr_f(u32 v)
88{
89 return (v & 0xfffffffU) << 0U;
90}
91static inline u32 bus_bar1_block_target_vid_mem_f(void)
92{
93 return 0x0U;
94}
95static inline u32 bus_bar1_block_target_sys_mem_coh_f(void)
96{
97 return 0x20000000U;
98}
99static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void)
100{
101 return 0x30000000U;
102}
103static inline u32 bus_bar1_block_mode_virtual_f(void)
104{
105 return 0x80000000U;
106}
107static inline u32 bus_bar2_block_r(void)
108{
109 return 0x00001714U;
110}
111static inline u32 bus_bar2_block_ptr_f(u32 v)
112{
113 return (v & 0xfffffffU) << 0U;
114}
115static inline u32 bus_bar2_block_target_vid_mem_f(void)
116{
117 return 0x0U;
118}
119static inline u32 bus_bar2_block_target_sys_mem_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void)
124{
125 return 0x30000000U;
126}
127static inline u32 bus_bar2_block_mode_virtual_f(void)
128{
129 return 0x80000000U;
130}
131static inline u32 bus_bar1_block_ptr_shift_v(void)
132{
133 return 0x0000000cU;
134}
135static inline u32 bus_bar2_block_ptr_shift_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 bus_bind_status_r(void)
140{
141 return 0x00001710U;
142}
143static inline u32 bus_bind_status_bar1_pending_v(u32 r)
144{
145 return (r >> 0U) & 0x1U;
146}
147static inline u32 bus_bind_status_bar1_pending_empty_f(void)
148{
149 return 0x0U;
150}
151static inline u32 bus_bind_status_bar1_pending_busy_f(void)
152{
153 return 0x1U;
154}
155static inline u32 bus_bind_status_bar1_outstanding_v(u32 r)
156{
157 return (r >> 1U) & 0x1U;
158}
159static inline u32 bus_bind_status_bar1_outstanding_false_f(void)
160{
161 return 0x0U;
162}
163static inline u32 bus_bind_status_bar1_outstanding_true_f(void)
164{
165 return 0x2U;
166}
167static inline u32 bus_bind_status_bar2_pending_v(u32 r)
168{
169 return (r >> 2U) & 0x1U;
170}
171static inline u32 bus_bind_status_bar2_pending_empty_f(void)
172{
173 return 0x0U;
174}
175static inline u32 bus_bind_status_bar2_pending_busy_f(void)
176{
177 return 0x4U;
178}
179static inline u32 bus_bind_status_bar2_outstanding_v(u32 r)
180{
181 return (r >> 3U) & 0x1U;
182}
183static inline u32 bus_bind_status_bar2_outstanding_false_f(void)
184{
185 return 0x0U;
186}
187static inline u32 bus_bind_status_bar2_outstanding_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 bus_intr_0_r(void)
192{
193 return 0x00001100U;
194}
195static inline u32 bus_intr_0_pri_squash_m(void)
196{
197 return 0x1U << 1U;
198}
199static inline u32 bus_intr_0_pri_fecserr_m(void)
200{
201 return 0x1U << 2U;
202}
203static inline u32 bus_intr_0_pri_timeout_m(void)
204{
205 return 0x1U << 3U;
206}
207static inline u32 bus_intr_en_0_r(void)
208{
209 return 0x00001140U;
210}
211static inline u32 bus_intr_en_0_pri_squash_m(void)
212{
213 return 0x1U << 1U;
214}
215static inline u32 bus_intr_en_0_pri_fecserr_m(void)
216{
217 return 0x1U << 2U;
218}
219static inline u32 bus_intr_en_0_pri_timeout_m(void)
220{
221 return 0x1U << 3U;
222}
223#endif
diff --git a/include/nvgpu/hw/gp10b/hw_ccsr_gp10b.h b/include/nvgpu/hw/gp10b/hw_ccsr_gp10b.h
deleted file mode 100644
index 00879c1..0000000
--- a/include/nvgpu/hw/gp10b/hw_ccsr_gp10b.h
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ccsr_gp10b_h_
57#define _hw_ccsr_gp10b_h_
58
59static inline u32 ccsr_channel_inst_r(u32 i)
60{
61 return 0x00800000U + i*8U;
62}
63static inline u32 ccsr_channel_inst__size_1_v(void)
64{
65 return 0x00000200U;
66}
67static inline u32 ccsr_channel_inst_ptr_f(u32 v)
68{
69 return (v & 0xfffffffU) << 0U;
70}
71static inline u32 ccsr_channel_inst_target_vid_mem_f(void)
72{
73 return 0x0U;
74}
75static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void)
76{
77 return 0x20000000U;
78}
79static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void)
80{
81 return 0x30000000U;
82}
83static inline u32 ccsr_channel_inst_bind_false_f(void)
84{
85 return 0x0U;
86}
87static inline u32 ccsr_channel_inst_bind_true_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 ccsr_channel_r(u32 i)
92{
93 return 0x00800004U + i*8U;
94}
95static inline u32 ccsr_channel__size_1_v(void)
96{
97 return 0x00000200U;
98}
99static inline u32 ccsr_channel_enable_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 ccsr_channel_enable_set_f(u32 v)
104{
105 return (v & 0x1U) << 10U;
106}
107static inline u32 ccsr_channel_enable_set_true_f(void)
108{
109 return 0x400U;
110}
111static inline u32 ccsr_channel_enable_clr_true_f(void)
112{
113 return 0x800U;
114}
115static inline u32 ccsr_channel_status_v(u32 r)
116{
117 return (r >> 24U) & 0xfU;
118}
119static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
120{
121 return 0x00000002U;
122}
123static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
124{
125 return 0x00000004U;
126}
127static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
128{
129 return 0x0000000aU;
130}
131static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
132{
133 return 0x0000000bU;
134}
135static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
140{
141 return 0x0000000dU;
142}
143static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
144{
145 return 0x0000000eU;
146}
147static inline u32 ccsr_channel_next_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 ccsr_channel_next_true_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 ccsr_channel_force_ctx_reload_true_f(void)
156{
157 return 0x100U;
158}
159static inline u32 ccsr_channel_busy_v(u32 r)
160{
161 return (r >> 28U) & 0x1U;
162}
163#endif
diff --git a/include/nvgpu/hw/gp10b/hw_ce_gp10b.h b/include/nvgpu/hw/gp10b/hw_ce_gp10b.h
deleted file mode 100644
index c293771..0000000
--- a/include/nvgpu/hw/gp10b/hw_ce_gp10b.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ce_gp10b_h_
57#define _hw_ce_gp10b_h_
58
59static inline u32 ce_intr_status_r(u32 i)
60{
61 return 0x00104410U + i*128U;
62}
63static inline u32 ce_intr_status_blockpipe_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 ce_intr_status_blockpipe_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 ce_intr_status_nonblockpipe_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 ce_intr_status_nonblockpipe_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 ce_intr_status_launcherr_pending_f(void)
80{
81 return 0x4U;
82}
83static inline u32 ce_intr_status_launcherr_reset_f(void)
84{
85 return 0x4U;
86}
87#endif
diff --git a/include/nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h b/include/nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h
deleted file mode 100644
index d83320f..0000000
--- a/include/nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h
+++ /dev/null
@@ -1,491 +0,0 @@
1/*
2 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ctxsw_prog_gp10b_h_
57#define _hw_ctxsw_prog_gp10b_h_
58
59static inline u32 ctxsw_prog_fecs_header_v(void)
60{
61 return 0x00000100U;
62}
63static inline u32 ctxsw_prog_main_image_num_gpcs_o(void)
64{
65 return 0x00000008U;
66}
67static inline u32 ctxsw_prog_main_image_patch_count_o(void)
68{
69 return 0x00000010U;
70}
71static inline u32 ctxsw_prog_main_image_context_id_o(void)
72{
73 return 0x000000f0U;
74}
75static inline u32 ctxsw_prog_main_image_patch_adr_lo_o(void)
76{
77 return 0x00000014U;
78}
79static inline u32 ctxsw_prog_main_image_patch_adr_hi_o(void)
80{
81 return 0x00000018U;
82}
83static inline u32 ctxsw_prog_main_image_zcull_o(void)
84{
85 return 0x0000001cU;
86}
87static inline u32 ctxsw_prog_main_image_zcull_mode_no_ctxsw_v(void)
88{
89 return 0x00000001U;
90}
91static inline u32 ctxsw_prog_main_image_zcull_mode_separate_buffer_v(void)
92{
93 return 0x00000002U;
94}
95static inline u32 ctxsw_prog_main_image_zcull_ptr_o(void)
96{
97 return 0x00000020U;
98}
99static inline u32 ctxsw_prog_main_image_pm_o(void)
100{
101 return 0x00000028U;
102}
103static inline u32 ctxsw_prog_main_image_pm_mode_m(void)
104{
105 return 0x7U << 0U;
106}
107static inline u32 ctxsw_prog_main_image_pm_mode_ctxsw_f(void)
108{
109 return 0x1U;
110}
111static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void)
112{
113 return 0x0U;
114}
115static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void)
116{
117 return 0x7U << 3U;
118}
119static inline u32 ctxsw_prog_main_image_pm_smpc_mode_ctxsw_f(void)
120{
121 return 0x8U;
122}
123static inline u32 ctxsw_prog_main_image_pm_smpc_mode_no_ctxsw_f(void)
124{
125 return 0x0U;
126}
127static inline u32 ctxsw_prog_main_image_pm_ptr_o(void)
128{
129 return 0x0000002cU;
130}
131static inline u32 ctxsw_prog_main_image_num_save_ops_o(void)
132{
133 return 0x000000f4U;
134}
135static inline u32 ctxsw_prog_main_image_num_wfi_save_ops_o(void)
136{
137 return 0x000000d0U;
138}
139static inline u32 ctxsw_prog_main_image_num_cta_save_ops_o(void)
140{
141 return 0x000000d4U;
142}
143static inline u32 ctxsw_prog_main_image_num_gfxp_save_ops_o(void)
144{
145 return 0x000000d8U;
146}
147static inline u32 ctxsw_prog_main_image_num_cilp_save_ops_o(void)
148{
149 return 0x000000dcU;
150}
151static inline u32 ctxsw_prog_main_image_num_restore_ops_o(void)
152{
153 return 0x000000f8U;
154}
155static inline u32 ctxsw_prog_main_image_magic_value_o(void)
156{
157 return 0x000000fcU;
158}
159static inline u32 ctxsw_prog_main_image_magic_value_v_value_v(void)
160{
161 return 0x600dc0deU;
162}
163static inline u32 ctxsw_prog_local_priv_register_ctl_o(void)
164{
165 return 0x0000000cU;
166}
167static inline u32 ctxsw_prog_local_priv_register_ctl_offset_v(u32 r)
168{
169 return (r >> 0U) & 0xffffU;
170}
171static inline u32 ctxsw_prog_local_image_ppc_info_o(void)
172{
173 return 0x000000f4U;
174}
175static inline u32 ctxsw_prog_local_image_ppc_info_num_ppcs_v(u32 r)
176{
177 return (r >> 0U) & 0xffffU;
178}
179static inline u32 ctxsw_prog_local_image_ppc_info_ppc_mask_v(u32 r)
180{
181 return (r >> 16U) & 0xffffU;
182}
183static inline u32 ctxsw_prog_local_image_num_tpcs_o(void)
184{
185 return 0x000000f8U;
186}
187static inline u32 ctxsw_prog_local_magic_value_o(void)
188{
189 return 0x000000fcU;
190}
191static inline u32 ctxsw_prog_local_magic_value_v_value_v(void)
192{
193 return 0xad0becabU;
194}
195static inline u32 ctxsw_prog_main_extended_buffer_ctl_o(void)
196{
197 return 0x000000ecU;
198}
199static inline u32 ctxsw_prog_main_extended_buffer_ctl_offset_v(u32 r)
200{
201 return (r >> 0U) & 0xffffU;
202}
203static inline u32 ctxsw_prog_main_extended_buffer_ctl_size_v(u32 r)
204{
205 return (r >> 16U) & 0xffU;
206}
207static inline u32 ctxsw_prog_extended_buffer_segments_size_in_bytes_v(void)
208{
209 return 0x00000100U;
210}
211static inline u32 ctxsw_prog_extended_marker_size_in_bytes_v(void)
212{
213 return 0x00000004U;
214}
215static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_register_stride_v(void)
216{
217 return 0x00000000U;
218}
219static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_control_register_stride_v(void)
220{
221 return 0x00000002U;
222}
223static inline u32 ctxsw_prog_main_image_priv_access_map_config_o(void)
224{
225 return 0x000000a0U;
226}
227static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_s(void)
228{
229 return 2U;
230}
231static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_f(u32 v)
232{
233 return (v & 0x3U) << 0U;
234}
235static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_m(void)
236{
237 return 0x3U << 0U;
238}
239static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_v(u32 r)
240{
241 return (r >> 0U) & 0x3U;
242}
243static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_allow_all_f(void)
244{
245 return 0x0U;
246}
247static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f(void)
248{
249 return 0x2U;
250}
251static inline u32 ctxsw_prog_main_image_priv_access_map_addr_lo_o(void)
252{
253 return 0x000000a4U;
254}
255static inline u32 ctxsw_prog_main_image_priv_access_map_addr_hi_o(void)
256{
257 return 0x000000a8U;
258}
259static inline u32 ctxsw_prog_main_image_misc_options_o(void)
260{
261 return 0x0000003cU;
262}
263static inline u32 ctxsw_prog_main_image_misc_options_verif_features_m(void)
264{
265 return 0x1U << 3U;
266}
267static inline u32 ctxsw_prog_main_image_misc_options_verif_features_disabled_f(void)
268{
269 return 0x0U;
270}
271static inline u32 ctxsw_prog_main_image_pmu_options_o(void)
272{
273 return 0x00000070U;
274}
275static inline u32 ctxsw_prog_main_image_pmu_options_boost_clock_frequencies_f(u32 v)
276{
277 return (v & 0x1U) << 0U;
278}
279static inline u32 ctxsw_prog_main_image_graphics_preemption_options_o(void)
280{
281 return 0x00000080U;
282}
283static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_f(u32 v)
284{
285 return (v & 0x3U) << 0U;
286}
287static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_gfxp_f(void)
288{
289 return 0x1U;
290}
291static inline u32 ctxsw_prog_main_image_full_preemption_ptr_o(void)
292{
293 return 0x00000068U;
294}
295static inline u32 ctxsw_prog_main_image_compute_preemption_options_o(void)
296{
297 return 0x00000084U;
298}
299static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_f(u32 v)
300{
301 return (v & 0x3U) << 0U;
302}
303static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cta_f(void)
304{
305 return 0x1U;
306}
307static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cilp_f(void)
308{
309 return 0x2U;
310}
311static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_o(void)
312{
313 return 0x000000acU;
314}
315static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_num_records_f(u32 v)
316{
317 return (v & 0xffffU) << 0U;
318}
319static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_o(void)
320{
321 return 0x000000b0U;
322}
323static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_v_m(void)
324{
325 return 0xfffffffU << 0U;
326}
327static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_m(void)
328{
329 return 0x3U << 28U;
330}
331static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_vid_mem_f(void)
332{
333 return 0x0U;
334}
335static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_coherent_f(void)
336{
337 return 0x20000000U;
338}
339static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_noncoherent_f(void)
340{
341 return 0x30000000U;
342}
343static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(void)
344{
345 return 0x000000b4U;
346}
347static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_v_f(u32 v)
348{
349 return (v & 0xffffffffU) << 0U;
350}
351static inline u32 ctxsw_prog_record_timestamp_record_size_in_bytes_v(void)
352{
353 return 0x00000080U;
354}
355static inline u32 ctxsw_prog_record_timestamp_record_size_in_words_v(void)
356{
357 return 0x00000020U;
358}
359static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_o(void)
360{
361 return 0x00000000U;
362}
363static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_v_value_v(void)
364{
365 return 0x00000000U;
366}
367static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_o(void)
368{
369 return 0x00000004U;
370}
371static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_v_value_v(void)
372{
373 return 0x600dbeefU;
374}
375static inline u32 ctxsw_prog_record_timestamp_context_id_o(void)
376{
377 return 0x00000008U;
378}
379static inline u32 ctxsw_prog_record_timestamp_context_ptr_o(void)
380{
381 return 0x0000000cU;
382}
383static inline u32 ctxsw_prog_record_timestamp_timestamp_lo_o(void)
384{
385 return 0x00000018U;
386}
387static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_o(void)
388{
389 return 0x0000001cU;
390}
391static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_f(u32 v)
392{
393 return (v & 0xffffffU) << 0U;
394}
395static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_v(u32 r)
396{
397 return (r >> 0U) & 0xffffffU;
398}
399static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_f(u32 v)
400{
401 return (v & 0xffU) << 24U;
402}
403static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_m(void)
404{
405 return 0xffU << 24U;
406}
407static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_v(u32 r)
408{
409 return (r >> 24U) & 0xffU;
410}
411static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_v(void)
412{
413 return 0x00000001U;
414}
415static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_f(void)
416{
417 return 0x1000000U;
418}
419static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_v(void)
420{
421 return 0x00000002U;
422}
423static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_f(void)
424{
425 return 0x2000000U;
426}
427static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_v(void)
428{
429 return 0x0000000aU;
430}
431static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_f(void)
432{
433 return 0xa000000U;
434}
435static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_v(void)
436{
437 return 0x0000000bU;
438}
439static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_f(void)
440{
441 return 0xb000000U;
442}
443static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_v(void)
444{
445 return 0x0000000cU;
446}
447static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_f(void)
448{
449 return 0xc000000U;
450}
451static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_v(void)
452{
453 return 0x0000000dU;
454}
455static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_f(void)
456{
457 return 0xd000000U;
458}
459static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_v(void)
460{
461 return 0x00000003U;
462}
463static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_f(void)
464{
465 return 0x3000000U;
466}
467static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_v(void)
468{
469 return 0x00000004U;
470}
471static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_f(void)
472{
473 return 0x4000000U;
474}
475static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_v(void)
476{
477 return 0x00000005U;
478}
479static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_f(void)
480{
481 return 0x5000000U;
482}
483static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_v(void)
484{
485 return 0x000000ffU;
486}
487static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_f(void)
488{
489 return 0xff000000U;
490}
491#endif
diff --git a/include/nvgpu/hw/gp10b/hw_falcon_gp10b.h b/include/nvgpu/hw/gp10b/hw_falcon_gp10b.h
deleted file mode 100644
index 6dc401d..0000000
--- a/include/nvgpu/hw/gp10b/hw_falcon_gp10b.h
+++ /dev/null
@@ -1,603 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_falcon_gp10b_h_
57#define _hw_falcon_gp10b_h_
58
59static inline u32 falcon_falcon_irqsset_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 falcon_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 falcon_falcon_irqsclr_r(void)
68{
69 return 0x00000004U;
70}
71static inline u32 falcon_falcon_irqstat_r(void)
72{
73 return 0x00000008U;
74}
75static inline u32 falcon_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 falcon_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 falcon_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 falcon_falcon_irqmode_r(void)
88{
89 return 0x0000000cU;
90}
91static inline u32 falcon_falcon_irqmset_r(void)
92{
93 return 0x00000010U;
94}
95static inline u32 falcon_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 falcon_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 falcon_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 falcon_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 falcon_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 falcon_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 falcon_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 falcon_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 falcon_falcon_irqmclr_r(void)
128{
129 return 0x00000014U;
130}
131static inline u32 falcon_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 falcon_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 falcon_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 falcon_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 falcon_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 falcon_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 falcon_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 falcon_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 falcon_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 falcon_falcon_irqmask_r(void)
168{
169 return 0x00000018U;
170}
171static inline u32 falcon_falcon_irqdest_r(void)
172{
173 return 0x0000001cU;
174}
175static inline u32 falcon_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 falcon_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 falcon_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 falcon_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 falcon_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 falcon_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 falcon_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 falcon_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 falcon_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 falcon_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 falcon_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 falcon_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 falcon_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 falcon_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 falcon_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 falcon_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 falcon_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 falcon_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 falcon_falcon_curctx_r(void)
248{
249 return 0x00000050U;
250}
251static inline u32 falcon_falcon_nxtctx_r(void)
252{
253 return 0x00000054U;
254}
255static inline u32 falcon_falcon_mailbox0_r(void)
256{
257 return 0x00000040U;
258}
259static inline u32 falcon_falcon_mailbox1_r(void)
260{
261 return 0x00000044U;
262}
263static inline u32 falcon_falcon_itfen_r(void)
264{
265 return 0x00000048U;
266}
267static inline u32 falcon_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 falcon_falcon_idlestate_r(void)
272{
273 return 0x0000004cU;
274}
275static inline u32 falcon_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 falcon_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 falcon_falcon_os_r(void)
284{
285 return 0x00000080U;
286}
287static inline u32 falcon_falcon_engctl_r(void)
288{
289 return 0x000000a4U;
290}
291static inline u32 falcon_falcon_cpuctl_r(void)
292{
293 return 0x00000100U;
294}
295static inline u32 falcon_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 falcon_falcon_cpuctl_sreset_f(u32 v)
300{
301 return (v & 0x1U) << 2U;
302}
303static inline u32 falcon_falcon_cpuctl_hreset_f(u32 v)
304{
305 return (v & 0x1U) << 3U;
306}
307static inline u32 falcon_falcon_cpuctl_halt_intr_f(u32 v)
308{
309 return (v & 0x1U) << 4U;
310}
311static inline u32 falcon_falcon_cpuctl_halt_intr_m(void)
312{
313 return 0x1U << 4U;
314}
315static inline u32 falcon_falcon_cpuctl_halt_intr_v(u32 r)
316{
317 return (r >> 4U) & 0x1U;
318}
319static inline u32 falcon_falcon_cpuctl_stopped_m(void)
320{
321 return 0x1U << 5U;
322}
323static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
324{
325 return (v & 0x1U) << 6U;
326}
327static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_m(void)
328{
329 return 0x1U << 6U;
330}
331static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
332{
333 return (r >> 6U) & 0x1U;
334}
335static inline u32 falcon_falcon_cpuctl_alias_r(void)
336{
337 return 0x00000130U;
338}
339static inline u32 falcon_falcon_cpuctl_alias_startcpu_f(u32 v)
340{
341 return (v & 0x1U) << 1U;
342}
343static inline u32 falcon_falcon_imemc_r(u32 i)
344{
345 return 0x00000180U + i*16U;
346}
347static inline u32 falcon_falcon_imemc_offs_f(u32 v)
348{
349 return (v & 0x3fU) << 2U;
350}
351static inline u32 falcon_falcon_imemc_blk_f(u32 v)
352{
353 return (v & 0xffU) << 8U;
354}
355static inline u32 falcon_falcon_imemc_aincw_f(u32 v)
356{
357 return (v & 0x1U) << 24U;
358}
359static inline u32 falcon_falcon_imemc_secure_f(u32 v)
360{
361 return (v & 0x1U) << 28U;
362}
363static inline u32 falcon_falcon_imemd_r(u32 i)
364{
365 return 0x00000184U + i*16U;
366}
367static inline u32 falcon_falcon_imemt_r(u32 i)
368{
369 return 0x00000188U + i*16U;
370}
371static inline u32 falcon_falcon_sctl_r(void)
372{
373 return 0x00000240U;
374}
375static inline u32 falcon_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 falcon_falcon_bootvec_r(void)
380{
381 return 0x00000104U;
382}
383static inline u32 falcon_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 falcon_falcon_dmactl_r(void)
388{
389 return 0x0000010cU;
390}
391static inline u32 falcon_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 falcon_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 falcon_falcon_dmactl_require_ctx_f(u32 v)
400{
401 return (v & 0x1U) << 0U;
402}
403static inline u32 falcon_falcon_hwcfg_r(void)
404{
405 return 0x00000108U;
406}
407static inline u32 falcon_falcon_hwcfg_imem_size_v(u32 r)
408{
409 return (r >> 0U) & 0x1ffU;
410}
411static inline u32 falcon_falcon_hwcfg_dmem_size_v(u32 r)
412{
413 return (r >> 9U) & 0x1ffU;
414}
415static inline u32 falcon_falcon_dmatrfbase_r(void)
416{
417 return 0x00000110U;
418}
419static inline u32 falcon_falcon_dmatrfbase1_r(void)
420{
421 return 0x00000128U;
422}
423static inline u32 falcon_falcon_dmatrfmoffs_r(void)
424{
425 return 0x00000114U;
426}
427static inline u32 falcon_falcon_imctl_debug_r(void)
428{
429 return 0x0000015cU;
430}
431static inline u32 falcon_falcon_imctl_debug_addr_blk_f(u32 v)
432{
433 return (v & 0xffffffU) << 0U;
434}
435static inline u32 falcon_falcon_imctl_debug_cmd_f(u32 v)
436{
437 return (v & 0x7U) << 24U;
438}
439static inline u32 falcon_falcon_imstat_r(void)
440{
441 return 0x00000144U;
442}
443static inline u32 falcon_falcon_traceidx_r(void)
444{
445 return 0x00000148U;
446}
447static inline u32 falcon_falcon_traceidx_maxidx_v(u32 r)
448{
449 return (r >> 16U) & 0xffU;
450}
451static inline u32 falcon_falcon_traceidx_idx_f(u32 v)
452{
453 return (v & 0xffU) << 0U;
454}
455static inline u32 falcon_falcon_tracepc_r(void)
456{
457 return 0x0000014cU;
458}
459static inline u32 falcon_falcon_tracepc_pc_v(u32 r)
460{
461 return (r >> 0U) & 0xffffffU;
462}
463static inline u32 falcon_falcon_dmatrfcmd_r(void)
464{
465 return 0x00000118U;
466}
467static inline u32 falcon_falcon_dmatrfcmd_imem_f(u32 v)
468{
469 return (v & 0x1U) << 4U;
470}
471static inline u32 falcon_falcon_dmatrfcmd_write_f(u32 v)
472{
473 return (v & 0x1U) << 5U;
474}
475static inline u32 falcon_falcon_dmatrfcmd_size_f(u32 v)
476{
477 return (v & 0x7U) << 8U;
478}
479static inline u32 falcon_falcon_dmatrfcmd_ctxdma_f(u32 v)
480{
481 return (v & 0x7U) << 12U;
482}
483static inline u32 falcon_falcon_dmatrffboffs_r(void)
484{
485 return 0x0000011cU;
486}
487static inline u32 falcon_falcon_exterraddr_r(void)
488{
489 return 0x00000168U;
490}
491static inline u32 falcon_falcon_exterrstat_r(void)
492{
493 return 0x0000016cU;
494}
495static inline u32 falcon_falcon_exterrstat_valid_m(void)
496{
497 return 0x1U << 31U;
498}
499static inline u32 falcon_falcon_exterrstat_valid_v(u32 r)
500{
501 return (r >> 31U) & 0x1U;
502}
503static inline u32 falcon_falcon_exterrstat_valid_true_v(void)
504{
505 return 0x00000001U;
506}
507static inline u32 falcon_falcon_icd_cmd_r(void)
508{
509 return 0x00000200U;
510}
511static inline u32 falcon_falcon_icd_cmd_opc_s(void)
512{
513 return 4U;
514}
515static inline u32 falcon_falcon_icd_cmd_opc_f(u32 v)
516{
517 return (v & 0xfU) << 0U;
518}
519static inline u32 falcon_falcon_icd_cmd_opc_m(void)
520{
521 return 0xfU << 0U;
522}
523static inline u32 falcon_falcon_icd_cmd_opc_v(u32 r)
524{
525 return (r >> 0U) & 0xfU;
526}
527static inline u32 falcon_falcon_icd_cmd_opc_rreg_f(void)
528{
529 return 0x8U;
530}
531static inline u32 falcon_falcon_icd_cmd_opc_rstat_f(void)
532{
533 return 0xeU;
534}
535static inline u32 falcon_falcon_icd_cmd_idx_f(u32 v)
536{
537 return (v & 0x1fU) << 8U;
538}
539static inline u32 falcon_falcon_icd_rdata_r(void)
540{
541 return 0x0000020cU;
542}
543static inline u32 falcon_falcon_dmemc_r(u32 i)
544{
545 return 0x000001c0U + i*8U;
546}
547static inline u32 falcon_falcon_dmemc_offs_f(u32 v)
548{
549 return (v & 0x3fU) << 2U;
550}
551static inline u32 falcon_falcon_dmemc_offs_m(void)
552{
553 return 0x3fU << 2U;
554}
555static inline u32 falcon_falcon_dmemc_blk_f(u32 v)
556{
557 return (v & 0xffU) << 8U;
558}
559static inline u32 falcon_falcon_dmemc_blk_m(void)
560{
561 return 0xffU << 8U;
562}
563static inline u32 falcon_falcon_dmemc_aincw_f(u32 v)
564{
565 return (v & 0x1U) << 24U;
566}
567static inline u32 falcon_falcon_dmemc_aincr_f(u32 v)
568{
569 return (v & 0x1U) << 25U;
570}
571static inline u32 falcon_falcon_dmemd_r(u32 i)
572{
573 return 0x000001c4U + i*8U;
574}
575static inline u32 falcon_falcon_debug1_r(void)
576{
577 return 0x00000090U;
578}
579static inline u32 falcon_falcon_debug1_ctxsw_mode_s(void)
580{
581 return 1U;
582}
583static inline u32 falcon_falcon_debug1_ctxsw_mode_f(u32 v)
584{
585 return (v & 0x1U) << 16U;
586}
587static inline u32 falcon_falcon_debug1_ctxsw_mode_m(void)
588{
589 return 0x1U << 16U;
590}
591static inline u32 falcon_falcon_debug1_ctxsw_mode_v(u32 r)
592{
593 return (r >> 16U) & 0x1U;
594}
595static inline u32 falcon_falcon_debug1_ctxsw_mode_init_f(void)
596{
597 return 0x0U;
598}
599static inline u32 falcon_falcon_debuginfo_r(void)
600{
601 return 0x00000094U;
602}
603#endif
diff --git a/include/nvgpu/hw/gp10b/hw_fb_gp10b.h b/include/nvgpu/hw/gp10b/hw_fb_gp10b.h
deleted file mode 100644
index c1ef471..0000000
--- a/include/nvgpu/hw/gp10b/hw_fb_gp10b.h
+++ /dev/null
@@ -1,463 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fb_gp10b_h_
57#define _hw_fb_gp10b_h_
58
59static inline u32 fb_fbhub_num_active_ltcs_r(void)
60{
61 return 0x00100800U;
62}
63static inline u32 fb_mmu_ctrl_r(void)
64{
65 return 0x00100c80U;
66}
67static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r)
68{
69 return (r >> 15U) & 0x1U;
70}
71static inline u32 fb_mmu_ctrl_pri_fifo_empty_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r)
76{
77 return (r >> 16U) & 0xffU;
78}
79static inline u32 fb_priv_mmu_phy_secure_r(void)
80{
81 return 0x00100ce4U;
82}
83static inline u32 fb_mmu_invalidate_pdb_r(void)
84{
85 return 0x00100cb8U;
86}
87static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void)
92{
93 return 0x2U;
94}
95static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v)
96{
97 return (v & 0xfffffffU) << 4U;
98}
99static inline u32 fb_mmu_invalidate_r(void)
100{
101 return 0x00100cbcU;
102}
103static inline u32 fb_mmu_invalidate_all_va_true_f(void)
104{
105 return 0x1U;
106}
107static inline u32 fb_mmu_invalidate_all_pdb_true_f(void)
108{
109 return 0x2U;
110}
111static inline u32 fb_mmu_invalidate_hubtlb_only_s(void)
112{
113 return 1U;
114}
115static inline u32 fb_mmu_invalidate_hubtlb_only_f(u32 v)
116{
117 return (v & 0x1U) << 2U;
118}
119static inline u32 fb_mmu_invalidate_hubtlb_only_m(void)
120{
121 return 0x1U << 2U;
122}
123static inline u32 fb_mmu_invalidate_hubtlb_only_v(u32 r)
124{
125 return (r >> 2U) & 0x1U;
126}
127static inline u32 fb_mmu_invalidate_hubtlb_only_true_f(void)
128{
129 return 0x4U;
130}
131static inline u32 fb_mmu_invalidate_replay_s(void)
132{
133 return 3U;
134}
135static inline u32 fb_mmu_invalidate_replay_f(u32 v)
136{
137 return (v & 0x7U) << 3U;
138}
139static inline u32 fb_mmu_invalidate_replay_m(void)
140{
141 return 0x7U << 3U;
142}
143static inline u32 fb_mmu_invalidate_replay_v(u32 r)
144{
145 return (r >> 3U) & 0x7U;
146}
147static inline u32 fb_mmu_invalidate_replay_none_f(void)
148{
149 return 0x0U;
150}
151static inline u32 fb_mmu_invalidate_replay_start_f(void)
152{
153 return 0x8U;
154}
155static inline u32 fb_mmu_invalidate_replay_start_ack_all_f(void)
156{
157 return 0x10U;
158}
159static inline u32 fb_mmu_invalidate_replay_cancel_targeted_f(void)
160{
161 return 0x18U;
162}
163static inline u32 fb_mmu_invalidate_replay_cancel_global_f(void)
164{
165 return 0x20U;
166}
167static inline u32 fb_mmu_invalidate_replay_cancel_f(void)
168{
169 return 0x20U;
170}
171static inline u32 fb_mmu_invalidate_sys_membar_s(void)
172{
173 return 1U;
174}
175static inline u32 fb_mmu_invalidate_sys_membar_f(u32 v)
176{
177 return (v & 0x1U) << 6U;
178}
179static inline u32 fb_mmu_invalidate_sys_membar_m(void)
180{
181 return 0x1U << 6U;
182}
183static inline u32 fb_mmu_invalidate_sys_membar_v(u32 r)
184{
185 return (r >> 6U) & 0x1U;
186}
187static inline u32 fb_mmu_invalidate_sys_membar_true_f(void)
188{
189 return 0x40U;
190}
191static inline u32 fb_mmu_invalidate_ack_s(void)
192{
193 return 2U;
194}
195static inline u32 fb_mmu_invalidate_ack_f(u32 v)
196{
197 return (v & 0x3U) << 7U;
198}
199static inline u32 fb_mmu_invalidate_ack_m(void)
200{
201 return 0x3U << 7U;
202}
203static inline u32 fb_mmu_invalidate_ack_v(u32 r)
204{
205 return (r >> 7U) & 0x3U;
206}
207static inline u32 fb_mmu_invalidate_ack_ack_none_required_f(void)
208{
209 return 0x0U;
210}
211static inline u32 fb_mmu_invalidate_ack_ack_intranode_f(void)
212{
213 return 0x100U;
214}
215static inline u32 fb_mmu_invalidate_ack_ack_globally_f(void)
216{
217 return 0x80U;
218}
219static inline u32 fb_mmu_invalidate_cancel_client_id_s(void)
220{
221 return 6U;
222}
223static inline u32 fb_mmu_invalidate_cancel_client_id_f(u32 v)
224{
225 return (v & 0x3fU) << 9U;
226}
227static inline u32 fb_mmu_invalidate_cancel_client_id_m(void)
228{
229 return 0x3fU << 9U;
230}
231static inline u32 fb_mmu_invalidate_cancel_client_id_v(u32 r)
232{
233 return (r >> 9U) & 0x3fU;
234}
235static inline u32 fb_mmu_invalidate_cancel_gpc_id_s(void)
236{
237 return 5U;
238}
239static inline u32 fb_mmu_invalidate_cancel_gpc_id_f(u32 v)
240{
241 return (v & 0x1fU) << 15U;
242}
243static inline u32 fb_mmu_invalidate_cancel_gpc_id_m(void)
244{
245 return 0x1fU << 15U;
246}
247static inline u32 fb_mmu_invalidate_cancel_gpc_id_v(u32 r)
248{
249 return (r >> 15U) & 0x1fU;
250}
251static inline u32 fb_mmu_invalidate_cancel_client_type_s(void)
252{
253 return 1U;
254}
255static inline u32 fb_mmu_invalidate_cancel_client_type_f(u32 v)
256{
257 return (v & 0x1U) << 20U;
258}
259static inline u32 fb_mmu_invalidate_cancel_client_type_m(void)
260{
261 return 0x1U << 20U;
262}
263static inline u32 fb_mmu_invalidate_cancel_client_type_v(u32 r)
264{
265 return (r >> 20U) & 0x1U;
266}
267static inline u32 fb_mmu_invalidate_cancel_client_type_gpc_f(void)
268{
269 return 0x0U;
270}
271static inline u32 fb_mmu_invalidate_cancel_client_type_hub_f(void)
272{
273 return 0x100000U;
274}
275static inline u32 fb_mmu_invalidate_cancel_cache_level_s(void)
276{
277 return 3U;
278}
279static inline u32 fb_mmu_invalidate_cancel_cache_level_f(u32 v)
280{
281 return (v & 0x7U) << 24U;
282}
283static inline u32 fb_mmu_invalidate_cancel_cache_level_m(void)
284{
285 return 0x7U << 24U;
286}
287static inline u32 fb_mmu_invalidate_cancel_cache_level_v(u32 r)
288{
289 return (r >> 24U) & 0x7U;
290}
291static inline u32 fb_mmu_invalidate_cancel_cache_level_all_f(void)
292{
293 return 0x0U;
294}
295static inline u32 fb_mmu_invalidate_cancel_cache_level_pte_only_f(void)
296{
297 return 0x1000000U;
298}
299static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde0_f(void)
300{
301 return 0x2000000U;
302}
303static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde1_f(void)
304{
305 return 0x3000000U;
306}
307static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde2_f(void)
308{
309 return 0x4000000U;
310}
311static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde3_f(void)
312{
313 return 0x5000000U;
314}
315static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde4_f(void)
316{
317 return 0x6000000U;
318}
319static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde5_f(void)
320{
321 return 0x7000000U;
322}
323static inline u32 fb_mmu_invalidate_trigger_s(void)
324{
325 return 1U;
326}
327static inline u32 fb_mmu_invalidate_trigger_f(u32 v)
328{
329 return (v & 0x1U) << 31U;
330}
331static inline u32 fb_mmu_invalidate_trigger_m(void)
332{
333 return 0x1U << 31U;
334}
335static inline u32 fb_mmu_invalidate_trigger_v(u32 r)
336{
337 return (r >> 31U) & 0x1U;
338}
339static inline u32 fb_mmu_invalidate_trigger_true_f(void)
340{
341 return 0x80000000U;
342}
343static inline u32 fb_mmu_debug_wr_r(void)
344{
345 return 0x00100cc8U;
346}
347static inline u32 fb_mmu_debug_wr_aperture_s(void)
348{
349 return 2U;
350}
351static inline u32 fb_mmu_debug_wr_aperture_f(u32 v)
352{
353 return (v & 0x3U) << 0U;
354}
355static inline u32 fb_mmu_debug_wr_aperture_m(void)
356{
357 return 0x3U << 0U;
358}
359static inline u32 fb_mmu_debug_wr_aperture_v(u32 r)
360{
361 return (r >> 0U) & 0x3U;
362}
363static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void)
364{
365 return 0x0U;
366}
367static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void)
368{
369 return 0x2U;
370}
371static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void)
372{
373 return 0x3U;
374}
375static inline u32 fb_mmu_debug_wr_vol_false_f(void)
376{
377 return 0x0U;
378}
379static inline u32 fb_mmu_debug_wr_vol_true_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 fb_mmu_debug_wr_vol_true_f(void)
384{
385 return 0x4U;
386}
387static inline u32 fb_mmu_debug_wr_addr_f(u32 v)
388{
389 return (v & 0xfffffffU) << 4U;
390}
391static inline u32 fb_mmu_debug_wr_addr_alignment_v(void)
392{
393 return 0x0000000cU;
394}
395static inline u32 fb_mmu_debug_rd_r(void)
396{
397 return 0x00100cccU;
398}
399static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void)
400{
401 return 0x0U;
402}
403static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void)
404{
405 return 0x2U;
406}
407static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void)
408{
409 return 0x3U;
410}
411static inline u32 fb_mmu_debug_rd_vol_false_f(void)
412{
413 return 0x0U;
414}
415static inline u32 fb_mmu_debug_rd_addr_f(u32 v)
416{
417 return (v & 0xfffffffU) << 4U;
418}
419static inline u32 fb_mmu_debug_rd_addr_alignment_v(void)
420{
421 return 0x0000000cU;
422}
423static inline u32 fb_mmu_debug_ctrl_r(void)
424{
425 return 0x00100cc4U;
426}
427static inline u32 fb_mmu_debug_ctrl_debug_v(u32 r)
428{
429 return (r >> 16U) & 0x1U;
430}
431static inline u32 fb_mmu_debug_ctrl_debug_m(void)
432{
433 return 0x1U << 16U;
434}
435static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void)
436{
437 return 0x00000001U;
438}
439static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void)
440{
441 return 0x00000000U;
442}
443static inline u32 fb_mmu_vpr_info_r(void)
444{
445 return 0x00100cd0U;
446}
447static inline u32 fb_mmu_vpr_info_fetch_v(u32 r)
448{
449 return (r >> 2U) & 0x1U;
450}
451static inline u32 fb_mmu_vpr_info_fetch_false_v(void)
452{
453 return 0x00000000U;
454}
455static inline u32 fb_mmu_vpr_info_fetch_true_v(void)
456{
457 return 0x00000001U;
458}
459static inline u32 fb_niso_flush_sysmem_addr_r(void)
460{
461 return 0x00100c10U;
462}
463#endif
diff --git a/include/nvgpu/hw/gp10b/hw_fifo_gp10b.h b/include/nvgpu/hw/gp10b/hw_fifo_gp10b.h
deleted file mode 100644
index 7170162..0000000
--- a/include/nvgpu/hw/gp10b/hw_fifo_gp10b.h
+++ /dev/null
@@ -1,699 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fifo_gp10b_h_
57#define _hw_fifo_gp10b_h_
58
59static inline u32 fifo_bar1_base_r(void)
60{
61 return 0x00002254U;
62}
63static inline u32 fifo_bar1_base_ptr_f(u32 v)
64{
65 return (v & 0xfffffffU) << 0U;
66}
67static inline u32 fifo_bar1_base_ptr_align_shift_v(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 fifo_bar1_base_valid_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fifo_bar1_base_valid_true_f(void)
76{
77 return 0x10000000U;
78}
79static inline u32 fifo_runlist_base_r(void)
80{
81 return 0x00002270U;
82}
83static inline u32 fifo_runlist_base_ptr_f(u32 v)
84{
85 return (v & 0xfffffffU) << 0U;
86}
87static inline u32 fifo_runlist_base_target_vid_mem_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void)
92{
93 return 0x20000000U;
94}
95static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void)
96{
97 return 0x30000000U;
98}
99static inline u32 fifo_runlist_r(void)
100{
101 return 0x00002274U;
102}
103static inline u32 fifo_runlist_engine_f(u32 v)
104{
105 return (v & 0xfU) << 20U;
106}
107static inline u32 fifo_eng_runlist_base_r(u32 i)
108{
109 return 0x00002280U + i*8U;
110}
111static inline u32 fifo_eng_runlist_base__size_1_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 fifo_eng_runlist_r(u32 i)
116{
117 return 0x00002284U + i*8U;
118}
119static inline u32 fifo_eng_runlist__size_1_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 fifo_eng_runlist_length_f(u32 v)
124{
125 return (v & 0xffffU) << 0U;
126}
127static inline u32 fifo_eng_runlist_length_max_v(void)
128{
129 return 0x0000ffffU;
130}
131static inline u32 fifo_eng_runlist_pending_true_f(void)
132{
133 return 0x100000U;
134}
135static inline u32 fifo_pb_timeslice_r(u32 i)
136{
137 return 0x00002350U + i*4U;
138}
139static inline u32 fifo_pb_timeslice_timeout_16_f(void)
140{
141 return 0x10U;
142}
143static inline u32 fifo_pb_timeslice_timescale_0_f(void)
144{
145 return 0x0U;
146}
147static inline u32 fifo_pb_timeslice_enable_true_f(void)
148{
149 return 0x10000000U;
150}
151static inline u32 fifo_pbdma_map_r(u32 i)
152{
153 return 0x00002390U + i*4U;
154}
155static inline u32 fifo_intr_0_r(void)
156{
157 return 0x00002100U;
158}
159static inline u32 fifo_intr_0_bind_error_pending_f(void)
160{
161 return 0x1U;
162}
163static inline u32 fifo_intr_0_bind_error_reset_f(void)
164{
165 return 0x1U;
166}
167static inline u32 fifo_intr_0_sched_error_pending_f(void)
168{
169 return 0x100U;
170}
171static inline u32 fifo_intr_0_sched_error_reset_f(void)
172{
173 return 0x100U;
174}
175static inline u32 fifo_intr_0_chsw_error_pending_f(void)
176{
177 return 0x10000U;
178}
179static inline u32 fifo_intr_0_chsw_error_reset_f(void)
180{
181 return 0x10000U;
182}
183static inline u32 fifo_intr_0_fb_flush_timeout_pending_f(void)
184{
185 return 0x800000U;
186}
187static inline u32 fifo_intr_0_fb_flush_timeout_reset_f(void)
188{
189 return 0x800000U;
190}
191static inline u32 fifo_intr_0_lb_error_pending_f(void)
192{
193 return 0x1000000U;
194}
195static inline u32 fifo_intr_0_lb_error_reset_f(void)
196{
197 return 0x1000000U;
198}
199static inline u32 fifo_intr_0_replayable_fault_error_pending_f(void)
200{
201 return 0x2000000U;
202}
203static inline u32 fifo_intr_0_dropped_mmu_fault_pending_f(void)
204{
205 return 0x8000000U;
206}
207static inline u32 fifo_intr_0_dropped_mmu_fault_reset_f(void)
208{
209 return 0x8000000U;
210}
211static inline u32 fifo_intr_0_mmu_fault_pending_f(void)
212{
213 return 0x10000000U;
214}
215static inline u32 fifo_intr_0_pbdma_intr_pending_f(void)
216{
217 return 0x20000000U;
218}
219static inline u32 fifo_intr_0_runlist_event_pending_f(void)
220{
221 return 0x40000000U;
222}
223static inline u32 fifo_intr_0_channel_intr_pending_f(void)
224{
225 return 0x80000000U;
226}
227static inline u32 fifo_intr_en_0_r(void)
228{
229 return 0x00002140U;
230}
231static inline u32 fifo_intr_en_0_sched_error_f(u32 v)
232{
233 return (v & 0x1U) << 8U;
234}
235static inline u32 fifo_intr_en_0_sched_error_m(void)
236{
237 return 0x1U << 8U;
238}
239static inline u32 fifo_intr_en_0_mmu_fault_f(u32 v)
240{
241 return (v & 0x1U) << 28U;
242}
243static inline u32 fifo_intr_en_0_mmu_fault_m(void)
244{
245 return 0x1U << 28U;
246}
247static inline u32 fifo_intr_en_1_r(void)
248{
249 return 0x00002528U;
250}
251static inline u32 fifo_intr_bind_error_r(void)
252{
253 return 0x0000252cU;
254}
255static inline u32 fifo_intr_sched_error_r(void)
256{
257 return 0x0000254cU;
258}
259static inline u32 fifo_intr_sched_error_code_f(u32 v)
260{
261 return (v & 0xffU) << 0U;
262}
263static inline u32 fifo_intr_sched_error_code_ctxsw_timeout_v(void)
264{
265 return 0x0000000aU;
266}
267static inline u32 fifo_intr_chsw_error_r(void)
268{
269 return 0x0000256cU;
270}
271static inline u32 fifo_intr_mmu_fault_id_r(void)
272{
273 return 0x0000259cU;
274}
275static inline u32 fifo_intr_mmu_fault_eng_id_graphics_v(void)
276{
277 return 0x00000000U;
278}
279static inline u32 fifo_intr_mmu_fault_eng_id_graphics_f(void)
280{
281 return 0x0U;
282}
283static inline u32 fifo_intr_mmu_fault_inst_r(u32 i)
284{
285 return 0x00002800U + i*16U;
286}
287static inline u32 fifo_intr_mmu_fault_inst_ptr_v(u32 r)
288{
289 return (r >> 0U) & 0xfffffffU;
290}
291static inline u32 fifo_intr_mmu_fault_inst_ptr_align_shift_v(void)
292{
293 return 0x0000000cU;
294}
295static inline u32 fifo_intr_mmu_fault_lo_r(u32 i)
296{
297 return 0x00002804U + i*16U;
298}
299static inline u32 fifo_intr_mmu_fault_hi_r(u32 i)
300{
301 return 0x00002808U + i*16U;
302}
303static inline u32 fifo_intr_mmu_fault_info_r(u32 i)
304{
305 return 0x0000280cU + i*16U;
306}
307static inline u32 fifo_intr_mmu_fault_info_type_v(u32 r)
308{
309 return (r >> 0U) & 0x1fU;
310}
311static inline u32 fifo_intr_mmu_fault_info_access_type_v(u32 r)
312{
313 return (r >> 16U) & 0x7U;
314}
315static inline u32 fifo_intr_mmu_fault_info_client_type_v(u32 r)
316{
317 return (r >> 20U) & 0x1U;
318}
319static inline u32 fifo_intr_mmu_fault_info_client_type_gpc_v(void)
320{
321 return 0x00000000U;
322}
323static inline u32 fifo_intr_mmu_fault_info_client_type_hub_v(void)
324{
325 return 0x00000001U;
326}
327static inline u32 fifo_intr_mmu_fault_info_client_v(u32 r)
328{
329 return (r >> 8U) & 0x7fU;
330}
331static inline u32 fifo_intr_pbdma_id_r(void)
332{
333 return 0x000025a0U;
334}
335static inline u32 fifo_intr_pbdma_id_status_f(u32 v, u32 i)
336{
337 return (v & 0x1U) << (0U + i*1U);
338}
339static inline u32 fifo_intr_pbdma_id_status_v(u32 r, u32 i)
340{
341 return (r >> (0U + i*1U)) & 0x1U;
342}
343static inline u32 fifo_intr_pbdma_id_status__size_1_v(void)
344{
345 return 0x00000001U;
346}
347static inline u32 fifo_intr_runlist_r(void)
348{
349 return 0x00002a00U;
350}
351static inline u32 fifo_fb_timeout_r(void)
352{
353 return 0x00002a04U;
354}
355static inline u32 fifo_fb_timeout_period_m(void)
356{
357 return 0x3fffffffU << 0U;
358}
359static inline u32 fifo_fb_timeout_period_max_f(void)
360{
361 return 0x3fffffffU;
362}
363static inline u32 fifo_error_sched_disable_r(void)
364{
365 return 0x0000262cU;
366}
367static inline u32 fifo_sched_disable_r(void)
368{
369 return 0x00002630U;
370}
371static inline u32 fifo_sched_disable_runlist_f(u32 v, u32 i)
372{
373 return (v & 0x1U) << (0U + i*1U);
374}
375static inline u32 fifo_sched_disable_runlist_m(u32 i)
376{
377 return 0x1U << (0U + i*1U);
378}
379static inline u32 fifo_sched_disable_true_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 fifo_preempt_r(void)
384{
385 return 0x00002634U;
386}
387static inline u32 fifo_preempt_pending_true_f(void)
388{
389 return 0x100000U;
390}
391static inline u32 fifo_preempt_type_channel_f(void)
392{
393 return 0x0U;
394}
395static inline u32 fifo_preempt_type_tsg_f(void)
396{
397 return 0x1000000U;
398}
399static inline u32 fifo_preempt_chid_f(u32 v)
400{
401 return (v & 0xfffU) << 0U;
402}
403static inline u32 fifo_preempt_id_f(u32 v)
404{
405 return (v & 0xfffU) << 0U;
406}
407static inline u32 fifo_trigger_mmu_fault_r(u32 i)
408{
409 return 0x00002a30U + i*4U;
410}
411static inline u32 fifo_trigger_mmu_fault_id_f(u32 v)
412{
413 return (v & 0x1fU) << 0U;
414}
415static inline u32 fifo_trigger_mmu_fault_enable_f(u32 v)
416{
417 return (v & 0x1U) << 8U;
418}
419static inline u32 fifo_engine_status_r(u32 i)
420{
421 return 0x00002640U + i*8U;
422}
423static inline u32 fifo_engine_status__size_1_v(void)
424{
425 return 0x00000002U;
426}
427static inline u32 fifo_engine_status_id_v(u32 r)
428{
429 return (r >> 0U) & 0xfffU;
430}
431static inline u32 fifo_engine_status_id_type_v(u32 r)
432{
433 return (r >> 12U) & 0x1U;
434}
435static inline u32 fifo_engine_status_id_type_chid_v(void)
436{
437 return 0x00000000U;
438}
439static inline u32 fifo_engine_status_id_type_tsgid_v(void)
440{
441 return 0x00000001U;
442}
443static inline u32 fifo_engine_status_ctx_status_v(u32 r)
444{
445 return (r >> 13U) & 0x7U;
446}
447static inline u32 fifo_engine_status_ctx_status_invalid_v(void)
448{
449 return 0x00000000U;
450}
451static inline u32 fifo_engine_status_ctx_status_valid_v(void)
452{
453 return 0x00000001U;
454}
455static inline u32 fifo_engine_status_ctx_status_ctxsw_load_v(void)
456{
457 return 0x00000005U;
458}
459static inline u32 fifo_engine_status_ctx_status_ctxsw_save_v(void)
460{
461 return 0x00000006U;
462}
463static inline u32 fifo_engine_status_ctx_status_ctxsw_switch_v(void)
464{
465 return 0x00000007U;
466}
467static inline u32 fifo_engine_status_next_id_v(u32 r)
468{
469 return (r >> 16U) & 0xfffU;
470}
471static inline u32 fifo_engine_status_next_id_type_v(u32 r)
472{
473 return (r >> 28U) & 0x1U;
474}
475static inline u32 fifo_engine_status_next_id_type_chid_v(void)
476{
477 return 0x00000000U;
478}
479static inline u32 fifo_engine_status_faulted_v(u32 r)
480{
481 return (r >> 30U) & 0x1U;
482}
483static inline u32 fifo_engine_status_faulted_true_v(void)
484{
485 return 0x00000001U;
486}
487static inline u32 fifo_engine_status_engine_v(u32 r)
488{
489 return (r >> 31U) & 0x1U;
490}
491static inline u32 fifo_engine_status_engine_idle_v(void)
492{
493 return 0x00000000U;
494}
495static inline u32 fifo_engine_status_engine_busy_v(void)
496{
497 return 0x00000001U;
498}
499static inline u32 fifo_engine_status_ctxsw_v(u32 r)
500{
501 return (r >> 15U) & 0x1U;
502}
503static inline u32 fifo_engine_status_ctxsw_in_progress_v(void)
504{
505 return 0x00000001U;
506}
507static inline u32 fifo_engine_status_ctxsw_in_progress_f(void)
508{
509 return 0x8000U;
510}
511static inline u32 fifo_pbdma_status_r(u32 i)
512{
513 return 0x00003080U + i*4U;
514}
515static inline u32 fifo_pbdma_status__size_1_v(void)
516{
517 return 0x00000001U;
518}
519static inline u32 fifo_pbdma_status_id_v(u32 r)
520{
521 return (r >> 0U) & 0xfffU;
522}
523static inline u32 fifo_pbdma_status_id_type_v(u32 r)
524{
525 return (r >> 12U) & 0x1U;
526}
527static inline u32 fifo_pbdma_status_id_type_chid_v(void)
528{
529 return 0x00000000U;
530}
531static inline u32 fifo_pbdma_status_id_type_tsgid_v(void)
532{
533 return 0x00000001U;
534}
535static inline u32 fifo_pbdma_status_chan_status_v(u32 r)
536{
537 return (r >> 13U) & 0x7U;
538}
539static inline u32 fifo_pbdma_status_chan_status_valid_v(void)
540{
541 return 0x00000001U;
542}
543static inline u32 fifo_pbdma_status_chan_status_chsw_load_v(void)
544{
545 return 0x00000005U;
546}
547static inline u32 fifo_pbdma_status_chan_status_chsw_save_v(void)
548{
549 return 0x00000006U;
550}
551static inline u32 fifo_pbdma_status_chan_status_chsw_switch_v(void)
552{
553 return 0x00000007U;
554}
555static inline u32 fifo_pbdma_status_next_id_v(u32 r)
556{
557 return (r >> 16U) & 0xfffU;
558}
559static inline u32 fifo_pbdma_status_next_id_type_v(u32 r)
560{
561 return (r >> 28U) & 0x1U;
562}
563static inline u32 fifo_pbdma_status_next_id_type_chid_v(void)
564{
565 return 0x00000000U;
566}
567static inline u32 fifo_pbdma_status_chsw_v(u32 r)
568{
569 return (r >> 15U) & 0x1U;
570}
571static inline u32 fifo_pbdma_status_chsw_in_progress_v(void)
572{
573 return 0x00000001U;
574}
575static inline u32 fifo_replay_fault_buffer_lo_r(void)
576{
577 return 0x00002a70U;
578}
579static inline u32 fifo_replay_fault_buffer_lo_enable_v(u32 r)
580{
581 return (r >> 0U) & 0x1U;
582}
583static inline u32 fifo_replay_fault_buffer_lo_enable_true_v(void)
584{
585 return 0x00000001U;
586}
587static inline u32 fifo_replay_fault_buffer_lo_enable_false_v(void)
588{
589 return 0x00000000U;
590}
591static inline u32 fifo_replay_fault_buffer_lo_base_f(u32 v)
592{
593 return (v & 0xfffffU) << 12U;
594}
595static inline u32 fifo_replay_fault_buffer_lo_base_reset_v(void)
596{
597 return 0x00000000U;
598}
599static inline u32 fifo_replay_fault_buffer_hi_r(void)
600{
601 return 0x00002a74U;
602}
603static inline u32 fifo_replay_fault_buffer_hi_base_f(u32 v)
604{
605 return (v & 0xffU) << 0U;
606}
607static inline u32 fifo_replay_fault_buffer_hi_base_reset_v(void)
608{
609 return 0x00000000U;
610}
611static inline u32 fifo_replay_fault_buffer_size_r(void)
612{
613 return 0x00002a78U;
614}
615static inline u32 fifo_replay_fault_buffer_size_hw_f(u32 v)
616{
617 return (v & 0x1ffU) << 0U;
618}
619static inline u32 fifo_replay_fault_buffer_size_hw_entries_v(void)
620{
621 return 0x000000c0U;
622}
623static inline u32 fifo_replay_fault_buffer_get_r(void)
624{
625 return 0x00002a7cU;
626}
627static inline u32 fifo_replay_fault_buffer_get_offset_hw_f(u32 v)
628{
629 return (v & 0x1ffU) << 0U;
630}
631static inline u32 fifo_replay_fault_buffer_get_offset_hw_init_v(void)
632{
633 return 0x00000000U;
634}
635static inline u32 fifo_replay_fault_buffer_put_r(void)
636{
637 return 0x00002a80U;
638}
639static inline u32 fifo_replay_fault_buffer_put_offset_hw_f(u32 v)
640{
641 return (v & 0x1ffU) << 0U;
642}
643static inline u32 fifo_replay_fault_buffer_put_offset_hw_init_v(void)
644{
645 return 0x00000000U;
646}
647static inline u32 fifo_replay_fault_buffer_info_r(void)
648{
649 return 0x00002a84U;
650}
651static inline u32 fifo_replay_fault_buffer_info_overflow_f(u32 v)
652{
653 return (v & 0x1U) << 0U;
654}
655static inline u32 fifo_replay_fault_buffer_info_overflow_false_v(void)
656{
657 return 0x00000000U;
658}
659static inline u32 fifo_replay_fault_buffer_info_overflow_true_v(void)
660{
661 return 0x00000001U;
662}
663static inline u32 fifo_replay_fault_buffer_info_overflow_clear_v(void)
664{
665 return 0x00000001U;
666}
667static inline u32 fifo_replay_fault_buffer_info_write_nack_f(u32 v)
668{
669 return (v & 0x1U) << 24U;
670}
671static inline u32 fifo_replay_fault_buffer_info_write_nack_false_v(void)
672{
673 return 0x00000000U;
674}
675static inline u32 fifo_replay_fault_buffer_info_write_nack_true_v(void)
676{
677 return 0x00000001U;
678}
679static inline u32 fifo_replay_fault_buffer_info_write_nack_clear_v(void)
680{
681 return 0x00000001U;
682}
683static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_f(u32 v)
684{
685 return (v & 0x1U) << 28U;
686}
687static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_false_v(void)
688{
689 return 0x00000000U;
690}
691static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_true_v(void)
692{
693 return 0x00000001U;
694}
695static inline u32 fifo_replay_fault_buffer_info_fault_while_buffer_disabled_clear_v(void)
696{
697 return 0x00000001U;
698}
699#endif
diff --git a/include/nvgpu/hw/gp10b/hw_flush_gp10b.h b/include/nvgpu/hw/gp10b/hw_flush_gp10b.h
deleted file mode 100644
index ae6eabf..0000000
--- a/include/nvgpu/hw/gp10b/hw_flush_gp10b.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_flush_gp10b_h_
57#define _hw_flush_gp10b_h_
58
59static inline u32 flush_l2_system_invalidate_r(void)
60{
61 return 0x00070004U;
62}
63static inline u32 flush_l2_system_invalidate_pending_v(u32 r)
64{
65 return (r >> 0U) & 0x1U;
66}
67static inline u32 flush_l2_system_invalidate_pending_busy_v(void)
68{
69 return 0x00000001U;
70}
71static inline u32 flush_l2_system_invalidate_pending_busy_f(void)
72{
73 return 0x1U;
74}
75static inline u32 flush_l2_system_invalidate_outstanding_v(u32 r)
76{
77 return (r >> 1U) & 0x1U;
78}
79static inline u32 flush_l2_system_invalidate_outstanding_true_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 flush_l2_flush_dirty_r(void)
84{
85 return 0x00070010U;
86}
87static inline u32 flush_l2_flush_dirty_pending_v(u32 r)
88{
89 return (r >> 0U) & 0x1U;
90}
91static inline u32 flush_l2_flush_dirty_pending_empty_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 flush_l2_flush_dirty_pending_empty_f(void)
96{
97 return 0x0U;
98}
99static inline u32 flush_l2_flush_dirty_pending_busy_v(void)
100{
101 return 0x00000001U;
102}
103static inline u32 flush_l2_flush_dirty_pending_busy_f(void)
104{
105 return 0x1U;
106}
107static inline u32 flush_l2_flush_dirty_outstanding_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 flush_l2_flush_dirty_outstanding_false_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 flush_l2_flush_dirty_outstanding_false_f(void)
116{
117 return 0x0U;
118}
119static inline u32 flush_l2_flush_dirty_outstanding_true_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 flush_l2_clean_comptags_r(void)
124{
125 return 0x0007000cU;
126}
127static inline u32 flush_l2_clean_comptags_pending_v(u32 r)
128{
129 return (r >> 0U) & 0x1U;
130}
131static inline u32 flush_l2_clean_comptags_pending_empty_v(void)
132{
133 return 0x00000000U;
134}
135static inline u32 flush_l2_clean_comptags_pending_empty_f(void)
136{
137 return 0x0U;
138}
139static inline u32 flush_l2_clean_comptags_pending_busy_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 flush_l2_clean_comptags_pending_busy_f(void)
144{
145 return 0x1U;
146}
147static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 flush_l2_clean_comptags_outstanding_false_v(void)
152{
153 return 0x00000000U;
154}
155static inline u32 flush_l2_clean_comptags_outstanding_false_f(void)
156{
157 return 0x0U;
158}
159static inline u32 flush_l2_clean_comptags_outstanding_true_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 flush_fb_flush_r(void)
164{
165 return 0x00070000U;
166}
167static inline u32 flush_fb_flush_pending_v(u32 r)
168{
169 return (r >> 0U) & 0x1U;
170}
171static inline u32 flush_fb_flush_pending_busy_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 flush_fb_flush_pending_busy_f(void)
176{
177 return 0x1U;
178}
179static inline u32 flush_fb_flush_outstanding_v(u32 r)
180{
181 return (r >> 1U) & 0x1U;
182}
183static inline u32 flush_fb_flush_outstanding_true_v(void)
184{
185 return 0x00000001U;
186}
187#endif
diff --git a/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h b/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h
deleted file mode 100644
index 521dcfe..0000000
--- a/include/nvgpu/hw/gp10b/hw_fuse_gp10b.h
+++ /dev/null
@@ -1,155 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fuse_gp10b_h_
57#define _hw_fuse_gp10b_h_
58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
64{
65 return 0x00021c38U + i*4U;
66}
67static inline u32 fuse_ctrl_opt_tpc_gpc_r(u32 i)
68{
69 return 0x00021838U + i*4U;
70}
71static inline u32 fuse_ctrl_opt_ram_svop_pdp_r(void)
72{
73 return 0x00021944U;
74}
75static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_f(u32 v)
76{
77 return (v & 0xffU) << 0U;
78}
79static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_m(void)
80{
81 return 0xffU << 0U;
82}
83static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_v(u32 r)
84{
85 return (r >> 0U) & 0xffU;
86}
87static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_r(void)
88{
89 return 0x00021948U;
90}
91static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_f(u32 v)
92{
93 return (v & 0x1U) << 0U;
94}
95static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_m(void)
96{
97 return 0x1U << 0U;
98}
99static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_yes_f(void)
104{
105 return 0x1U;
106}
107static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_no_f(void)
108{
109 return 0x0U;
110}
111static inline u32 fuse_status_opt_fbio_r(void)
112{
113 return 0x00021c14U;
114}
115static inline u32 fuse_status_opt_fbio_data_f(u32 v)
116{
117 return (v & 0xffffU) << 0U;
118}
119static inline u32 fuse_status_opt_fbio_data_m(void)
120{
121 return 0xffffU << 0U;
122}
123static inline u32 fuse_status_opt_fbio_data_v(u32 r)
124{
125 return (r >> 0U) & 0xffffU;
126}
127static inline u32 fuse_status_opt_rop_l2_fbp_r(u32 i)
128{
129 return 0x00021d70U + i*4U;
130}
131static inline u32 fuse_status_opt_fbp_r(void)
132{
133 return 0x00021d38U;
134}
135static inline u32 fuse_status_opt_fbp_idx_v(u32 r, u32 i)
136{
137 return (r >> (0U + i*1U)) & 0x1U;
138}
139static inline u32 fuse_opt_ecc_en_r(void)
140{
141 return 0x00021228U;
142}
143static inline u32 fuse_opt_feature_fuses_override_disable_r(void)
144{
145 return 0x000213f0U;
146}
147static inline u32 fuse_opt_sec_debug_en_r(void)
148{
149 return 0x00021218U;
150}
151static inline u32 fuse_opt_priv_sec_en_r(void)
152{
153 return 0x00021434U;
154}
155#endif
diff --git a/include/nvgpu/hw/gp10b/hw_gmmu_gp10b.h b/include/nvgpu/hw/gp10b/hw_gmmu_gp10b.h
deleted file mode 100644
index 6aeb435..0000000
--- a/include/nvgpu/hw/gp10b/hw_gmmu_gp10b.h
+++ /dev/null
@@ -1,331 +0,0 @@
1/*
2 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gmmu_gp10b_h_
57#define _hw_gmmu_gp10b_h_
58
59static inline u32 gmmu_new_pde_is_pte_w(void)
60{
61 return 0U;
62}
63static inline u32 gmmu_new_pde_is_pte_false_f(void)
64{
65 return 0x0U;
66}
67static inline u32 gmmu_new_pde_aperture_w(void)
68{
69 return 0U;
70}
71static inline u32 gmmu_new_pde_aperture_invalid_f(void)
72{
73 return 0x0U;
74}
75static inline u32 gmmu_new_pde_aperture_video_memory_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gmmu_new_pde_aperture_sys_mem_coh_f(void)
80{
81 return 0x4U;
82}
83static inline u32 gmmu_new_pde_aperture_sys_mem_ncoh_f(void)
84{
85 return 0x6U;
86}
87static inline u32 gmmu_new_pde_address_sys_f(u32 v)
88{
89 return (v & 0xffffffU) << 8U;
90}
91static inline u32 gmmu_new_pde_address_sys_w(void)
92{
93 return 0U;
94}
95static inline u32 gmmu_new_pde_vol_w(void)
96{
97 return 0U;
98}
99static inline u32 gmmu_new_pde_vol_true_f(void)
100{
101 return 0x8U;
102}
103static inline u32 gmmu_new_pde_vol_false_f(void)
104{
105 return 0x0U;
106}
107static inline u32 gmmu_new_pde_address_shift_v(void)
108{
109 return 0x0000000cU;
110}
111static inline u32 gmmu_new_pde__size_v(void)
112{
113 return 0x00000008U;
114}
115static inline u32 gmmu_new_dual_pde_is_pte_w(void)
116{
117 return 0U;
118}
119static inline u32 gmmu_new_dual_pde_is_pte_false_f(void)
120{
121 return 0x0U;
122}
123static inline u32 gmmu_new_dual_pde_aperture_big_w(void)
124{
125 return 0U;
126}
127static inline u32 gmmu_new_dual_pde_aperture_big_invalid_f(void)
128{
129 return 0x0U;
130}
131static inline u32 gmmu_new_dual_pde_aperture_big_video_memory_f(void)
132{
133 return 0x2U;
134}
135static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_coh_f(void)
136{
137 return 0x4U;
138}
139static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f(void)
140{
141 return 0x6U;
142}
143static inline u32 gmmu_new_dual_pde_address_big_sys_f(u32 v)
144{
145 return (v & 0xfffffffU) << 4U;
146}
147static inline u32 gmmu_new_dual_pde_address_big_sys_w(void)
148{
149 return 0U;
150}
151static inline u32 gmmu_new_dual_pde_aperture_small_w(void)
152{
153 return 2U;
154}
155static inline u32 gmmu_new_dual_pde_aperture_small_invalid_f(void)
156{
157 return 0x0U;
158}
159static inline u32 gmmu_new_dual_pde_aperture_small_video_memory_f(void)
160{
161 return 0x2U;
162}
163static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_coh_f(void)
164{
165 return 0x4U;
166}
167static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f(void)
168{
169 return 0x6U;
170}
171static inline u32 gmmu_new_dual_pde_vol_small_w(void)
172{
173 return 2U;
174}
175static inline u32 gmmu_new_dual_pde_vol_small_true_f(void)
176{
177 return 0x8U;
178}
179static inline u32 gmmu_new_dual_pde_vol_small_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 gmmu_new_dual_pde_vol_big_w(void)
184{
185 return 0U;
186}
187static inline u32 gmmu_new_dual_pde_vol_big_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 gmmu_new_dual_pde_vol_big_false_f(void)
192{
193 return 0x0U;
194}
195static inline u32 gmmu_new_dual_pde_address_small_sys_f(u32 v)
196{
197 return (v & 0xffffffU) << 8U;
198}
199static inline u32 gmmu_new_dual_pde_address_small_sys_w(void)
200{
201 return 2U;
202}
203static inline u32 gmmu_new_dual_pde_address_shift_v(void)
204{
205 return 0x0000000cU;
206}
207static inline u32 gmmu_new_dual_pde_address_big_shift_v(void)
208{
209 return 0x00000008U;
210}
211static inline u32 gmmu_new_dual_pde__size_v(void)
212{
213 return 0x00000010U;
214}
215static inline u32 gmmu_new_pte__size_v(void)
216{
217 return 0x00000008U;
218}
219static inline u32 gmmu_new_pte_valid_w(void)
220{
221 return 0U;
222}
223static inline u32 gmmu_new_pte_valid_true_f(void)
224{
225 return 0x1U;
226}
227static inline u32 gmmu_new_pte_valid_false_f(void)
228{
229 return 0x0U;
230}
231static inline u32 gmmu_new_pte_privilege_w(void)
232{
233 return 0U;
234}
235static inline u32 gmmu_new_pte_privilege_true_f(void)
236{
237 return 0x20U;
238}
239static inline u32 gmmu_new_pte_privilege_false_f(void)
240{
241 return 0x0U;
242}
243static inline u32 gmmu_new_pte_address_sys_f(u32 v)
244{
245 return (v & 0xffffffU) << 8U;
246}
247static inline u32 gmmu_new_pte_address_sys_w(void)
248{
249 return 0U;
250}
251static inline u32 gmmu_new_pte_address_vid_f(u32 v)
252{
253 return (v & 0xffffffU) << 8U;
254}
255static inline u32 gmmu_new_pte_address_vid_w(void)
256{
257 return 0U;
258}
259static inline u32 gmmu_new_pte_vol_w(void)
260{
261 return 0U;
262}
263static inline u32 gmmu_new_pte_vol_true_f(void)
264{
265 return 0x8U;
266}
267static inline u32 gmmu_new_pte_vol_false_f(void)
268{
269 return 0x0U;
270}
271static inline u32 gmmu_new_pte_aperture_w(void)
272{
273 return 0U;
274}
275static inline u32 gmmu_new_pte_aperture_video_memory_f(void)
276{
277 return 0x0U;
278}
279static inline u32 gmmu_new_pte_aperture_sys_mem_coh_f(void)
280{
281 return 0x4U;
282}
283static inline u32 gmmu_new_pte_aperture_sys_mem_ncoh_f(void)
284{
285 return 0x6U;
286}
287static inline u32 gmmu_new_pte_read_only_w(void)
288{
289 return 0U;
290}
291static inline u32 gmmu_new_pte_read_only_true_f(void)
292{
293 return 0x40U;
294}
295static inline u32 gmmu_new_pte_comptagline_f(u32 v)
296{
297 return (v & 0x3ffffU) << 4U;
298}
299static inline u32 gmmu_new_pte_comptagline_w(void)
300{
301 return 1U;
302}
303static inline u32 gmmu_new_pte_kind_f(u32 v)
304{
305 return (v & 0xffU) << 24U;
306}
307static inline u32 gmmu_new_pte_kind_w(void)
308{
309 return 1U;
310}
311static inline u32 gmmu_new_pte_address_shift_v(void)
312{
313 return 0x0000000cU;
314}
315static inline u32 gmmu_pte_kind_f(u32 v)
316{
317 return (v & 0xffU) << 4U;
318}
319static inline u32 gmmu_pte_kind_w(void)
320{
321 return 1U;
322}
323static inline u32 gmmu_pte_kind_invalid_v(void)
324{
325 return 0x000000ffU;
326}
327static inline u32 gmmu_pte_kind_pitch_v(void)
328{
329 return 0x00000000U;
330}
331#endif
diff --git a/include/nvgpu/hw/gp10b/hw_gr_gp10b.h b/include/nvgpu/hw/gp10b/hw_gr_gp10b.h
deleted file mode 100644
index 89c6bba..0000000
--- a/include/nvgpu/hw/gp10b/hw_gr_gp10b.h
+++ /dev/null
@@ -1,4419 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gr_gp10b_h_
57#define _hw_gr_gp10b_h_
58
59static inline u32 gr_intr_r(void)
60{
61 return 0x00400100U;
62}
63static inline u32 gr_intr_notify_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 gr_intr_notify_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gr_intr_semaphore_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gr_intr_semaphore_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gr_intr_illegal_method_pending_f(void)
80{
81 return 0x10U;
82}
83static inline u32 gr_intr_illegal_method_reset_f(void)
84{
85 return 0x10U;
86}
87static inline u32 gr_intr_illegal_notify_pending_f(void)
88{
89 return 0x40U;
90}
91static inline u32 gr_intr_illegal_notify_reset_f(void)
92{
93 return 0x40U;
94}
95static inline u32 gr_intr_firmware_method_f(u32 v)
96{
97 return (v & 0x1U) << 8U;
98}
99static inline u32 gr_intr_firmware_method_pending_f(void)
100{
101 return 0x100U;
102}
103static inline u32 gr_intr_firmware_method_reset_f(void)
104{
105 return 0x100U;
106}
107static inline u32 gr_intr_illegal_class_pending_f(void)
108{
109 return 0x20U;
110}
111static inline u32 gr_intr_illegal_class_reset_f(void)
112{
113 return 0x20U;
114}
115static inline u32 gr_intr_fecs_error_pending_f(void)
116{
117 return 0x80000U;
118}
119static inline u32 gr_intr_fecs_error_reset_f(void)
120{
121 return 0x80000U;
122}
123static inline u32 gr_intr_class_error_pending_f(void)
124{
125 return 0x100000U;
126}
127static inline u32 gr_intr_class_error_reset_f(void)
128{
129 return 0x100000U;
130}
131static inline u32 gr_intr_exception_pending_f(void)
132{
133 return 0x200000U;
134}
135static inline u32 gr_intr_exception_reset_f(void)
136{
137 return 0x200000U;
138}
139static inline u32 gr_fecs_intr_r(void)
140{
141 return 0x00400144U;
142}
143static inline u32 gr_class_error_r(void)
144{
145 return 0x00400110U;
146}
147static inline u32 gr_class_error_code_v(u32 r)
148{
149 return (r >> 0U) & 0xffffU;
150}
151static inline u32 gr_intr_nonstall_r(void)
152{
153 return 0x00400120U;
154}
155static inline u32 gr_intr_nonstall_trap_pending_f(void)
156{
157 return 0x2U;
158}
159static inline u32 gr_intr_en_r(void)
160{
161 return 0x0040013cU;
162}
163static inline u32 gr_exception_r(void)
164{
165 return 0x00400108U;
166}
167static inline u32 gr_exception_fe_m(void)
168{
169 return 0x1U << 0U;
170}
171static inline u32 gr_exception_gpc_m(void)
172{
173 return 0x1U << 24U;
174}
175static inline u32 gr_exception_memfmt_m(void)
176{
177 return 0x1U << 1U;
178}
179static inline u32 gr_exception_ds_m(void)
180{
181 return 0x1U << 4U;
182}
183static inline u32 gr_exception_sked_m(void)
184{
185 return 0x1U << 8U;
186}
187static inline u32 gr_exception_pd_m(void)
188{
189 return 0x1U << 2U;
190}
191static inline u32 gr_exception_scc_m(void)
192{
193 return 0x1U << 3U;
194}
195static inline u32 gr_exception_ssync_m(void)
196{
197 return 0x1U << 5U;
198}
199static inline u32 gr_exception_mme_m(void)
200{
201 return 0x1U << 7U;
202}
203static inline u32 gr_exception1_r(void)
204{
205 return 0x00400118U;
206}
207static inline u32 gr_exception1_gpc_0_pending_f(void)
208{
209 return 0x1U;
210}
211static inline u32 gr_exception2_r(void)
212{
213 return 0x0040011cU;
214}
215static inline u32 gr_exception_en_r(void)
216{
217 return 0x00400138U;
218}
219static inline u32 gr_exception_en_fe_m(void)
220{
221 return 0x1U << 0U;
222}
223static inline u32 gr_exception1_en_r(void)
224{
225 return 0x00400130U;
226}
227static inline u32 gr_exception2_en_r(void)
228{
229 return 0x00400134U;
230}
231static inline u32 gr_gpfifo_ctl_r(void)
232{
233 return 0x00400500U;
234}
235static inline u32 gr_gpfifo_ctl_access_f(u32 v)
236{
237 return (v & 0x1U) << 0U;
238}
239static inline u32 gr_gpfifo_ctl_access_disabled_f(void)
240{
241 return 0x0U;
242}
243static inline u32 gr_gpfifo_ctl_access_enabled_f(void)
244{
245 return 0x1U;
246}
247static inline u32 gr_gpfifo_ctl_semaphore_access_f(u32 v)
248{
249 return (v & 0x1U) << 16U;
250}
251static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_v(void)
252{
253 return 0x00000001U;
254}
255static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_f(void)
256{
257 return 0x10000U;
258}
259static inline u32 gr_gpfifo_status_r(void)
260{
261 return 0x00400504U;
262}
263static inline u32 gr_trapped_addr_r(void)
264{
265 return 0x00400704U;
266}
267static inline u32 gr_trapped_addr_mthd_v(u32 r)
268{
269 return (r >> 2U) & 0xfffU;
270}
271static inline u32 gr_trapped_addr_subch_v(u32 r)
272{
273 return (r >> 16U) & 0x7U;
274}
275static inline u32 gr_trapped_addr_mme_generated_v(u32 r)
276{
277 return (r >> 20U) & 0x1U;
278}
279static inline u32 gr_trapped_addr_datahigh_v(u32 r)
280{
281 return (r >> 24U) & 0x1U;
282}
283static inline u32 gr_trapped_addr_priv_v(u32 r)
284{
285 return (r >> 28U) & 0x1U;
286}
287static inline u32 gr_trapped_addr_status_v(u32 r)
288{
289 return (r >> 31U) & 0x1U;
290}
291static inline u32 gr_trapped_data_lo_r(void)
292{
293 return 0x00400708U;
294}
295static inline u32 gr_trapped_data_hi_r(void)
296{
297 return 0x0040070cU;
298}
299static inline u32 gr_trapped_data_mme_r(void)
300{
301 return 0x00400710U;
302}
303static inline u32 gr_trapped_data_mme_pc_v(u32 r)
304{
305 return (r >> 0U) & 0xfffU;
306}
307static inline u32 gr_status_r(void)
308{
309 return 0x00400700U;
310}
311static inline u32 gr_status_fe_method_upper_v(u32 r)
312{
313 return (r >> 1U) & 0x1U;
314}
315static inline u32 gr_status_fe_method_lower_v(u32 r)
316{
317 return (r >> 2U) & 0x1U;
318}
319static inline u32 gr_status_fe_method_lower_idle_v(void)
320{
321 return 0x00000000U;
322}
323static inline u32 gr_status_fe_gi_v(u32 r)
324{
325 return (r >> 21U) & 0x1U;
326}
327static inline u32 gr_status_mask_r(void)
328{
329 return 0x00400610U;
330}
331static inline u32 gr_status_1_r(void)
332{
333 return 0x00400604U;
334}
335static inline u32 gr_status_2_r(void)
336{
337 return 0x00400608U;
338}
339static inline u32 gr_engine_status_r(void)
340{
341 return 0x0040060cU;
342}
343static inline u32 gr_engine_status_value_busy_f(void)
344{
345 return 0x1U;
346}
347static inline u32 gr_pri_be0_becs_be_exception_r(void)
348{
349 return 0x00410204U;
350}
351static inline u32 gr_pri_be0_becs_be_exception_en_r(void)
352{
353 return 0x00410208U;
354}
355static inline u32 gr_pri_gpc0_gpccs_gpc_exception_r(void)
356{
357 return 0x00502c90U;
358}
359static inline u32 gr_pri_gpc0_gpccs_gpc_exception_en_r(void)
360{
361 return 0x00502c94U;
362}
363static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_r(void)
364{
365 return 0x00504508U;
366}
367static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
368{
369 return 0x0050450cU;
370}
371static inline u32 gr_activity_0_r(void)
372{
373 return 0x00400380U;
374}
375static inline u32 gr_activity_1_r(void)
376{
377 return 0x00400384U;
378}
379static inline u32 gr_activity_2_r(void)
380{
381 return 0x00400388U;
382}
383static inline u32 gr_activity_4_r(void)
384{
385 return 0x00400390U;
386}
387static inline u32 gr_activity_4_gpc0_s(void)
388{
389 return 3U;
390}
391static inline u32 gr_activity_4_gpc0_f(u32 v)
392{
393 return (v & 0x7U) << 0U;
394}
395static inline u32 gr_activity_4_gpc0_m(void)
396{
397 return 0x7U << 0U;
398}
399static inline u32 gr_activity_4_gpc0_v(u32 r)
400{
401 return (r >> 0U) & 0x7U;
402}
403static inline u32 gr_activity_4_gpc0_empty_v(void)
404{
405 return 0x00000000U;
406}
407static inline u32 gr_activity_4_gpc0_preempted_v(void)
408{
409 return 0x00000004U;
410}
411static inline u32 gr_pri_gpc0_gcc_dbg_r(void)
412{
413 return 0x00501000U;
414}
415static inline u32 gr_pri_gpcs_gcc_dbg_r(void)
416{
417 return 0x00419000U;
418}
419static inline u32 gr_pri_gpcs_gcc_dbg_invalidate_m(void)
420{
421 return 0x1U << 1U;
422}
423static inline u32 gr_pri_gpc0_tpc0_sm_cache_control_r(void)
424{
425 return 0x005046a4U;
426}
427static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_r(void)
428{
429 return 0x00419ea4U;
430}
431static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_invalidate_cache_m(void)
432{
433 return 0x1U << 0U;
434}
435static inline u32 gr_pri_sked_activity_r(void)
436{
437 return 0x00407054U;
438}
439static inline u32 gr_pri_gpc0_gpccs_gpc_activity0_r(void)
440{
441 return 0x00502c80U;
442}
443static inline u32 gr_pri_gpc0_gpccs_gpc_activity1_r(void)
444{
445 return 0x00502c84U;
446}
447static inline u32 gr_pri_gpc0_gpccs_gpc_activity2_r(void)
448{
449 return 0x00502c88U;
450}
451static inline u32 gr_pri_gpc0_gpccs_gpc_activity3_r(void)
452{
453 return 0x00502c8cU;
454}
455static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r(void)
456{
457 return 0x00504500U;
458}
459static inline u32 gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r(void)
460{
461 return 0x00504d00U;
462}
463static inline u32 gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r(void)
464{
465 return 0x00501d00U;
466}
467static inline u32 gr_pri_gpcs_gpccs_gpc_activity_0_r(void)
468{
469 return 0x0041ac80U;
470}
471static inline u32 gr_pri_gpcs_gpccs_gpc_activity_1_r(void)
472{
473 return 0x0041ac84U;
474}
475static inline u32 gr_pri_gpcs_gpccs_gpc_activity_2_r(void)
476{
477 return 0x0041ac88U;
478}
479static inline u32 gr_pri_gpcs_gpccs_gpc_activity_3_r(void)
480{
481 return 0x0041ac8cU;
482}
483static inline u32 gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r(void)
484{
485 return 0x0041c500U;
486}
487static inline u32 gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r(void)
488{
489 return 0x0041cd00U;
490}
491static inline u32 gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r(void)
492{
493 return 0x00419d00U;
494}
495static inline u32 gr_pri_be0_becs_be_activity0_r(void)
496{
497 return 0x00410200U;
498}
499static inline u32 gr_pri_be1_becs_be_activity0_r(void)
500{
501 return 0x00410600U;
502}
503static inline u32 gr_pri_bes_becs_be_activity0_r(void)
504{
505 return 0x00408a00U;
506}
507static inline u32 gr_pri_ds_mpipe_status_r(void)
508{
509 return 0x00405858U;
510}
511static inline u32 gr_pri_fe_go_idle_info_r(void)
512{
513 return 0x00404194U;
514}
515static inline u32 gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r(void)
516{
517 return 0x00504238U;
518}
519static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_r(void)
520{
521 return 0x005046b8U;
522}
523static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp0_b(void)
524{
525 return 4U;
526}
527static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp0_pending_f(void)
528{
529 return 0x10U;
530}
531static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp1_pending_f(void)
532{
533 return 0x20U;
534}
535static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp2_pending_f(void)
536{
537 return 0x40U;
538}
539static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_single_err_detected_qrfdp3_pending_f(void)
540{
541 return 0x80U;
542}
543static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp0_b(void)
544{
545 return 8U;
546}
547static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp0_pending_f(void)
548{
549 return 0x100U;
550}
551static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp1_pending_f(void)
552{
553 return 0x200U;
554}
555static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp2_pending_f(void)
556{
557 return 0x400U;
558}
559static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_double_err_detected_qrfdp3_pending_f(void)
560{
561 return 0x800U;
562}
563static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_r(void)
564{
565 return 0x005044a0U;
566}
567static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_corrected_shm0_pending_f(void)
568{
569 return 0x1U;
570}
571static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_corrected_shm1_pending_f(void)
572{
573 return 0x2U;
574}
575static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_detected_shm0_pending_f(void)
576{
577 return 0x10U;
578}
579static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_single_err_detected_shm1_pending_f(void)
580{
581 return 0x20U;
582}
583static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_double_err_detected_shm0_pending_f(void)
584{
585 return 0x100U;
586}
587static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_status_double_err_detected_shm1_pending_f(void)
588{
589 return 0x200U;
590}
591static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_single_err_count_r(void)
592{
593 return 0x005046bcU;
594}
595static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_double_err_count_r(void)
596{
597 return 0x005046c0U;
598}
599static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_r(void)
600{
601 return 0x005044a4U;
602}
603static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_corrected_m(void)
604{
605 return 0xffU << 0U;
606}
607static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_corrected_v(u32 r)
608{
609 return (r >> 0U) & 0xffU;
610}
611static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_detected_m(void)
612{
613 return 0xffU << 8U;
614}
615static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_single_detected_v(u32 r)
616{
617 return (r >> 8U) & 0xffU;
618}
619static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_double_detected_m(void)
620{
621 return 0xffU << 16U;
622}
623static inline u32 gr_pri_gpc0_tpc0_sm_shm_ecc_err_count_double_detected_v(u32 r)
624{
625 return (r >> 16U) & 0xffU;
626}
627static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_r(void)
628{
629 return 0x005042c4U;
630}
631static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_default_f(void)
632{
633 return 0x0U;
634}
635static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe0_f(void)
636{
637 return 0x1U;
638}
639static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe1_f(void)
640{
641 return 0x2U;
642}
643static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_total_r(void)
644{
645 return 0x00504218U;
646}
647static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_total_sec_m(void)
648{
649 return 0xffffU << 0U;
650}
651static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_total_sec_v(u32 r)
652{
653 return (r >> 0U) & 0xffffU;
654}
655static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_total_ded_m(void)
656{
657 return 0xffffU << 16U;
658}
659static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_total_ded_v(u32 r)
660{
661 return (r >> 16U) & 0xffffU;
662}
663static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_unique_r(void)
664{
665 return 0x005042ecU;
666}
667static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_unique_sec_m(void)
668{
669 return 0xffffU << 0U;
670}
671static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_unique_sec_v(u32 r)
672{
673 return (r >> 0U) & 0xffffU;
674}
675static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_unique_ded_m(void)
676{
677 return 0xffffU << 16U;
678}
679static inline u32 gr_pri_gpc0_tpc0_tex_m_ecc_cnt_unique_ded_v(u32 r)
680{
681 return (r >> 16U) & 0xffffU;
682}
683static inline u32 gr_pri_be0_crop_status1_r(void)
684{
685 return 0x00410134U;
686}
687static inline u32 gr_pri_bes_crop_status1_r(void)
688{
689 return 0x00408934U;
690}
691static inline u32 gr_pri_be0_zrop_status_r(void)
692{
693 return 0x00410048U;
694}
695static inline u32 gr_pri_be0_zrop_status2_r(void)
696{
697 return 0x0041004cU;
698}
699static inline u32 gr_pri_bes_zrop_status_r(void)
700{
701 return 0x00408848U;
702}
703static inline u32 gr_pri_bes_zrop_status2_r(void)
704{
705 return 0x0040884cU;
706}
707static inline u32 gr_pipe_bundle_address_r(void)
708{
709 return 0x00400200U;
710}
711static inline u32 gr_pipe_bundle_address_value_v(u32 r)
712{
713 return (r >> 0U) & 0xffffU;
714}
715static inline u32 gr_pipe_bundle_data_r(void)
716{
717 return 0x00400204U;
718}
719static inline u32 gr_pipe_bundle_config_r(void)
720{
721 return 0x00400208U;
722}
723static inline u32 gr_pipe_bundle_config_override_pipe_mode_disabled_f(void)
724{
725 return 0x0U;
726}
727static inline u32 gr_pipe_bundle_config_override_pipe_mode_enabled_f(void)
728{
729 return 0x80000000U;
730}
731static inline u32 gr_fe_hww_esr_r(void)
732{
733 return 0x00404000U;
734}
735static inline u32 gr_fe_hww_esr_reset_active_f(void)
736{
737 return 0x40000000U;
738}
739static inline u32 gr_fe_hww_esr_en_enable_f(void)
740{
741 return 0x80000000U;
742}
743static inline u32 gr_fe_hww_esr_info_r(void)
744{
745 return 0x004041b0U;
746}
747static inline u32 gr_fe_go_idle_timeout_r(void)
748{
749 return 0x00404154U;
750}
751static inline u32 gr_fe_go_idle_timeout_count_f(u32 v)
752{
753 return (v & 0xffffffffU) << 0U;
754}
755static inline u32 gr_fe_go_idle_timeout_count_disabled_f(void)
756{
757 return 0x0U;
758}
759static inline u32 gr_fe_go_idle_timeout_count_prod_f(void)
760{
761 return 0x7fffffffU;
762}
763static inline u32 gr_fe_object_table_r(u32 i)
764{
765 return 0x00404200U + i*4U;
766}
767static inline u32 gr_fe_object_table_nvclass_v(u32 r)
768{
769 return (r >> 0U) & 0xffffU;
770}
771static inline u32 gr_fe_tpc_fs_r(void)
772{
773 return 0x004041c4U;
774}
775static inline u32 gr_pri_mme_shadow_raw_index_r(void)
776{
777 return 0x00404488U;
778}
779static inline u32 gr_pri_mme_shadow_raw_index_write_trigger_f(void)
780{
781 return 0x80000000U;
782}
783static inline u32 gr_pri_mme_shadow_raw_data_r(void)
784{
785 return 0x0040448cU;
786}
787static inline u32 gr_mme_hww_esr_r(void)
788{
789 return 0x00404490U;
790}
791static inline u32 gr_mme_hww_esr_reset_active_f(void)
792{
793 return 0x40000000U;
794}
795static inline u32 gr_mme_hww_esr_en_enable_f(void)
796{
797 return 0x80000000U;
798}
799static inline u32 gr_mme_hww_esr_info_r(void)
800{
801 return 0x00404494U;
802}
803static inline u32 gr_memfmt_hww_esr_r(void)
804{
805 return 0x00404600U;
806}
807static inline u32 gr_memfmt_hww_esr_reset_active_f(void)
808{
809 return 0x40000000U;
810}
811static inline u32 gr_memfmt_hww_esr_en_enable_f(void)
812{
813 return 0x80000000U;
814}
815static inline u32 gr_fecs_cpuctl_r(void)
816{
817 return 0x00409100U;
818}
819static inline u32 gr_fecs_cpuctl_startcpu_f(u32 v)
820{
821 return (v & 0x1U) << 1U;
822}
823static inline u32 gr_fecs_cpuctl_alias_r(void)
824{
825 return 0x00409130U;
826}
827static inline u32 gr_fecs_cpuctl_alias_startcpu_f(u32 v)
828{
829 return (v & 0x1U) << 1U;
830}
831static inline u32 gr_fecs_dmactl_r(void)
832{
833 return 0x0040910cU;
834}
835static inline u32 gr_fecs_dmactl_require_ctx_f(u32 v)
836{
837 return (v & 0x1U) << 0U;
838}
839static inline u32 gr_fecs_dmactl_dmem_scrubbing_m(void)
840{
841 return 0x1U << 1U;
842}
843static inline u32 gr_fecs_dmactl_imem_scrubbing_m(void)
844{
845 return 0x1U << 2U;
846}
847static inline u32 gr_fecs_os_r(void)
848{
849 return 0x00409080U;
850}
851static inline u32 gr_fecs_idlestate_r(void)
852{
853 return 0x0040904cU;
854}
855static inline u32 gr_fecs_mailbox0_r(void)
856{
857 return 0x00409040U;
858}
859static inline u32 gr_fecs_mailbox1_r(void)
860{
861 return 0x00409044U;
862}
863static inline u32 gr_fecs_irqstat_r(void)
864{
865 return 0x00409008U;
866}
867static inline u32 gr_fecs_irqmode_r(void)
868{
869 return 0x0040900cU;
870}
871static inline u32 gr_fecs_irqmask_r(void)
872{
873 return 0x00409018U;
874}
875static inline u32 gr_fecs_irqdest_r(void)
876{
877 return 0x0040901cU;
878}
879static inline u32 gr_fecs_curctx_r(void)
880{
881 return 0x00409050U;
882}
883static inline u32 gr_fecs_nxtctx_r(void)
884{
885 return 0x00409054U;
886}
887static inline u32 gr_fecs_engctl_r(void)
888{
889 return 0x004090a4U;
890}
891static inline u32 gr_fecs_debug1_r(void)
892{
893 return 0x00409090U;
894}
895static inline u32 gr_fecs_debuginfo_r(void)
896{
897 return 0x00409094U;
898}
899static inline u32 gr_fecs_icd_cmd_r(void)
900{
901 return 0x00409200U;
902}
903static inline u32 gr_fecs_icd_cmd_opc_s(void)
904{
905 return 4U;
906}
907static inline u32 gr_fecs_icd_cmd_opc_f(u32 v)
908{
909 return (v & 0xfU) << 0U;
910}
911static inline u32 gr_fecs_icd_cmd_opc_m(void)
912{
913 return 0xfU << 0U;
914}
915static inline u32 gr_fecs_icd_cmd_opc_v(u32 r)
916{
917 return (r >> 0U) & 0xfU;
918}
919static inline u32 gr_fecs_icd_cmd_opc_rreg_f(void)
920{
921 return 0x8U;
922}
923static inline u32 gr_fecs_icd_cmd_opc_rstat_f(void)
924{
925 return 0xeU;
926}
927static inline u32 gr_fecs_icd_cmd_idx_f(u32 v)
928{
929 return (v & 0x1fU) << 8U;
930}
931static inline u32 gr_fecs_icd_rdata_r(void)
932{
933 return 0x0040920cU;
934}
935static inline u32 gr_fecs_imemc_r(u32 i)
936{
937 return 0x00409180U + i*16U;
938}
939static inline u32 gr_fecs_imemc_offs_f(u32 v)
940{
941 return (v & 0x3fU) << 2U;
942}
943static inline u32 gr_fecs_imemc_blk_f(u32 v)
944{
945 return (v & 0xffU) << 8U;
946}
947static inline u32 gr_fecs_imemc_aincw_f(u32 v)
948{
949 return (v & 0x1U) << 24U;
950}
951static inline u32 gr_fecs_imemd_r(u32 i)
952{
953 return 0x00409184U + i*16U;
954}
955static inline u32 gr_fecs_imemt_r(u32 i)
956{
957 return 0x00409188U + i*16U;
958}
959static inline u32 gr_fecs_imemt_tag_f(u32 v)
960{
961 return (v & 0xffffU) << 0U;
962}
963static inline u32 gr_fecs_dmemc_r(u32 i)
964{
965 return 0x004091c0U + i*8U;
966}
967static inline u32 gr_fecs_dmemc_offs_s(void)
968{
969 return 6U;
970}
971static inline u32 gr_fecs_dmemc_offs_f(u32 v)
972{
973 return (v & 0x3fU) << 2U;
974}
975static inline u32 gr_fecs_dmemc_offs_m(void)
976{
977 return 0x3fU << 2U;
978}
979static inline u32 gr_fecs_dmemc_offs_v(u32 r)
980{
981 return (r >> 2U) & 0x3fU;
982}
983static inline u32 gr_fecs_dmemc_blk_f(u32 v)
984{
985 return (v & 0xffU) << 8U;
986}
987static inline u32 gr_fecs_dmemc_aincw_f(u32 v)
988{
989 return (v & 0x1U) << 24U;
990}
991static inline u32 gr_fecs_dmemd_r(u32 i)
992{
993 return 0x004091c4U + i*8U;
994}
995static inline u32 gr_fecs_dmatrfbase_r(void)
996{
997 return 0x00409110U;
998}
999static inline u32 gr_fecs_dmatrfmoffs_r(void)
1000{
1001 return 0x00409114U;
1002}
1003static inline u32 gr_fecs_dmatrffboffs_r(void)
1004{
1005 return 0x0040911cU;
1006}
1007static inline u32 gr_fecs_dmatrfcmd_r(void)
1008{
1009 return 0x00409118U;
1010}
1011static inline u32 gr_fecs_dmatrfcmd_imem_f(u32 v)
1012{
1013 return (v & 0x1U) << 4U;
1014}
1015static inline u32 gr_fecs_dmatrfcmd_write_f(u32 v)
1016{
1017 return (v & 0x1U) << 5U;
1018}
1019static inline u32 gr_fecs_dmatrfcmd_size_f(u32 v)
1020{
1021 return (v & 0x7U) << 8U;
1022}
1023static inline u32 gr_fecs_dmatrfcmd_ctxdma_f(u32 v)
1024{
1025 return (v & 0x7U) << 12U;
1026}
1027static inline u32 gr_fecs_bootvec_r(void)
1028{
1029 return 0x00409104U;
1030}
1031static inline u32 gr_fecs_bootvec_vec_f(u32 v)
1032{
1033 return (v & 0xffffffffU) << 0U;
1034}
1035static inline u32 gr_fecs_falcon_hwcfg_r(void)
1036{
1037 return 0x00409108U;
1038}
1039static inline u32 gr_gpcs_gpccs_falcon_hwcfg_r(void)
1040{
1041 return 0x0041a108U;
1042}
1043static inline u32 gr_fecs_falcon_rm_r(void)
1044{
1045 return 0x00409084U;
1046}
1047static inline u32 gr_fecs_current_ctx_r(void)
1048{
1049 return 0x00409b00U;
1050}
1051static inline u32 gr_fecs_current_ctx_ptr_f(u32 v)
1052{
1053 return (v & 0xfffffffU) << 0U;
1054}
1055static inline u32 gr_fecs_current_ctx_ptr_v(u32 r)
1056{
1057 return (r >> 0U) & 0xfffffffU;
1058}
1059static inline u32 gr_fecs_current_ctx_target_s(void)
1060{
1061 return 2U;
1062}
1063static inline u32 gr_fecs_current_ctx_target_f(u32 v)
1064{
1065 return (v & 0x3U) << 28U;
1066}
1067static inline u32 gr_fecs_current_ctx_target_m(void)
1068{
1069 return 0x3U << 28U;
1070}
1071static inline u32 gr_fecs_current_ctx_target_v(u32 r)
1072{
1073 return (r >> 28U) & 0x3U;
1074}
1075static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void)
1076{
1077 return 0x0U;
1078}
1079static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void)
1080{
1081 return 0x20000000U;
1082}
1083static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void)
1084{
1085 return 0x30000000U;
1086}
1087static inline u32 gr_fecs_current_ctx_valid_s(void)
1088{
1089 return 1U;
1090}
1091static inline u32 gr_fecs_current_ctx_valid_f(u32 v)
1092{
1093 return (v & 0x1U) << 31U;
1094}
1095static inline u32 gr_fecs_current_ctx_valid_m(void)
1096{
1097 return 0x1U << 31U;
1098}
1099static inline u32 gr_fecs_current_ctx_valid_v(u32 r)
1100{
1101 return (r >> 31U) & 0x1U;
1102}
1103static inline u32 gr_fecs_current_ctx_valid_false_f(void)
1104{
1105 return 0x0U;
1106}
1107static inline u32 gr_fecs_method_data_r(void)
1108{
1109 return 0x00409500U;
1110}
1111static inline u32 gr_fecs_method_push_r(void)
1112{
1113 return 0x00409504U;
1114}
1115static inline u32 gr_fecs_method_push_adr_f(u32 v)
1116{
1117 return (v & 0xfffU) << 0U;
1118}
1119static inline u32 gr_fecs_method_push_adr_bind_pointer_v(void)
1120{
1121 return 0x00000003U;
1122}
1123static inline u32 gr_fecs_method_push_adr_bind_pointer_f(void)
1124{
1125 return 0x3U;
1126}
1127static inline u32 gr_fecs_method_push_adr_discover_image_size_v(void)
1128{
1129 return 0x00000010U;
1130}
1131static inline u32 gr_fecs_method_push_adr_wfi_golden_save_v(void)
1132{
1133 return 0x00000009U;
1134}
1135static inline u32 gr_fecs_method_push_adr_restore_golden_v(void)
1136{
1137 return 0x00000015U;
1138}
1139static inline u32 gr_fecs_method_push_adr_discover_zcull_image_size_v(void)
1140{
1141 return 0x00000016U;
1142}
1143static inline u32 gr_fecs_method_push_adr_discover_pm_image_size_v(void)
1144{
1145 return 0x00000025U;
1146}
1147static inline u32 gr_fecs_method_push_adr_discover_reglist_image_size_v(void)
1148{
1149 return 0x00000030U;
1150}
1151static inline u32 gr_fecs_method_push_adr_set_reglist_bind_instance_v(void)
1152{
1153 return 0x00000031U;
1154}
1155static inline u32 gr_fecs_method_push_adr_set_reglist_virtual_address_v(void)
1156{
1157 return 0x00000032U;
1158}
1159static inline u32 gr_fecs_method_push_adr_stop_ctxsw_v(void)
1160{
1161 return 0x00000038U;
1162}
1163static inline u32 gr_fecs_method_push_adr_start_ctxsw_v(void)
1164{
1165 return 0x00000039U;
1166}
1167static inline u32 gr_fecs_method_push_adr_set_watchdog_timeout_f(void)
1168{
1169 return 0x21U;
1170}
1171static inline u32 gr_fecs_method_push_adr_write_timestamp_record_v(void)
1172{
1173 return 0x0000003dU;
1174}
1175static inline u32 gr_fecs_method_push_adr_discover_preemption_image_size_v(void)
1176{
1177 return 0x0000001aU;
1178}
1179static inline u32 gr_fecs_method_push_adr_halt_pipeline_v(void)
1180{
1181 return 0x00000004U;
1182}
1183static inline u32 gr_fecs_method_push_adr_configure_interrupt_completion_option_v(void)
1184{
1185 return 0x0000003aU;
1186}
1187static inline u32 gr_fecs_host_int_status_r(void)
1188{
1189 return 0x00409c18U;
1190}
1191static inline u32 gr_fecs_host_int_status_fault_during_ctxsw_f(u32 v)
1192{
1193 return (v & 0x1U) << 16U;
1194}
1195static inline u32 gr_fecs_host_int_status_umimp_firmware_method_f(u32 v)
1196{
1197 return (v & 0x1U) << 17U;
1198}
1199static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v)
1200{
1201 return (v & 0x1U) << 18U;
1202}
1203static inline u32 gr_fecs_host_int_status_watchdog_active_f(void)
1204{
1205 return 0x80000U;
1206}
1207static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v)
1208{
1209 return (v & 0xffffU) << 0U;
1210}
1211static inline u32 gr_fecs_host_int_clear_r(void)
1212{
1213 return 0x00409c20U;
1214}
1215static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_f(u32 v)
1216{
1217 return (v & 0x1U) << 1U;
1218}
1219static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_clear_f(void)
1220{
1221 return 0x2U;
1222}
1223static inline u32 gr_fecs_host_int_enable_r(void)
1224{
1225 return 0x00409c24U;
1226}
1227static inline u32 gr_fecs_host_int_enable_ctxsw_intr1_enable_f(void)
1228{
1229 return 0x2U;
1230}
1231static inline u32 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f(void)
1232{
1233 return 0x10000U;
1234}
1235static inline u32 gr_fecs_host_int_enable_umimp_firmware_method_enable_f(void)
1236{
1237 return 0x20000U;
1238}
1239static inline u32 gr_fecs_host_int_enable_umimp_illegal_method_enable_f(void)
1240{
1241 return 0x40000U;
1242}
1243static inline u32 gr_fecs_host_int_enable_watchdog_enable_f(void)
1244{
1245 return 0x80000U;
1246}
1247static inline u32 gr_fecs_ctxsw_reset_ctl_r(void)
1248{
1249 return 0x00409614U;
1250}
1251static inline u32 gr_fecs_ctxsw_reset_ctl_sys_halt_disabled_f(void)
1252{
1253 return 0x0U;
1254}
1255static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_halt_disabled_f(void)
1256{
1257 return 0x0U;
1258}
1259static inline u32 gr_fecs_ctxsw_reset_ctl_be_halt_disabled_f(void)
1260{
1261 return 0x0U;
1262}
1263static inline u32 gr_fecs_ctxsw_reset_ctl_sys_engine_reset_disabled_f(void)
1264{
1265 return 0x10U;
1266}
1267static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_engine_reset_disabled_f(void)
1268{
1269 return 0x20U;
1270}
1271static inline u32 gr_fecs_ctxsw_reset_ctl_be_engine_reset_disabled_f(void)
1272{
1273 return 0x40U;
1274}
1275static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_enabled_f(void)
1276{
1277 return 0x0U;
1278}
1279static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_disabled_f(void)
1280{
1281 return 0x100U;
1282}
1283static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_enabled_f(void)
1284{
1285 return 0x0U;
1286}
1287static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_disabled_f(void)
1288{
1289 return 0x200U;
1290}
1291static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_s(void)
1292{
1293 return 1U;
1294}
1295static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_f(u32 v)
1296{
1297 return (v & 0x1U) << 10U;
1298}
1299static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_m(void)
1300{
1301 return 0x1U << 10U;
1302}
1303static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_v(u32 r)
1304{
1305 return (r >> 10U) & 0x1U;
1306}
1307static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_enabled_f(void)
1308{
1309 return 0x0U;
1310}
1311static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_disabled_f(void)
1312{
1313 return 0x400U;
1314}
1315static inline u32 gr_fecs_ctx_state_store_major_rev_id_r(void)
1316{
1317 return 0x0040960cU;
1318}
1319static inline u32 gr_fecs_ctxsw_mailbox_r(u32 i)
1320{
1321 return 0x00409800U + i*4U;
1322}
1323static inline u32 gr_fecs_ctxsw_mailbox__size_1_v(void)
1324{
1325 return 0x00000010U;
1326}
1327static inline u32 gr_fecs_ctxsw_mailbox_value_f(u32 v)
1328{
1329 return (v & 0xffffffffU) << 0U;
1330}
1331static inline u32 gr_fecs_ctxsw_mailbox_value_pass_v(void)
1332{
1333 return 0x00000001U;
1334}
1335static inline u32 gr_fecs_ctxsw_mailbox_value_fail_v(void)
1336{
1337 return 0x00000002U;
1338}
1339static inline u32 gr_fecs_ctxsw_mailbox_set_r(u32 i)
1340{
1341 return 0x004098c0U + i*4U;
1342}
1343static inline u32 gr_fecs_ctxsw_mailbox_set_value_f(u32 v)
1344{
1345 return (v & 0xffffffffU) << 0U;
1346}
1347static inline u32 gr_fecs_ctxsw_mailbox_clear_r(u32 i)
1348{
1349 return 0x00409840U + i*4U;
1350}
1351static inline u32 gr_fecs_ctxsw_mailbox_clear_value_f(u32 v)
1352{
1353 return (v & 0xffffffffU) << 0U;
1354}
1355static inline u32 gr_fecs_fs_r(void)
1356{
1357 return 0x00409604U;
1358}
1359static inline u32 gr_fecs_fs_num_available_gpcs_s(void)
1360{
1361 return 5U;
1362}
1363static inline u32 gr_fecs_fs_num_available_gpcs_f(u32 v)
1364{
1365 return (v & 0x1fU) << 0U;
1366}
1367static inline u32 gr_fecs_fs_num_available_gpcs_m(void)
1368{
1369 return 0x1fU << 0U;
1370}
1371static inline u32 gr_fecs_fs_num_available_gpcs_v(u32 r)
1372{
1373 return (r >> 0U) & 0x1fU;
1374}
1375static inline u32 gr_fecs_fs_num_available_fbps_s(void)
1376{
1377 return 5U;
1378}
1379static inline u32 gr_fecs_fs_num_available_fbps_f(u32 v)
1380{
1381 return (v & 0x1fU) << 16U;
1382}
1383static inline u32 gr_fecs_fs_num_available_fbps_m(void)
1384{
1385 return 0x1fU << 16U;
1386}
1387static inline u32 gr_fecs_fs_num_available_fbps_v(u32 r)
1388{
1389 return (r >> 16U) & 0x1fU;
1390}
1391static inline u32 gr_fecs_cfg_r(void)
1392{
1393 return 0x00409620U;
1394}
1395static inline u32 gr_fecs_cfg_imem_sz_v(u32 r)
1396{
1397 return (r >> 0U) & 0xffU;
1398}
1399static inline u32 gr_fecs_rc_lanes_r(void)
1400{
1401 return 0x00409880U;
1402}
1403static inline u32 gr_fecs_rc_lanes_num_chains_s(void)
1404{
1405 return 6U;
1406}
1407static inline u32 gr_fecs_rc_lanes_num_chains_f(u32 v)
1408{
1409 return (v & 0x3fU) << 0U;
1410}
1411static inline u32 gr_fecs_rc_lanes_num_chains_m(void)
1412{
1413 return 0x3fU << 0U;
1414}
1415static inline u32 gr_fecs_rc_lanes_num_chains_v(u32 r)
1416{
1417 return (r >> 0U) & 0x3fU;
1418}
1419static inline u32 gr_fecs_ctxsw_status_1_r(void)
1420{
1421 return 0x00409400U;
1422}
1423static inline u32 gr_fecs_ctxsw_status_1_arb_busy_s(void)
1424{
1425 return 1U;
1426}
1427static inline u32 gr_fecs_ctxsw_status_1_arb_busy_f(u32 v)
1428{
1429 return (v & 0x1U) << 12U;
1430}
1431static inline u32 gr_fecs_ctxsw_status_1_arb_busy_m(void)
1432{
1433 return 0x1U << 12U;
1434}
1435static inline u32 gr_fecs_ctxsw_status_1_arb_busy_v(u32 r)
1436{
1437 return (r >> 12U) & 0x1U;
1438}
1439static inline u32 gr_fecs_arb_ctx_adr_r(void)
1440{
1441 return 0x00409a24U;
1442}
1443static inline u32 gr_fecs_new_ctx_r(void)
1444{
1445 return 0x00409b04U;
1446}
1447static inline u32 gr_fecs_new_ctx_ptr_s(void)
1448{
1449 return 28U;
1450}
1451static inline u32 gr_fecs_new_ctx_ptr_f(u32 v)
1452{
1453 return (v & 0xfffffffU) << 0U;
1454}
1455static inline u32 gr_fecs_new_ctx_ptr_m(void)
1456{
1457 return 0xfffffffU << 0U;
1458}
1459static inline u32 gr_fecs_new_ctx_ptr_v(u32 r)
1460{
1461 return (r >> 0U) & 0xfffffffU;
1462}
1463static inline u32 gr_fecs_new_ctx_target_s(void)
1464{
1465 return 2U;
1466}
1467static inline u32 gr_fecs_new_ctx_target_f(u32 v)
1468{
1469 return (v & 0x3U) << 28U;
1470}
1471static inline u32 gr_fecs_new_ctx_target_m(void)
1472{
1473 return 0x3U << 28U;
1474}
1475static inline u32 gr_fecs_new_ctx_target_v(u32 r)
1476{
1477 return (r >> 28U) & 0x3U;
1478}
1479static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void)
1480{
1481 return 0x0U;
1482}
1483static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void)
1484{
1485 return 0x30000000U;
1486}
1487static inline u32 gr_fecs_new_ctx_target_sys_mem_coh_f(void)
1488{
1489 return 0x20000000U;
1490}
1491static inline u32 gr_fecs_new_ctx_valid_s(void)
1492{
1493 return 1U;
1494}
1495static inline u32 gr_fecs_new_ctx_valid_f(u32 v)
1496{
1497 return (v & 0x1U) << 31U;
1498}
1499static inline u32 gr_fecs_new_ctx_valid_m(void)
1500{
1501 return 0x1U << 31U;
1502}
1503static inline u32 gr_fecs_new_ctx_valid_v(u32 r)
1504{
1505 return (r >> 31U) & 0x1U;
1506}
1507static inline u32 gr_fecs_arb_ctx_ptr_r(void)
1508{
1509 return 0x00409a0cU;
1510}
1511static inline u32 gr_fecs_arb_ctx_ptr_ptr_s(void)
1512{
1513 return 28U;
1514}
1515static inline u32 gr_fecs_arb_ctx_ptr_ptr_f(u32 v)
1516{
1517 return (v & 0xfffffffU) << 0U;
1518}
1519static inline u32 gr_fecs_arb_ctx_ptr_ptr_m(void)
1520{
1521 return 0xfffffffU << 0U;
1522}
1523static inline u32 gr_fecs_arb_ctx_ptr_ptr_v(u32 r)
1524{
1525 return (r >> 0U) & 0xfffffffU;
1526}
1527static inline u32 gr_fecs_arb_ctx_ptr_target_s(void)
1528{
1529 return 2U;
1530}
1531static inline u32 gr_fecs_arb_ctx_ptr_target_f(u32 v)
1532{
1533 return (v & 0x3U) << 28U;
1534}
1535static inline u32 gr_fecs_arb_ctx_ptr_target_m(void)
1536{
1537 return 0x3U << 28U;
1538}
1539static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r)
1540{
1541 return (r >> 28U) & 0x3U;
1542}
1543static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void)
1544{
1545 return 0x0U;
1546}
1547static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void)
1548{
1549 return 0x30000000U;
1550}
1551static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_coh_f(void)
1552{
1553 return 0x20000000U;
1554}
1555static inline u32 gr_fecs_arb_ctx_cmd_r(void)
1556{
1557 return 0x00409a10U;
1558}
1559static inline u32 gr_fecs_arb_ctx_cmd_cmd_s(void)
1560{
1561 return 5U;
1562}
1563static inline u32 gr_fecs_arb_ctx_cmd_cmd_f(u32 v)
1564{
1565 return (v & 0x1fU) << 0U;
1566}
1567static inline u32 gr_fecs_arb_ctx_cmd_cmd_m(void)
1568{
1569 return 0x1fU << 0U;
1570}
1571static inline u32 gr_fecs_arb_ctx_cmd_cmd_v(u32 r)
1572{
1573 return (r >> 0U) & 0x1fU;
1574}
1575static inline u32 gr_fecs_ctxsw_status_fe_0_r(void)
1576{
1577 return 0x00409c00U;
1578}
1579static inline u32 gr_gpc0_gpccs_ctxsw_status_gpc_0_r(void)
1580{
1581 return 0x00502c04U;
1582}
1583static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void)
1584{
1585 return 0x00502400U;
1586}
1587static inline u32 gr_gpc0_gpccs_ctxsw_mailbox__size_1_v(void)
1588{
1589 return 0x00000010U;
1590}
1591static inline u32 gr_fecs_ctxsw_idlestate_r(void)
1592{
1593 return 0x00409420U;
1594}
1595static inline u32 gr_fecs_feature_override_ecc_r(void)
1596{
1597 return 0x00409658U;
1598}
1599static inline u32 gr_fecs_feature_override_ecc_sm_lrf_override_v(u32 r)
1600{
1601 return (r >> 3U) & 0x1U;
1602}
1603static inline u32 gr_fecs_feature_override_ecc_sm_shm_override_v(u32 r)
1604{
1605 return (r >> 7U) & 0x1U;
1606}
1607static inline u32 gr_fecs_feature_override_ecc_tex_override_v(u32 r)
1608{
1609 return (r >> 11U) & 0x1U;
1610}
1611static inline u32 gr_fecs_feature_override_ecc_ltc_override_v(u32 r)
1612{
1613 return (r >> 15U) & 0x1U;
1614}
1615static inline u32 gr_fecs_feature_override_ecc_sm_lrf_v(u32 r)
1616{
1617 return (r >> 0U) & 0x1U;
1618}
1619static inline u32 gr_fecs_feature_override_ecc_sm_shm_v(u32 r)
1620{
1621 return (r >> 4U) & 0x1U;
1622}
1623static inline u32 gr_fecs_feature_override_ecc_tex_v(u32 r)
1624{
1625 return (r >> 8U) & 0x1U;
1626}
1627static inline u32 gr_fecs_feature_override_ecc_ltc_v(u32 r)
1628{
1629 return (r >> 12U) & 0x1U;
1630}
1631static inline u32 gr_gpc0_gpccs_ctxsw_idlestate_r(void)
1632{
1633 return 0x00502420U;
1634}
1635static inline u32 gr_rstr2d_gpc_map0_r(void)
1636{
1637 return 0x0040780cU;
1638}
1639static inline u32 gr_rstr2d_gpc_map1_r(void)
1640{
1641 return 0x00407810U;
1642}
1643static inline u32 gr_rstr2d_gpc_map2_r(void)
1644{
1645 return 0x00407814U;
1646}
1647static inline u32 gr_rstr2d_gpc_map3_r(void)
1648{
1649 return 0x00407818U;
1650}
1651static inline u32 gr_rstr2d_gpc_map4_r(void)
1652{
1653 return 0x0040781cU;
1654}
1655static inline u32 gr_rstr2d_gpc_map5_r(void)
1656{
1657 return 0x00407820U;
1658}
1659static inline u32 gr_rstr2d_map_table_cfg_r(void)
1660{
1661 return 0x004078bcU;
1662}
1663static inline u32 gr_rstr2d_map_table_cfg_row_offset_f(u32 v)
1664{
1665 return (v & 0xffU) << 0U;
1666}
1667static inline u32 gr_rstr2d_map_table_cfg_num_entries_f(u32 v)
1668{
1669 return (v & 0xffU) << 8U;
1670}
1671static inline u32 gr_pd_hww_esr_r(void)
1672{
1673 return 0x00406018U;
1674}
1675static inline u32 gr_pd_hww_esr_reset_active_f(void)
1676{
1677 return 0x40000000U;
1678}
1679static inline u32 gr_pd_hww_esr_en_enable_f(void)
1680{
1681 return 0x80000000U;
1682}
1683static inline u32 gr_pd_num_tpc_per_gpc_r(u32 i)
1684{
1685 return 0x00406028U + i*4U;
1686}
1687static inline u32 gr_pd_num_tpc_per_gpc__size_1_v(void)
1688{
1689 return 0x00000004U;
1690}
1691static inline u32 gr_pd_num_tpc_per_gpc_count0_f(u32 v)
1692{
1693 return (v & 0xfU) << 0U;
1694}
1695static inline u32 gr_pd_num_tpc_per_gpc_count1_f(u32 v)
1696{
1697 return (v & 0xfU) << 4U;
1698}
1699static inline u32 gr_pd_num_tpc_per_gpc_count2_f(u32 v)
1700{
1701 return (v & 0xfU) << 8U;
1702}
1703static inline u32 gr_pd_num_tpc_per_gpc_count3_f(u32 v)
1704{
1705 return (v & 0xfU) << 12U;
1706}
1707static inline u32 gr_pd_num_tpc_per_gpc_count4_f(u32 v)
1708{
1709 return (v & 0xfU) << 16U;
1710}
1711static inline u32 gr_pd_num_tpc_per_gpc_count5_f(u32 v)
1712{
1713 return (v & 0xfU) << 20U;
1714}
1715static inline u32 gr_pd_num_tpc_per_gpc_count6_f(u32 v)
1716{
1717 return (v & 0xfU) << 24U;
1718}
1719static inline u32 gr_pd_num_tpc_per_gpc_count7_f(u32 v)
1720{
1721 return (v & 0xfU) << 28U;
1722}
1723static inline u32 gr_pd_ab_dist_cfg0_r(void)
1724{
1725 return 0x004064c0U;
1726}
1727static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_en_f(void)
1728{
1729 return 0x80000000U;
1730}
1731static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_dis_f(void)
1732{
1733 return 0x0U;
1734}
1735static inline u32 gr_pd_ab_dist_cfg1_r(void)
1736{
1737 return 0x004064c4U;
1738}
1739static inline u32 gr_pd_ab_dist_cfg1_max_batches_f(u32 v)
1740{
1741 return (v & 0xffffU) << 0U;
1742}
1743static inline u32 gr_pd_ab_dist_cfg1_max_batches_init_f(void)
1744{
1745 return 0xffffU;
1746}
1747static inline u32 gr_pd_ab_dist_cfg1_max_output_f(u32 v)
1748{
1749 return (v & 0xffffU) << 16U;
1750}
1751static inline u32 gr_pd_ab_dist_cfg1_max_output_granularity_v(void)
1752{
1753 return 0x00000080U;
1754}
1755static inline u32 gr_pd_ab_dist_cfg2_r(void)
1756{
1757 return 0x004064c8U;
1758}
1759static inline u32 gr_pd_ab_dist_cfg2_token_limit_f(u32 v)
1760{
1761 return (v & 0x1fffU) << 0U;
1762}
1763static inline u32 gr_pd_ab_dist_cfg2_token_limit_init_v(void)
1764{
1765 return 0x000001c0U;
1766}
1767static inline u32 gr_pd_ab_dist_cfg2_state_limit_f(u32 v)
1768{
1769 return (v & 0x1fffU) << 16U;
1770}
1771static inline u32 gr_pd_ab_dist_cfg2_state_limit_scc_bundle_granularity_v(void)
1772{
1773 return 0x00000020U;
1774}
1775static inline u32 gr_pd_ab_dist_cfg2_state_limit_min_gpm_fifo_depths_v(void)
1776{
1777 return 0x00000182U;
1778}
1779static inline u32 gr_pd_dist_skip_table_r(u32 i)
1780{
1781 return 0x004064d0U + i*4U;
1782}
1783static inline u32 gr_pd_dist_skip_table__size_1_v(void)
1784{
1785 return 0x00000008U;
1786}
1787static inline u32 gr_pd_dist_skip_table_gpc_4n0_mask_f(u32 v)
1788{
1789 return (v & 0xffU) << 0U;
1790}
1791static inline u32 gr_pd_dist_skip_table_gpc_4n1_mask_f(u32 v)
1792{
1793 return (v & 0xffU) << 8U;
1794}
1795static inline u32 gr_pd_dist_skip_table_gpc_4n2_mask_f(u32 v)
1796{
1797 return (v & 0xffU) << 16U;
1798}
1799static inline u32 gr_pd_dist_skip_table_gpc_4n3_mask_f(u32 v)
1800{
1801 return (v & 0xffU) << 24U;
1802}
1803static inline u32 gr_ds_debug_r(void)
1804{
1805 return 0x00405800U;
1806}
1807static inline u32 gr_ds_debug_timeslice_mode_disable_f(void)
1808{
1809 return 0x0U;
1810}
1811static inline u32 gr_ds_debug_timeslice_mode_enable_f(void)
1812{
1813 return 0x8000000U;
1814}
1815static inline u32 gr_ds_zbc_color_r_r(void)
1816{
1817 return 0x00405804U;
1818}
1819static inline u32 gr_ds_zbc_color_r_val_f(u32 v)
1820{
1821 return (v & 0xffffffffU) << 0U;
1822}
1823static inline u32 gr_ds_zbc_color_g_r(void)
1824{
1825 return 0x00405808U;
1826}
1827static inline u32 gr_ds_zbc_color_g_val_f(u32 v)
1828{
1829 return (v & 0xffffffffU) << 0U;
1830}
1831static inline u32 gr_ds_zbc_color_b_r(void)
1832{
1833 return 0x0040580cU;
1834}
1835static inline u32 gr_ds_zbc_color_b_val_f(u32 v)
1836{
1837 return (v & 0xffffffffU) << 0U;
1838}
1839static inline u32 gr_ds_zbc_color_a_r(void)
1840{
1841 return 0x00405810U;
1842}
1843static inline u32 gr_ds_zbc_color_a_val_f(u32 v)
1844{
1845 return (v & 0xffffffffU) << 0U;
1846}
1847static inline u32 gr_ds_zbc_color_fmt_r(void)
1848{
1849 return 0x00405814U;
1850}
1851static inline u32 gr_ds_zbc_color_fmt_val_f(u32 v)
1852{
1853 return (v & 0x7fU) << 0U;
1854}
1855static inline u32 gr_ds_zbc_color_fmt_val_invalid_f(void)
1856{
1857 return 0x0U;
1858}
1859static inline u32 gr_ds_zbc_color_fmt_val_zero_v(void)
1860{
1861 return 0x00000001U;
1862}
1863static inline u32 gr_ds_zbc_color_fmt_val_unorm_one_v(void)
1864{
1865 return 0x00000002U;
1866}
1867static inline u32 gr_ds_zbc_color_fmt_val_rf32_gf32_bf32_af32_v(void)
1868{
1869 return 0x00000004U;
1870}
1871static inline u32 gr_ds_zbc_color_fmt_val_a8_b8_g8_r8_v(void)
1872{
1873 return 0x00000028U;
1874}
1875static inline u32 gr_ds_zbc_z_r(void)
1876{
1877 return 0x00405818U;
1878}
1879static inline u32 gr_ds_zbc_z_val_s(void)
1880{
1881 return 32U;
1882}
1883static inline u32 gr_ds_zbc_z_val_f(u32 v)
1884{
1885 return (v & 0xffffffffU) << 0U;
1886}
1887static inline u32 gr_ds_zbc_z_val_m(void)
1888{
1889 return 0xffffffffU << 0U;
1890}
1891static inline u32 gr_ds_zbc_z_val_v(u32 r)
1892{
1893 return (r >> 0U) & 0xffffffffU;
1894}
1895static inline u32 gr_ds_zbc_z_val__init_v(void)
1896{
1897 return 0x00000000U;
1898}
1899static inline u32 gr_ds_zbc_z_val__init_f(void)
1900{
1901 return 0x0U;
1902}
1903static inline u32 gr_ds_zbc_z_fmt_r(void)
1904{
1905 return 0x0040581cU;
1906}
1907static inline u32 gr_ds_zbc_z_fmt_val_f(u32 v)
1908{
1909 return (v & 0x1U) << 0U;
1910}
1911static inline u32 gr_ds_zbc_z_fmt_val_invalid_f(void)
1912{
1913 return 0x0U;
1914}
1915static inline u32 gr_ds_zbc_z_fmt_val_fp32_v(void)
1916{
1917 return 0x00000001U;
1918}
1919static inline u32 gr_ds_zbc_tbl_index_r(void)
1920{
1921 return 0x00405820U;
1922}
1923static inline u32 gr_ds_zbc_tbl_index_val_f(u32 v)
1924{
1925 return (v & 0xfU) << 0U;
1926}
1927static inline u32 gr_ds_zbc_tbl_ld_r(void)
1928{
1929 return 0x00405824U;
1930}
1931static inline u32 gr_ds_zbc_tbl_ld_select_c_f(void)
1932{
1933 return 0x0U;
1934}
1935static inline u32 gr_ds_zbc_tbl_ld_select_z_f(void)
1936{
1937 return 0x1U;
1938}
1939static inline u32 gr_ds_zbc_tbl_ld_action_write_f(void)
1940{
1941 return 0x0U;
1942}
1943static inline u32 gr_ds_zbc_tbl_ld_trigger_active_f(void)
1944{
1945 return 0x4U;
1946}
1947static inline u32 gr_ds_tga_constraintlogic_beta_r(void)
1948{
1949 return 0x00405830U;
1950}
1951static inline u32 gr_ds_tga_constraintlogic_beta_cbsize_f(u32 v)
1952{
1953 return (v & 0x3fffffU) << 0U;
1954}
1955static inline u32 gr_ds_tga_constraintlogic_alpha_r(void)
1956{
1957 return 0x0040585cU;
1958}
1959static inline u32 gr_ds_tga_constraintlogic_alpha_cbsize_f(u32 v)
1960{
1961 return (v & 0xffffU) << 0U;
1962}
1963static inline u32 gr_ds_hww_esr_r(void)
1964{
1965 return 0x00405840U;
1966}
1967static inline u32 gr_ds_hww_esr_reset_s(void)
1968{
1969 return 1U;
1970}
1971static inline u32 gr_ds_hww_esr_reset_f(u32 v)
1972{
1973 return (v & 0x1U) << 30U;
1974}
1975static inline u32 gr_ds_hww_esr_reset_m(void)
1976{
1977 return 0x1U << 30U;
1978}
1979static inline u32 gr_ds_hww_esr_reset_v(u32 r)
1980{
1981 return (r >> 30U) & 0x1U;
1982}
1983static inline u32 gr_ds_hww_esr_reset_task_v(void)
1984{
1985 return 0x00000001U;
1986}
1987static inline u32 gr_ds_hww_esr_reset_task_f(void)
1988{
1989 return 0x40000000U;
1990}
1991static inline u32 gr_ds_hww_esr_en_enabled_f(void)
1992{
1993 return 0x80000000U;
1994}
1995static inline u32 gr_ds_hww_esr_2_r(void)
1996{
1997 return 0x00405848U;
1998}
1999static inline u32 gr_ds_hww_esr_2_reset_s(void)
2000{
2001 return 1U;
2002}
2003static inline u32 gr_ds_hww_esr_2_reset_f(u32 v)
2004{
2005 return (v & 0x1U) << 30U;
2006}
2007static inline u32 gr_ds_hww_esr_2_reset_m(void)
2008{
2009 return 0x1U << 30U;
2010}
2011static inline u32 gr_ds_hww_esr_2_reset_v(u32 r)
2012{
2013 return (r >> 30U) & 0x1U;
2014}
2015static inline u32 gr_ds_hww_esr_2_reset_task_v(void)
2016{
2017 return 0x00000001U;
2018}
2019static inline u32 gr_ds_hww_esr_2_reset_task_f(void)
2020{
2021 return 0x40000000U;
2022}
2023static inline u32 gr_ds_hww_esr_2_en_enabled_f(void)
2024{
2025 return 0x80000000U;
2026}
2027static inline u32 gr_ds_hww_report_mask_r(void)
2028{
2029 return 0x00405844U;
2030}
2031static inline u32 gr_ds_hww_report_mask_sph0_err_report_f(void)
2032{
2033 return 0x1U;
2034}
2035static inline u32 gr_ds_hww_report_mask_sph1_err_report_f(void)
2036{
2037 return 0x2U;
2038}
2039static inline u32 gr_ds_hww_report_mask_sph2_err_report_f(void)
2040{
2041 return 0x4U;
2042}
2043static inline u32 gr_ds_hww_report_mask_sph3_err_report_f(void)
2044{
2045 return 0x8U;
2046}
2047static inline u32 gr_ds_hww_report_mask_sph4_err_report_f(void)
2048{
2049 return 0x10U;
2050}
2051static inline u32 gr_ds_hww_report_mask_sph5_err_report_f(void)
2052{
2053 return 0x20U;
2054}
2055static inline u32 gr_ds_hww_report_mask_sph6_err_report_f(void)
2056{
2057 return 0x40U;
2058}
2059static inline u32 gr_ds_hww_report_mask_sph7_err_report_f(void)
2060{
2061 return 0x80U;
2062}
2063static inline u32 gr_ds_hww_report_mask_sph8_err_report_f(void)
2064{
2065 return 0x100U;
2066}
2067static inline u32 gr_ds_hww_report_mask_sph9_err_report_f(void)
2068{
2069 return 0x200U;
2070}
2071static inline u32 gr_ds_hww_report_mask_sph10_err_report_f(void)
2072{
2073 return 0x400U;
2074}
2075static inline u32 gr_ds_hww_report_mask_sph11_err_report_f(void)
2076{
2077 return 0x800U;
2078}
2079static inline u32 gr_ds_hww_report_mask_sph12_err_report_f(void)
2080{
2081 return 0x1000U;
2082}
2083static inline u32 gr_ds_hww_report_mask_sph13_err_report_f(void)
2084{
2085 return 0x2000U;
2086}
2087static inline u32 gr_ds_hww_report_mask_sph14_err_report_f(void)
2088{
2089 return 0x4000U;
2090}
2091static inline u32 gr_ds_hww_report_mask_sph15_err_report_f(void)
2092{
2093 return 0x8000U;
2094}
2095static inline u32 gr_ds_hww_report_mask_sph16_err_report_f(void)
2096{
2097 return 0x10000U;
2098}
2099static inline u32 gr_ds_hww_report_mask_sph17_err_report_f(void)
2100{
2101 return 0x20000U;
2102}
2103static inline u32 gr_ds_hww_report_mask_sph18_err_report_f(void)
2104{
2105 return 0x40000U;
2106}
2107static inline u32 gr_ds_hww_report_mask_sph19_err_report_f(void)
2108{
2109 return 0x80000U;
2110}
2111static inline u32 gr_ds_hww_report_mask_sph20_err_report_f(void)
2112{
2113 return 0x100000U;
2114}
2115static inline u32 gr_ds_hww_report_mask_sph21_err_report_f(void)
2116{
2117 return 0x200000U;
2118}
2119static inline u32 gr_ds_hww_report_mask_sph22_err_report_f(void)
2120{
2121 return 0x400000U;
2122}
2123static inline u32 gr_ds_hww_report_mask_sph23_err_report_f(void)
2124{
2125 return 0x800000U;
2126}
2127static inline u32 gr_ds_hww_report_mask_2_r(void)
2128{
2129 return 0x0040584cU;
2130}
2131static inline u32 gr_ds_hww_report_mask_2_sph24_err_report_f(void)
2132{
2133 return 0x1U;
2134}
2135static inline u32 gr_ds_num_tpc_per_gpc_r(u32 i)
2136{
2137 return 0x00405870U + i*4U;
2138}
2139static inline u32 gr_scc_bundle_cb_base_r(void)
2140{
2141 return 0x00408004U;
2142}
2143static inline u32 gr_scc_bundle_cb_base_addr_39_8_f(u32 v)
2144{
2145 return (v & 0xffffffffU) << 0U;
2146}
2147static inline u32 gr_scc_bundle_cb_base_addr_39_8_align_bits_v(void)
2148{
2149 return 0x00000008U;
2150}
2151static inline u32 gr_scc_bundle_cb_size_r(void)
2152{
2153 return 0x00408008U;
2154}
2155static inline u32 gr_scc_bundle_cb_size_div_256b_f(u32 v)
2156{
2157 return (v & 0x7ffU) << 0U;
2158}
2159static inline u32 gr_scc_bundle_cb_size_div_256b__prod_v(void)
2160{
2161 return 0x00000018U;
2162}
2163static inline u32 gr_scc_bundle_cb_size_div_256b_byte_granularity_v(void)
2164{
2165 return 0x00000100U;
2166}
2167static inline u32 gr_scc_bundle_cb_size_valid_false_v(void)
2168{
2169 return 0x00000000U;
2170}
2171static inline u32 gr_scc_bundle_cb_size_valid_false_f(void)
2172{
2173 return 0x0U;
2174}
2175static inline u32 gr_scc_bundle_cb_size_valid_true_f(void)
2176{
2177 return 0x80000000U;
2178}
2179static inline u32 gr_scc_pagepool_base_r(void)
2180{
2181 return 0x0040800cU;
2182}
2183static inline u32 gr_scc_pagepool_base_addr_39_8_f(u32 v)
2184{
2185 return (v & 0xffffffffU) << 0U;
2186}
2187static inline u32 gr_scc_pagepool_base_addr_39_8_align_bits_v(void)
2188{
2189 return 0x00000008U;
2190}
2191static inline u32 gr_scc_pagepool_r(void)
2192{
2193 return 0x00408010U;
2194}
2195static inline u32 gr_scc_pagepool_total_pages_f(u32 v)
2196{
2197 return (v & 0x3ffU) << 0U;
2198}
2199static inline u32 gr_scc_pagepool_total_pages_hwmax_v(void)
2200{
2201 return 0x00000000U;
2202}
2203static inline u32 gr_scc_pagepool_total_pages_hwmax_value_v(void)
2204{
2205 return 0x00000200U;
2206}
2207static inline u32 gr_scc_pagepool_total_pages_byte_granularity_v(void)
2208{
2209 return 0x00000100U;
2210}
2211static inline u32 gr_scc_pagepool_max_valid_pages_s(void)
2212{
2213 return 10U;
2214}
2215static inline u32 gr_scc_pagepool_max_valid_pages_f(u32 v)
2216{
2217 return (v & 0x3ffU) << 10U;
2218}
2219static inline u32 gr_scc_pagepool_max_valid_pages_m(void)
2220{
2221 return 0x3ffU << 10U;
2222}
2223static inline u32 gr_scc_pagepool_max_valid_pages_v(u32 r)
2224{
2225 return (r >> 10U) & 0x3ffU;
2226}
2227static inline u32 gr_scc_pagepool_valid_true_f(void)
2228{
2229 return 0x80000000U;
2230}
2231static inline u32 gr_scc_init_r(void)
2232{
2233 return 0x0040802cU;
2234}
2235static inline u32 gr_scc_init_ram_trigger_f(void)
2236{
2237 return 0x1U;
2238}
2239static inline u32 gr_scc_hww_esr_r(void)
2240{
2241 return 0x00408030U;
2242}
2243static inline u32 gr_scc_hww_esr_reset_active_f(void)
2244{
2245 return 0x40000000U;
2246}
2247static inline u32 gr_scc_hww_esr_en_enable_f(void)
2248{
2249 return 0x80000000U;
2250}
2251static inline u32 gr_sked_hww_esr_r(void)
2252{
2253 return 0x00407020U;
2254}
2255static inline u32 gr_sked_hww_esr_reset_active_f(void)
2256{
2257 return 0x40000000U;
2258}
2259static inline u32 gr_cwd_fs_r(void)
2260{
2261 return 0x00405b00U;
2262}
2263static inline u32 gr_cwd_fs_num_gpcs_f(u32 v)
2264{
2265 return (v & 0xffU) << 0U;
2266}
2267static inline u32 gr_cwd_fs_num_tpcs_f(u32 v)
2268{
2269 return (v & 0xffU) << 8U;
2270}
2271static inline u32 gr_cwd_gpc_tpc_id_r(u32 i)
2272{
2273 return 0x00405b60U + i*4U;
2274}
2275static inline u32 gr_cwd_gpc_tpc_id_tpc0_s(void)
2276{
2277 return 4U;
2278}
2279static inline u32 gr_cwd_gpc_tpc_id_tpc0_f(u32 v)
2280{
2281 return (v & 0xfU) << 0U;
2282}
2283static inline u32 gr_cwd_gpc_tpc_id_gpc0_s(void)
2284{
2285 return 4U;
2286}
2287static inline u32 gr_cwd_gpc_tpc_id_gpc0_f(u32 v)
2288{
2289 return (v & 0xfU) << 4U;
2290}
2291static inline u32 gr_cwd_gpc_tpc_id_tpc1_f(u32 v)
2292{
2293 return (v & 0xfU) << 8U;
2294}
2295static inline u32 gr_cwd_sm_id_r(u32 i)
2296{
2297 return 0x00405ba0U + i*4U;
2298}
2299static inline u32 gr_cwd_sm_id__size_1_v(void)
2300{
2301 return 0x00000010U;
2302}
2303static inline u32 gr_cwd_sm_id_tpc0_f(u32 v)
2304{
2305 return (v & 0xffU) << 0U;
2306}
2307static inline u32 gr_cwd_sm_id_tpc1_f(u32 v)
2308{
2309 return (v & 0xffU) << 8U;
2310}
2311static inline u32 gr_gpc0_fs_gpc_r(void)
2312{
2313 return 0x00502608U;
2314}
2315static inline u32 gr_gpc0_fs_gpc_num_available_tpcs_v(u32 r)
2316{
2317 return (r >> 0U) & 0x1fU;
2318}
2319static inline u32 gr_gpc0_fs_gpc_num_available_zculls_v(u32 r)
2320{
2321 return (r >> 16U) & 0x1fU;
2322}
2323static inline u32 gr_gpc0_cfg_r(void)
2324{
2325 return 0x00502620U;
2326}
2327static inline u32 gr_gpc0_cfg_imem_sz_v(u32 r)
2328{
2329 return (r >> 0U) & 0xffU;
2330}
2331static inline u32 gr_gpccs_rc_lanes_r(void)
2332{
2333 return 0x00502880U;
2334}
2335static inline u32 gr_gpccs_rc_lanes_num_chains_s(void)
2336{
2337 return 6U;
2338}
2339static inline u32 gr_gpccs_rc_lanes_num_chains_f(u32 v)
2340{
2341 return (v & 0x3fU) << 0U;
2342}
2343static inline u32 gr_gpccs_rc_lanes_num_chains_m(void)
2344{
2345 return 0x3fU << 0U;
2346}
2347static inline u32 gr_gpccs_rc_lanes_num_chains_v(u32 r)
2348{
2349 return (r >> 0U) & 0x3fU;
2350}
2351static inline u32 gr_gpccs_rc_lane_size_r(void)
2352{
2353 return 0x00502910U;
2354}
2355static inline u32 gr_gpccs_rc_lane_size_v_s(void)
2356{
2357 return 24U;
2358}
2359static inline u32 gr_gpccs_rc_lane_size_v_f(u32 v)
2360{
2361 return (v & 0xffffffU) << 0U;
2362}
2363static inline u32 gr_gpccs_rc_lane_size_v_m(void)
2364{
2365 return 0xffffffU << 0U;
2366}
2367static inline u32 gr_gpccs_rc_lane_size_v_v(u32 r)
2368{
2369 return (r >> 0U) & 0xffffffU;
2370}
2371static inline u32 gr_gpccs_rc_lane_size_v_0_v(void)
2372{
2373 return 0x00000000U;
2374}
2375static inline u32 gr_gpccs_rc_lane_size_v_0_f(void)
2376{
2377 return 0x0U;
2378}
2379static inline u32 gr_gpc0_zcull_fs_r(void)
2380{
2381 return 0x00500910U;
2382}
2383static inline u32 gr_gpc0_zcull_fs_num_sms_f(u32 v)
2384{
2385 return (v & 0x1ffU) << 0U;
2386}
2387static inline u32 gr_gpc0_zcull_fs_num_active_banks_f(u32 v)
2388{
2389 return (v & 0xfU) << 16U;
2390}
2391static inline u32 gr_gpc0_zcull_ram_addr_r(void)
2392{
2393 return 0x00500914U;
2394}
2395static inline u32 gr_gpc0_zcull_ram_addr_tiles_per_hypertile_row_per_gpc_f(u32 v)
2396{
2397 return (v & 0xfU) << 0U;
2398}
2399static inline u32 gr_gpc0_zcull_ram_addr_row_offset_f(u32 v)
2400{
2401 return (v & 0xfU) << 8U;
2402}
2403static inline u32 gr_gpc0_zcull_sm_num_rcp_r(void)
2404{
2405 return 0x00500918U;
2406}
2407static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative_f(u32 v)
2408{
2409 return (v & 0xffffffU) << 0U;
2410}
2411static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative__max_v(void)
2412{
2413 return 0x00800000U;
2414}
2415static inline u32 gr_gpc0_zcull_total_ram_size_r(void)
2416{
2417 return 0x00500920U;
2418}
2419static inline u32 gr_gpc0_zcull_total_ram_size_num_aliquots_f(u32 v)
2420{
2421 return (v & 0xffffU) << 0U;
2422}
2423static inline u32 gr_gpc0_zcull_zcsize_r(u32 i)
2424{
2425 return 0x00500a04U + i*32U;
2426}
2427static inline u32 gr_gpc0_zcull_zcsize_height_subregion__multiple_v(void)
2428{
2429 return 0x00000040U;
2430}
2431static inline u32 gr_gpc0_zcull_zcsize_width_subregion__multiple_v(void)
2432{
2433 return 0x00000010U;
2434}
2435static inline u32 gr_gpc0_gpm_pd_sm_id_r(u32 i)
2436{
2437 return 0x00500c10U + i*4U;
2438}
2439static inline u32 gr_gpc0_gpm_pd_sm_id_id_f(u32 v)
2440{
2441 return (v & 0xffU) << 0U;
2442}
2443static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_r(u32 i)
2444{
2445 return 0x00500c30U + i*4U;
2446}
2447static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(u32 r)
2448{
2449 return (r >> 0U) & 0xffU;
2450}
2451static inline u32 gr_gpc0_tpc0_pe_cfg_smid_r(void)
2452{
2453 return 0x00504088U;
2454}
2455static inline u32 gr_gpc0_tpc0_pe_cfg_smid_value_f(u32 v)
2456{
2457 return (v & 0xffffU) << 0U;
2458}
2459static inline u32 gr_gpc0_tpc0_sm_cfg_r(void)
2460{
2461 return 0x00504698U;
2462}
2463static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_f(u32 v)
2464{
2465 return (v & 0xffffU) << 0U;
2466}
2467static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_v(u32 r)
2468{
2469 return (r >> 0U) & 0xffffU;
2470}
2471static inline u32 gr_gpc0_tpc0_sm_arch_r(void)
2472{
2473 return 0x0050469cU;
2474}
2475static inline u32 gr_gpc0_tpc0_sm_arch_warp_count_v(u32 r)
2476{
2477 return (r >> 0U) & 0xffU;
2478}
2479static inline u32 gr_gpc0_tpc0_sm_arch_spa_version_v(u32 r)
2480{
2481 return (r >> 8U) & 0xfffU;
2482}
2483static inline u32 gr_gpc0_tpc0_sm_arch_sm_version_v(u32 r)
2484{
2485 return (r >> 20U) & 0xfffU;
2486}
2487static inline u32 gr_gpc0_ppc0_pes_vsc_strem_r(void)
2488{
2489 return 0x00503018U;
2490}
2491static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_m(void)
2492{
2493 return 0x1U << 0U;
2494}
2495static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_true_f(void)
2496{
2497 return 0x1U;
2498}
2499static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_r(void)
2500{
2501 return 0x005030c0U;
2502}
2503static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_f(u32 v)
2504{
2505 return (v & 0x3fffffU) << 0U;
2506}
2507static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_m(void)
2508{
2509 return 0x3fffffU << 0U;
2510}
2511static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_default_v(void)
2512{
2513 return 0x00030000U;
2514}
2515static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_gfxp_v(void)
2516{
2517 return 0x00030a00U;
2518}
2519static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v(void)
2520{
2521 return 0x00000020U;
2522}
2523static inline u32 gr_gpc0_ppc0_cbm_beta_cb_offset_r(void)
2524{
2525 return 0x005030f4U;
2526}
2527static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_r(void)
2528{
2529 return 0x005030e4U;
2530}
2531static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(u32 v)
2532{
2533 return (v & 0xffffU) << 0U;
2534}
2535static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_m(void)
2536{
2537 return 0xffffU << 0U;
2538}
2539static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_default_v(void)
2540{
2541 return 0x00000800U;
2542}
2543static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_granularity_v(void)
2544{
2545 return 0x00000020U;
2546}
2547static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_offset_r(void)
2548{
2549 return 0x005030f8U;
2550}
2551static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_r(void)
2552{
2553 return 0x005030f0U;
2554}
2555static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_f(u32 v)
2556{
2557 return (v & 0x3fffffU) << 0U;
2558}
2559static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_default_v(void)
2560{
2561 return 0x00030000U;
2562}
2563static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_r(void)
2564{
2565 return 0x00419b00U;
2566}
2567static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_base_addr_43_12_f(u32 v)
2568{
2569 return (v & 0xffffffffU) << 0U;
2570}
2571static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_r(void)
2572{
2573 return 0x00419b04U;
2574}
2575static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_s(void)
2576{
2577 return 21U;
2578}
2579static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_f(u32 v)
2580{
2581 return (v & 0x1fffffU) << 0U;
2582}
2583static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_m(void)
2584{
2585 return 0x1fffffU << 0U;
2586}
2587static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_v(u32 r)
2588{
2589 return (r >> 0U) & 0x1fffffU;
2590}
2591static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_granularity_f(void)
2592{
2593 return 0x80U;
2594}
2595static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_s(void)
2596{
2597 return 1U;
2598}
2599static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_f(u32 v)
2600{
2601 return (v & 0x1U) << 31U;
2602}
2603static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_m(void)
2604{
2605 return 0x1U << 31U;
2606}
2607static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_v(u32 r)
2608{
2609 return (r >> 31U) & 0x1U;
2610}
2611static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_true_f(void)
2612{
2613 return 0x80000000U;
2614}
2615static inline u32 gr_gpcs_tpcs_tex_m_dbg2_r(void)
2616{
2617 return 0x00419a3cU;
2618}
2619static inline u32 gr_gpcs_tpcs_tex_m_dbg2_lg_rd_coalesce_en_f(u32 v)
2620{
2621 return (v & 0x1U) << 2U;
2622}
2623static inline u32 gr_gpcs_tpcs_tex_m_dbg2_lg_rd_coalesce_en_m(void)
2624{
2625 return 0x1U << 2U;
2626}
2627static inline u32 gr_gpcs_tpcs_tex_m_dbg2_su_rd_coalesce_en_f(u32 v)
2628{
2629 return (v & 0x1U) << 4U;
2630}
2631static inline u32 gr_gpcs_tpcs_tex_m_dbg2_su_rd_coalesce_en_m(void)
2632{
2633 return 0x1U << 4U;
2634}
2635static inline u32 gr_gpccs_falcon_addr_r(void)
2636{
2637 return 0x0041a0acU;
2638}
2639static inline u32 gr_gpccs_falcon_addr_lsb_s(void)
2640{
2641 return 6U;
2642}
2643static inline u32 gr_gpccs_falcon_addr_lsb_f(u32 v)
2644{
2645 return (v & 0x3fU) << 0U;
2646}
2647static inline u32 gr_gpccs_falcon_addr_lsb_m(void)
2648{
2649 return 0x3fU << 0U;
2650}
2651static inline u32 gr_gpccs_falcon_addr_lsb_v(u32 r)
2652{
2653 return (r >> 0U) & 0x3fU;
2654}
2655static inline u32 gr_gpccs_falcon_addr_lsb_init_v(void)
2656{
2657 return 0x00000000U;
2658}
2659static inline u32 gr_gpccs_falcon_addr_lsb_init_f(void)
2660{
2661 return 0x0U;
2662}
2663static inline u32 gr_gpccs_falcon_addr_msb_s(void)
2664{
2665 return 6U;
2666}
2667static inline u32 gr_gpccs_falcon_addr_msb_f(u32 v)
2668{
2669 return (v & 0x3fU) << 6U;
2670}
2671static inline u32 gr_gpccs_falcon_addr_msb_m(void)
2672{
2673 return 0x3fU << 6U;
2674}
2675static inline u32 gr_gpccs_falcon_addr_msb_v(u32 r)
2676{
2677 return (r >> 6U) & 0x3fU;
2678}
2679static inline u32 gr_gpccs_falcon_addr_msb_init_v(void)
2680{
2681 return 0x00000000U;
2682}
2683static inline u32 gr_gpccs_falcon_addr_msb_init_f(void)
2684{
2685 return 0x0U;
2686}
2687static inline u32 gr_gpccs_falcon_addr_ext_s(void)
2688{
2689 return 12U;
2690}
2691static inline u32 gr_gpccs_falcon_addr_ext_f(u32 v)
2692{
2693 return (v & 0xfffU) << 0U;
2694}
2695static inline u32 gr_gpccs_falcon_addr_ext_m(void)
2696{
2697 return 0xfffU << 0U;
2698}
2699static inline u32 gr_gpccs_falcon_addr_ext_v(u32 r)
2700{
2701 return (r >> 0U) & 0xfffU;
2702}
2703static inline u32 gr_gpccs_cpuctl_r(void)
2704{
2705 return 0x0041a100U;
2706}
2707static inline u32 gr_gpccs_cpuctl_startcpu_f(u32 v)
2708{
2709 return (v & 0x1U) << 1U;
2710}
2711static inline u32 gr_gpccs_dmactl_r(void)
2712{
2713 return 0x0041a10cU;
2714}
2715static inline u32 gr_gpccs_dmactl_require_ctx_f(u32 v)
2716{
2717 return (v & 0x1U) << 0U;
2718}
2719static inline u32 gr_gpccs_dmactl_dmem_scrubbing_m(void)
2720{
2721 return 0x1U << 1U;
2722}
2723static inline u32 gr_gpccs_dmactl_imem_scrubbing_m(void)
2724{
2725 return 0x1U << 2U;
2726}
2727static inline u32 gr_gpccs_imemc_r(u32 i)
2728{
2729 return 0x0041a180U + i*16U;
2730}
2731static inline u32 gr_gpccs_imemc_offs_f(u32 v)
2732{
2733 return (v & 0x3fU) << 2U;
2734}
2735static inline u32 gr_gpccs_imemc_blk_f(u32 v)
2736{
2737 return (v & 0xffU) << 8U;
2738}
2739static inline u32 gr_gpccs_imemc_aincw_f(u32 v)
2740{
2741 return (v & 0x1U) << 24U;
2742}
2743static inline u32 gr_gpccs_imemd_r(u32 i)
2744{
2745 return 0x0041a184U + i*16U;
2746}
2747static inline u32 gr_gpccs_imemt_r(u32 i)
2748{
2749 return 0x0041a188U + i*16U;
2750}
2751static inline u32 gr_gpccs_imemt__size_1_v(void)
2752{
2753 return 0x00000004U;
2754}
2755static inline u32 gr_gpccs_imemt_tag_f(u32 v)
2756{
2757 return (v & 0xffffU) << 0U;
2758}
2759static inline u32 gr_gpccs_dmemc_r(u32 i)
2760{
2761 return 0x0041a1c0U + i*8U;
2762}
2763static inline u32 gr_gpccs_dmemc_offs_f(u32 v)
2764{
2765 return (v & 0x3fU) << 2U;
2766}
2767static inline u32 gr_gpccs_dmemc_blk_f(u32 v)
2768{
2769 return (v & 0xffU) << 8U;
2770}
2771static inline u32 gr_gpccs_dmemc_aincw_f(u32 v)
2772{
2773 return (v & 0x1U) << 24U;
2774}
2775static inline u32 gr_gpccs_dmemd_r(u32 i)
2776{
2777 return 0x0041a1c4U + i*8U;
2778}
2779static inline u32 gr_gpccs_ctxsw_mailbox_r(u32 i)
2780{
2781 return 0x0041a800U + i*4U;
2782}
2783static inline u32 gr_gpccs_ctxsw_mailbox_value_f(u32 v)
2784{
2785 return (v & 0xffffffffU) << 0U;
2786}
2787static inline u32 gr_gpcs_swdx_bundle_cb_base_r(void)
2788{
2789 return 0x00418e24U;
2790}
2791static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_s(void)
2792{
2793 return 32U;
2794}
2795static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_f(u32 v)
2796{
2797 return (v & 0xffffffffU) << 0U;
2798}
2799static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_m(void)
2800{
2801 return 0xffffffffU << 0U;
2802}
2803static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_v(u32 r)
2804{
2805 return (r >> 0U) & 0xffffffffU;
2806}
2807static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_v(void)
2808{
2809 return 0x00000000U;
2810}
2811static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_f(void)
2812{
2813 return 0x0U;
2814}
2815static inline u32 gr_gpcs_swdx_bundle_cb_size_r(void)
2816{
2817 return 0x00418e28U;
2818}
2819static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_s(void)
2820{
2821 return 11U;
2822}
2823static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_f(u32 v)
2824{
2825 return (v & 0x7ffU) << 0U;
2826}
2827static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_m(void)
2828{
2829 return 0x7ffU << 0U;
2830}
2831static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_v(u32 r)
2832{
2833 return (r >> 0U) & 0x7ffU;
2834}
2835static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_v(void)
2836{
2837 return 0x00000018U;
2838}
2839static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_f(void)
2840{
2841 return 0x18U;
2842}
2843static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_s(void)
2844{
2845 return 1U;
2846}
2847static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_f(u32 v)
2848{
2849 return (v & 0x1U) << 31U;
2850}
2851static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_m(void)
2852{
2853 return 0x1U << 31U;
2854}
2855static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_v(u32 r)
2856{
2857 return (r >> 31U) & 0x1U;
2858}
2859static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_v(void)
2860{
2861 return 0x00000000U;
2862}
2863static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_f(void)
2864{
2865 return 0x0U;
2866}
2867static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_v(void)
2868{
2869 return 0x00000001U;
2870}
2871static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_f(void)
2872{
2873 return 0x80000000U;
2874}
2875static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_r(void)
2876{
2877 return 0x00500ee4U;
2878}
2879static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_f(u32 v)
2880{
2881 return (v & 0xffffU) << 0U;
2882}
2883static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_default_v(void)
2884{
2885 return 0x00000250U;
2886}
2887static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_byte_granularity_v(void)
2888{
2889 return 0x00000100U;
2890}
2891static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_r(void)
2892{
2893 return 0x00500ee0U;
2894}
2895static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_f(u32 v)
2896{
2897 return (v & 0xffffffffU) << 0U;
2898}
2899static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_align_bits_v(void)
2900{
2901 return 0x00000008U;
2902}
2903static inline u32 gr_gpcs_swdx_beta_cb_ctrl_r(void)
2904{
2905 return 0x00418eecU;
2906}
2907static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_f(u32 v)
2908{
2909 return (v & 0xfffU) << 0U;
2910}
2911static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_gfxp_v(void)
2912{
2913 return 0x00000100U;
2914}
2915static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_r(void)
2916{
2917 return 0x0041befcU;
2918}
2919static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_cbes_reserve_f(u32 v)
2920{
2921 return (v & 0xfffU) << 0U;
2922}
2923static inline u32 gr_gpcs_swdx_tc_beta_cb_size_r(u32 i)
2924{
2925 return 0x00418ea0U + i*4U;
2926}
2927static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_f(u32 v)
2928{
2929 return (v & 0x3fffffU) << 0U;
2930}
2931static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_m(void)
2932{
2933 return 0x3fffffU << 0U;
2934}
2935static inline u32 gr_gpcs_swdx_dss_zbc_color_r_r(u32 i)
2936{
2937 return 0x00418010U + i*4U;
2938}
2939static inline u32 gr_gpcs_swdx_dss_zbc_color_r_val_f(u32 v)
2940{
2941 return (v & 0xffffffffU) << 0U;
2942}
2943static inline u32 gr_gpcs_swdx_dss_zbc_color_g_r(u32 i)
2944{
2945 return 0x0041804cU + i*4U;
2946}
2947static inline u32 gr_gpcs_swdx_dss_zbc_color_g_val_f(u32 v)
2948{
2949 return (v & 0xffffffffU) << 0U;
2950}
2951static inline u32 gr_gpcs_swdx_dss_zbc_color_b_r(u32 i)
2952{
2953 return 0x00418088U + i*4U;
2954}
2955static inline u32 gr_gpcs_swdx_dss_zbc_color_b_val_f(u32 v)
2956{
2957 return (v & 0xffffffffU) << 0U;
2958}
2959static inline u32 gr_gpcs_swdx_dss_zbc_color_a_r(u32 i)
2960{
2961 return 0x004180c4U + i*4U;
2962}
2963static inline u32 gr_gpcs_swdx_dss_zbc_color_a_val_f(u32 v)
2964{
2965 return (v & 0xffffffffU) << 0U;
2966}
2967static inline u32 gr_gpcs_swdx_dss_zbc_c_01_to_04_format_r(void)
2968{
2969 return 0x00500100U;
2970}
2971static inline u32 gr_gpcs_swdx_dss_zbc_z_r(u32 i)
2972{
2973 return 0x00418110U + i*4U;
2974}
2975static inline u32 gr_gpcs_swdx_dss_zbc_z_val_f(u32 v)
2976{
2977 return (v & 0xffffffffU) << 0U;
2978}
2979static inline u32 gr_gpcs_swdx_dss_zbc_z_01_to_04_format_r(void)
2980{
2981 return 0x0050014cU;
2982}
2983static inline u32 gr_gpcs_setup_attrib_cb_base_r(void)
2984{
2985 return 0x00418810U;
2986}
2987static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_f(u32 v)
2988{
2989 return (v & 0xfffffffU) << 0U;
2990}
2991static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_align_bits_v(void)
2992{
2993 return 0x0000000cU;
2994}
2995static inline u32 gr_gpcs_setup_attrib_cb_base_valid_true_f(void)
2996{
2997 return 0x80000000U;
2998}
2999static inline u32 gr_crstr_gpc_map0_r(void)
3000{
3001 return 0x00418b08U;
3002}
3003static inline u32 gr_crstr_gpc_map0_tile0_f(u32 v)
3004{
3005 return (v & 0x7U) << 0U;
3006}
3007static inline u32 gr_crstr_gpc_map0_tile1_f(u32 v)
3008{
3009 return (v & 0x7U) << 5U;
3010}
3011static inline u32 gr_crstr_gpc_map0_tile2_f(u32 v)
3012{
3013 return (v & 0x7U) << 10U;
3014}
3015static inline u32 gr_crstr_gpc_map0_tile3_f(u32 v)
3016{
3017 return (v & 0x7U) << 15U;
3018}
3019static inline u32 gr_crstr_gpc_map0_tile4_f(u32 v)
3020{
3021 return (v & 0x7U) << 20U;
3022}
3023static inline u32 gr_crstr_gpc_map0_tile5_f(u32 v)
3024{
3025 return (v & 0x7U) << 25U;
3026}
3027static inline u32 gr_crstr_gpc_map1_r(void)
3028{
3029 return 0x00418b0cU;
3030}
3031static inline u32 gr_crstr_gpc_map1_tile6_f(u32 v)
3032{
3033 return (v & 0x7U) << 0U;
3034}
3035static inline u32 gr_crstr_gpc_map1_tile7_f(u32 v)
3036{
3037 return (v & 0x7U) << 5U;
3038}
3039static inline u32 gr_crstr_gpc_map1_tile8_f(u32 v)
3040{
3041 return (v & 0x7U) << 10U;
3042}
3043static inline u32 gr_crstr_gpc_map1_tile9_f(u32 v)
3044{
3045 return (v & 0x7U) << 15U;
3046}
3047static inline u32 gr_crstr_gpc_map1_tile10_f(u32 v)
3048{
3049 return (v & 0x7U) << 20U;
3050}
3051static inline u32 gr_crstr_gpc_map1_tile11_f(u32 v)
3052{
3053 return (v & 0x7U) << 25U;
3054}
3055static inline u32 gr_crstr_gpc_map2_r(void)
3056{
3057 return 0x00418b10U;
3058}
3059static inline u32 gr_crstr_gpc_map2_tile12_f(u32 v)
3060{
3061 return (v & 0x7U) << 0U;
3062}
3063static inline u32 gr_crstr_gpc_map2_tile13_f(u32 v)
3064{
3065 return (v & 0x7U) << 5U;
3066}
3067static inline u32 gr_crstr_gpc_map2_tile14_f(u32 v)
3068{
3069 return (v & 0x7U) << 10U;
3070}
3071static inline u32 gr_crstr_gpc_map2_tile15_f(u32 v)
3072{
3073 return (v & 0x7U) << 15U;
3074}
3075static inline u32 gr_crstr_gpc_map2_tile16_f(u32 v)
3076{
3077 return (v & 0x7U) << 20U;
3078}
3079static inline u32 gr_crstr_gpc_map2_tile17_f(u32 v)
3080{
3081 return (v & 0x7U) << 25U;
3082}
3083static inline u32 gr_crstr_gpc_map3_r(void)
3084{
3085 return 0x00418b14U;
3086}
3087static inline u32 gr_crstr_gpc_map3_tile18_f(u32 v)
3088{
3089 return (v & 0x7U) << 0U;
3090}
3091static inline u32 gr_crstr_gpc_map3_tile19_f(u32 v)
3092{
3093 return (v & 0x7U) << 5U;
3094}
3095static inline u32 gr_crstr_gpc_map3_tile20_f(u32 v)
3096{
3097 return (v & 0x7U) << 10U;
3098}
3099static inline u32 gr_crstr_gpc_map3_tile21_f(u32 v)
3100{
3101 return (v & 0x7U) << 15U;
3102}
3103static inline u32 gr_crstr_gpc_map3_tile22_f(u32 v)
3104{
3105 return (v & 0x7U) << 20U;
3106}
3107static inline u32 gr_crstr_gpc_map3_tile23_f(u32 v)
3108{
3109 return (v & 0x7U) << 25U;
3110}
3111static inline u32 gr_crstr_gpc_map4_r(void)
3112{
3113 return 0x00418b18U;
3114}
3115static inline u32 gr_crstr_gpc_map4_tile24_f(u32 v)
3116{
3117 return (v & 0x7U) << 0U;
3118}
3119static inline u32 gr_crstr_gpc_map4_tile25_f(u32 v)
3120{
3121 return (v & 0x7U) << 5U;
3122}
3123static inline u32 gr_crstr_gpc_map4_tile26_f(u32 v)
3124{
3125 return (v & 0x7U) << 10U;
3126}
3127static inline u32 gr_crstr_gpc_map4_tile27_f(u32 v)
3128{
3129 return (v & 0x7U) << 15U;
3130}
3131static inline u32 gr_crstr_gpc_map4_tile28_f(u32 v)
3132{
3133 return (v & 0x7U) << 20U;
3134}
3135static inline u32 gr_crstr_gpc_map4_tile29_f(u32 v)
3136{
3137 return (v & 0x7U) << 25U;
3138}
3139static inline u32 gr_crstr_gpc_map5_r(void)
3140{
3141 return 0x00418b1cU;
3142}
3143static inline u32 gr_crstr_gpc_map5_tile30_f(u32 v)
3144{
3145 return (v & 0x7U) << 0U;
3146}
3147static inline u32 gr_crstr_gpc_map5_tile31_f(u32 v)
3148{
3149 return (v & 0x7U) << 5U;
3150}
3151static inline u32 gr_crstr_gpc_map5_tile32_f(u32 v)
3152{
3153 return (v & 0x7U) << 10U;
3154}
3155static inline u32 gr_crstr_gpc_map5_tile33_f(u32 v)
3156{
3157 return (v & 0x7U) << 15U;
3158}
3159static inline u32 gr_crstr_gpc_map5_tile34_f(u32 v)
3160{
3161 return (v & 0x7U) << 20U;
3162}
3163static inline u32 gr_crstr_gpc_map5_tile35_f(u32 v)
3164{
3165 return (v & 0x7U) << 25U;
3166}
3167static inline u32 gr_crstr_map_table_cfg_r(void)
3168{
3169 return 0x00418bb8U;
3170}
3171static inline u32 gr_crstr_map_table_cfg_row_offset_f(u32 v)
3172{
3173 return (v & 0xffU) << 0U;
3174}
3175static inline u32 gr_crstr_map_table_cfg_num_entries_f(u32 v)
3176{
3177 return (v & 0xffU) << 8U;
3178}
3179static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_r(void)
3180{
3181 return 0x00418980U;
3182}
3183static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_0_f(u32 v)
3184{
3185 return (v & 0x7U) << 0U;
3186}
3187static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_1_f(u32 v)
3188{
3189 return (v & 0x7U) << 4U;
3190}
3191static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_2_f(u32 v)
3192{
3193 return (v & 0x7U) << 8U;
3194}
3195static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_3_f(u32 v)
3196{
3197 return (v & 0x7U) << 12U;
3198}
3199static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_4_f(u32 v)
3200{
3201 return (v & 0x7U) << 16U;
3202}
3203static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_5_f(u32 v)
3204{
3205 return (v & 0x7U) << 20U;
3206}
3207static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_6_f(u32 v)
3208{
3209 return (v & 0x7U) << 24U;
3210}
3211static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map0_tile_7_f(u32 v)
3212{
3213 return (v & 0x7U) << 28U;
3214}
3215static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_r(void)
3216{
3217 return 0x00418984U;
3218}
3219static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_8_f(u32 v)
3220{
3221 return (v & 0x7U) << 0U;
3222}
3223static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_9_f(u32 v)
3224{
3225 return (v & 0x7U) << 4U;
3226}
3227static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_10_f(u32 v)
3228{
3229 return (v & 0x7U) << 8U;
3230}
3231static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_11_f(u32 v)
3232{
3233 return (v & 0x7U) << 12U;
3234}
3235static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_12_f(u32 v)
3236{
3237 return (v & 0x7U) << 16U;
3238}
3239static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_13_f(u32 v)
3240{
3241 return (v & 0x7U) << 20U;
3242}
3243static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_14_f(u32 v)
3244{
3245 return (v & 0x7U) << 24U;
3246}
3247static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map1_tile_15_f(u32 v)
3248{
3249 return (v & 0x7U) << 28U;
3250}
3251static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_r(void)
3252{
3253 return 0x00418988U;
3254}
3255static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_16_f(u32 v)
3256{
3257 return (v & 0x7U) << 0U;
3258}
3259static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_17_f(u32 v)
3260{
3261 return (v & 0x7U) << 4U;
3262}
3263static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_18_f(u32 v)
3264{
3265 return (v & 0x7U) << 8U;
3266}
3267static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_19_f(u32 v)
3268{
3269 return (v & 0x7U) << 12U;
3270}
3271static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_20_f(u32 v)
3272{
3273 return (v & 0x7U) << 16U;
3274}
3275static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_21_f(u32 v)
3276{
3277 return (v & 0x7U) << 20U;
3278}
3279static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_22_f(u32 v)
3280{
3281 return (v & 0x7U) << 24U;
3282}
3283static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_s(void)
3284{
3285 return 3U;
3286}
3287static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_f(u32 v)
3288{
3289 return (v & 0x7U) << 28U;
3290}
3291static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_m(void)
3292{
3293 return 0x7U << 28U;
3294}
3295static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map2_tile_23_v(u32 r)
3296{
3297 return (r >> 28U) & 0x7U;
3298}
3299static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_r(void)
3300{
3301 return 0x0041898cU;
3302}
3303static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_24_f(u32 v)
3304{
3305 return (v & 0x7U) << 0U;
3306}
3307static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_25_f(u32 v)
3308{
3309 return (v & 0x7U) << 4U;
3310}
3311static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_26_f(u32 v)
3312{
3313 return (v & 0x7U) << 8U;
3314}
3315static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_27_f(u32 v)
3316{
3317 return (v & 0x7U) << 12U;
3318}
3319static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_28_f(u32 v)
3320{
3321 return (v & 0x7U) << 16U;
3322}
3323static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_29_f(u32 v)
3324{
3325 return (v & 0x7U) << 20U;
3326}
3327static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_30_f(u32 v)
3328{
3329 return (v & 0x7U) << 24U;
3330}
3331static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map3_tile_31_f(u32 v)
3332{
3333 return (v & 0x7U) << 28U;
3334}
3335static inline u32 gr_gpcs_gpm_pd_cfg_r(void)
3336{
3337 return 0x00418c6cU;
3338}
3339static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_disable_f(void)
3340{
3341 return 0x0U;
3342}
3343static inline u32 gr_gpcs_gpm_pd_cfg_timeslice_mode_enable_f(void)
3344{
3345 return 0x1U;
3346}
3347static inline u32 gr_gpcs_gcc_pagepool_base_r(void)
3348{
3349 return 0x00419004U;
3350}
3351static inline u32 gr_gpcs_gcc_pagepool_base_addr_39_8_f(u32 v)
3352{
3353 return (v & 0xffffffffU) << 0U;
3354}
3355static inline u32 gr_gpcs_gcc_pagepool_r(void)
3356{
3357 return 0x00419008U;
3358}
3359static inline u32 gr_gpcs_gcc_pagepool_total_pages_f(u32 v)
3360{
3361 return (v & 0x3ffU) << 0U;
3362}
3363static inline u32 gr_gpcs_tpcs_pe_vaf_r(void)
3364{
3365 return 0x0041980cU;
3366}
3367static inline u32 gr_gpcs_tpcs_pe_vaf_fast_mode_switch_true_f(void)
3368{
3369 return 0x10U;
3370}
3371static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_r(void)
3372{
3373 return 0x00419848U;
3374}
3375static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_v_f(u32 v)
3376{
3377 return (v & 0xfffffffU) << 0U;
3378}
3379static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_f(u32 v)
3380{
3381 return (v & 0x1U) << 28U;
3382}
3383static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_true_f(void)
3384{
3385 return 0x10000000U;
3386}
3387static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_r(void)
3388{
3389 return 0x00419c00U;
3390}
3391static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_disabled_f(void)
3392{
3393 return 0x0U;
3394}
3395static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_enabled_f(void)
3396{
3397 return 0x8U;
3398}
3399static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_r(void)
3400{
3401 return 0x00419c2cU;
3402}
3403static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_v_f(u32 v)
3404{
3405 return (v & 0xfffffffU) << 0U;
3406}
3407static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_f(u32 v)
3408{
3409 return (v & 0x1U) << 28U;
3410}
3411static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_true_f(void)
3412{
3413 return 0x10000000U;
3414}
3415static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_r(void)
3416{
3417 return 0x00419e44U;
3418}
3419static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_stack_error_report_f(void)
3420{
3421 return 0x2U;
3422}
3423static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_api_stack_error_report_f(void)
3424{
3425 return 0x4U;
3426}
3427static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_ret_empty_stack_error_report_f(void)
3428{
3429 return 0x8U;
3430}
3431static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_wrap_report_f(void)
3432{
3433 return 0x10U;
3434}
3435static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_pc_report_f(void)
3436{
3437 return 0x20U;
3438}
3439static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_pc_overflow_report_f(void)
3440{
3441 return 0x40U;
3442}
3443static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_immc_addr_report_f(void)
3444{
3445 return 0x80U;
3446}
3447static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_reg_report_f(void)
3448{
3449 return 0x100U;
3450}
3451static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_encoding_report_f(void)
3452{
3453 return 0x200U;
3454}
3455static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_sph_instr_combo_report_f(void)
3456{
3457 return 0x400U;
3458}
3459static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param_report_f(void)
3460{
3461 return 0x800U;
3462}
3463static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_report_f(void)
3464{
3465 return 0x1000U;
3466}
3467static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_reg_report_f(void)
3468{
3469 return 0x2000U;
3470}
3471static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_oor_addr_report_f(void)
3472{
3473 return 0x4000U;
3474}
3475static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_misaligned_addr_report_f(void)
3476{
3477 return 0x8000U;
3478}
3479static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_addr_space_report_f(void)
3480{
3481 return 0x10000U;
3482}
3483static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_illegal_instr_param2_report_f(void)
3484{
3485 return 0x20000U;
3486}
3487static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_invalid_const_addr_ldc_report_f(void)
3488{
3489 return 0x40000U;
3490}
3491static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_mmu_fault_report_f(void)
3492{
3493 return 0x800000U;
3494}
3495static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_stack_overflow_report_f(void)
3496{
3497 return 0x400000U;
3498}
3499static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_geometry_sm_error_report_f(void)
3500{
3501 return 0x80000U;
3502}
3503static inline u32 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_divergent_report_f(void)
3504{
3505 return 0x100000U;
3506}
3507static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_report_mask_r(void)
3508{
3509 return 0x00504644U;
3510}
3511static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_r(void)
3512{
3513 return 0x00419e4cU;
3514}
3515static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_sm_to_sm_fault_report_f(void)
3516{
3517 return 0x1U;
3518}
3519static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_l1_error_report_f(void)
3520{
3521 return 0x2U;
3522}
3523static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_multiple_warp_errors_report_f(void)
3524{
3525 return 0x4U;
3526}
3527static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_physical_stack_overflow_error_report_f(void)
3528{
3529 return 0x8U;
3530}
3531static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_int_report_f(void)
3532{
3533 return 0x10U;
3534}
3535static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_ecc_sec_error_report_f(void)
3536{
3537 return 0x20000000U;
3538}
3539static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_ecc_ded_error_report_f(void)
3540{
3541 return 0x40000000U;
3542}
3543static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_bpt_pause_report_f(void)
3544{
3545 return 0x20U;
3546}
3547static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_single_step_complete_report_f(void)
3548{
3549 return 0x40U;
3550}
3551static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_report_mask_r(void)
3552{
3553 return 0x0050464cU;
3554}
3555static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void)
3556{
3557 return 0x00419d0cU;
3558}
3559static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f(void)
3560{
3561 return 0x2U;
3562}
3563static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_tex_enabled_f(void)
3564{
3565 return 0x1U;
3566}
3567static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
3568{
3569 return 0x0050450cU;
3570}
3571static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_v(u32 r)
3572{
3573 return (r >> 1U) & 0x1U;
3574}
3575static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_enabled_f(void)
3576{
3577 return 0x2U;
3578}
3579static inline u32 gr_gpcs_gpccs_gpc_exception_en_r(void)
3580{
3581 return 0x0041ac94U;
3582}
3583static inline u32 gr_gpcs_gpccs_gpc_exception_en_tpc_f(u32 v)
3584{
3585 return (v & 0xffU) << 16U;
3586}
3587static inline u32 gr_gpc0_gpccs_gpc_exception_r(void)
3588{
3589 return 0x00502c90U;
3590}
3591static inline u32 gr_gpc0_gpccs_gpc_exception_gcc_v(u32 r)
3592{
3593 return (r >> 2U) & 0x1U;
3594}
3595static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_v(u32 r)
3596{
3597 return (r >> 16U) & 0xffU;
3598}
3599static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_0_pending_v(void)
3600{
3601 return 0x00000001U;
3602}
3603static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_r(void)
3604{
3605 return 0x00504508U;
3606}
3607static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_v(u32 r)
3608{
3609 return (r >> 0U) & 0x1U;
3610}
3611static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_pending_v(void)
3612{
3613 return 0x00000001U;
3614}
3615static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_v(u32 r)
3616{
3617 return (r >> 1U) & 0x1U;
3618}
3619static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_pending_v(void)
3620{
3621 return 0x00000001U;
3622}
3623static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_r(void)
3624{
3625 return 0x00504610U;
3626}
3627static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_m(void)
3628{
3629 return 0x1U << 0U;
3630}
3631static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_v(u32 r)
3632{
3633 return (r >> 0U) & 0x1U;
3634}
3635static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_on_v(void)
3636{
3637 return 0x00000001U;
3638}
3639static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_debugger_mode_off_v(void)
3640{
3641 return 0x00000000U;
3642}
3643static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_enable_f(void)
3644{
3645 return 0x80000000U;
3646}
3647static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_trigger_disable_f(void)
3648{
3649 return 0x0U;
3650}
3651static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_single_step_mode_enable_f(void)
3652{
3653 return 0x8U;
3654}
3655static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_single_step_mode_disable_f(void)
3656{
3657 return 0x0U;
3658}
3659static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_run_trigger_task_f(void)
3660{
3661 return 0x40000000U;
3662}
3663static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_m(void)
3664{
3665 return 0x1U << 1U;
3666}
3667static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_v(u32 r)
3668{
3669 return (r >> 1U) & 0x1U;
3670}
3671static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_warp_disable_f(void)
3672{
3673 return 0x0U;
3674}
3675static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_m(void)
3676{
3677 return 0x1U << 2U;
3678}
3679static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_v(u32 r)
3680{
3681 return (r >> 2U) & 0x1U;
3682}
3683static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_disable_f(void)
3684{
3685 return 0x0U;
3686}
3687static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_stop_on_any_warp_disable_v(void)
3688{
3689 return 0x00000000U;
3690}
3691static inline u32 gr_gpc0_tpc0_sm_dbgr_control0_stop_on_any_sm_stop_on_any_sm_disable_v(void)
3692{
3693 return 0x00000000U;
3694}
3695static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_r(void)
3696{
3697 return 0x00504614U;
3698}
3699static inline u32 gr_gpc0_tpc0_sm_warp_valid_mask_1_r(void)
3700{
3701 return 0x00504618U;
3702}
3703static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_r(void)
3704{
3705 return 0x00504624U;
3706}
3707static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_pause_mask_1_r(void)
3708{
3709 return 0x00504628U;
3710}
3711static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_r(void)
3712{
3713 return 0x00504634U;
3714}
3715static inline u32 gr_gpc0_tpc0_sm_dbgr_bpt_trap_mask_1_r(void)
3716{
3717 return 0x00504638U;
3718}
3719static inline u32 gr_gpcs_tpcs_sm_dbgr_bpt_pause_mask_r(void)
3720{
3721 return 0x00419e24U;
3722}
3723static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_r(void)
3724{
3725 return 0x0050460cU;
3726}
3727static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_sm_in_trap_mode_v(u32 r)
3728{
3729 return (r >> 0U) & 0x1U;
3730}
3731static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_v(u32 r)
3732{
3733 return (r >> 4U) & 0x1U;
3734}
3735static inline u32 gr_gpc0_tpc0_sm_dbgr_status0_locked_down_true_v(void)
3736{
3737 return 0x00000001U;
3738}
3739static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_r(void)
3740{
3741 return 0x00419e50U;
3742}
3743static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_int_pending_f(void)
3744{
3745 return 0x10U;
3746}
3747static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_bpt_pause_pending_f(void)
3748{
3749 return 0x20U;
3750}
3751static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_single_step_complete_pending_f(void)
3752{
3753 return 0x40U;
3754}
3755static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_sm_to_sm_fault_pending_f(void)
3756{
3757 return 0x1U;
3758}
3759static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_l1_error_pending_f(void)
3760{
3761 return 0x2U;
3762}
3763static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_multiple_warp_errors_pending_f(void)
3764{
3765 return 0x4U;
3766}
3767static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_physical_stack_overflow_error_pending_f(void)
3768{
3769 return 0x8U;
3770}
3771static inline u32 gr_gpcs_tpcs_sm_hww_global_esr_timeout_error_pending_f(void)
3772{
3773 return 0x80000000U;
3774}
3775static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_r(void)
3776{
3777 return 0x00504650U;
3778}
3779static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_int_pending_f(void)
3780{
3781 return 0x10U;
3782}
3783static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_ecc_sec_error_pending_f(void)
3784{
3785 return 0x20000000U;
3786}
3787static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_ecc_ded_error_pending_f(void)
3788{
3789 return 0x40000000U;
3790}
3791static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_bpt_pause_pending_f(void)
3792{
3793 return 0x20U;
3794}
3795static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_single_step_complete_pending_f(void)
3796{
3797 return 0x40U;
3798}
3799static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_sm_to_sm_fault_pending_f(void)
3800{
3801 return 0x1U;
3802}
3803static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_l1_error_pending_f(void)
3804{
3805 return 0x2U;
3806}
3807static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_multiple_warp_errors_pending_f(void)
3808{
3809 return 0x4U;
3810}
3811static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_physical_stack_overflow_error_pending_f(void)
3812{
3813 return 0x8U;
3814}
3815static inline u32 gr_gpc0_tpc0_sm_hww_global_esr_timeout_error_pending_f(void)
3816{
3817 return 0x80000000U;
3818}
3819static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_r(void)
3820{
3821 return 0x00504224U;
3822}
3823static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_intr_pending_f(void)
3824{
3825 return 0x1U;
3826}
3827static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_ecc_sec_pending_f(void)
3828{
3829 return 0x80U;
3830}
3831static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_ecc_ded_pending_f(void)
3832{
3833 return 0x100U;
3834}
3835static inline u32 gr_gpc0_tpc0_tex_m_hww_esr_reset_active_f(void)
3836{
3837 return 0x40000000U;
3838}
3839static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_r(void)
3840{
3841 return 0x00504648U;
3842}
3843static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_v(u32 r)
3844{
3845 return (r >> 0U) & 0xffffU;
3846}
3847static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_v(void)
3848{
3849 return 0x00000000U;
3850}
3851static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_f(void)
3852{
3853 return 0x0U;
3854}
3855static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_addr_valid_m(void)
3856{
3857 return 0x1U << 24U;
3858}
3859static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_addr_error_type_m(void)
3860{
3861 return 0x7U << 25U;
3862}
3863static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_addr_error_type_none_f(void)
3864{
3865 return 0x0U;
3866}
3867static inline u32 gr_gpc0_tpc0_sm_hww_warp_esr_pc_r(void)
3868{
3869 return 0x00504654U;
3870}
3871static inline u32 gr_gpc0_tpc0_sm_halfctl_ctrl_r(void)
3872{
3873 return 0x00504770U;
3874}
3875static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_r(void)
3876{
3877 return 0x00419f70U;
3878}
3879static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_m(void)
3880{
3881 return 0x1U << 4U;
3882}
3883static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_f(u32 v)
3884{
3885 return (v & 0x1U) << 4U;
3886}
3887static inline u32 gr_gpc0_tpc0_sm_debug_sfe_control_r(void)
3888{
3889 return 0x0050477cU;
3890}
3891static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_r(void)
3892{
3893 return 0x00419f7cU;
3894}
3895static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_m(void)
3896{
3897 return 0x1U << 0U;
3898}
3899static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_f(u32 v)
3900{
3901 return (v & 0x1U) << 0U;
3902}
3903static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_r(void)
3904{
3905 return 0x0041be08U;
3906}
3907static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_fast_mode_switch_true_f(void)
3908{
3909 return 0x4U;
3910}
3911static inline u32 gr_ppcs_wwdx_map_gpc_map0_r(void)
3912{
3913 return 0x0041bf00U;
3914}
3915static inline u32 gr_ppcs_wwdx_map_gpc_map1_r(void)
3916{
3917 return 0x0041bf04U;
3918}
3919static inline u32 gr_ppcs_wwdx_map_gpc_map2_r(void)
3920{
3921 return 0x0041bf08U;
3922}
3923static inline u32 gr_ppcs_wwdx_map_gpc_map3_r(void)
3924{
3925 return 0x0041bf0cU;
3926}
3927static inline u32 gr_ppcs_wwdx_map_gpc_map4_r(void)
3928{
3929 return 0x0041bf10U;
3930}
3931static inline u32 gr_ppcs_wwdx_map_gpc_map5_r(void)
3932{
3933 return 0x0041bf14U;
3934}
3935static inline u32 gr_ppcs_wwdx_map_table_cfg_r(void)
3936{
3937 return 0x0041bfd0U;
3938}
3939static inline u32 gr_ppcs_wwdx_map_table_cfg_row_offset_f(u32 v)
3940{
3941 return (v & 0xffU) << 0U;
3942}
3943static inline u32 gr_ppcs_wwdx_map_table_cfg_num_entries_f(u32 v)
3944{
3945 return (v & 0xffU) << 8U;
3946}
3947static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_num_entries_f(u32 v)
3948{
3949 return (v & 0x1fU) << 16U;
3950}
3951static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_shift_value_f(u32 v)
3952{
3953 return (v & 0x7U) << 21U;
3954}
3955static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff5_mod_value_f(u32 v)
3956{
3957 return (v & 0x1fU) << 24U;
3958}
3959static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_r(void)
3960{
3961 return 0x0041bfd4U;
3962}
3963static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_conservative_f(u32 v)
3964{
3965 return (v & 0xffffffU) << 0U;
3966}
3967static inline u32 gr_ppcs_wwdx_map_table_cfg2_r(void)
3968{
3969 return 0x0041bfe4U;
3970}
3971static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff6_mod_value_f(u32 v)
3972{
3973 return (v & 0x1fU) << 0U;
3974}
3975static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff7_mod_value_f(u32 v)
3976{
3977 return (v & 0x1fU) << 5U;
3978}
3979static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff8_mod_value_f(u32 v)
3980{
3981 return (v & 0x1fU) << 10U;
3982}
3983static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff9_mod_value_f(u32 v)
3984{
3985 return (v & 0x1fU) << 15U;
3986}
3987static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff10_mod_value_f(u32 v)
3988{
3989 return (v & 0x1fU) << 20U;
3990}
3991static inline u32 gr_ppcs_wwdx_map_table_cfg2_coeff11_mod_value_f(u32 v)
3992{
3993 return (v & 0x1fU) << 25U;
3994}
3995static inline u32 gr_bes_zrop_settings_r(void)
3996{
3997 return 0x00408850U;
3998}
3999static inline u32 gr_bes_zrop_settings_num_active_ltcs_f(u32 v)
4000{
4001 return (v & 0xfU) << 0U;
4002}
4003static inline u32 gr_be0_crop_debug3_r(void)
4004{
4005 return 0x00410108U;
4006}
4007static inline u32 gr_bes_crop_debug3_r(void)
4008{
4009 return 0x00408908U;
4010}
4011static inline u32 gr_bes_crop_debug3_comp_vdc_4to2_disable_m(void)
4012{
4013 return 0x1U << 31U;
4014}
4015static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_m(void)
4016{
4017 return 0x1U << 1U;
4018}
4019static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_disabled_f(void)
4020{
4021 return 0x0U;
4022}
4023static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_enabled_f(void)
4024{
4025 return 0x2U;
4026}
4027static inline u32 gr_bes_crop_debug3_blendopt_fill_override_m(void)
4028{
4029 return 0x1U << 2U;
4030}
4031static inline u32 gr_bes_crop_debug3_blendopt_fill_override_disabled_f(void)
4032{
4033 return 0x0U;
4034}
4035static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
4036{
4037 return 0x4U;
4038}
4039static inline u32 gr_bes_crop_debug4_r(void)
4040{
4041 return 0x0040894cU;
4042}
4043static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
4044{
4045 return 0x1U << 18U;
4046}
4047static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
4048{
4049 return 0x0U;
4050}
4051static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
4052{
4053 return 0x40000U;
4054}
4055static inline u32 gr_bes_crop_settings_r(void)
4056{
4057 return 0x00408958U;
4058}
4059static inline u32 gr_bes_crop_settings_num_active_ltcs_f(u32 v)
4060{
4061 return (v & 0xfU) << 0U;
4062}
4063static inline u32 gr_zcull_bytes_per_aliquot_per_gpu_v(void)
4064{
4065 return 0x00000020U;
4066}
4067static inline u32 gr_zcull_save_restore_header_bytes_per_gpc_v(void)
4068{
4069 return 0x00000020U;
4070}
4071static inline u32 gr_zcull_save_restore_subregion_header_bytes_per_gpc_v(void)
4072{
4073 return 0x000000c0U;
4074}
4075static inline u32 gr_zcull_subregion_qty_v(void)
4076{
4077 return 0x00000010U;
4078}
4079static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel0_r(void)
4080{
4081 return 0x00504604U;
4082}
4083static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control_sel1_r(void)
4084{
4085 return 0x00504608U;
4086}
4087static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control0_r(void)
4088{
4089 return 0x0050465cU;
4090}
4091static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control1_r(void)
4092{
4093 return 0x00504660U;
4094}
4095static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control2_r(void)
4096{
4097 return 0x00504664U;
4098}
4099static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control3_r(void)
4100{
4101 return 0x00504668U;
4102}
4103static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control4_r(void)
4104{
4105 return 0x0050466cU;
4106}
4107static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_control5_r(void)
4108{
4109 return 0x00504658U;
4110}
4111static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_control_r(void)
4112{
4113 return 0x00504730U;
4114}
4115static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_control_r(void)
4116{
4117 return 0x00504734U;
4118}
4119static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_control_r(void)
4120{
4121 return 0x00504738U;
4122}
4123static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_control_r(void)
4124{
4125 return 0x0050473cU;
4126}
4127static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter4_control_r(void)
4128{
4129 return 0x00504740U;
4130}
4131static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter5_control_r(void)
4132{
4133 return 0x00504744U;
4134}
4135static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter6_control_r(void)
4136{
4137 return 0x00504748U;
4138}
4139static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter7_control_r(void)
4140{
4141 return 0x0050474cU;
4142}
4143static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status_s1_r(void)
4144{
4145 return 0x00504678U;
4146}
4147static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter_status1_r(void)
4148{
4149 return 0x00504694U;
4150}
4151static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_s0_r(void)
4152{
4153 return 0x005046f0U;
4154}
4155static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter0_s1_r(void)
4156{
4157 return 0x00504700U;
4158}
4159static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_s0_r(void)
4160{
4161 return 0x005046f4U;
4162}
4163static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter1_s1_r(void)
4164{
4165 return 0x00504704U;
4166}
4167static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_s0_r(void)
4168{
4169 return 0x005046f8U;
4170}
4171static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter2_s1_r(void)
4172{
4173 return 0x00504708U;
4174}
4175static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_s0_r(void)
4176{
4177 return 0x005046fcU;
4178}
4179static inline u32 gr_pri_gpc0_tpc0_sm_dsm_perf_counter3_s1_r(void)
4180{
4181 return 0x0050470cU;
4182}
4183static inline u32 gr_fe_pwr_mode_r(void)
4184{
4185 return 0x00404170U;
4186}
4187static inline u32 gr_fe_pwr_mode_mode_auto_f(void)
4188{
4189 return 0x0U;
4190}
4191static inline u32 gr_fe_pwr_mode_mode_force_on_f(void)
4192{
4193 return 0x2U;
4194}
4195static inline u32 gr_fe_pwr_mode_req_v(u32 r)
4196{
4197 return (r >> 4U) & 0x1U;
4198}
4199static inline u32 gr_fe_pwr_mode_req_send_f(void)
4200{
4201 return 0x10U;
4202}
4203static inline u32 gr_fe_pwr_mode_req_done_v(void)
4204{
4205 return 0x00000000U;
4206}
4207static inline u32 gr_gpcs_pri_mmu_ctrl_r(void)
4208{
4209 return 0x00418880U;
4210}
4211static inline u32 gr_gpcs_pri_mmu_ctrl_vm_pg_size_m(void)
4212{
4213 return 0x1U << 0U;
4214}
4215static inline u32 gr_gpcs_pri_mmu_ctrl_use_pdb_big_page_size_m(void)
4216{
4217 return 0x1U << 11U;
4218}
4219static inline u32 gr_gpcs_pri_mmu_ctrl_vol_fault_m(void)
4220{
4221 return 0x1U << 1U;
4222}
4223static inline u32 gr_gpcs_pri_mmu_ctrl_comp_fault_m(void)
4224{
4225 return 0x1U << 2U;
4226}
4227static inline u32 gr_gpcs_pri_mmu_ctrl_miss_gran_m(void)
4228{
4229 return 0x3U << 3U;
4230}
4231static inline u32 gr_gpcs_pri_mmu_ctrl_cache_mode_m(void)
4232{
4233 return 0x3U << 5U;
4234}
4235static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_aperture_m(void)
4236{
4237 return 0x3U << 28U;
4238}
4239static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_vol_m(void)
4240{
4241 return 0x1U << 30U;
4242}
4243static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_disable_m(void)
4244{
4245 return 0x1U << 31U;
4246}
4247static inline u32 gr_gpcs_pri_mmu_pm_unit_mask_r(void)
4248{
4249 return 0x00418890U;
4250}
4251static inline u32 gr_gpcs_pri_mmu_pm_req_mask_r(void)
4252{
4253 return 0x00418894U;
4254}
4255static inline u32 gr_gpcs_pri_mmu_debug_ctrl_r(void)
4256{
4257 return 0x004188b0U;
4258}
4259static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_v(u32 r)
4260{
4261 return (r >> 16U) & 0x1U;
4262}
4263static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(void)
4264{
4265 return 0x00000001U;
4266}
4267static inline u32 gr_gpcs_pri_mmu_debug_wr_r(void)
4268{
4269 return 0x004188b4U;
4270}
4271static inline u32 gr_gpcs_pri_mmu_debug_rd_r(void)
4272{
4273 return 0x004188b8U;
4274}
4275static inline u32 gr_gpcs_mmu_num_active_ltcs_r(void)
4276{
4277 return 0x004188acU;
4278}
4279static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_r(void)
4280{
4281 return 0x00419e10U;
4282}
4283static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_f(u32 v)
4284{
4285 return (v & 0x1U) << 0U;
4286}
4287static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_debugger_mode_on_v(void)
4288{
4289 return 0x00000001U;
4290}
4291static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_m(void)
4292{
4293 return 0x1U << 31U;
4294}
4295static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_v(u32 r)
4296{
4297 return (r >> 31U) & 0x1U;
4298}
4299static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_enable_f(void)
4300{
4301 return 0x80000000U;
4302}
4303static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_disable_f(void)
4304{
4305 return 0x0U;
4306}
4307static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_m(void)
4308{
4309 return 0x1U << 3U;
4310}
4311static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_enable_f(void)
4312{
4313 return 0x8U;
4314}
4315static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_single_step_mode_disable_f(void)
4316{
4317 return 0x0U;
4318}
4319static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_m(void)
4320{
4321 return 0x1U << 30U;
4322}
4323static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_v(u32 r)
4324{
4325 return (r >> 30U) & 0x1U;
4326}
4327static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_task_f(void)
4328{
4329 return 0x40000000U;
4330}
4331static inline u32 gr_fe_gfxp_wfi_timeout_r(void)
4332{
4333 return 0x004041c0U;
4334}
4335static inline u32 gr_fe_gfxp_wfi_timeout_count_f(u32 v)
4336{
4337 return (v & 0xffffffffU) << 0U;
4338}
4339static inline u32 gr_fe_gfxp_wfi_timeout_count_disabled_f(void)
4340{
4341 return 0x0U;
4342}
4343static inline u32 gr_debug_2_r(void)
4344{
4345 return 0x00400088U;
4346}
4347static inline u32 gr_debug_2_gfxp_wfi_always_injects_wfi_m(void)
4348{
4349 return 0x1U << 23U;
4350}
4351static inline u32 gr_debug_2_gfxp_wfi_always_injects_wfi_v(u32 r)
4352{
4353 return (r >> 23U) & 0x1U;
4354}
4355static inline u32 gr_debug_2_gfxp_wfi_always_injects_wfi_enabled_f(void)
4356{
4357 return 0x800000U;
4358}
4359static inline u32 gr_debug_2_gfxp_wfi_always_injects_wfi_disabled_f(void)
4360{
4361 return 0x0U;
4362}
4363static inline u32 gr_gpcs_tpcs_sm_texio_control_r(void)
4364{
4365 return 0x00419c84U;
4366}
4367static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_f(u32 v)
4368{
4369 return (v & 0x7U) << 8U;
4370}
4371static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_m(void)
4372{
4373 return 0x7U << 8U;
4374}
4375static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_arm_63_48_match_f(void)
4376{
4377 return 0x100U;
4378}
4379static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_r(void)
4380{
4381 return 0x00419f78U;
4382}
4383static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_m(void)
4384{
4385 return 0x3U << 11U;
4386}
4387static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_disable_f(void)
4388{
4389 return 0x1000U;
4390}
4391static inline u32 gr_gpcs_tc_debug0_r(void)
4392{
4393 return 0x00418708U;
4394}
4395static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_f(u32 v)
4396{
4397 return (v & 0xffU) << 0U;
4398}
4399static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_m(void)
4400{
4401 return 0xffU << 0U;
4402}
4403static inline u32 gr_gpc0_prop_debug1_r(void)
4404{
4405 return 0x00500400U;
4406}
4407static inline u32 gr_gpc0_prop_debug1_czf_bypass_f(u32 v)
4408{
4409 return (v & 0x3U) << 14U;
4410}
4411static inline u32 gr_gpc0_prop_debug1_czf_bypass_m(void)
4412{
4413 return 0x3U << 14U;
4414}
4415static inline u32 gr_gpc0_prop_debug1_czf_bypass_init_v(void)
4416{
4417 return 0x00000001U;
4418}
4419#endif
diff --git a/include/nvgpu/hw/gp10b/hw_ltc_gp10b.h b/include/nvgpu/hw/gp10b/hw_ltc_gp10b.h
deleted file mode 100644
index 721a48a..0000000
--- a/include/nvgpu/hw/gp10b/hw_ltc_gp10b.h
+++ /dev/null
@@ -1,587 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ltc_gp10b_h_
57#define _hw_ltc_gp10b_h_
58
59static inline u32 ltc_pltcg_base_v(void)
60{
61 return 0x00140000U;
62}
63static inline u32 ltc_pltcg_extent_v(void)
64{
65 return 0x0017ffffU;
66}
67static inline u32 ltc_ltc0_ltss_v(void)
68{
69 return 0x00140200U;
70}
71static inline u32 ltc_ltc0_lts0_v(void)
72{
73 return 0x00140400U;
74}
75static inline u32 ltc_ltcs_ltss_v(void)
76{
77 return 0x0017e200U;
78}
79static inline u32 ltc_ltcs_lts0_cbc_ctrl1_r(void)
80{
81 return 0x0014046cU;
82}
83static inline u32 ltc_ltc0_lts0_dstg_cfg0_r(void)
84{
85 return 0x00140518U;
86}
87static inline u32 ltc_ltcs_ltss_dstg_cfg0_r(void)
88{
89 return 0x0017e318U;
90}
91static inline u32 ltc_ltcs_ltss_dstg_cfg0_vdc_4to2_disable_m(void)
92{
93 return 0x1U << 15U;
94}
95static inline u32 ltc_ltc0_lts0_tstg_cfg1_r(void)
96{
97 return 0x00140494U;
98}
99static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_ways_v(u32 r)
100{
101 return (r >> 0U) & 0xffffU;
102}
103static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_v(u32 r)
104{
105 return (r >> 16U) & 0x3U;
106}
107static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_all_v(void)
108{
109 return 0x00000000U;
110}
111static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_half_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v(void)
116{
117 return 0x00000002U;
118}
119static inline u32 ltc_ltcs_ltss_cbc_ctrl1_r(void)
120{
121 return 0x0017e26cU;
122}
123static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clean_active_f(void)
124{
125 return 0x1U;
126}
127static inline u32 ltc_ltcs_ltss_cbc_ctrl1_invalidate_active_f(void)
128{
129 return 0x2U;
130}
131static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_v(u32 r)
132{
133 return (r >> 2U) & 0x1U;
134}
135static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_v(void)
136{
137 return 0x00000001U;
138}
139static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_f(void)
140{
141 return 0x4U;
142}
143static inline u32 ltc_ltc0_lts0_cbc_ctrl1_r(void)
144{
145 return 0x0014046cU;
146}
147static inline u32 ltc_ltcs_ltss_cbc_ctrl2_r(void)
148{
149 return 0x0017e270U;
150}
151static inline u32 ltc_ltcs_ltss_cbc_ctrl2_clear_lower_bound_f(u32 v)
152{
153 return (v & 0x3ffffU) << 0U;
154}
155static inline u32 ltc_ltcs_ltss_cbc_ctrl3_r(void)
156{
157 return 0x0017e274U;
158}
159static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_f(u32 v)
160{
161 return (v & 0x3ffffU) << 0U;
162}
163static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_init_v(void)
164{
165 return 0x0003ffffU;
166}
167static inline u32 ltc_ltcs_ltss_cbc_base_r(void)
168{
169 return 0x0017e278U;
170}
171static inline u32 ltc_ltcs_ltss_cbc_base_alignment_shift_v(void)
172{
173 return 0x0000000bU;
174}
175static inline u32 ltc_ltcs_ltss_cbc_base_address_v(u32 r)
176{
177 return (r >> 0U) & 0x3ffffffU;
178}
179static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_r(void)
180{
181 return 0x0017e27cU;
182}
183static inline u32 ltc_ltcs_misc_ltc_num_active_ltcs_r(void)
184{
185 return 0x0017e000U;
186}
187static inline u32 ltc_ltcs_ltss_cbc_param_r(void)
188{
189 return 0x0017e280U;
190}
191static inline u32 ltc_ltcs_ltss_cbc_param_comptags_per_cache_line_v(u32 r)
192{
193 return (r >> 0U) & 0xffffU;
194}
195static inline u32 ltc_ltcs_ltss_cbc_param_cache_line_size_v(u32 r)
196{
197 return (r >> 24U) & 0xfU;
198}
199static inline u32 ltc_ltcs_ltss_cbc_param_slices_per_ltc_v(u32 r)
200{
201 return (r >> 28U) & 0xfU;
202}
203static inline u32 ltc_ltcs_ltss_cbc_param2_r(void)
204{
205 return 0x0017e3f4U;
206}
207static inline u32 ltc_ltcs_ltss_cbc_param2_gobs_per_comptagline_per_slice_v(u32 r)
208{
209 return (r >> 0U) & 0xffffU;
210}
211static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_r(void)
212{
213 return 0x0017e2acU;
214}
215static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(u32 v)
216{
217 return (v & 0x1fU) << 16U;
218}
219static inline u32 ltc_ltcs_ltss_dstg_zbc_index_r(void)
220{
221 return 0x0017e338U;
222}
223static inline u32 ltc_ltcs_ltss_dstg_zbc_index_address_f(u32 v)
224{
225 return (v & 0xfU) << 0U;
226}
227static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value_r(u32 i)
228{
229 return 0x0017e33cU + i*4U;
230}
231static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value__size_1_v(void)
232{
233 return 0x00000004U;
234}
235static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_r(void)
236{
237 return 0x0017e34cU;
238}
239static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_s(void)
240{
241 return 32U;
242}
243static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_f(u32 v)
244{
245 return (v & 0xffffffffU) << 0U;
246}
247static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_m(void)
248{
249 return 0xffffffffU << 0U;
250}
251static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_v(u32 r)
252{
253 return (r >> 0U) & 0xffffffffU;
254}
255static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_r(void)
256{
257 return 0x0017e2b0U;
258}
259static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_l2_bypass_mode_enabled_f(void)
260{
261 return 0x10000000U;
262}
263static inline u32 ltc_ltcs_ltss_g_elpg_r(void)
264{
265 return 0x0017e214U;
266}
267static inline u32 ltc_ltcs_ltss_g_elpg_flush_v(u32 r)
268{
269 return (r >> 0U) & 0x1U;
270}
271static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_v(void)
272{
273 return 0x00000001U;
274}
275static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_f(void)
276{
277 return 0x1U;
278}
279static inline u32 ltc_ltc0_ltss_g_elpg_r(void)
280{
281 return 0x00140214U;
282}
283static inline u32 ltc_ltc0_ltss_g_elpg_flush_v(u32 r)
284{
285 return (r >> 0U) & 0x1U;
286}
287static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_v(void)
288{
289 return 0x00000001U;
290}
291static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_f(void)
292{
293 return 0x1U;
294}
295static inline u32 ltc_ltc1_ltss_g_elpg_r(void)
296{
297 return 0x00142214U;
298}
299static inline u32 ltc_ltc1_ltss_g_elpg_flush_v(u32 r)
300{
301 return (r >> 0U) & 0x1U;
302}
303static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_v(void)
304{
305 return 0x00000001U;
306}
307static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_f(void)
308{
309 return 0x1U;
310}
311static inline u32 ltc_ltcs_ltss_intr_r(void)
312{
313 return 0x0017e20cU;
314}
315static inline u32 ltc_ltcs_ltss_intr_ecc_sec_error_pending_f(void)
316{
317 return 0x100U;
318}
319static inline u32 ltc_ltcs_ltss_intr_ecc_ded_error_pending_f(void)
320{
321 return 0x200U;
322}
323static inline u32 ltc_ltcs_ltss_intr_en_evicted_cb_m(void)
324{
325 return 0x1U << 20U;
326}
327static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_access_m(void)
328{
329 return 0x1U << 30U;
330}
331static inline u32 ltc_ltcs_ltss_intr_en_ecc_sec_error_enabled_f(void)
332{
333 return 0x1000000U;
334}
335static inline u32 ltc_ltcs_ltss_intr_en_ecc_ded_error_enabled_f(void)
336{
337 return 0x2000000U;
338}
339static inline u32 ltc_ltc0_lts0_intr_r(void)
340{
341 return 0x0014040cU;
342}
343static inline u32 ltc_ltc0_lts0_dstg_ecc_report_r(void)
344{
345 return 0x0014051cU;
346}
347static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_m(void)
348{
349 return 0xffU << 0U;
350}
351static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_v(u32 r)
352{
353 return (r >> 0U) & 0xffU;
354}
355static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_m(void)
356{
357 return 0xffU << 16U;
358}
359static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_v(u32 r)
360{
361 return (r >> 16U) & 0xffU;
362}
363static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_r(void)
364{
365 return 0x0017e2a0U;
366}
367static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_v(u32 r)
368{
369 return (r >> 0U) & 0x1U;
370}
371static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_v(void)
372{
373 return 0x00000001U;
374}
375static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_f(void)
376{
377 return 0x1U;
378}
379static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_v(u32 r)
380{
381 return (r >> 8U) & 0xfU;
382}
383static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_v(void)
384{
385 return 0x00000003U;
386}
387static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_f(void)
388{
389 return 0x300U;
390}
391static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_v(u32 r)
392{
393 return (r >> 28U) & 0x1U;
394}
395static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_v(void)
396{
397 return 0x00000001U;
398}
399static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_f(void)
400{
401 return 0x10000000U;
402}
403static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_v(u32 r)
404{
405 return (r >> 29U) & 0x1U;
406}
407static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_v(void)
408{
409 return 0x00000001U;
410}
411static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_f(void)
412{
413 return 0x20000000U;
414}
415static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_v(u32 r)
416{
417 return (r >> 30U) & 0x1U;
418}
419static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_v(void)
420{
421 return 0x00000001U;
422}
423static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_f(void)
424{
425 return 0x40000000U;
426}
427static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_r(void)
428{
429 return 0x0017e2a4U;
430}
431static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_v(u32 r)
432{
433 return (r >> 0U) & 0x1U;
434}
435static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_v(void)
436{
437 return 0x00000001U;
438}
439static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_f(void)
440{
441 return 0x1U;
442}
443static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_v(u32 r)
444{
445 return (r >> 8U) & 0xfU;
446}
447static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_v(void)
448{
449 return 0x00000003U;
450}
451static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_f(void)
452{
453 return 0x300U;
454}
455static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_v(u32 r)
456{
457 return (r >> 16U) & 0x1U;
458}
459static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_v(void)
460{
461 return 0x00000001U;
462}
463static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_f(void)
464{
465 return 0x10000U;
466}
467static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_v(u32 r)
468{
469 return (r >> 28U) & 0x1U;
470}
471static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_v(void)
472{
473 return 0x00000001U;
474}
475static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_f(void)
476{
477 return 0x10000000U;
478}
479static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_v(u32 r)
480{
481 return (r >> 29U) & 0x1U;
482}
483static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_v(void)
484{
485 return 0x00000001U;
486}
487static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_f(void)
488{
489 return 0x20000000U;
490}
491static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_v(u32 r)
492{
493 return (r >> 30U) & 0x1U;
494}
495static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_v(void)
496{
497 return 0x00000001U;
498}
499static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_f(void)
500{
501 return 0x40000000U;
502}
503static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_r(void)
504{
505 return 0x001402a0U;
506}
507static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_v(u32 r)
508{
509 return (r >> 0U) & 0x1U;
510}
511static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_v(void)
512{
513 return 0x00000001U;
514}
515static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_f(void)
516{
517 return 0x1U;
518}
519static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_r(void)
520{
521 return 0x001402a4U;
522}
523static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_v(u32 r)
524{
525 return (r >> 0U) & 0x1U;
526}
527static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_v(void)
528{
529 return 0x00000001U;
530}
531static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_f(void)
532{
533 return 0x1U;
534}
535static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_r(void)
536{
537 return 0x001422a0U;
538}
539static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_v(u32 r)
540{
541 return (r >> 0U) & 0x1U;
542}
543static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_v(void)
544{
545 return 0x00000001U;
546}
547static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_f(void)
548{
549 return 0x1U;
550}
551static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_r(void)
552{
553 return 0x001422a4U;
554}
555static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_v(u32 r)
556{
557 return (r >> 0U) & 0x1U;
558}
559static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_v(void)
560{
561 return 0x00000001U;
562}
563static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_f(void)
564{
565 return 0x1U;
566}
567static inline u32 ltc_ltc0_lts0_tstg_info_1_r(void)
568{
569 return 0x0014058cU;
570}
571static inline u32 ltc_ltc0_lts0_tstg_info_1_slice_size_in_kb_v(u32 r)
572{
573 return (r >> 0U) & 0xffffU;
574}
575static inline u32 ltc_ltc0_lts0_tstg_info_1_slices_per_l2_v(u32 r)
576{
577 return (r >> 16U) & 0x1fU;
578}
579static inline u32 ltc_ltca_g_axi_pctrl_r(void)
580{
581 return 0x00160000U;
582}
583static inline u32 ltc_ltca_g_axi_pctrl_user_sid_f(u32 v)
584{
585 return (v & 0xffU) << 2U;
586}
587#endif
diff --git a/include/nvgpu/hw/gp10b/hw_mc_gp10b.h b/include/nvgpu/hw/gp10b/hw_mc_gp10b.h
deleted file mode 100644
index 39c132a..0000000
--- a/include/nvgpu/hw/gp10b/hw_mc_gp10b.h
+++ /dev/null
@@ -1,255 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_mc_gp10b_h_
57#define _hw_mc_gp10b_h_
58
59static inline u32 mc_boot_0_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 mc_boot_0_architecture_v(u32 r)
64{
65 return (r >> 24U) & 0x1fU;
66}
67static inline u32 mc_boot_0_implementation_v(u32 r)
68{
69 return (r >> 20U) & 0xfU;
70}
71static inline u32 mc_boot_0_major_revision_v(u32 r)
72{
73 return (r >> 4U) & 0xfU;
74}
75static inline u32 mc_boot_0_minor_revision_v(u32 r)
76{
77 return (r >> 0U) & 0xfU;
78}
79static inline u32 mc_intr_r(u32 i)
80{
81 return 0x00000100U + i*4U;
82}
83static inline u32 mc_intr_pfifo_pending_f(void)
84{
85 return 0x100U;
86}
87static inline u32 mc_intr_replayable_fault_pending_f(void)
88{
89 return 0x200U;
90}
91static inline u32 mc_intr_pfb_pending_f(void)
92{
93 return 0x2000U;
94}
95static inline u32 mc_intr_pgraph_pending_f(void)
96{
97 return 0x1000U;
98}
99static inline u32 mc_intr_pmu_pending_f(void)
100{
101 return 0x1000000U;
102}
103static inline u32 mc_intr_ltc_pending_f(void)
104{
105 return 0x2000000U;
106}
107static inline u32 mc_intr_priv_ring_pending_f(void)
108{
109 return 0x40000000U;
110}
111static inline u32 mc_intr_pbus_pending_f(void)
112{
113 return 0x10000000U;
114}
115static inline u32 mc_intr_en_r(u32 i)
116{
117 return 0x00000140U + i*4U;
118}
119static inline u32 mc_intr_en_set_r(u32 i)
120{
121 return 0x00000160U + i*4U;
122}
123static inline u32 mc_intr_en_clear_r(u32 i)
124{
125 return 0x00000180U + i*4U;
126}
127static inline u32 mc_enable_r(void)
128{
129 return 0x00000200U;
130}
131static inline u32 mc_enable_xbar_enabled_f(void)
132{
133 return 0x4U;
134}
135static inline u32 mc_enable_l2_enabled_f(void)
136{
137 return 0x8U;
138}
139static inline u32 mc_enable_pmedia_s(void)
140{
141 return 1U;
142}
143static inline u32 mc_enable_pmedia_f(u32 v)
144{
145 return (v & 0x1U) << 4U;
146}
147static inline u32 mc_enable_pmedia_m(void)
148{
149 return 0x1U << 4U;
150}
151static inline u32 mc_enable_pmedia_v(u32 r)
152{
153 return (r >> 4U) & 0x1U;
154}
155static inline u32 mc_enable_priv_ring_enabled_f(void)
156{
157 return 0x20U;
158}
159static inline u32 mc_enable_ce0_m(void)
160{
161 return 0x1U << 6U;
162}
163static inline u32 mc_enable_pfifo_enabled_f(void)
164{
165 return 0x100U;
166}
167static inline u32 mc_enable_pgraph_enabled_f(void)
168{
169 return 0x1000U;
170}
171static inline u32 mc_enable_pwr_v(u32 r)
172{
173 return (r >> 13U) & 0x1U;
174}
175static inline u32 mc_enable_pwr_disabled_v(void)
176{
177 return 0x00000000U;
178}
179static inline u32 mc_enable_pwr_enabled_f(void)
180{
181 return 0x2000U;
182}
183static inline u32 mc_enable_pfb_enabled_f(void)
184{
185 return 0x100000U;
186}
187static inline u32 mc_enable_ce2_m(void)
188{
189 return 0x1U << 21U;
190}
191static inline u32 mc_enable_ce2_enabled_f(void)
192{
193 return 0x200000U;
194}
195static inline u32 mc_enable_blg_enabled_f(void)
196{
197 return 0x8000000U;
198}
199static inline u32 mc_enable_perfmon_enabled_f(void)
200{
201 return 0x10000000U;
202}
203static inline u32 mc_enable_hub_enabled_f(void)
204{
205 return 0x20000000U;
206}
207static inline u32 mc_intr_ltc_r(void)
208{
209 return 0x000001c0U;
210}
211static inline u32 mc_enable_pb_r(void)
212{
213 return 0x00000204U;
214}
215static inline u32 mc_enable_pb_0_s(void)
216{
217 return 1U;
218}
219static inline u32 mc_enable_pb_0_f(u32 v)
220{
221 return (v & 0x1U) << 0U;
222}
223static inline u32 mc_enable_pb_0_m(void)
224{
225 return 0x1U << 0U;
226}
227static inline u32 mc_enable_pb_0_v(u32 r)
228{
229 return (r >> 0U) & 0x1U;
230}
231static inline u32 mc_enable_pb_0_enabled_v(void)
232{
233 return 0x00000001U;
234}
235static inline u32 mc_enable_pb_sel_f(u32 v, u32 i)
236{
237 return (v & 0x1U) << (0U + i*1U);
238}
239static inline u32 mc_elpg_enable_r(void)
240{
241 return 0x0000020cU;
242}
243static inline u32 mc_elpg_enable_xbar_enabled_f(void)
244{
245 return 0x4U;
246}
247static inline u32 mc_elpg_enable_pfb_enabled_f(void)
248{
249 return 0x100000U;
250}
251static inline u32 mc_elpg_enable_hub_enabled_f(void)
252{
253 return 0x20000000U;
254}
255#endif
diff --git a/include/nvgpu/hw/gp10b/hw_pbdma_gp10b.h b/include/nvgpu/hw/gp10b/hw_pbdma_gp10b.h
deleted file mode 100644
index 66e8ddb..0000000
--- a/include/nvgpu/hw/gp10b/hw_pbdma_gp10b.h
+++ /dev/null
@@ -1,615 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pbdma_gp10b_h_
57#define _hw_pbdma_gp10b_h_
58
59static inline u32 pbdma_gp_entry1_r(void)
60{
61 return 0x10000004U;
62}
63static inline u32 pbdma_gp_entry1_get_hi_v(u32 r)
64{
65 return (r >> 0U) & 0xffU;
66}
67static inline u32 pbdma_gp_entry1_length_f(u32 v)
68{
69 return (v & 0x1fffffU) << 10U;
70}
71static inline u32 pbdma_gp_entry1_length_v(u32 r)
72{
73 return (r >> 10U) & 0x1fffffU;
74}
75static inline u32 pbdma_gp_base_r(u32 i)
76{
77 return 0x00040048U + i*8192U;
78}
79static inline u32 pbdma_gp_base__size_1_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 pbdma_gp_base_offset_f(u32 v)
84{
85 return (v & 0x1fffffffU) << 3U;
86}
87static inline u32 pbdma_gp_base_rsvd_s(void)
88{
89 return 3U;
90}
91static inline u32 pbdma_gp_base_hi_r(u32 i)
92{
93 return 0x0004004cU + i*8192U;
94}
95static inline u32 pbdma_gp_base_hi_offset_f(u32 v)
96{
97 return (v & 0xffU) << 0U;
98}
99static inline u32 pbdma_gp_base_hi_limit2_f(u32 v)
100{
101 return (v & 0x1fU) << 16U;
102}
103static inline u32 pbdma_gp_fetch_r(u32 i)
104{
105 return 0x00040050U + i*8192U;
106}
107static inline u32 pbdma_gp_get_r(u32 i)
108{
109 return 0x00040014U + i*8192U;
110}
111static inline u32 pbdma_gp_put_r(u32 i)
112{
113 return 0x00040000U + i*8192U;
114}
115static inline u32 pbdma_pb_fetch_r(u32 i)
116{
117 return 0x00040054U + i*8192U;
118}
119static inline u32 pbdma_pb_fetch_hi_r(u32 i)
120{
121 return 0x00040058U + i*8192U;
122}
123static inline u32 pbdma_get_r(u32 i)
124{
125 return 0x00040018U + i*8192U;
126}
127static inline u32 pbdma_get_hi_r(u32 i)
128{
129 return 0x0004001cU + i*8192U;
130}
131static inline u32 pbdma_put_r(u32 i)
132{
133 return 0x0004005cU + i*8192U;
134}
135static inline u32 pbdma_put_hi_r(u32 i)
136{
137 return 0x00040060U + i*8192U;
138}
139static inline u32 pbdma_formats_r(u32 i)
140{
141 return 0x0004009cU + i*8192U;
142}
143static inline u32 pbdma_formats_gp_fermi0_f(void)
144{
145 return 0x0U;
146}
147static inline u32 pbdma_formats_pb_fermi1_f(void)
148{
149 return 0x100U;
150}
151static inline u32 pbdma_formats_mp_fermi0_f(void)
152{
153 return 0x0U;
154}
155static inline u32 pbdma_pb_header_r(u32 i)
156{
157 return 0x00040084U + i*8192U;
158}
159static inline u32 pbdma_pb_header_priv_user_f(void)
160{
161 return 0x0U;
162}
163static inline u32 pbdma_pb_header_method_zero_f(void)
164{
165 return 0x0U;
166}
167static inline u32 pbdma_pb_header_subchannel_zero_f(void)
168{
169 return 0x0U;
170}
171static inline u32 pbdma_pb_header_level_main_f(void)
172{
173 return 0x0U;
174}
175static inline u32 pbdma_pb_header_first_true_f(void)
176{
177 return 0x400000U;
178}
179static inline u32 pbdma_pb_header_type_inc_f(void)
180{
181 return 0x20000000U;
182}
183static inline u32 pbdma_pb_header_type_non_inc_f(void)
184{
185 return 0x60000000U;
186}
187static inline u32 pbdma_hdr_shadow_r(u32 i)
188{
189 return 0x00040118U + i*8192U;
190}
191static inline u32 pbdma_gp_shadow_0_r(u32 i)
192{
193 return 0x00040110U + i*8192U;
194}
195static inline u32 pbdma_gp_shadow_1_r(u32 i)
196{
197 return 0x00040114U + i*8192U;
198}
199static inline u32 pbdma_subdevice_r(u32 i)
200{
201 return 0x00040094U + i*8192U;
202}
203static inline u32 pbdma_subdevice_id_f(u32 v)
204{
205 return (v & 0xfffU) << 0U;
206}
207static inline u32 pbdma_subdevice_status_active_f(void)
208{
209 return 0x10000000U;
210}
211static inline u32 pbdma_subdevice_channel_dma_enable_f(void)
212{
213 return 0x20000000U;
214}
215static inline u32 pbdma_method0_r(u32 i)
216{
217 return 0x000400c0U + i*8192U;
218}
219static inline u32 pbdma_method0_fifo_size_v(void)
220{
221 return 0x00000004U;
222}
223static inline u32 pbdma_method0_addr_f(u32 v)
224{
225 return (v & 0xfffU) << 2U;
226}
227static inline u32 pbdma_method0_addr_v(u32 r)
228{
229 return (r >> 2U) & 0xfffU;
230}
231static inline u32 pbdma_method0_subch_v(u32 r)
232{
233 return (r >> 16U) & 0x7U;
234}
235static inline u32 pbdma_method0_first_true_f(void)
236{
237 return 0x400000U;
238}
239static inline u32 pbdma_method0_valid_true_f(void)
240{
241 return 0x80000000U;
242}
243static inline u32 pbdma_method1_r(u32 i)
244{
245 return 0x000400c8U + i*8192U;
246}
247static inline u32 pbdma_method2_r(u32 i)
248{
249 return 0x000400d0U + i*8192U;
250}
251static inline u32 pbdma_method3_r(u32 i)
252{
253 return 0x000400d8U + i*8192U;
254}
255static inline u32 pbdma_data0_r(u32 i)
256{
257 return 0x000400c4U + i*8192U;
258}
259static inline u32 pbdma_target_r(u32 i)
260{
261 return 0x000400acU + i*8192U;
262}
263static inline u32 pbdma_target_engine_sw_f(void)
264{
265 return 0x1fU;
266}
267static inline u32 pbdma_acquire_r(u32 i)
268{
269 return 0x00040030U + i*8192U;
270}
271static inline u32 pbdma_acquire_retry_man_2_f(void)
272{
273 return 0x2U;
274}
275static inline u32 pbdma_acquire_retry_exp_2_f(void)
276{
277 return 0x100U;
278}
279static inline u32 pbdma_acquire_timeout_exp_f(u32 v)
280{
281 return (v & 0xfU) << 11U;
282}
283static inline u32 pbdma_acquire_timeout_exp_max_v(void)
284{
285 return 0x0000000fU;
286}
287static inline u32 pbdma_acquire_timeout_exp_max_f(void)
288{
289 return 0x7800U;
290}
291static inline u32 pbdma_acquire_timeout_man_f(u32 v)
292{
293 return (v & 0xffffU) << 15U;
294}
295static inline u32 pbdma_acquire_timeout_man_max_v(void)
296{
297 return 0x0000ffffU;
298}
299static inline u32 pbdma_acquire_timeout_man_max_f(void)
300{
301 return 0x7fff8000U;
302}
303static inline u32 pbdma_acquire_timeout_en_enable_f(void)
304{
305 return 0x80000000U;
306}
307static inline u32 pbdma_acquire_timeout_en_disable_f(void)
308{
309 return 0x0U;
310}
311static inline u32 pbdma_status_r(u32 i)
312{
313 return 0x00040100U + i*8192U;
314}
315static inline u32 pbdma_channel_r(u32 i)
316{
317 return 0x00040120U + i*8192U;
318}
319static inline u32 pbdma_signature_r(u32 i)
320{
321 return 0x00040010U + i*8192U;
322}
323static inline u32 pbdma_signature_hw_valid_f(void)
324{
325 return 0xfaceU;
326}
327static inline u32 pbdma_signature_sw_zero_f(void)
328{
329 return 0x0U;
330}
331static inline u32 pbdma_userd_r(u32 i)
332{
333 return 0x00040008U + i*8192U;
334}
335static inline u32 pbdma_userd_target_vid_mem_f(void)
336{
337 return 0x0U;
338}
339static inline u32 pbdma_userd_target_sys_mem_coh_f(void)
340{
341 return 0x2U;
342}
343static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void)
344{
345 return 0x3U;
346}
347static inline u32 pbdma_userd_addr_f(u32 v)
348{
349 return (v & 0x7fffffU) << 9U;
350}
351static inline u32 pbdma_userd_hi_r(u32 i)
352{
353 return 0x0004000cU + i*8192U;
354}
355static inline u32 pbdma_userd_hi_addr_f(u32 v)
356{
357 return (v & 0xffU) << 0U;
358}
359static inline u32 pbdma_config_r(u32 i)
360{
361 return 0x000400f4U + i*8192U;
362}
363static inline u32 pbdma_config_auth_level_privileged_f(void)
364{
365 return 0x100U;
366}
367static inline u32 pbdma_hce_ctrl_r(u32 i)
368{
369 return 0x000400e4U + i*8192U;
370}
371static inline u32 pbdma_hce_ctrl_hce_priv_mode_yes_f(void)
372{
373 return 0x20U;
374}
375static inline u32 pbdma_intr_0_r(u32 i)
376{
377 return 0x00040108U + i*8192U;
378}
379static inline u32 pbdma_intr_0_memreq_v(u32 r)
380{
381 return (r >> 0U) & 0x1U;
382}
383static inline u32 pbdma_intr_0_memreq_pending_f(void)
384{
385 return 0x1U;
386}
387static inline u32 pbdma_intr_0_memack_timeout_pending_f(void)
388{
389 return 0x2U;
390}
391static inline u32 pbdma_intr_0_memack_extra_pending_f(void)
392{
393 return 0x4U;
394}
395static inline u32 pbdma_intr_0_memdat_timeout_pending_f(void)
396{
397 return 0x8U;
398}
399static inline u32 pbdma_intr_0_memdat_extra_pending_f(void)
400{
401 return 0x10U;
402}
403static inline u32 pbdma_intr_0_memflush_pending_f(void)
404{
405 return 0x20U;
406}
407static inline u32 pbdma_intr_0_memop_pending_f(void)
408{
409 return 0x40U;
410}
411static inline u32 pbdma_intr_0_lbconnect_pending_f(void)
412{
413 return 0x80U;
414}
415static inline u32 pbdma_intr_0_lbreq_pending_f(void)
416{
417 return 0x100U;
418}
419static inline u32 pbdma_intr_0_lback_timeout_pending_f(void)
420{
421 return 0x200U;
422}
423static inline u32 pbdma_intr_0_lback_extra_pending_f(void)
424{
425 return 0x400U;
426}
427static inline u32 pbdma_intr_0_lbdat_timeout_pending_f(void)
428{
429 return 0x800U;
430}
431static inline u32 pbdma_intr_0_lbdat_extra_pending_f(void)
432{
433 return 0x1000U;
434}
435static inline u32 pbdma_intr_0_gpfifo_pending_f(void)
436{
437 return 0x2000U;
438}
439static inline u32 pbdma_intr_0_gpptr_pending_f(void)
440{
441 return 0x4000U;
442}
443static inline u32 pbdma_intr_0_gpentry_pending_f(void)
444{
445 return 0x8000U;
446}
447static inline u32 pbdma_intr_0_gpcrc_pending_f(void)
448{
449 return 0x10000U;
450}
451static inline u32 pbdma_intr_0_pbptr_pending_f(void)
452{
453 return 0x20000U;
454}
455static inline u32 pbdma_intr_0_pbentry_pending_f(void)
456{
457 return 0x40000U;
458}
459static inline u32 pbdma_intr_0_pbcrc_pending_f(void)
460{
461 return 0x80000U;
462}
463static inline u32 pbdma_intr_0_xbarconnect_pending_f(void)
464{
465 return 0x100000U;
466}
467static inline u32 pbdma_intr_0_method_pending_f(void)
468{
469 return 0x200000U;
470}
471static inline u32 pbdma_intr_0_methodcrc_pending_f(void)
472{
473 return 0x400000U;
474}
475static inline u32 pbdma_intr_0_device_pending_f(void)
476{
477 return 0x800000U;
478}
479static inline u32 pbdma_intr_0_semaphore_pending_f(void)
480{
481 return 0x2000000U;
482}
483static inline u32 pbdma_intr_0_acquire_pending_f(void)
484{
485 return 0x4000000U;
486}
487static inline u32 pbdma_intr_0_pri_pending_f(void)
488{
489 return 0x8000000U;
490}
491static inline u32 pbdma_intr_0_no_ctxsw_seg_pending_f(void)
492{
493 return 0x20000000U;
494}
495static inline u32 pbdma_intr_0_pbseg_pending_f(void)
496{
497 return 0x40000000U;
498}
499static inline u32 pbdma_intr_0_signature_pending_f(void)
500{
501 return 0x80000000U;
502}
503static inline u32 pbdma_intr_0_syncpoint_illegal_pending_f(void)
504{
505 return 0x10000000U;
506}
507static inline u32 pbdma_intr_1_r(u32 i)
508{
509 return 0x00040148U + i*8192U;
510}
511static inline u32 pbdma_intr_en_0_r(u32 i)
512{
513 return 0x0004010cU + i*8192U;
514}
515static inline u32 pbdma_intr_en_0_lbreq_enabled_f(void)
516{
517 return 0x100U;
518}
519static inline u32 pbdma_intr_en_1_r(u32 i)
520{
521 return 0x0004014cU + i*8192U;
522}
523static inline u32 pbdma_intr_stall_r(u32 i)
524{
525 return 0x0004013cU + i*8192U;
526}
527static inline u32 pbdma_intr_stall_lbreq_enabled_f(void)
528{
529 return 0x100U;
530}
531static inline u32 pbdma_intr_stall_1_r(u32 i)
532{
533 return 0x00040140U + i*8192U;
534}
535static inline u32 pbdma_intr_stall_1_hce_illegal_op_enabled_f(void)
536{
537 return 0x1U;
538}
539static inline u32 pbdma_udma_nop_r(void)
540{
541 return 0x00000008U;
542}
543static inline u32 pbdma_allowed_syncpoints_r(u32 i)
544{
545 return 0x000400e8U + i*8192U;
546}
547static inline u32 pbdma_allowed_syncpoints_0_valid_f(u32 v)
548{
549 return (v & 0x1U) << 31U;
550}
551static inline u32 pbdma_allowed_syncpoints_0_index_f(u32 v)
552{
553 return (v & 0x7fffU) << 16U;
554}
555static inline u32 pbdma_allowed_syncpoints_0_index_v(u32 r)
556{
557 return (r >> 16U) & 0x7fffU;
558}
559static inline u32 pbdma_allowed_syncpoints_1_valid_f(u32 v)
560{
561 return (v & 0x1U) << 15U;
562}
563static inline u32 pbdma_allowed_syncpoints_1_index_f(u32 v)
564{
565 return (v & 0x7fffU) << 0U;
566}
567static inline u32 pbdma_syncpointa_r(u32 i)
568{
569 return 0x000400a4U + i*8192U;
570}
571static inline u32 pbdma_syncpointa_payload_v(u32 r)
572{
573 return (r >> 0U) & 0xffffffffU;
574}
575static inline u32 pbdma_syncpointb_r(u32 i)
576{
577 return 0x000400a8U + i*8192U;
578}
579static inline u32 pbdma_syncpointb_op_v(u32 r)
580{
581 return (r >> 0U) & 0x1U;
582}
583static inline u32 pbdma_syncpointb_op_wait_v(void)
584{
585 return 0x00000000U;
586}
587static inline u32 pbdma_syncpointb_wait_switch_v(u32 r)
588{
589 return (r >> 4U) & 0x1U;
590}
591static inline u32 pbdma_syncpointb_wait_switch_en_v(void)
592{
593 return 0x00000001U;
594}
595static inline u32 pbdma_syncpointb_syncpt_index_v(u32 r)
596{
597 return (r >> 8U) & 0xfffU;
598}
599static inline u32 pbdma_runlist_timeslice_r(u32 i)
600{
601 return 0x000400f8U + i*8192U;
602}
603static inline u32 pbdma_runlist_timeslice_timeout_128_f(void)
604{
605 return 0x80U;
606}
607static inline u32 pbdma_runlist_timeslice_timescale_3_f(void)
608{
609 return 0x3000U;
610}
611static inline u32 pbdma_runlist_timeslice_enable_true_f(void)
612{
613 return 0x10000000U;
614}
615#endif
diff --git a/include/nvgpu/hw/gp10b/hw_perf_gp10b.h b/include/nvgpu/hw/gp10b/hw_perf_gp10b.h
deleted file mode 100644
index 43424e1..0000000
--- a/include/nvgpu/hw/gp10b/hw_perf_gp10b.h
+++ /dev/null
@@ -1,219 +0,0 @@
1/*
2 * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_perf_gp10b_h_
57#define _hw_perf_gp10b_h_
58
59static inline u32 perf_pmmsys_base_v(void)
60{
61 return 0x001b0000U;
62}
63static inline u32 perf_pmmsys_extent_v(void)
64{
65 return 0x001b0fffU;
66}
67static inline u32 perf_pmasys_control_r(void)
68{
69 return 0x001b4000U;
70}
71static inline u32 perf_pmasys_control_membuf_status_v(u32 r)
72{
73 return (r >> 4U) & 0x1U;
74}
75static inline u32 perf_pmasys_control_membuf_status_overflowed_v(void)
76{
77 return 0x00000001U;
78}
79static inline u32 perf_pmasys_control_membuf_status_overflowed_f(void)
80{
81 return 0x10U;
82}
83static inline u32 perf_pmasys_control_membuf_clear_status_f(u32 v)
84{
85 return (v & 0x1U) << 5U;
86}
87static inline u32 perf_pmasys_control_membuf_clear_status_v(u32 r)
88{
89 return (r >> 5U) & 0x1U;
90}
91static inline u32 perf_pmasys_control_membuf_clear_status_doit_v(void)
92{
93 return 0x00000001U;
94}
95static inline u32 perf_pmasys_control_membuf_clear_status_doit_f(void)
96{
97 return 0x20U;
98}
99static inline u32 perf_pmasys_mem_block_r(void)
100{
101 return 0x001b4070U;
102}
103static inline u32 perf_pmasys_mem_block_base_f(u32 v)
104{
105 return (v & 0xfffffffU) << 0U;
106}
107static inline u32 perf_pmasys_mem_block_target_f(u32 v)
108{
109 return (v & 0x3U) << 28U;
110}
111static inline u32 perf_pmasys_mem_block_target_v(u32 r)
112{
113 return (r >> 28U) & 0x3U;
114}
115static inline u32 perf_pmasys_mem_block_target_lfb_v(void)
116{
117 return 0x00000000U;
118}
119static inline u32 perf_pmasys_mem_block_target_lfb_f(void)
120{
121 return 0x0U;
122}
123static inline u32 perf_pmasys_mem_block_target_sys_coh_v(void)
124{
125 return 0x00000002U;
126}
127static inline u32 perf_pmasys_mem_block_target_sys_coh_f(void)
128{
129 return 0x20000000U;
130}
131static inline u32 perf_pmasys_mem_block_target_sys_ncoh_v(void)
132{
133 return 0x00000003U;
134}
135static inline u32 perf_pmasys_mem_block_target_sys_ncoh_f(void)
136{
137 return 0x30000000U;
138}
139static inline u32 perf_pmasys_mem_block_valid_f(u32 v)
140{
141 return (v & 0x1U) << 31U;
142}
143static inline u32 perf_pmasys_mem_block_valid_v(u32 r)
144{
145 return (r >> 31U) & 0x1U;
146}
147static inline u32 perf_pmasys_mem_block_valid_true_v(void)
148{
149 return 0x00000001U;
150}
151static inline u32 perf_pmasys_mem_block_valid_true_f(void)
152{
153 return 0x80000000U;
154}
155static inline u32 perf_pmasys_mem_block_valid_false_v(void)
156{
157 return 0x00000000U;
158}
159static inline u32 perf_pmasys_mem_block_valid_false_f(void)
160{
161 return 0x0U;
162}
163static inline u32 perf_pmasys_outbase_r(void)
164{
165 return 0x001b4074U;
166}
167static inline u32 perf_pmasys_outbase_ptr_f(u32 v)
168{
169 return (v & 0x7ffffffU) << 5U;
170}
171static inline u32 perf_pmasys_outbaseupper_r(void)
172{
173 return 0x001b4078U;
174}
175static inline u32 perf_pmasys_outbaseupper_ptr_f(u32 v)
176{
177 return (v & 0xffU) << 0U;
178}
179static inline u32 perf_pmasys_outsize_r(void)
180{
181 return 0x001b407cU;
182}
183static inline u32 perf_pmasys_outsize_numbytes_f(u32 v)
184{
185 return (v & 0x7ffffffU) << 5U;
186}
187static inline u32 perf_pmasys_mem_bytes_r(void)
188{
189 return 0x001b4084U;
190}
191static inline u32 perf_pmasys_mem_bytes_numbytes_f(u32 v)
192{
193 return (v & 0xfffffffU) << 4U;
194}
195static inline u32 perf_pmasys_mem_bump_r(void)
196{
197 return 0x001b4088U;
198}
199static inline u32 perf_pmasys_mem_bump_numbytes_f(u32 v)
200{
201 return (v & 0xfffffffU) << 4U;
202}
203static inline u32 perf_pmasys_enginestatus_r(void)
204{
205 return 0x001b40a4U;
206}
207static inline u32 perf_pmasys_enginestatus_rbufempty_f(u32 v)
208{
209 return (v & 0x1U) << 4U;
210}
211static inline u32 perf_pmasys_enginestatus_rbufempty_empty_v(void)
212{
213 return 0x00000001U;
214}
215static inline u32 perf_pmasys_enginestatus_rbufempty_empty_f(void)
216{
217 return 0x10U;
218}
219#endif
diff --git a/include/nvgpu/hw/gp10b/hw_pram_gp10b.h b/include/nvgpu/hw/gp10b/hw_pram_gp10b.h
deleted file mode 100644
index aef0e69..0000000
--- a/include/nvgpu/hw/gp10b/hw_pram_gp10b.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pram_gp10b_h_
57#define _hw_pram_gp10b_h_
58
59static inline u32 pram_data032_r(u32 i)
60{
61 return 0x00700000U + i*4U;
62}
63#endif
diff --git a/include/nvgpu/hw/gp10b/hw_pri_ringmaster_gp10b.h b/include/nvgpu/hw/gp10b/hw_pri_ringmaster_gp10b.h
deleted file mode 100644
index 03a3854..0000000
--- a/include/nvgpu/hw/gp10b/hw_pri_ringmaster_gp10b.h
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringmaster_gp10b_h_
57#define _hw_pri_ringmaster_gp10b_h_
58
59static inline u32 pri_ringmaster_command_r(void)
60{
61 return 0x0012004cU;
62}
63static inline u32 pri_ringmaster_command_cmd_m(void)
64{
65 return 0x3fU << 0U;
66}
67static inline u32 pri_ringmaster_command_cmd_v(u32 r)
68{
69 return (r >> 0U) & 0x3fU;
70}
71static inline u32 pri_ringmaster_command_cmd_no_cmd_v(void)
72{
73 return 0x00000000U;
74}
75static inline u32 pri_ringmaster_command_cmd_start_ring_f(void)
76{
77 return 0x1U;
78}
79static inline u32 pri_ringmaster_command_cmd_ack_interrupt_f(void)
80{
81 return 0x2U;
82}
83static inline u32 pri_ringmaster_command_cmd_enumerate_stations_f(void)
84{
85 return 0x3U;
86}
87static inline u32 pri_ringmaster_command_cmd_enumerate_stations_bc_grp_all_f(void)
88{
89 return 0x0U;
90}
91static inline u32 pri_ringmaster_command_data_r(void)
92{
93 return 0x00120048U;
94}
95static inline u32 pri_ringmaster_start_results_r(void)
96{
97 return 0x00120050U;
98}
99static inline u32 pri_ringmaster_start_results_connectivity_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 pri_ringmaster_start_results_connectivity_pass_v(void)
104{
105 return 0x00000001U;
106}
107static inline u32 pri_ringmaster_intr_status0_r(void)
108{
109 return 0x00120058U;
110}
111static inline u32 pri_ringmaster_intr_status0_ring_start_conn_fault_v(u32 r)
112{
113 return (r >> 0U) & 0x1U;
114}
115static inline u32 pri_ringmaster_intr_status0_disconnect_fault_v(u32 r)
116{
117 return (r >> 1U) & 0x1U;
118}
119static inline u32 pri_ringmaster_intr_status0_overflow_fault_v(u32 r)
120{
121 return (r >> 2U) & 0x1U;
122}
123static inline u32 pri_ringmaster_intr_status0_gbl_write_error_sys_v(u32 r)
124{
125 return (r >> 8U) & 0x1U;
126}
127static inline u32 pri_ringmaster_intr_status1_r(void)
128{
129 return 0x0012005cU;
130}
131static inline u32 pri_ringmaster_global_ctl_r(void)
132{
133 return 0x00120060U;
134}
135static inline u32 pri_ringmaster_global_ctl_ring_reset_asserted_f(void)
136{
137 return 0x1U;
138}
139static inline u32 pri_ringmaster_global_ctl_ring_reset_deasserted_f(void)
140{
141 return 0x0U;
142}
143static inline u32 pri_ringmaster_enum_fbp_r(void)
144{
145 return 0x00120074U;
146}
147static inline u32 pri_ringmaster_enum_fbp_count_v(u32 r)
148{
149 return (r >> 0U) & 0x1fU;
150}
151static inline u32 pri_ringmaster_enum_gpc_r(void)
152{
153 return 0x00120078U;
154}
155static inline u32 pri_ringmaster_enum_gpc_count_v(u32 r)
156{
157 return (r >> 0U) & 0x1fU;
158}
159static inline u32 pri_ringmaster_enum_ltc_r(void)
160{
161 return 0x0012006cU;
162}
163static inline u32 pri_ringmaster_enum_ltc_count_v(u32 r)
164{
165 return (r >> 0U) & 0x1fU;
166}
167#endif
diff --git a/include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h b/include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h
deleted file mode 100644
index ba55658..0000000
--- a/include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_gpc_gp10b_h_
57#define _hw_pri_ringstation_gpc_gp10b_h_
58
59static inline u32 pri_ringstation_gpc_master_config_r(u32 i)
60{
61 return 0x00128300U + i*4U;
62}
63static inline u32 pri_ringstation_gpc_gpc0_priv_error_adr_r(void)
64{
65 return 0x00128120U;
66}
67static inline u32 pri_ringstation_gpc_gpc0_priv_error_wrdat_r(void)
68{
69 return 0x00128124U;
70}
71static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_r(void)
72{
73 return 0x00128128U;
74}
75static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_subid_v(u32 r)
76{
77 return (r >> 24U) & 0x3fU;
78}
79static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_priv_level_v(u32 r)
80{
81 return (r >> 20U) & 0x3U;
82}
83static inline u32 pri_ringstation_gpc_gpc0_priv_error_code_r(void)
84{
85 return 0x0012812cU;
86}
87#endif
diff --git a/include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h b/include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h
deleted file mode 100644
index 1dcb1a3..0000000
--- a/include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_sys_gp10b_h_
57#define _hw_pri_ringstation_sys_gp10b_h_
58
59static inline u32 pri_ringstation_sys_master_config_r(u32 i)
60{
61 return 0x00122300U + i*4U;
62}
63static inline u32 pri_ringstation_sys_decode_config_r(void)
64{
65 return 0x00122204U;
66}
67static inline u32 pri_ringstation_sys_decode_config_ring_m(void)
68{
69 return 0x7U << 0U;
70}
71static inline u32 pri_ringstation_sys_decode_config_ring_drop_on_ring_not_started_f(void)
72{
73 return 0x1U;
74}
75static inline u32 pri_ringstation_sys_priv_error_adr_r(void)
76{
77 return 0x00122120U;
78}
79static inline u32 pri_ringstation_sys_priv_error_wrdat_r(void)
80{
81 return 0x00122124U;
82}
83static inline u32 pri_ringstation_sys_priv_error_info_r(void)
84{
85 return 0x00122128U;
86}
87static inline u32 pri_ringstation_sys_priv_error_info_subid_v(u32 r)
88{
89 return (r >> 24U) & 0x3fU;
90}
91static inline u32 pri_ringstation_sys_priv_error_info_priv_level_v(u32 r)
92{
93 return (r >> 20U) & 0x3U;
94}
95static inline u32 pri_ringstation_sys_priv_error_code_r(void)
96{
97 return 0x0012212cU;
98}
99#endif
diff --git a/include/nvgpu/hw/gp10b/hw_proj_gp10b.h b/include/nvgpu/hw/gp10b/hw_proj_gp10b.h
deleted file mode 100644
index a885e93..0000000
--- a/include/nvgpu/hw/gp10b/hw_proj_gp10b.h
+++ /dev/null
@@ -1,179 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_proj_gp10b_h_
57#define _hw_proj_gp10b_h_
58
59static inline u32 proj_gpc_base_v(void)
60{
61 return 0x00500000U;
62}
63static inline u32 proj_gpc_shared_base_v(void)
64{
65 return 0x00418000U;
66}
67static inline u32 proj_gpc_stride_v(void)
68{
69 return 0x00008000U;
70}
71static inline u32 proj_gpc_priv_stride_v(void)
72{
73 return 0x00000800U;
74}
75static inline u32 proj_ltc_stride_v(void)
76{
77 return 0x00002000U;
78}
79static inline u32 proj_lts_stride_v(void)
80{
81 return 0x00000200U;
82}
83static inline u32 proj_fbpa_base_v(void)
84{
85 return 0x00900000U;
86}
87static inline u32 proj_fbpa_shared_base_v(void)
88{
89 return 0x009a0000U;
90}
91static inline u32 proj_fbpa_stride_v(void)
92{
93 return 0x00004000U;
94}
95static inline u32 proj_ppc_in_gpc_base_v(void)
96{
97 return 0x00003000U;
98}
99static inline u32 proj_ppc_in_gpc_shared_base_v(void)
100{
101 return 0x00003e00U;
102}
103static inline u32 proj_ppc_in_gpc_stride_v(void)
104{
105 return 0x00000200U;
106}
107static inline u32 proj_rop_base_v(void)
108{
109 return 0x00410000U;
110}
111static inline u32 proj_rop_shared_base_v(void)
112{
113 return 0x00408800U;
114}
115static inline u32 proj_rop_stride_v(void)
116{
117 return 0x00000400U;
118}
119static inline u32 proj_tpc_in_gpc_base_v(void)
120{
121 return 0x00004000U;
122}
123static inline u32 proj_tpc_in_gpc_stride_v(void)
124{
125 return 0x00000800U;
126}
127static inline u32 proj_tpc_in_gpc_shared_base_v(void)
128{
129 return 0x00001800U;
130}
131static inline u32 proj_host_num_engines_v(void)
132{
133 return 0x00000002U;
134}
135static inline u32 proj_host_num_pbdma_v(void)
136{
137 return 0x00000001U;
138}
139static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void)
140{
141 return 0x00000002U;
142}
143static inline u32 proj_scal_litter_num_sm_per_tpc_v(void)
144{
145 return 0x00000001U;
146}
147static inline u32 proj_scal_litter_num_fbps_v(void)
148{
149 return 0x00000001U;
150}
151static inline u32 proj_scal_litter_num_fbpas_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 proj_scal_litter_num_gpcs_v(void)
156{
157 return 0x00000001U;
158}
159static inline u32 proj_scal_litter_num_pes_per_gpc_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 proj_scal_litter_num_tpcs_per_pes_v(void)
164{
165 return 0x00000002U;
166}
167static inline u32 proj_scal_litter_num_zcull_banks_v(void)
168{
169 return 0x00000004U;
170}
171static inline u32 proj_scal_max_gpcs_v(void)
172{
173 return 0x00000020U;
174}
175static inline u32 proj_scal_max_tpc_per_gpc_v(void)
176{
177 return 0x00000008U;
178}
179#endif
diff --git a/include/nvgpu/hw/gp10b/hw_pwr_gp10b.h b/include/nvgpu/hw/gp10b/hw_pwr_gp10b.h
deleted file mode 100644
index f067be7..0000000
--- a/include/nvgpu/hw/gp10b/hw_pwr_gp10b.h
+++ /dev/null
@@ -1,883 +0,0 @@
1/*
2 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pwr_gp10b_h_
57#define _hw_pwr_gp10b_h_
58
59static inline u32 pwr_falcon_irqsset_r(void)
60{
61 return 0x0010a000U;
62}
63static inline u32 pwr_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 pwr_falcon_irqsclr_r(void)
68{
69 return 0x0010a004U;
70}
71static inline u32 pwr_falcon_irqstat_r(void)
72{
73 return 0x0010a008U;
74}
75static inline u32 pwr_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 pwr_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 pwr_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 pwr_falcon_irqmode_r(void)
88{
89 return 0x0010a00cU;
90}
91static inline u32 pwr_falcon_irqmset_r(void)
92{
93 return 0x0010a010U;
94}
95static inline u32 pwr_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 pwr_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 pwr_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 pwr_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 pwr_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 pwr_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 pwr_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 pwr_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 pwr_falcon_irqmclr_r(void)
128{
129 return 0x0010a014U;
130}
131static inline u32 pwr_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 pwr_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 pwr_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 pwr_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 pwr_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 pwr_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 pwr_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 pwr_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 pwr_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 pwr_falcon_irqmask_r(void)
168{
169 return 0x0010a018U;
170}
171static inline u32 pwr_falcon_irqdest_r(void)
172{
173 return 0x0010a01cU;
174}
175static inline u32 pwr_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 pwr_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 pwr_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 pwr_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 pwr_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 pwr_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 pwr_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 pwr_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 pwr_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 pwr_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 pwr_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 pwr_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 pwr_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 pwr_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 pwr_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 pwr_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 pwr_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 pwr_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 pwr_falcon_curctx_r(void)
248{
249 return 0x0010a050U;
250}
251static inline u32 pwr_falcon_nxtctx_r(void)
252{
253 return 0x0010a054U;
254}
255static inline u32 pwr_falcon_mailbox0_r(void)
256{
257 return 0x0010a040U;
258}
259static inline u32 pwr_falcon_mailbox1_r(void)
260{
261 return 0x0010a044U;
262}
263static inline u32 pwr_falcon_itfen_r(void)
264{
265 return 0x0010a048U;
266}
267static inline u32 pwr_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 pwr_falcon_idlestate_r(void)
272{
273 return 0x0010a04cU;
274}
275static inline u32 pwr_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 pwr_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 pwr_falcon_os_r(void)
284{
285 return 0x0010a080U;
286}
287static inline u32 pwr_falcon_engctl_r(void)
288{
289 return 0x0010a0a4U;
290}
291static inline u32 pwr_falcon_cpuctl_r(void)
292{
293 return 0x0010a100U;
294}
295static inline u32 pwr_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 pwr_falcon_cpuctl_halt_intr_f(u32 v)
300{
301 return (v & 0x1U) << 4U;
302}
303static inline u32 pwr_falcon_cpuctl_halt_intr_m(void)
304{
305 return 0x1U << 4U;
306}
307static inline u32 pwr_falcon_cpuctl_halt_intr_v(u32 r)
308{
309 return (r >> 4U) & 0x1U;
310}
311static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
312{
313 return (v & 0x1U) << 6U;
314}
315static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_m(void)
316{
317 return 0x1U << 6U;
318}
319static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
320{
321 return (r >> 6U) & 0x1U;
322}
323static inline u32 pwr_falcon_cpuctl_alias_r(void)
324{
325 return 0x0010a130U;
326}
327static inline u32 pwr_falcon_cpuctl_alias_startcpu_f(u32 v)
328{
329 return (v & 0x1U) << 1U;
330}
331static inline u32 pwr_pmu_scpctl_stat_r(void)
332{
333 return 0x0010ac08U;
334}
335static inline u32 pwr_pmu_scpctl_stat_debug_mode_f(u32 v)
336{
337 return (v & 0x1U) << 20U;
338}
339static inline u32 pwr_pmu_scpctl_stat_debug_mode_m(void)
340{
341 return 0x1U << 20U;
342}
343static inline u32 pwr_pmu_scpctl_stat_debug_mode_v(u32 r)
344{
345 return (r >> 20U) & 0x1U;
346}
347static inline u32 pwr_falcon_imemc_r(u32 i)
348{
349 return 0x0010a180U + i*16U;
350}
351static inline u32 pwr_falcon_imemc_offs_f(u32 v)
352{
353 return (v & 0x3fU) << 2U;
354}
355static inline u32 pwr_falcon_imemc_blk_f(u32 v)
356{
357 return (v & 0xffU) << 8U;
358}
359static inline u32 pwr_falcon_imemc_aincw_f(u32 v)
360{
361 return (v & 0x1U) << 24U;
362}
363static inline u32 pwr_falcon_imemd_r(u32 i)
364{
365 return 0x0010a184U + i*16U;
366}
367static inline u32 pwr_falcon_imemt_r(u32 i)
368{
369 return 0x0010a188U + i*16U;
370}
371static inline u32 pwr_falcon_sctl_r(void)
372{
373 return 0x0010a240U;
374}
375static inline u32 pwr_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 pwr_falcon_bootvec_r(void)
380{
381 return 0x0010a104U;
382}
383static inline u32 pwr_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 pwr_falcon_dmactl_r(void)
388{
389 return 0x0010a10cU;
390}
391static inline u32 pwr_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 pwr_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 pwr_falcon_hwcfg_r(void)
400{
401 return 0x0010a108U;
402}
403static inline u32 pwr_falcon_hwcfg_imem_size_v(u32 r)
404{
405 return (r >> 0U) & 0x1ffU;
406}
407static inline u32 pwr_falcon_hwcfg_dmem_size_v(u32 r)
408{
409 return (r >> 9U) & 0x1ffU;
410}
411static inline u32 pwr_falcon_dmatrfbase_r(void)
412{
413 return 0x0010a110U;
414}
415static inline u32 pwr_falcon_dmatrfbase1_r(void)
416{
417 return 0x0010a128U;
418}
419static inline u32 pwr_falcon_dmatrfmoffs_r(void)
420{
421 return 0x0010a114U;
422}
423static inline u32 pwr_falcon_dmatrfcmd_r(void)
424{
425 return 0x0010a118U;
426}
427static inline u32 pwr_falcon_dmatrfcmd_imem_f(u32 v)
428{
429 return (v & 0x1U) << 4U;
430}
431static inline u32 pwr_falcon_dmatrfcmd_write_f(u32 v)
432{
433 return (v & 0x1U) << 5U;
434}
435static inline u32 pwr_falcon_dmatrfcmd_size_f(u32 v)
436{
437 return (v & 0x7U) << 8U;
438}
439static inline u32 pwr_falcon_dmatrfcmd_ctxdma_f(u32 v)
440{
441 return (v & 0x7U) << 12U;
442}
443static inline u32 pwr_falcon_dmatrffboffs_r(void)
444{
445 return 0x0010a11cU;
446}
447static inline u32 pwr_falcon_exterraddr_r(void)
448{
449 return 0x0010a168U;
450}
451static inline u32 pwr_falcon_exterrstat_r(void)
452{
453 return 0x0010a16cU;
454}
455static inline u32 pwr_falcon_exterrstat_valid_m(void)
456{
457 return 0x1U << 31U;
458}
459static inline u32 pwr_falcon_exterrstat_valid_v(u32 r)
460{
461 return (r >> 31U) & 0x1U;
462}
463static inline u32 pwr_falcon_exterrstat_valid_true_v(void)
464{
465 return 0x00000001U;
466}
467static inline u32 pwr_pmu_falcon_icd_cmd_r(void)
468{
469 return 0x0010a200U;
470}
471static inline u32 pwr_pmu_falcon_icd_cmd_opc_s(void)
472{
473 return 4U;
474}
475static inline u32 pwr_pmu_falcon_icd_cmd_opc_f(u32 v)
476{
477 return (v & 0xfU) << 0U;
478}
479static inline u32 pwr_pmu_falcon_icd_cmd_opc_m(void)
480{
481 return 0xfU << 0U;
482}
483static inline u32 pwr_pmu_falcon_icd_cmd_opc_v(u32 r)
484{
485 return (r >> 0U) & 0xfU;
486}
487static inline u32 pwr_pmu_falcon_icd_cmd_opc_rreg_f(void)
488{
489 return 0x8U;
490}
491static inline u32 pwr_pmu_falcon_icd_cmd_opc_rstat_f(void)
492{
493 return 0xeU;
494}
495static inline u32 pwr_pmu_falcon_icd_cmd_idx_f(u32 v)
496{
497 return (v & 0x1fU) << 8U;
498}
499static inline u32 pwr_pmu_falcon_icd_rdata_r(void)
500{
501 return 0x0010a20cU;
502}
503static inline u32 pwr_falcon_dmemc_r(u32 i)
504{
505 return 0x0010a1c0U + i*8U;
506}
507static inline u32 pwr_falcon_dmemc_offs_f(u32 v)
508{
509 return (v & 0x3fU) << 2U;
510}
511static inline u32 pwr_falcon_dmemc_offs_m(void)
512{
513 return 0x3fU << 2U;
514}
515static inline u32 pwr_falcon_dmemc_blk_f(u32 v)
516{
517 return (v & 0xffU) << 8U;
518}
519static inline u32 pwr_falcon_dmemc_blk_m(void)
520{
521 return 0xffU << 8U;
522}
523static inline u32 pwr_falcon_dmemc_aincw_f(u32 v)
524{
525 return (v & 0x1U) << 24U;
526}
527static inline u32 pwr_falcon_dmemc_aincr_f(u32 v)
528{
529 return (v & 0x1U) << 25U;
530}
531static inline u32 pwr_falcon_dmemd_r(u32 i)
532{
533 return 0x0010a1c4U + i*8U;
534}
535static inline u32 pwr_pmu_new_instblk_r(void)
536{
537 return 0x0010a480U;
538}
539static inline u32 pwr_pmu_new_instblk_ptr_f(u32 v)
540{
541 return (v & 0xfffffffU) << 0U;
542}
543static inline u32 pwr_pmu_new_instblk_target_fb_f(void)
544{
545 return 0x0U;
546}
547static inline u32 pwr_pmu_new_instblk_target_sys_coh_f(void)
548{
549 return 0x20000000U;
550}
551static inline u32 pwr_pmu_new_instblk_target_sys_ncoh_f(void)
552{
553 return 0x30000000U;
554}
555static inline u32 pwr_pmu_new_instblk_valid_f(u32 v)
556{
557 return (v & 0x1U) << 30U;
558}
559static inline u32 pwr_pmu_mutex_id_r(void)
560{
561 return 0x0010a488U;
562}
563static inline u32 pwr_pmu_mutex_id_value_v(u32 r)
564{
565 return (r >> 0U) & 0xffU;
566}
567static inline u32 pwr_pmu_mutex_id_value_init_v(void)
568{
569 return 0x00000000U;
570}
571static inline u32 pwr_pmu_mutex_id_value_not_avail_v(void)
572{
573 return 0x000000ffU;
574}
575static inline u32 pwr_pmu_mutex_id_release_r(void)
576{
577 return 0x0010a48cU;
578}
579static inline u32 pwr_pmu_mutex_id_release_value_f(u32 v)
580{
581 return (v & 0xffU) << 0U;
582}
583static inline u32 pwr_pmu_mutex_id_release_value_m(void)
584{
585 return 0xffU << 0U;
586}
587static inline u32 pwr_pmu_mutex_id_release_value_init_v(void)
588{
589 return 0x00000000U;
590}
591static inline u32 pwr_pmu_mutex_id_release_value_init_f(void)
592{
593 return 0x0U;
594}
595static inline u32 pwr_pmu_mutex_r(u32 i)
596{
597 return 0x0010a580U + i*4U;
598}
599static inline u32 pwr_pmu_mutex__size_1_v(void)
600{
601 return 0x00000010U;
602}
603static inline u32 pwr_pmu_mutex_value_f(u32 v)
604{
605 return (v & 0xffU) << 0U;
606}
607static inline u32 pwr_pmu_mutex_value_v(u32 r)
608{
609 return (r >> 0U) & 0xffU;
610}
611static inline u32 pwr_pmu_mutex_value_initial_lock_f(void)
612{
613 return 0x0U;
614}
615static inline u32 pwr_pmu_queue_head_r(u32 i)
616{
617 return 0x0010a4a0U + i*4U;
618}
619static inline u32 pwr_pmu_queue_head__size_1_v(void)
620{
621 return 0x00000004U;
622}
623static inline u32 pwr_pmu_queue_head_address_f(u32 v)
624{
625 return (v & 0xffffffffU) << 0U;
626}
627static inline u32 pwr_pmu_queue_head_address_v(u32 r)
628{
629 return (r >> 0U) & 0xffffffffU;
630}
631static inline u32 pwr_pmu_queue_tail_r(u32 i)
632{
633 return 0x0010a4b0U + i*4U;
634}
635static inline u32 pwr_pmu_queue_tail__size_1_v(void)
636{
637 return 0x00000004U;
638}
639static inline u32 pwr_pmu_queue_tail_address_f(u32 v)
640{
641 return (v & 0xffffffffU) << 0U;
642}
643static inline u32 pwr_pmu_queue_tail_address_v(u32 r)
644{
645 return (r >> 0U) & 0xffffffffU;
646}
647static inline u32 pwr_pmu_msgq_head_r(void)
648{
649 return 0x0010a4c8U;
650}
651static inline u32 pwr_pmu_msgq_head_val_f(u32 v)
652{
653 return (v & 0xffffffffU) << 0U;
654}
655static inline u32 pwr_pmu_msgq_head_val_v(u32 r)
656{
657 return (r >> 0U) & 0xffffffffU;
658}
659static inline u32 pwr_pmu_msgq_tail_r(void)
660{
661 return 0x0010a4ccU;
662}
663static inline u32 pwr_pmu_msgq_tail_val_f(u32 v)
664{
665 return (v & 0xffffffffU) << 0U;
666}
667static inline u32 pwr_pmu_msgq_tail_val_v(u32 r)
668{
669 return (r >> 0U) & 0xffffffffU;
670}
671static inline u32 pwr_pmu_idle_mask_r(u32 i)
672{
673 return 0x0010a504U + i*16U;
674}
675static inline u32 pwr_pmu_idle_mask_gr_enabled_f(void)
676{
677 return 0x1U;
678}
679static inline u32 pwr_pmu_idle_mask_ce_2_enabled_f(void)
680{
681 return 0x200000U;
682}
683static inline u32 pwr_pmu_idle_mask_1_r(u32 i)
684{
685 return 0x0010aa34U + i*8U;
686}
687static inline u32 pwr_pmu_idle_count_r(u32 i)
688{
689 return 0x0010a508U + i*16U;
690}
691static inline u32 pwr_pmu_idle_count_value_f(u32 v)
692{
693 return (v & 0x7fffffffU) << 0U;
694}
695static inline u32 pwr_pmu_idle_count_value_v(u32 r)
696{
697 return (r >> 0U) & 0x7fffffffU;
698}
699static inline u32 pwr_pmu_idle_count_reset_f(u32 v)
700{
701 return (v & 0x1U) << 31U;
702}
703static inline u32 pwr_pmu_idle_ctrl_r(u32 i)
704{
705 return 0x0010a50cU + i*16U;
706}
707static inline u32 pwr_pmu_idle_ctrl_value_m(void)
708{
709 return 0x3U << 0U;
710}
711static inline u32 pwr_pmu_idle_ctrl_value_busy_f(void)
712{
713 return 0x2U;
714}
715static inline u32 pwr_pmu_idle_ctrl_value_always_f(void)
716{
717 return 0x3U;
718}
719static inline u32 pwr_pmu_idle_ctrl_filter_m(void)
720{
721 return 0x1U << 2U;
722}
723static inline u32 pwr_pmu_idle_ctrl_filter_disabled_f(void)
724{
725 return 0x0U;
726}
727static inline u32 pwr_pmu_idle_threshold_r(u32 i)
728{
729 return 0x0010a8a0U + i*4U;
730}
731static inline u32 pwr_pmu_idle_threshold_value_f(u32 v)
732{
733 return (v & 0x7fffffffU) << 0U;
734}
735static inline u32 pwr_pmu_idle_intr_r(void)
736{
737 return 0x0010a9e8U;
738}
739static inline u32 pwr_pmu_idle_intr_en_f(u32 v)
740{
741 return (v & 0x1U) << 0U;
742}
743static inline u32 pwr_pmu_idle_intr_en_disabled_v(void)
744{
745 return 0x00000000U;
746}
747static inline u32 pwr_pmu_idle_intr_en_enabled_v(void)
748{
749 return 0x00000001U;
750}
751static inline u32 pwr_pmu_idle_intr_status_r(void)
752{
753 return 0x0010a9ecU;
754}
755static inline u32 pwr_pmu_idle_intr_status_intr_f(u32 v)
756{
757 return (v & 0x1U) << 0U;
758}
759static inline u32 pwr_pmu_idle_intr_status_intr_m(void)
760{
761 return 0x1U << 0U;
762}
763static inline u32 pwr_pmu_idle_intr_status_intr_v(u32 r)
764{
765 return (r >> 0U) & 0x1U;
766}
767static inline u32 pwr_pmu_idle_intr_status_intr_pending_v(void)
768{
769 return 0x00000001U;
770}
771static inline u32 pwr_pmu_idle_intr_status_intr_clear_v(void)
772{
773 return 0x00000001U;
774}
775static inline u32 pwr_pmu_idle_mask_supp_r(u32 i)
776{
777 return 0x0010a9f0U + i*8U;
778}
779static inline u32 pwr_pmu_idle_mask_1_supp_r(u32 i)
780{
781 return 0x0010a9f4U + i*8U;
782}
783static inline u32 pwr_pmu_idle_ctrl_supp_r(u32 i)
784{
785 return 0x0010aa30U + i*8U;
786}
787static inline u32 pwr_pmu_debug_r(u32 i)
788{
789 return 0x0010a5c0U + i*4U;
790}
791static inline u32 pwr_pmu_debug__size_1_v(void)
792{
793 return 0x00000004U;
794}
795static inline u32 pwr_pmu_mailbox_r(u32 i)
796{
797 return 0x0010a450U + i*4U;
798}
799static inline u32 pwr_pmu_mailbox__size_1_v(void)
800{
801 return 0x0000000cU;
802}
803static inline u32 pwr_pmu_bar0_addr_r(void)
804{
805 return 0x0010a7a0U;
806}
807static inline u32 pwr_pmu_bar0_data_r(void)
808{
809 return 0x0010a7a4U;
810}
811static inline u32 pwr_pmu_bar0_ctl_r(void)
812{
813 return 0x0010a7acU;
814}
815static inline u32 pwr_pmu_bar0_timeout_r(void)
816{
817 return 0x0010a7a8U;
818}
819static inline u32 pwr_pmu_bar0_fecs_error_r(void)
820{
821 return 0x0010a988U;
822}
823static inline u32 pwr_pmu_bar0_error_status_r(void)
824{
825 return 0x0010a7b0U;
826}
827static inline u32 pwr_pmu_pg_idlefilth_r(u32 i)
828{
829 return 0x0010a6c0U + i*4U;
830}
831static inline u32 pwr_pmu_pg_ppuidlefilth_r(u32 i)
832{
833 return 0x0010a6e8U + i*4U;
834}
835static inline u32 pwr_pmu_pg_idle_cnt_r(u32 i)
836{
837 return 0x0010a710U + i*4U;
838}
839static inline u32 pwr_pmu_pg_intren_r(u32 i)
840{
841 return 0x0010a760U + i*4U;
842}
843static inline u32 pwr_fbif_transcfg_r(u32 i)
844{
845 return 0x0010ae00U + i*4U;
846}
847static inline u32 pwr_fbif_transcfg_target_local_fb_f(void)
848{
849 return 0x0U;
850}
851static inline u32 pwr_fbif_transcfg_target_coherent_sysmem_f(void)
852{
853 return 0x1U;
854}
855static inline u32 pwr_fbif_transcfg_target_noncoherent_sysmem_f(void)
856{
857 return 0x2U;
858}
859static inline u32 pwr_fbif_transcfg_mem_type_s(void)
860{
861 return 1U;
862}
863static inline u32 pwr_fbif_transcfg_mem_type_f(u32 v)
864{
865 return (v & 0x1U) << 2U;
866}
867static inline u32 pwr_fbif_transcfg_mem_type_m(void)
868{
869 return 0x1U << 2U;
870}
871static inline u32 pwr_fbif_transcfg_mem_type_v(u32 r)
872{
873 return (r >> 2U) & 0x1U;
874}
875static inline u32 pwr_fbif_transcfg_mem_type_virtual_f(void)
876{
877 return 0x0U;
878}
879static inline u32 pwr_fbif_transcfg_mem_type_physical_f(void)
880{
881 return 0x4U;
882}
883#endif
diff --git a/include/nvgpu/hw/gp10b/hw_ram_gp10b.h b/include/nvgpu/hw/gp10b/hw_ram_gp10b.h
deleted file mode 100644
index cc83f52..0000000
--- a/include/nvgpu/hw/gp10b/hw_ram_gp10b.h
+++ /dev/null
@@ -1,519 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ram_gp10b_h_
57#define _hw_ram_gp10b_h_
58
59static inline u32 ram_in_ramfc_s(void)
60{
61 return 4096U;
62}
63static inline u32 ram_in_ramfc_w(void)
64{
65 return 0U;
66}
67static inline u32 ram_in_page_dir_base_target_f(u32 v)
68{
69 return (v & 0x3U) << 0U;
70}
71static inline u32 ram_in_page_dir_base_target_w(void)
72{
73 return 128U;
74}
75static inline u32 ram_in_page_dir_base_target_vid_mem_f(void)
76{
77 return 0x0U;
78}
79static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void)
80{
81 return 0x2U;
82}
83static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void)
84{
85 return 0x3U;
86}
87static inline u32 ram_in_page_dir_base_vol_w(void)
88{
89 return 128U;
90}
91static inline u32 ram_in_page_dir_base_vol_true_f(void)
92{
93 return 0x4U;
94}
95static inline u32 ram_in_page_dir_base_fault_replay_tex_f(u32 v)
96{
97 return (v & 0x1U) << 4U;
98}
99static inline u32 ram_in_page_dir_base_fault_replay_tex_m(void)
100{
101 return 0x1U << 4U;
102}
103static inline u32 ram_in_page_dir_base_fault_replay_tex_w(void)
104{
105 return 128U;
106}
107static inline u32 ram_in_page_dir_base_fault_replay_tex_true_f(void)
108{
109 return 0x10U;
110}
111static inline u32 ram_in_page_dir_base_fault_replay_gcc_f(u32 v)
112{
113 return (v & 0x1U) << 5U;
114}
115static inline u32 ram_in_page_dir_base_fault_replay_gcc_m(void)
116{
117 return 0x1U << 5U;
118}
119static inline u32 ram_in_page_dir_base_fault_replay_gcc_w(void)
120{
121 return 128U;
122}
123static inline u32 ram_in_page_dir_base_fault_replay_gcc_true_f(void)
124{
125 return 0x20U;
126}
127static inline u32 ram_in_use_ver2_pt_format_f(u32 v)
128{
129 return (v & 0x1U) << 10U;
130}
131static inline u32 ram_in_use_ver2_pt_format_m(void)
132{
133 return 0x1U << 10U;
134}
135static inline u32 ram_in_use_ver2_pt_format_w(void)
136{
137 return 128U;
138}
139static inline u32 ram_in_use_ver2_pt_format_true_f(void)
140{
141 return 0x400U;
142}
143static inline u32 ram_in_use_ver2_pt_format_false_f(void)
144{
145 return 0x0U;
146}
147static inline u32 ram_in_big_page_size_f(u32 v)
148{
149 return (v & 0x1U) << 11U;
150}
151static inline u32 ram_in_big_page_size_m(void)
152{
153 return 0x1U << 11U;
154}
155static inline u32 ram_in_big_page_size_w(void)
156{
157 return 128U;
158}
159static inline u32 ram_in_big_page_size_128kb_f(void)
160{
161 return 0x0U;
162}
163static inline u32 ram_in_big_page_size_64kb_f(void)
164{
165 return 0x800U;
166}
167static inline u32 ram_in_page_dir_base_lo_f(u32 v)
168{
169 return (v & 0xfffffU) << 12U;
170}
171static inline u32 ram_in_page_dir_base_lo_w(void)
172{
173 return 128U;
174}
175static inline u32 ram_in_page_dir_base_hi_f(u32 v)
176{
177 return (v & 0xffU) << 0U;
178}
179static inline u32 ram_in_page_dir_base_hi_w(void)
180{
181 return 129U;
182}
183static inline u32 ram_in_adr_limit_lo_f(u32 v)
184{
185 return (v & 0xfffffU) << 12U;
186}
187static inline u32 ram_in_adr_limit_lo_w(void)
188{
189 return 130U;
190}
191static inline u32 ram_in_adr_limit_hi_f(u32 v)
192{
193 return (v & 0xffffffffU) << 0U;
194}
195static inline u32 ram_in_adr_limit_hi_w(void)
196{
197 return 131U;
198}
199static inline u32 ram_in_engine_cs_w(void)
200{
201 return 132U;
202}
203static inline u32 ram_in_engine_cs_wfi_v(void)
204{
205 return 0x00000000U;
206}
207static inline u32 ram_in_engine_cs_wfi_f(void)
208{
209 return 0x0U;
210}
211static inline u32 ram_in_engine_cs_fg_v(void)
212{
213 return 0x00000001U;
214}
215static inline u32 ram_in_engine_cs_fg_f(void)
216{
217 return 0x8U;
218}
219static inline u32 ram_in_gr_cs_w(void)
220{
221 return 132U;
222}
223static inline u32 ram_in_gr_cs_wfi_f(void)
224{
225 return 0x0U;
226}
227static inline u32 ram_in_gr_wfi_target_w(void)
228{
229 return 132U;
230}
231static inline u32 ram_in_gr_wfi_mode_w(void)
232{
233 return 132U;
234}
235static inline u32 ram_in_gr_wfi_mode_physical_v(void)
236{
237 return 0x00000000U;
238}
239static inline u32 ram_in_gr_wfi_mode_physical_f(void)
240{
241 return 0x0U;
242}
243static inline u32 ram_in_gr_wfi_mode_virtual_v(void)
244{
245 return 0x00000001U;
246}
247static inline u32 ram_in_gr_wfi_mode_virtual_f(void)
248{
249 return 0x4U;
250}
251static inline u32 ram_in_gr_wfi_ptr_lo_f(u32 v)
252{
253 return (v & 0xfffffU) << 12U;
254}
255static inline u32 ram_in_gr_wfi_ptr_lo_w(void)
256{
257 return 132U;
258}
259static inline u32 ram_in_gr_wfi_ptr_hi_f(u32 v)
260{
261 return (v & 0xffU) << 0U;
262}
263static inline u32 ram_in_gr_wfi_ptr_hi_w(void)
264{
265 return 133U;
266}
267static inline u32 ram_in_base_shift_v(void)
268{
269 return 0x0000000cU;
270}
271static inline u32 ram_in_alloc_size_v(void)
272{
273 return 0x00001000U;
274}
275static inline u32 ram_fc_size_val_v(void)
276{
277 return 0x00000200U;
278}
279static inline u32 ram_fc_gp_put_w(void)
280{
281 return 0U;
282}
283static inline u32 ram_fc_userd_w(void)
284{
285 return 2U;
286}
287static inline u32 ram_fc_userd_hi_w(void)
288{
289 return 3U;
290}
291static inline u32 ram_fc_signature_w(void)
292{
293 return 4U;
294}
295static inline u32 ram_fc_gp_get_w(void)
296{
297 return 5U;
298}
299static inline u32 ram_fc_pb_get_w(void)
300{
301 return 6U;
302}
303static inline u32 ram_fc_pb_get_hi_w(void)
304{
305 return 7U;
306}
307static inline u32 ram_fc_pb_top_level_get_w(void)
308{
309 return 8U;
310}
311static inline u32 ram_fc_pb_top_level_get_hi_w(void)
312{
313 return 9U;
314}
315static inline u32 ram_fc_acquire_w(void)
316{
317 return 12U;
318}
319static inline u32 ram_fc_semaphorea_w(void)
320{
321 return 14U;
322}
323static inline u32 ram_fc_semaphoreb_w(void)
324{
325 return 15U;
326}
327static inline u32 ram_fc_semaphorec_w(void)
328{
329 return 16U;
330}
331static inline u32 ram_fc_semaphored_w(void)
332{
333 return 17U;
334}
335static inline u32 ram_fc_gp_base_w(void)
336{
337 return 18U;
338}
339static inline u32 ram_fc_gp_base_hi_w(void)
340{
341 return 19U;
342}
343static inline u32 ram_fc_gp_fetch_w(void)
344{
345 return 20U;
346}
347static inline u32 ram_fc_pb_fetch_w(void)
348{
349 return 21U;
350}
351static inline u32 ram_fc_pb_fetch_hi_w(void)
352{
353 return 22U;
354}
355static inline u32 ram_fc_pb_put_w(void)
356{
357 return 23U;
358}
359static inline u32 ram_fc_pb_put_hi_w(void)
360{
361 return 24U;
362}
363static inline u32 ram_fc_pb_header_w(void)
364{
365 return 33U;
366}
367static inline u32 ram_fc_pb_count_w(void)
368{
369 return 34U;
370}
371static inline u32 ram_fc_subdevice_w(void)
372{
373 return 37U;
374}
375static inline u32 ram_fc_formats_w(void)
376{
377 return 39U;
378}
379static inline u32 ram_fc_allowed_syncpoints_w(void)
380{
381 return 58U;
382}
383static inline u32 ram_fc_syncpointa_w(void)
384{
385 return 41U;
386}
387static inline u32 ram_fc_syncpointb_w(void)
388{
389 return 42U;
390}
391static inline u32 ram_fc_target_w(void)
392{
393 return 43U;
394}
395static inline u32 ram_fc_hce_ctrl_w(void)
396{
397 return 57U;
398}
399static inline u32 ram_fc_chid_w(void)
400{
401 return 58U;
402}
403static inline u32 ram_fc_chid_id_f(u32 v)
404{
405 return (v & 0xfffU) << 0U;
406}
407static inline u32 ram_fc_chid_id_w(void)
408{
409 return 0U;
410}
411static inline u32 ram_fc_config_w(void)
412{
413 return 61U;
414}
415static inline u32 ram_fc_runlist_timeslice_w(void)
416{
417 return 62U;
418}
419static inline u32 ram_userd_base_shift_v(void)
420{
421 return 0x00000009U;
422}
423static inline u32 ram_userd_chan_size_v(void)
424{
425 return 0x00000200U;
426}
427static inline u32 ram_userd_put_w(void)
428{
429 return 16U;
430}
431static inline u32 ram_userd_get_w(void)
432{
433 return 17U;
434}
435static inline u32 ram_userd_ref_w(void)
436{
437 return 18U;
438}
439static inline u32 ram_userd_put_hi_w(void)
440{
441 return 19U;
442}
443static inline u32 ram_userd_ref_threshold_w(void)
444{
445 return 20U;
446}
447static inline u32 ram_userd_top_level_get_w(void)
448{
449 return 22U;
450}
451static inline u32 ram_userd_top_level_get_hi_w(void)
452{
453 return 23U;
454}
455static inline u32 ram_userd_get_hi_w(void)
456{
457 return 24U;
458}
459static inline u32 ram_userd_gp_get_w(void)
460{
461 return 34U;
462}
463static inline u32 ram_userd_gp_put_w(void)
464{
465 return 35U;
466}
467static inline u32 ram_userd_gp_top_level_get_w(void)
468{
469 return 22U;
470}
471static inline u32 ram_userd_gp_top_level_get_hi_w(void)
472{
473 return 23U;
474}
475static inline u32 ram_rl_entry_size_v(void)
476{
477 return 0x00000008U;
478}
479static inline u32 ram_rl_entry_chid_f(u32 v)
480{
481 return (v & 0xfffU) << 0U;
482}
483static inline u32 ram_rl_entry_id_f(u32 v)
484{
485 return (v & 0xfffU) << 0U;
486}
487static inline u32 ram_rl_entry_type_f(u32 v)
488{
489 return (v & 0x1U) << 13U;
490}
491static inline u32 ram_rl_entry_type_chid_f(void)
492{
493 return 0x0U;
494}
495static inline u32 ram_rl_entry_type_tsg_f(void)
496{
497 return 0x2000U;
498}
499static inline u32 ram_rl_entry_timeslice_scale_f(u32 v)
500{
501 return (v & 0xfU) << 14U;
502}
503static inline u32 ram_rl_entry_timeslice_scale_3_f(void)
504{
505 return 0xc000U;
506}
507static inline u32 ram_rl_entry_timeslice_timeout_f(u32 v)
508{
509 return (v & 0xffU) << 18U;
510}
511static inline u32 ram_rl_entry_timeslice_timeout_128_f(void)
512{
513 return 0x2000000U;
514}
515static inline u32 ram_rl_entry_tsg_length_f(u32 v)
516{
517 return (v & 0x3fU) << 26U;
518}
519#endif
diff --git a/include/nvgpu/hw/gp10b/hw_therm_gp10b.h b/include/nvgpu/hw/gp10b/hw_therm_gp10b.h
deleted file mode 100644
index 49fb718..0000000
--- a/include/nvgpu/hw/gp10b/hw_therm_gp10b.h
+++ /dev/null
@@ -1,415 +0,0 @@
1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_therm_gp10b_h_
57#define _hw_therm_gp10b_h_
58
59static inline u32 therm_use_a_r(void)
60{
61 return 0x00020798U;
62}
63static inline u32 therm_use_a_ext_therm_0_enable_f(void)
64{
65 return 0x1U;
66}
67static inline u32 therm_use_a_ext_therm_1_enable_f(void)
68{
69 return 0x2U;
70}
71static inline u32 therm_use_a_ext_therm_2_enable_f(void)
72{
73 return 0x4U;
74}
75static inline u32 therm_evt_ext_therm_0_r(void)
76{
77 return 0x00020700U;
78}
79static inline u32 therm_evt_ext_therm_0_slow_factor_f(u32 v)
80{
81 return (v & 0x3fU) << 24U;
82}
83static inline u32 therm_evt_ext_therm_0_slow_factor_init_v(void)
84{
85 return 0x00000001U;
86}
87static inline u32 therm_evt_ext_therm_0_mode_f(u32 v)
88{
89 return (v & 0x3U) << 30U;
90}
91static inline u32 therm_evt_ext_therm_0_mode_normal_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 therm_evt_ext_therm_0_mode_inverted_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 therm_evt_ext_therm_0_mode_forced_v(void)
100{
101 return 0x00000002U;
102}
103static inline u32 therm_evt_ext_therm_0_mode_cleared_v(void)
104{
105 return 0x00000003U;
106}
107static inline u32 therm_evt_ext_therm_1_r(void)
108{
109 return 0x00020704U;
110}
111static inline u32 therm_evt_ext_therm_1_slow_factor_f(u32 v)
112{
113 return (v & 0x3fU) << 24U;
114}
115static inline u32 therm_evt_ext_therm_1_slow_factor_init_v(void)
116{
117 return 0x00000002U;
118}
119static inline u32 therm_evt_ext_therm_1_mode_f(u32 v)
120{
121 return (v & 0x3U) << 30U;
122}
123static inline u32 therm_evt_ext_therm_1_mode_normal_v(void)
124{
125 return 0x00000000U;
126}
127static inline u32 therm_evt_ext_therm_1_mode_inverted_v(void)
128{
129 return 0x00000001U;
130}
131static inline u32 therm_evt_ext_therm_1_mode_forced_v(void)
132{
133 return 0x00000002U;
134}
135static inline u32 therm_evt_ext_therm_1_mode_cleared_v(void)
136{
137 return 0x00000003U;
138}
139static inline u32 therm_evt_ext_therm_2_r(void)
140{
141 return 0x00020708U;
142}
143static inline u32 therm_evt_ext_therm_2_slow_factor_f(u32 v)
144{
145 return (v & 0x3fU) << 24U;
146}
147static inline u32 therm_evt_ext_therm_2_slow_factor_init_v(void)
148{
149 return 0x00000003U;
150}
151static inline u32 therm_evt_ext_therm_2_mode_f(u32 v)
152{
153 return (v & 0x3U) << 30U;
154}
155static inline u32 therm_evt_ext_therm_2_mode_normal_v(void)
156{
157 return 0x00000000U;
158}
159static inline u32 therm_evt_ext_therm_2_mode_inverted_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 therm_evt_ext_therm_2_mode_forced_v(void)
164{
165 return 0x00000002U;
166}
167static inline u32 therm_evt_ext_therm_2_mode_cleared_v(void)
168{
169 return 0x00000003U;
170}
171static inline u32 therm_weight_1_r(void)
172{
173 return 0x00020024U;
174}
175static inline u32 therm_config1_r(void)
176{
177 return 0x00020050U;
178}
179static inline u32 therm_config2_r(void)
180{
181 return 0x00020130U;
182}
183static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
184{
185 return (v & 0x1U) << 24U;
186}
187static inline u32 therm_config2_grad_enable_f(u32 v)
188{
189 return (v & 0x1U) << 31U;
190}
191static inline u32 therm_gate_ctrl_r(u32 i)
192{
193 return 0x00020200U + i*4U;
194}
195static inline u32 therm_gate_ctrl_eng_clk_m(void)
196{
197 return 0x3U << 0U;
198}
199static inline u32 therm_gate_ctrl_eng_clk_run_f(void)
200{
201 return 0x0U;
202}
203static inline u32 therm_gate_ctrl_eng_clk_auto_f(void)
204{
205 return 0x1U;
206}
207static inline u32 therm_gate_ctrl_eng_clk_stop_f(void)
208{
209 return 0x2U;
210}
211static inline u32 therm_gate_ctrl_blk_clk_m(void)
212{
213 return 0x3U << 2U;
214}
215static inline u32 therm_gate_ctrl_blk_clk_run_f(void)
216{
217 return 0x0U;
218}
219static inline u32 therm_gate_ctrl_blk_clk_auto_f(void)
220{
221 return 0x4U;
222}
223static inline u32 therm_gate_ctrl_eng_pwr_m(void)
224{
225 return 0x3U << 4U;
226}
227static inline u32 therm_gate_ctrl_eng_pwr_auto_f(void)
228{
229 return 0x10U;
230}
231static inline u32 therm_gate_ctrl_eng_pwr_off_v(void)
232{
233 return 0x00000002U;
234}
235static inline u32 therm_gate_ctrl_eng_pwr_off_f(void)
236{
237 return 0x20U;
238}
239static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v)
240{
241 return (v & 0x1fU) << 8U;
242}
243static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void)
244{
245 return 0x1fU << 8U;
246}
247static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v)
248{
249 return (v & 0x7U) << 13U;
250}
251static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
252{
253 return 0x7U << 13U;
254}
255static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
256{
257 return (v & 0xfU) << 16U;
258}
259static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
260{
261 return 0xfU << 16U;
262}
263static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
264{
265 return (v & 0xfU) << 20U;
266}
267static inline u32 therm_gate_ctrl_eng_delay_after_m(void)
268{
269 return 0xfU << 20U;
270}
271static inline u32 therm_fecs_idle_filter_r(void)
272{
273 return 0x00020288U;
274}
275static inline u32 therm_fecs_idle_filter_value_m(void)
276{
277 return 0xffffffffU << 0U;
278}
279static inline u32 therm_hubmmu_idle_filter_r(void)
280{
281 return 0x0002028cU;
282}
283static inline u32 therm_hubmmu_idle_filter_value_m(void)
284{
285 return 0xffffffffU << 0U;
286}
287static inline u32 therm_clk_slowdown_r(u32 i)
288{
289 return 0x00020160U + i*4U;
290}
291static inline u32 therm_clk_slowdown_idle_factor_f(u32 v)
292{
293 return (v & 0x3fU) << 16U;
294}
295static inline u32 therm_clk_slowdown_idle_factor_m(void)
296{
297 return 0x3fU << 16U;
298}
299static inline u32 therm_clk_slowdown_idle_factor_v(u32 r)
300{
301 return (r >> 16U) & 0x3fU;
302}
303static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void)
304{
305 return 0x0U;
306}
307static inline u32 therm_grad_stepping_table_r(u32 i)
308{
309 return 0x000202c8U + i*4U;
310}
311static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
312{
313 return (v & 0x3fU) << 0U;
314}
315static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
316{
317 return 0x3fU << 0U;
318}
319static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
320{
321 return 0x1U;
322}
323static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
324{
325 return 0x2U;
326}
327static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
328{
329 return 0x6U;
330}
331static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
332{
333 return 0xeU;
334}
335static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
336{
337 return (v & 0x3fU) << 6U;
338}
339static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
340{
341 return 0x3fU << 6U;
342}
343static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
344{
345 return (v & 0x3fU) << 12U;
346}
347static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
348{
349 return 0x3fU << 12U;
350}
351static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
352{
353 return (v & 0x3fU) << 18U;
354}
355static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
356{
357 return 0x3fU << 18U;
358}
359static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
360{
361 return (v & 0x3fU) << 24U;
362}
363static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
364{
365 return 0x3fU << 24U;
366}
367static inline u32 therm_grad_stepping0_r(void)
368{
369 return 0x000202c0U;
370}
371static inline u32 therm_grad_stepping0_feature_s(void)
372{
373 return 1U;
374}
375static inline u32 therm_grad_stepping0_feature_f(u32 v)
376{
377 return (v & 0x1U) << 0U;
378}
379static inline u32 therm_grad_stepping0_feature_m(void)
380{
381 return 0x1U << 0U;
382}
383static inline u32 therm_grad_stepping0_feature_v(u32 r)
384{
385 return (r >> 0U) & 0x1U;
386}
387static inline u32 therm_grad_stepping0_feature_enable_f(void)
388{
389 return 0x1U;
390}
391static inline u32 therm_grad_stepping1_r(void)
392{
393 return 0x000202c4U;
394}
395static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
396{
397 return (v & 0x1ffffU) << 0U;
398}
399static inline u32 therm_clk_timing_r(u32 i)
400{
401 return 0x000203c0U + i*4U;
402}
403static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
404{
405 return (v & 0x1U) << 16U;
406}
407static inline u32 therm_clk_timing_grad_slowdown_m(void)
408{
409 return 0x1U << 16U;
410}
411static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
412{
413 return 0x10000U;
414}
415#endif
diff --git a/include/nvgpu/hw/gp10b/hw_timer_gp10b.h b/include/nvgpu/hw/gp10b/hw_timer_gp10b.h
deleted file mode 100644
index 54facfc..0000000
--- a/include/nvgpu/hw/gp10b/hw_timer_gp10b.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_timer_gp10b_h_
57#define _hw_timer_gp10b_h_
58
59static inline u32 timer_pri_timeout_r(void)
60{
61 return 0x00009080U;
62}
63static inline u32 timer_pri_timeout_period_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 timer_pri_timeout_period_m(void)
68{
69 return 0xffffffU << 0U;
70}
71static inline u32 timer_pri_timeout_period_v(u32 r)
72{
73 return (r >> 0U) & 0xffffffU;
74}
75static inline u32 timer_pri_timeout_en_f(u32 v)
76{
77 return (v & 0x1U) << 31U;
78}
79static inline u32 timer_pri_timeout_en_m(void)
80{
81 return 0x1U << 31U;
82}
83static inline u32 timer_pri_timeout_en_v(u32 r)
84{
85 return (r >> 31U) & 0x1U;
86}
87static inline u32 timer_pri_timeout_en_en_enabled_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 timer_pri_timeout_en_en_disabled_f(void)
92{
93 return 0x0U;
94}
95static inline u32 timer_pri_timeout_save_0_r(void)
96{
97 return 0x00009084U;
98}
99static inline u32 timer_pri_timeout_save_0_fecs_tgt_v(u32 r)
100{
101 return (r >> 31U) & 0x1U;
102}
103static inline u32 timer_pri_timeout_save_0_addr_v(u32 r)
104{
105 return (r >> 2U) & 0x3fffffU;
106}
107static inline u32 timer_pri_timeout_save_0_write_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 timer_pri_timeout_save_1_r(void)
112{
113 return 0x00009088U;
114}
115static inline u32 timer_pri_timeout_fecs_errcode_r(void)
116{
117 return 0x0000908cU;
118}
119static inline u32 timer_time_0_r(void)
120{
121 return 0x00009400U;
122}
123static inline u32 timer_time_1_r(void)
124{
125 return 0x00009410U;
126}
127#endif
diff --git a/include/nvgpu/hw/gp10b/hw_top_gp10b.h b/include/nvgpu/hw/gp10b/hw_top_gp10b.h
deleted file mode 100644
index a7b7c2b..0000000
--- a/include/nvgpu/hw/gp10b/hw_top_gp10b.h
+++ /dev/null
@@ -1,231 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_top_gp10b_h_
57#define _hw_top_gp10b_h_
58
59static inline u32 top_num_gpcs_r(void)
60{
61 return 0x00022430U;
62}
63static inline u32 top_num_gpcs_value_v(u32 r)
64{
65 return (r >> 0U) & 0x1fU;
66}
67static inline u32 top_tpc_per_gpc_r(void)
68{
69 return 0x00022434U;
70}
71static inline u32 top_tpc_per_gpc_value_v(u32 r)
72{
73 return (r >> 0U) & 0x1fU;
74}
75static inline u32 top_num_fbps_r(void)
76{
77 return 0x00022438U;
78}
79static inline u32 top_num_fbps_value_v(u32 r)
80{
81 return (r >> 0U) & 0x1fU;
82}
83static inline u32 top_ltc_per_fbp_r(void)
84{
85 return 0x00022450U;
86}
87static inline u32 top_ltc_per_fbp_value_v(u32 r)
88{
89 return (r >> 0U) & 0x1fU;
90}
91static inline u32 top_slices_per_ltc_r(void)
92{
93 return 0x0002245cU;
94}
95static inline u32 top_slices_per_ltc_value_v(u32 r)
96{
97 return (r >> 0U) & 0x1fU;
98}
99static inline u32 top_num_ltcs_r(void)
100{
101 return 0x00022454U;
102}
103static inline u32 top_device_info_r(u32 i)
104{
105 return 0x00022700U + i*4U;
106}
107static inline u32 top_device_info__size_1_v(void)
108{
109 return 0x00000040U;
110}
111static inline u32 top_device_info_chain_v(u32 r)
112{
113 return (r >> 31U) & 0x1U;
114}
115static inline u32 top_device_info_chain_enable_v(void)
116{
117 return 0x00000001U;
118}
119static inline u32 top_device_info_engine_enum_v(u32 r)
120{
121 return (r >> 26U) & 0xfU;
122}
123static inline u32 top_device_info_runlist_enum_v(u32 r)
124{
125 return (r >> 21U) & 0xfU;
126}
127static inline u32 top_device_info_intr_enum_v(u32 r)
128{
129 return (r >> 15U) & 0x1fU;
130}
131static inline u32 top_device_info_reset_enum_v(u32 r)
132{
133 return (r >> 9U) & 0x1fU;
134}
135static inline u32 top_device_info_type_enum_v(u32 r)
136{
137 return (r >> 2U) & 0x1fffffffU;
138}
139static inline u32 top_device_info_type_enum_graphics_v(void)
140{
141 return 0x00000000U;
142}
143static inline u32 top_device_info_type_enum_graphics_f(void)
144{
145 return 0x0U;
146}
147static inline u32 top_device_info_type_enum_copy2_v(void)
148{
149 return 0x00000003U;
150}
151static inline u32 top_device_info_type_enum_copy2_f(void)
152{
153 return 0xcU;
154}
155static inline u32 top_device_info_type_enum_lce_v(void)
156{
157 return 0x00000013U;
158}
159static inline u32 top_device_info_type_enum_lce_f(void)
160{
161 return 0x4cU;
162}
163static inline u32 top_device_info_engine_v(u32 r)
164{
165 return (r >> 5U) & 0x1U;
166}
167static inline u32 top_device_info_runlist_v(u32 r)
168{
169 return (r >> 4U) & 0x1U;
170}
171static inline u32 top_device_info_intr_v(u32 r)
172{
173 return (r >> 3U) & 0x1U;
174}
175static inline u32 top_device_info_reset_v(u32 r)
176{
177 return (r >> 2U) & 0x1U;
178}
179static inline u32 top_device_info_entry_v(u32 r)
180{
181 return (r >> 0U) & 0x3U;
182}
183static inline u32 top_device_info_entry_not_valid_v(void)
184{
185 return 0x00000000U;
186}
187static inline u32 top_device_info_entry_enum_v(void)
188{
189 return 0x00000002U;
190}
191static inline u32 top_device_info_entry_engine_type_v(void)
192{
193 return 0x00000003U;
194}
195static inline u32 top_device_info_entry_data_v(void)
196{
197 return 0x00000001U;
198}
199static inline u32 top_device_info_data_type_v(u32 r)
200{
201 return (r >> 30U) & 0x1U;
202}
203static inline u32 top_device_info_data_type_enum2_v(void)
204{
205 return 0x00000000U;
206}
207static inline u32 top_device_info_data_inst_id_v(u32 r)
208{
209 return (r >> 26U) & 0xfU;
210}
211static inline u32 top_device_info_data_pri_base_v(u32 r)
212{
213 return (r >> 12U) & 0xfffU;
214}
215static inline u32 top_device_info_data_pri_base_align_v(void)
216{
217 return 0x0000000cU;
218}
219static inline u32 top_device_info_data_fault_id_enum_v(u32 r)
220{
221 return (r >> 3U) & 0x1fU;
222}
223static inline u32 top_device_info_data_fault_id_v(u32 r)
224{
225 return (r >> 2U) & 0x1U;
226}
227static inline u32 top_device_info_data_fault_id_valid_v(void)
228{
229 return 0x00000001U;
230}
231#endif
diff --git a/include/nvgpu/hw/gv100/hw_bus_gv100.h b/include/nvgpu/hw/gv100/hw_bus_gv100.h
deleted file mode 100644
index 7771f1e..0000000
--- a/include/nvgpu/hw/gv100/hw_bus_gv100.h
+++ /dev/null
@@ -1,227 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_bus_gv100_h_
57#define _hw_bus_gv100_h_
58
59static inline u32 bus_sw_scratch_r(u32 i)
60{
61 return 0x00001580U + i*4U;
62}
63static inline u32 bus_bar0_window_r(void)
64{
65 return 0x00001700U;
66}
67static inline u32 bus_bar0_window_base_f(u32 v)
68{
69 return (v & 0xffffffU) << 0U;
70}
71static inline u32 bus_bar0_window_target_vid_mem_f(void)
72{
73 return 0x0U;
74}
75static inline u32 bus_bar0_window_target_sys_mem_coherent_f(void)
76{
77 return 0x2000000U;
78}
79static inline u32 bus_bar0_window_target_sys_mem_noncoherent_f(void)
80{
81 return 0x3000000U;
82}
83static inline u32 bus_bar0_window_target_bar0_window_base_shift_v(void)
84{
85 return 0x00000010U;
86}
87static inline u32 bus_bar1_block_r(void)
88{
89 return 0x00001704U;
90}
91static inline u32 bus_bar1_block_ptr_f(u32 v)
92{
93 return (v & 0xfffffffU) << 0U;
94}
95static inline u32 bus_bar1_block_target_vid_mem_f(void)
96{
97 return 0x0U;
98}
99static inline u32 bus_bar1_block_target_sys_mem_coh_f(void)
100{
101 return 0x20000000U;
102}
103static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void)
104{
105 return 0x30000000U;
106}
107static inline u32 bus_bar1_block_mode_virtual_f(void)
108{
109 return 0x80000000U;
110}
111static inline u32 bus_bar2_block_r(void)
112{
113 return 0x00001714U;
114}
115static inline u32 bus_bar2_block_ptr_f(u32 v)
116{
117 return (v & 0xfffffffU) << 0U;
118}
119static inline u32 bus_bar2_block_target_vid_mem_f(void)
120{
121 return 0x0U;
122}
123static inline u32 bus_bar2_block_target_sys_mem_coh_f(void)
124{
125 return 0x20000000U;
126}
127static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void)
128{
129 return 0x30000000U;
130}
131static inline u32 bus_bar2_block_mode_virtual_f(void)
132{
133 return 0x80000000U;
134}
135static inline u32 bus_bar1_block_ptr_shift_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 bus_bar2_block_ptr_shift_v(void)
140{
141 return 0x0000000cU;
142}
143static inline u32 bus_bind_status_r(void)
144{
145 return 0x00001710U;
146}
147static inline u32 bus_bind_status_bar1_pending_v(u32 r)
148{
149 return (r >> 0U) & 0x1U;
150}
151static inline u32 bus_bind_status_bar1_pending_empty_f(void)
152{
153 return 0x0U;
154}
155static inline u32 bus_bind_status_bar1_pending_busy_f(void)
156{
157 return 0x1U;
158}
159static inline u32 bus_bind_status_bar1_outstanding_v(u32 r)
160{
161 return (r >> 1U) & 0x1U;
162}
163static inline u32 bus_bind_status_bar1_outstanding_false_f(void)
164{
165 return 0x0U;
166}
167static inline u32 bus_bind_status_bar1_outstanding_true_f(void)
168{
169 return 0x2U;
170}
171static inline u32 bus_bind_status_bar2_pending_v(u32 r)
172{
173 return (r >> 2U) & 0x1U;
174}
175static inline u32 bus_bind_status_bar2_pending_empty_f(void)
176{
177 return 0x0U;
178}
179static inline u32 bus_bind_status_bar2_pending_busy_f(void)
180{
181 return 0x4U;
182}
183static inline u32 bus_bind_status_bar2_outstanding_v(u32 r)
184{
185 return (r >> 3U) & 0x1U;
186}
187static inline u32 bus_bind_status_bar2_outstanding_false_f(void)
188{
189 return 0x0U;
190}
191static inline u32 bus_bind_status_bar2_outstanding_true_f(void)
192{
193 return 0x8U;
194}
195static inline u32 bus_intr_0_r(void)
196{
197 return 0x00001100U;
198}
199static inline u32 bus_intr_0_pri_squash_m(void)
200{
201 return 0x1U << 1U;
202}
203static inline u32 bus_intr_0_pri_fecserr_m(void)
204{
205 return 0x1U << 2U;
206}
207static inline u32 bus_intr_0_pri_timeout_m(void)
208{
209 return 0x1U << 3U;
210}
211static inline u32 bus_intr_en_0_r(void)
212{
213 return 0x00001140U;
214}
215static inline u32 bus_intr_en_0_pri_squash_m(void)
216{
217 return 0x1U << 1U;
218}
219static inline u32 bus_intr_en_0_pri_fecserr_m(void)
220{
221 return 0x1U << 2U;
222}
223static inline u32 bus_intr_en_0_pri_timeout_m(void)
224{
225 return 0x1U << 3U;
226}
227#endif
diff --git a/include/nvgpu/hw/gv100/hw_ccsr_gv100.h b/include/nvgpu/hw/gv100/hw_ccsr_gv100.h
deleted file mode 100644
index b147803..0000000
--- a/include/nvgpu/hw/gv100/hw_ccsr_gv100.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ccsr_gv100_h_
57#define _hw_ccsr_gv100_h_
58
59static inline u32 ccsr_channel_inst_r(u32 i)
60{
61 return 0x00800000U + i*8U;
62}
63static inline u32 ccsr_channel_inst__size_1_v(void)
64{
65 return 0x00001000U;
66}
67static inline u32 ccsr_channel_inst_ptr_f(u32 v)
68{
69 return (v & 0xfffffffU) << 0U;
70}
71static inline u32 ccsr_channel_inst_target_vid_mem_f(void)
72{
73 return 0x0U;
74}
75static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void)
76{
77 return 0x20000000U;
78}
79static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void)
80{
81 return 0x30000000U;
82}
83static inline u32 ccsr_channel_inst_bind_false_f(void)
84{
85 return 0x0U;
86}
87static inline u32 ccsr_channel_inst_bind_true_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 ccsr_channel_r(u32 i)
92{
93 return 0x00800004U + i*8U;
94}
95static inline u32 ccsr_channel__size_1_v(void)
96{
97 return 0x00001000U;
98}
99static inline u32 ccsr_channel_enable_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 ccsr_channel_enable_set_f(u32 v)
104{
105 return (v & 0x1U) << 10U;
106}
107static inline u32 ccsr_channel_enable_set_true_f(void)
108{
109 return 0x400U;
110}
111static inline u32 ccsr_channel_enable_clr_true_f(void)
112{
113 return 0x800U;
114}
115static inline u32 ccsr_channel_status_v(u32 r)
116{
117 return (r >> 24U) & 0xfU;
118}
119static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
120{
121 return 0x00000002U;
122}
123static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
124{
125 return 0x00000004U;
126}
127static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
128{
129 return 0x0000000aU;
130}
131static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
132{
133 return 0x0000000bU;
134}
135static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
140{
141 return 0x0000000dU;
142}
143static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
144{
145 return 0x0000000eU;
146}
147static inline u32 ccsr_channel_next_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 ccsr_channel_next_true_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 ccsr_channel_force_ctx_reload_true_f(void)
156{
157 return 0x100U;
158}
159static inline u32 ccsr_channel_pbdma_faulted_f(u32 v)
160{
161 return (v & 0x1U) << 22U;
162}
163static inline u32 ccsr_channel_pbdma_faulted_reset_f(void)
164{
165 return 0x400000U;
166}
167static inline u32 ccsr_channel_eng_faulted_f(u32 v)
168{
169 return (v & 0x1U) << 23U;
170}
171static inline u32 ccsr_channel_eng_faulted_v(u32 r)
172{
173 return (r >> 23U) & 0x1U;
174}
175static inline u32 ccsr_channel_eng_faulted_reset_f(void)
176{
177 return 0x800000U;
178}
179static inline u32 ccsr_channel_eng_faulted_true_v(void)
180{
181 return 0x00000001U;
182}
183static inline u32 ccsr_channel_busy_v(u32 r)
184{
185 return (r >> 28U) & 0x1U;
186}
187#endif
diff --git a/include/nvgpu/hw/gv100/hw_ce_gv100.h b/include/nvgpu/hw/gv100/hw_ce_gv100.h
deleted file mode 100644
index 18b5fc6..0000000
--- a/include/nvgpu/hw/gv100/hw_ce_gv100.h
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ce_gv100_h_
57#define _hw_ce_gv100_h_
58
59static inline u32 ce_intr_status_r(u32 i)
60{
61 return 0x00104410U + i*128U;
62}
63static inline u32 ce_intr_status_blockpipe_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 ce_intr_status_blockpipe_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 ce_intr_status_nonblockpipe_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 ce_intr_status_nonblockpipe_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 ce_intr_status_launcherr_pending_f(void)
80{
81 return 0x4U;
82}
83static inline u32 ce_intr_status_launcherr_reset_f(void)
84{
85 return 0x4U;
86}
87static inline u32 ce_intr_status_invalid_config_pending_f(void)
88{
89 return 0x8U;
90}
91static inline u32 ce_intr_status_invalid_config_reset_f(void)
92{
93 return 0x8U;
94}
95static inline u32 ce_intr_status_mthd_buffer_fault_pending_f(void)
96{
97 return 0x10U;
98}
99static inline u32 ce_intr_status_mthd_buffer_fault_reset_f(void)
100{
101 return 0x10U;
102}
103static inline u32 ce_pce_map_r(void)
104{
105 return 0x00104028U;
106}
107#endif
diff --git a/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h b/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h
deleted file mode 100644
index b7f3df2..0000000
--- a/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h
+++ /dev/null
@@ -1,459 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ctxsw_prog_gv100_h_
57#define _hw_ctxsw_prog_gv100_h_
58
59static inline u32 ctxsw_prog_fecs_header_v(void)
60{
61 return 0x00000100U;
62}
63static inline u32 ctxsw_prog_main_image_num_gpcs_o(void)
64{
65 return 0x00000008U;
66}
67static inline u32 ctxsw_prog_main_image_ctl_o(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 ctxsw_prog_main_image_ctl_type_f(u32 v)
72{
73 return (v & 0x3fU) << 0U;
74}
75static inline u32 ctxsw_prog_main_image_ctl_type_undefined_v(void)
76{
77 return 0x00000000U;
78}
79static inline u32 ctxsw_prog_main_image_ctl_type_opengl_v(void)
80{
81 return 0x00000008U;
82}
83static inline u32 ctxsw_prog_main_image_ctl_type_dx9_v(void)
84{
85 return 0x00000010U;
86}
87static inline u32 ctxsw_prog_main_image_ctl_type_dx10_v(void)
88{
89 return 0x00000011U;
90}
91static inline u32 ctxsw_prog_main_image_ctl_type_dx11_v(void)
92{
93 return 0x00000012U;
94}
95static inline u32 ctxsw_prog_main_image_ctl_type_compute_v(void)
96{
97 return 0x00000020U;
98}
99static inline u32 ctxsw_prog_main_image_ctl_type_per_veid_header_v(void)
100{
101 return 0x00000021U;
102}
103static inline u32 ctxsw_prog_main_image_patch_count_o(void)
104{
105 return 0x00000010U;
106}
107static inline u32 ctxsw_prog_main_image_context_id_o(void)
108{
109 return 0x000000f0U;
110}
111static inline u32 ctxsw_prog_main_image_patch_adr_lo_o(void)
112{
113 return 0x00000014U;
114}
115static inline u32 ctxsw_prog_main_image_patch_adr_hi_o(void)
116{
117 return 0x00000018U;
118}
119static inline u32 ctxsw_prog_main_image_zcull_o(void)
120{
121 return 0x0000001cU;
122}
123static inline u32 ctxsw_prog_main_image_zcull_mode_no_ctxsw_v(void)
124{
125 return 0x00000001U;
126}
127static inline u32 ctxsw_prog_main_image_zcull_mode_separate_buffer_v(void)
128{
129 return 0x00000002U;
130}
131static inline u32 ctxsw_prog_main_image_zcull_ptr_o(void)
132{
133 return 0x00000020U;
134}
135static inline u32 ctxsw_prog_main_image_pm_o(void)
136{
137 return 0x00000028U;
138}
139static inline u32 ctxsw_prog_main_image_pm_mode_m(void)
140{
141 return 0x7U << 0U;
142}
143static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void)
144{
145 return 0x0U;
146}
147static inline u32 ctxsw_prog_main_image_pm_mode_stream_out_ctxsw_f(void)
148{
149 return 0x2U;
150}
151static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void)
152{
153 return 0x7U << 3U;
154}
155static inline u32 ctxsw_prog_main_image_pm_smpc_mode_ctxsw_f(void)
156{
157 return 0x8U;
158}
159static inline u32 ctxsw_prog_main_image_pm_smpc_mode_no_ctxsw_f(void)
160{
161 return 0x0U;
162}
163static inline u32 ctxsw_prog_main_image_pm_ptr_o(void)
164{
165 return 0x0000002cU;
166}
167static inline u32 ctxsw_prog_main_image_num_save_ops_o(void)
168{
169 return 0x000000f4U;
170}
171static inline u32 ctxsw_prog_main_image_num_wfi_save_ops_o(void)
172{
173 return 0x000000d0U;
174}
175static inline u32 ctxsw_prog_main_image_num_cta_save_ops_o(void)
176{
177 return 0x000000d4U;
178}
179static inline u32 ctxsw_prog_main_image_num_gfxp_save_ops_o(void)
180{
181 return 0x000000d8U;
182}
183static inline u32 ctxsw_prog_main_image_num_cilp_save_ops_o(void)
184{
185 return 0x000000dcU;
186}
187static inline u32 ctxsw_prog_main_image_num_restore_ops_o(void)
188{
189 return 0x000000f8U;
190}
191static inline u32 ctxsw_prog_main_image_zcull_ptr_hi_o(void)
192{
193 return 0x00000060U;
194}
195static inline u32 ctxsw_prog_main_image_zcull_ptr_hi_v_f(u32 v)
196{
197 return (v & 0x1ffffU) << 0U;
198}
199static inline u32 ctxsw_prog_main_image_pm_ptr_hi_o(void)
200{
201 return 0x00000094U;
202}
203static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_o(void)
204{
205 return 0x00000064U;
206}
207static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_v_f(u32 v)
208{
209 return (v & 0x1ffffU) << 0U;
210}
211static inline u32 ctxsw_prog_main_image_full_preemption_ptr_o(void)
212{
213 return 0x00000068U;
214}
215static inline u32 ctxsw_prog_main_image_full_preemption_ptr_v_f(u32 v)
216{
217 return (v & 0xffffffffU) << 0U;
218}
219static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_hi_o(void)
220{
221 return 0x00000070U;
222}
223static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_hi_v_f(u32 v)
224{
225 return (v & 0x1ffffU) << 0U;
226}
227static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_o(void)
228{
229 return 0x00000074U;
230}
231static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_v_f(u32 v)
232{
233 return (v & 0xffffffffU) << 0U;
234}
235static inline u32 ctxsw_prog_main_image_context_buffer_ptr_hi_o(void)
236{
237 return 0x00000078U;
238}
239static inline u32 ctxsw_prog_main_image_context_buffer_ptr_hi_v_f(u32 v)
240{
241 return (v & 0x1ffffU) << 0U;
242}
243static inline u32 ctxsw_prog_main_image_context_buffer_ptr_o(void)
244{
245 return 0x0000007cU;
246}
247static inline u32 ctxsw_prog_main_image_context_buffer_ptr_v_f(u32 v)
248{
249 return (v & 0xffffffffU) << 0U;
250}
251static inline u32 ctxsw_prog_main_image_magic_value_o(void)
252{
253 return 0x000000fcU;
254}
255static inline u32 ctxsw_prog_main_image_magic_value_v_value_v(void)
256{
257 return 0x600dc0deU;
258}
259static inline u32 ctxsw_prog_local_priv_register_ctl_o(void)
260{
261 return 0x0000000cU;
262}
263static inline u32 ctxsw_prog_local_priv_register_ctl_offset_v(u32 r)
264{
265 return (r >> 0U) & 0xffffU;
266}
267static inline u32 ctxsw_prog_main_image_global_cb_ptr_o(void)
268{
269 return 0x000000b8U;
270}
271static inline u32 ctxsw_prog_main_image_global_cb_ptr_v_f(u32 v)
272{
273 return (v & 0xffffffffU) << 0U;
274}
275static inline u32 ctxsw_prog_main_image_global_cb_ptr_hi_o(void)
276{
277 return 0x000000bcU;
278}
279static inline u32 ctxsw_prog_main_image_global_cb_ptr_hi_v_f(u32 v)
280{
281 return (v & 0x1ffffU) << 0U;
282}
283static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_o(void)
284{
285 return 0x000000c0U;
286}
287static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_v_f(u32 v)
288{
289 return (v & 0xffffffffU) << 0U;
290}
291static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_hi_o(void)
292{
293 return 0x000000c4U;
294}
295static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_hi_v_f(u32 v)
296{
297 return (v & 0x1ffffU) << 0U;
298}
299static inline u32 ctxsw_prog_main_image_control_block_ptr_o(void)
300{
301 return 0x000000c8U;
302}
303static inline u32 ctxsw_prog_main_image_control_block_ptr_v_f(u32 v)
304{
305 return (v & 0xffffffffU) << 0U;
306}
307static inline u32 ctxsw_prog_main_image_control_block_ptr_hi_o(void)
308{
309 return 0x000000ccU;
310}
311static inline u32 ctxsw_prog_main_image_control_block_ptr_hi_v_f(u32 v)
312{
313 return (v & 0x1ffffU) << 0U;
314}
315static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_lo_o(void)
316{
317 return 0x000000e0U;
318}
319static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_lo_v_f(u32 v)
320{
321 return (v & 0xffffffffU) << 0U;
322}
323static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_hi_o(void)
324{
325 return 0x000000e4U;
326}
327static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_hi_v_f(u32 v)
328{
329 return (v & 0x1ffffU) << 0U;
330}
331static inline u32 ctxsw_prog_local_image_ppc_info_o(void)
332{
333 return 0x000000f4U;
334}
335static inline u32 ctxsw_prog_local_image_ppc_info_num_ppcs_v(u32 r)
336{
337 return (r >> 0U) & 0xffffU;
338}
339static inline u32 ctxsw_prog_local_image_ppc_info_ppc_mask_v(u32 r)
340{
341 return (r >> 16U) & 0xffffU;
342}
343static inline u32 ctxsw_prog_local_image_num_tpcs_o(void)
344{
345 return 0x000000f8U;
346}
347static inline u32 ctxsw_prog_local_magic_value_o(void)
348{
349 return 0x000000fcU;
350}
351static inline u32 ctxsw_prog_local_magic_value_v_value_v(void)
352{
353 return 0xad0becabU;
354}
355static inline u32 ctxsw_prog_main_extended_buffer_ctl_o(void)
356{
357 return 0x000000ecU;
358}
359static inline u32 ctxsw_prog_main_extended_buffer_ctl_offset_v(u32 r)
360{
361 return (r >> 0U) & 0xffffU;
362}
363static inline u32 ctxsw_prog_main_extended_buffer_ctl_size_v(u32 r)
364{
365 return (r >> 16U) & 0xffU;
366}
367static inline u32 ctxsw_prog_extended_buffer_segments_size_in_bytes_v(void)
368{
369 return 0x00000100U;
370}
371static inline u32 ctxsw_prog_extended_marker_size_in_bytes_v(void)
372{
373 return 0x00000004U;
374}
375static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_register_stride_v(void)
376{
377 return 0x00000000U;
378}
379static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_control_register_stride_v(void)
380{
381 return 0x00000002U;
382}
383static inline u32 ctxsw_prog_main_image_priv_access_map_config_o(void)
384{
385 return 0x000000a0U;
386}
387static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_s(void)
388{
389 return 2U;
390}
391static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_f(u32 v)
392{
393 return (v & 0x3U) << 0U;
394}
395static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_m(void)
396{
397 return 0x3U << 0U;
398}
399static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_v(u32 r)
400{
401 return (r >> 0U) & 0x3U;
402}
403static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_allow_all_f(void)
404{
405 return 0x0U;
406}
407static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f(void)
408{
409 return 0x2U;
410}
411static inline u32 ctxsw_prog_main_image_priv_access_map_addr_lo_o(void)
412{
413 return 0x000000a4U;
414}
415static inline u32 ctxsw_prog_main_image_priv_access_map_addr_hi_o(void)
416{
417 return 0x000000a8U;
418}
419static inline u32 ctxsw_prog_main_image_misc_options_o(void)
420{
421 return 0x0000003cU;
422}
423static inline u32 ctxsw_prog_main_image_misc_options_verif_features_m(void)
424{
425 return 0x1U << 3U;
426}
427static inline u32 ctxsw_prog_main_image_misc_options_verif_features_disabled_f(void)
428{
429 return 0x0U;
430}
431static inline u32 ctxsw_prog_main_image_graphics_preemption_options_o(void)
432{
433 return 0x00000080U;
434}
435static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_f(u32 v)
436{
437 return (v & 0x3U) << 0U;
438}
439static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_gfxp_f(void)
440{
441 return 0x1U;
442}
443static inline u32 ctxsw_prog_main_image_compute_preemption_options_o(void)
444{
445 return 0x00000084U;
446}
447static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_f(u32 v)
448{
449 return (v & 0x3U) << 0U;
450}
451static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cta_f(void)
452{
453 return 0x1U;
454}
455static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cilp_f(void)
456{
457 return 0x2U;
458}
459#endif
diff --git a/include/nvgpu/hw/gv100/hw_falcon_gv100.h b/include/nvgpu/hw/gv100/hw_falcon_gv100.h
deleted file mode 100644
index 3492d68..0000000
--- a/include/nvgpu/hw/gv100/hw_falcon_gv100.h
+++ /dev/null
@@ -1,603 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_falcon_gv100_h_
57#define _hw_falcon_gv100_h_
58
59static inline u32 falcon_falcon_irqsset_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 falcon_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 falcon_falcon_irqsclr_r(void)
68{
69 return 0x00000004U;
70}
71static inline u32 falcon_falcon_irqstat_r(void)
72{
73 return 0x00000008U;
74}
75static inline u32 falcon_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 falcon_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 falcon_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 falcon_falcon_irqmode_r(void)
88{
89 return 0x0000000cU;
90}
91static inline u32 falcon_falcon_irqmset_r(void)
92{
93 return 0x00000010U;
94}
95static inline u32 falcon_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 falcon_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 falcon_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 falcon_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 falcon_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 falcon_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 falcon_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 falcon_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 falcon_falcon_irqmclr_r(void)
128{
129 return 0x00000014U;
130}
131static inline u32 falcon_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 falcon_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 falcon_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 falcon_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 falcon_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 falcon_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 falcon_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 falcon_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 falcon_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 falcon_falcon_irqmask_r(void)
168{
169 return 0x00000018U;
170}
171static inline u32 falcon_falcon_irqdest_r(void)
172{
173 return 0x0000001cU;
174}
175static inline u32 falcon_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 falcon_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 falcon_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 falcon_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 falcon_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 falcon_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 falcon_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 falcon_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 falcon_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 falcon_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 falcon_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 falcon_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 falcon_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 falcon_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 falcon_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 falcon_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 falcon_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 falcon_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 falcon_falcon_curctx_r(void)
248{
249 return 0x00000050U;
250}
251static inline u32 falcon_falcon_nxtctx_r(void)
252{
253 return 0x00000054U;
254}
255static inline u32 falcon_falcon_mailbox0_r(void)
256{
257 return 0x00000040U;
258}
259static inline u32 falcon_falcon_mailbox1_r(void)
260{
261 return 0x00000044U;
262}
263static inline u32 falcon_falcon_itfen_r(void)
264{
265 return 0x00000048U;
266}
267static inline u32 falcon_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 falcon_falcon_idlestate_r(void)
272{
273 return 0x0000004cU;
274}
275static inline u32 falcon_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 falcon_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 falcon_falcon_os_r(void)
284{
285 return 0x00000080U;
286}
287static inline u32 falcon_falcon_engctl_r(void)
288{
289 return 0x000000a4U;
290}
291static inline u32 falcon_falcon_cpuctl_r(void)
292{
293 return 0x00000100U;
294}
295static inline u32 falcon_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 falcon_falcon_cpuctl_sreset_f(u32 v)
300{
301 return (v & 0x1U) << 2U;
302}
303static inline u32 falcon_falcon_cpuctl_hreset_f(u32 v)
304{
305 return (v & 0x1U) << 3U;
306}
307static inline u32 falcon_falcon_cpuctl_halt_intr_f(u32 v)
308{
309 return (v & 0x1U) << 4U;
310}
311static inline u32 falcon_falcon_cpuctl_halt_intr_m(void)
312{
313 return 0x1U << 4U;
314}
315static inline u32 falcon_falcon_cpuctl_halt_intr_v(u32 r)
316{
317 return (r >> 4U) & 0x1U;
318}
319static inline u32 falcon_falcon_cpuctl_stopped_m(void)
320{
321 return 0x1U << 5U;
322}
323static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
324{
325 return (v & 0x1U) << 6U;
326}
327static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_m(void)
328{
329 return 0x1U << 6U;
330}
331static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
332{
333 return (r >> 6U) & 0x1U;
334}
335static inline u32 falcon_falcon_cpuctl_alias_r(void)
336{
337 return 0x00000130U;
338}
339static inline u32 falcon_falcon_cpuctl_alias_startcpu_f(u32 v)
340{
341 return (v & 0x1U) << 1U;
342}
343static inline u32 falcon_falcon_imemc_r(u32 i)
344{
345 return 0x00000180U + i*16U;
346}
347static inline u32 falcon_falcon_imemc_offs_f(u32 v)
348{
349 return (v & 0x3fU) << 2U;
350}
351static inline u32 falcon_falcon_imemc_blk_f(u32 v)
352{
353 return (v & 0xffU) << 8U;
354}
355static inline u32 falcon_falcon_imemc_aincw_f(u32 v)
356{
357 return (v & 0x1U) << 24U;
358}
359static inline u32 falcon_falcon_imemc_secure_f(u32 v)
360{
361 return (v & 0x1U) << 28U;
362}
363static inline u32 falcon_falcon_imemd_r(u32 i)
364{
365 return 0x00000184U + i*16U;
366}
367static inline u32 falcon_falcon_imemt_r(u32 i)
368{
369 return 0x00000188U + i*16U;
370}
371static inline u32 falcon_falcon_sctl_r(void)
372{
373 return 0x00000240U;
374}
375static inline u32 falcon_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 falcon_falcon_bootvec_r(void)
380{
381 return 0x00000104U;
382}
383static inline u32 falcon_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 falcon_falcon_dmactl_r(void)
388{
389 return 0x0000010cU;
390}
391static inline u32 falcon_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 falcon_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 falcon_falcon_dmactl_require_ctx_f(u32 v)
400{
401 return (v & 0x1U) << 0U;
402}
403static inline u32 falcon_falcon_hwcfg_r(void)
404{
405 return 0x00000108U;
406}
407static inline u32 falcon_falcon_hwcfg_imem_size_v(u32 r)
408{
409 return (r >> 0U) & 0x1ffU;
410}
411static inline u32 falcon_falcon_hwcfg_dmem_size_v(u32 r)
412{
413 return (r >> 9U) & 0x1ffU;
414}
415static inline u32 falcon_falcon_dmatrfbase_r(void)
416{
417 return 0x00000110U;
418}
419static inline u32 falcon_falcon_dmatrfbase1_r(void)
420{
421 return 0x00000128U;
422}
423static inline u32 falcon_falcon_dmatrfmoffs_r(void)
424{
425 return 0x00000114U;
426}
427static inline u32 falcon_falcon_dmatrfcmd_r(void)
428{
429 return 0x00000118U;
430}
431static inline u32 falcon_falcon_dmatrfcmd_imem_f(u32 v)
432{
433 return (v & 0x1U) << 4U;
434}
435static inline u32 falcon_falcon_dmatrfcmd_write_f(u32 v)
436{
437 return (v & 0x1U) << 5U;
438}
439static inline u32 falcon_falcon_dmatrfcmd_size_f(u32 v)
440{
441 return (v & 0x7U) << 8U;
442}
443static inline u32 falcon_falcon_dmatrfcmd_ctxdma_f(u32 v)
444{
445 return (v & 0x7U) << 12U;
446}
447static inline u32 falcon_falcon_dmatrffboffs_r(void)
448{
449 return 0x0000011cU;
450}
451static inline u32 falcon_falcon_imctl_debug_r(void)
452{
453 return 0x0000015cU;
454}
455static inline u32 falcon_falcon_imctl_debug_addr_blk_f(u32 v)
456{
457 return (v & 0xffffffU) << 0U;
458}
459static inline u32 falcon_falcon_imctl_debug_cmd_f(u32 v)
460{
461 return (v & 0x7U) << 24U;
462}
463static inline u32 falcon_falcon_imstat_r(void)
464{
465 return 0x00000144U;
466}
467static inline u32 falcon_falcon_traceidx_r(void)
468{
469 return 0x00000148U;
470}
471static inline u32 falcon_falcon_traceidx_maxidx_v(u32 r)
472{
473 return (r >> 16U) & 0xffU;
474}
475static inline u32 falcon_falcon_traceidx_idx_f(u32 v)
476{
477 return (v & 0xffU) << 0U;
478}
479static inline u32 falcon_falcon_tracepc_r(void)
480{
481 return 0x0000014cU;
482}
483static inline u32 falcon_falcon_tracepc_pc_v(u32 r)
484{
485 return (r >> 0U) & 0xffffffU;
486}
487static inline u32 falcon_falcon_exterraddr_r(void)
488{
489 return 0x00000168U;
490}
491static inline u32 falcon_falcon_exterrstat_r(void)
492{
493 return 0x0000016cU;
494}
495static inline u32 falcon_falcon_exterrstat_valid_m(void)
496{
497 return 0x1U << 31U;
498}
499static inline u32 falcon_falcon_exterrstat_valid_v(u32 r)
500{
501 return (r >> 31U) & 0x1U;
502}
503static inline u32 falcon_falcon_exterrstat_valid_true_v(void)
504{
505 return 0x00000001U;
506}
507static inline u32 falcon_falcon_icd_cmd_r(void)
508{
509 return 0x00000200U;
510}
511static inline u32 falcon_falcon_icd_cmd_opc_s(void)
512{
513 return 4U;
514}
515static inline u32 falcon_falcon_icd_cmd_opc_f(u32 v)
516{
517 return (v & 0xfU) << 0U;
518}
519static inline u32 falcon_falcon_icd_cmd_opc_m(void)
520{
521 return 0xfU << 0U;
522}
523static inline u32 falcon_falcon_icd_cmd_opc_v(u32 r)
524{
525 return (r >> 0U) & 0xfU;
526}
527static inline u32 falcon_falcon_icd_cmd_opc_rreg_f(void)
528{
529 return 0x8U;
530}
531static inline u32 falcon_falcon_icd_cmd_opc_rstat_f(void)
532{
533 return 0xeU;
534}
535static inline u32 falcon_falcon_icd_cmd_idx_f(u32 v)
536{
537 return (v & 0x1fU) << 8U;
538}
539static inline u32 falcon_falcon_icd_rdata_r(void)
540{
541 return 0x0000020cU;
542}
543static inline u32 falcon_falcon_dmemc_r(u32 i)
544{
545 return 0x000001c0U + i*8U;
546}
547static inline u32 falcon_falcon_dmemc_offs_f(u32 v)
548{
549 return (v & 0x3fU) << 2U;
550}
551static inline u32 falcon_falcon_dmemc_offs_m(void)
552{
553 return 0x3fU << 2U;
554}
555static inline u32 falcon_falcon_dmemc_blk_f(u32 v)
556{
557 return (v & 0xffU) << 8U;
558}
559static inline u32 falcon_falcon_dmemc_blk_m(void)
560{
561 return 0xffU << 8U;
562}
563static inline u32 falcon_falcon_dmemc_aincw_f(u32 v)
564{
565 return (v & 0x1U) << 24U;
566}
567static inline u32 falcon_falcon_dmemc_aincr_f(u32 v)
568{
569 return (v & 0x1U) << 25U;
570}
571static inline u32 falcon_falcon_dmemd_r(u32 i)
572{
573 return 0x000001c4U + i*8U;
574}
575static inline u32 falcon_falcon_debug1_r(void)
576{
577 return 0x00000090U;
578}
579static inline u32 falcon_falcon_debug1_ctxsw_mode_s(void)
580{
581 return 1U;
582}
583static inline u32 falcon_falcon_debug1_ctxsw_mode_f(u32 v)
584{
585 return (v & 0x1U) << 16U;
586}
587static inline u32 falcon_falcon_debug1_ctxsw_mode_m(void)
588{
589 return 0x1U << 16U;
590}
591static inline u32 falcon_falcon_debug1_ctxsw_mode_v(u32 r)
592{
593 return (r >> 16U) & 0x1U;
594}
595static inline u32 falcon_falcon_debug1_ctxsw_mode_init_f(void)
596{
597 return 0x0U;
598}
599static inline u32 falcon_falcon_debuginfo_r(void)
600{
601 return 0x00000094U;
602}
603#endif
diff --git a/include/nvgpu/hw/gv100/hw_fb_gv100.h b/include/nvgpu/hw/gv100/hw_fb_gv100.h
deleted file mode 100644
index ac248b5..0000000
--- a/include/nvgpu/hw/gv100/hw_fb_gv100.h
+++ /dev/null
@@ -1,1923 +0,0 @@
1/*
2 * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fb_gv100_h_
57#define _hw_fb_gv100_h_
58
59static inline u32 fb_fbhub_num_active_ltcs_r(void)
60{
61 return 0x00100800U;
62}
63static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_f(u32 v)
64{
65 return (v & 0xffU) << 16U;
66}
67static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_m(void)
68{
69 return 0xffU << 16U;
70}
71static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_v(u32 r)
72{
73 return (r >> 16U) & 0xffU;
74}
75static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer_f(u32 v, u32 i)
76{
77 return (v & 0x1U) << (16U + i*1U);
78}
79static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer_m(u32 i)
80{
81 return 0x1U << (16U + i*1U);
82}
83static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer_v(u32 r, u32 i)
84{
85 return (r >> (16U + i*1U)) & 0x1U;
86}
87static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer___size_1_v(void)
88{
89 return 0x00000008U;
90}
91static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer___size_1_f(u32 i)
92{
93 return 0x0U << (32U + i*1U);
94}
95static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer_enabled_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer_enabled_f(u32 i)
100{
101 return 0x1U << (32U + i*1U);
102}
103static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer_disabled_v(void)
104{
105 return 0x00000000U;
106}
107static inline u32 fb_fbhub_num_active_ltcs_use_nvlink_peer_disabled_f(u32 i)
108{
109 return 0x0U << (32U + i*1U);
110}
111static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_f(u32 v)
112{
113 return (v & 0x1U) << 25U;
114}
115static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_m(void)
116{
117 return 0x1U << 25U;
118}
119static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_v(u32 r)
120{
121 return (r >> 25U) & 0x1U;
122}
123static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_use_read_v(void)
124{
125 return 0x00000000U;
126}
127static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_use_read_f(void)
128{
129 return 0x0U;
130}
131static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_use_rmw_v(void)
132{
133 return 0x00000001U;
134}
135static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_use_rmw_f(void)
136{
137 return 0x2000000U;
138}
139static inline u32 fb_mmu_ctrl_r(void)
140{
141 return 0x00100c80U;
142}
143static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r)
144{
145 return (r >> 15U) & 0x1U;
146}
147static inline u32 fb_mmu_ctrl_pri_fifo_empty_false_f(void)
148{
149 return 0x0U;
150}
151static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r)
152{
153 return (r >> 16U) & 0xffU;
154}
155static inline u32 fb_mmu_ctrl_atomic_capability_mode_f(u32 v)
156{
157 return (v & 0x3U) << 24U;
158}
159static inline u32 fb_mmu_ctrl_atomic_capability_mode_m(void)
160{
161 return 0x3U << 24U;
162}
163static inline u32 fb_mmu_ctrl_atomic_capability_mode_v(u32 r)
164{
165 return (r >> 24U) & 0x3U;
166}
167static inline u32 fb_mmu_ctrl_atomic_capability_mode_l2_v(void)
168{
169 return 0x00000000U;
170}
171static inline u32 fb_mmu_ctrl_atomic_capability_mode_l2_f(void)
172{
173 return 0x0U;
174}
175static inline u32 fb_mmu_ctrl_atomic_capability_mode_atomic_v(void)
176{
177 return 0x00000001U;
178}
179static inline u32 fb_mmu_ctrl_atomic_capability_mode_atomic_f(void)
180{
181 return 0x1000000U;
182}
183static inline u32 fb_mmu_ctrl_atomic_capability_mode_rmw_v(void)
184{
185 return 0x00000002U;
186}
187static inline u32 fb_mmu_ctrl_atomic_capability_mode_rmw_f(void)
188{
189 return 0x2000000U;
190}
191static inline u32 fb_mmu_ctrl_atomic_capability_mode_power_v(void)
192{
193 return 0x00000003U;
194}
195static inline u32 fb_mmu_ctrl_atomic_capability_mode_power_f(void)
196{
197 return 0x3000000U;
198}
199static inline u32 fb_hsmmu_pri_mmu_ctrl_r(void)
200{
201 return 0x001fac80U;
202}
203static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_f(u32 v)
204{
205 return (v & 0x3U) << 24U;
206}
207static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_m(void)
208{
209 return 0x3U << 24U;
210}
211static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_v(u32 r)
212{
213 return (r >> 24U) & 0x3U;
214}
215static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_l2_v(void)
216{
217 return 0x00000000U;
218}
219static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_l2_f(void)
220{
221 return 0x0U;
222}
223static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_atomic_v(void)
224{
225 return 0x00000001U;
226}
227static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_atomic_f(void)
228{
229 return 0x1000000U;
230}
231static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_rmw_v(void)
232{
233 return 0x00000002U;
234}
235static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_rmw_f(void)
236{
237 return 0x2000000U;
238}
239static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_power_v(void)
240{
241 return 0x00000003U;
242}
243static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_power_f(void)
244{
245 return 0x3000000U;
246}
247static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_r(void)
248{
249 return 0x001facc4U;
250}
251static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_v(u32 r)
252{
253 return (r >> 16U) & 0x1U;
254}
255static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_m(void)
256{
257 return 0x1U << 16U;
258}
259static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_enabled_f(void)
260{
261 return 0x10000U;
262}
263static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_disabled_f(void)
264{
265 return 0x0U;
266}
267static inline u32 fb_hshub_num_active_ltcs_r(void)
268{
269 return 0x001fbc20U;
270}
271static inline u32 fb_hshub_num_active_ltcs_use_nvlink_f(u32 v)
272{
273 return (v & 0xffU) << 16U;
274}
275static inline u32 fb_hshub_num_active_ltcs_use_nvlink_m(void)
276{
277 return 0xffU << 16U;
278}
279static inline u32 fb_hshub_num_active_ltcs_use_nvlink_v(u32 r)
280{
281 return (r >> 16U) & 0xffU;
282}
283static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer_f(u32 v, u32 i)
284{
285 return (v & 0x1U) << (16U + i*1U);
286}
287static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer_m(u32 i)
288{
289 return 0x1U << (16U + i*1U);
290}
291static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer_v(u32 r, u32 i)
292{
293 return (r >> (16U + i*1U)) & 0x1U;
294}
295static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer___size_1_v(void)
296{
297 return 0x00000008U;
298}
299static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer___size_1_f(u32 i)
300{
301 return 0x0U << (32U + i*1U);
302}
303static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer_enabled_v(void)
304{
305 return 0x00000001U;
306}
307static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer_enabled_f(u32 i)
308{
309 return 0x1U << (32U + i*1U);
310}
311static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer_disabled_v(void)
312{
313 return 0x00000000U;
314}
315static inline u32 fb_hshub_num_active_ltcs_use_nvlink_peer_disabled_f(u32 i)
316{
317 return 0x0U << (32U + i*1U);
318}
319static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_f(u32 v)
320{
321 return (v & 0x1U) << 25U;
322}
323static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_m(void)
324{
325 return 0x1U << 25U;
326}
327static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_v(u32 r)
328{
329 return (r >> 25U) & 0x1U;
330}
331static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_use_read_v(void)
332{
333 return 0x00000000U;
334}
335static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_use_read_f(void)
336{
337 return 0x0U;
338}
339static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_use_rmw_v(void)
340{
341 return 0x00000001U;
342}
343static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_use_rmw_f(void)
344{
345 return 0x2000000U;
346}
347static inline u32 fb_priv_mmu_phy_secure_r(void)
348{
349 return 0x00100ce4U;
350}
351static inline u32 fb_mmu_invalidate_pdb_r(void)
352{
353 return 0x00100cb8U;
354}
355static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void)
356{
357 return 0x0U;
358}
359static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void)
360{
361 return 0x2U;
362}
363static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v)
364{
365 return (v & 0xfffffffU) << 4U;
366}
367static inline u32 fb_mmu_invalidate_r(void)
368{
369 return 0x00100cbcU;
370}
371static inline u32 fb_mmu_invalidate_all_va_true_f(void)
372{
373 return 0x1U;
374}
375static inline u32 fb_mmu_invalidate_all_pdb_true_f(void)
376{
377 return 0x2U;
378}
379static inline u32 fb_mmu_invalidate_hubtlb_only_s(void)
380{
381 return 1U;
382}
383static inline u32 fb_mmu_invalidate_hubtlb_only_f(u32 v)
384{
385 return (v & 0x1U) << 2U;
386}
387static inline u32 fb_mmu_invalidate_hubtlb_only_m(void)
388{
389 return 0x1U << 2U;
390}
391static inline u32 fb_mmu_invalidate_hubtlb_only_v(u32 r)
392{
393 return (r >> 2U) & 0x1U;
394}
395static inline u32 fb_mmu_invalidate_hubtlb_only_true_f(void)
396{
397 return 0x4U;
398}
399static inline u32 fb_mmu_invalidate_replay_s(void)
400{
401 return 3U;
402}
403static inline u32 fb_mmu_invalidate_replay_f(u32 v)
404{
405 return (v & 0x7U) << 3U;
406}
407static inline u32 fb_mmu_invalidate_replay_m(void)
408{
409 return 0x7U << 3U;
410}
411static inline u32 fb_mmu_invalidate_replay_v(u32 r)
412{
413 return (r >> 3U) & 0x7U;
414}
415static inline u32 fb_mmu_invalidate_replay_none_f(void)
416{
417 return 0x0U;
418}
419static inline u32 fb_mmu_invalidate_replay_start_f(void)
420{
421 return 0x8U;
422}
423static inline u32 fb_mmu_invalidate_replay_start_ack_all_f(void)
424{
425 return 0x10U;
426}
427static inline u32 fb_mmu_invalidate_replay_cancel_global_f(void)
428{
429 return 0x20U;
430}
431static inline u32 fb_mmu_invalidate_sys_membar_s(void)
432{
433 return 1U;
434}
435static inline u32 fb_mmu_invalidate_sys_membar_f(u32 v)
436{
437 return (v & 0x1U) << 6U;
438}
439static inline u32 fb_mmu_invalidate_sys_membar_m(void)
440{
441 return 0x1U << 6U;
442}
443static inline u32 fb_mmu_invalidate_sys_membar_v(u32 r)
444{
445 return (r >> 6U) & 0x1U;
446}
447static inline u32 fb_mmu_invalidate_sys_membar_true_f(void)
448{
449 return 0x40U;
450}
451static inline u32 fb_mmu_invalidate_ack_s(void)
452{
453 return 2U;
454}
455static inline u32 fb_mmu_invalidate_ack_f(u32 v)
456{
457 return (v & 0x3U) << 7U;
458}
459static inline u32 fb_mmu_invalidate_ack_m(void)
460{
461 return 0x3U << 7U;
462}
463static inline u32 fb_mmu_invalidate_ack_v(u32 r)
464{
465 return (r >> 7U) & 0x3U;
466}
467static inline u32 fb_mmu_invalidate_ack_ack_none_required_f(void)
468{
469 return 0x0U;
470}
471static inline u32 fb_mmu_invalidate_ack_ack_intranode_f(void)
472{
473 return 0x100U;
474}
475static inline u32 fb_mmu_invalidate_ack_ack_globally_f(void)
476{
477 return 0x80U;
478}
479static inline u32 fb_mmu_invalidate_cancel_client_id_s(void)
480{
481 return 6U;
482}
483static inline u32 fb_mmu_invalidate_cancel_client_id_f(u32 v)
484{
485 return (v & 0x3fU) << 9U;
486}
487static inline u32 fb_mmu_invalidate_cancel_client_id_m(void)
488{
489 return 0x3fU << 9U;
490}
491static inline u32 fb_mmu_invalidate_cancel_client_id_v(u32 r)
492{
493 return (r >> 9U) & 0x3fU;
494}
495static inline u32 fb_mmu_invalidate_cancel_gpc_id_s(void)
496{
497 return 5U;
498}
499static inline u32 fb_mmu_invalidate_cancel_gpc_id_f(u32 v)
500{
501 return (v & 0x1fU) << 15U;
502}
503static inline u32 fb_mmu_invalidate_cancel_gpc_id_m(void)
504{
505 return 0x1fU << 15U;
506}
507static inline u32 fb_mmu_invalidate_cancel_gpc_id_v(u32 r)
508{
509 return (r >> 15U) & 0x1fU;
510}
511static inline u32 fb_mmu_invalidate_cancel_client_type_s(void)
512{
513 return 1U;
514}
515static inline u32 fb_mmu_invalidate_cancel_client_type_f(u32 v)
516{
517 return (v & 0x1U) << 20U;
518}
519static inline u32 fb_mmu_invalidate_cancel_client_type_m(void)
520{
521 return 0x1U << 20U;
522}
523static inline u32 fb_mmu_invalidate_cancel_client_type_v(u32 r)
524{
525 return (r >> 20U) & 0x1U;
526}
527static inline u32 fb_mmu_invalidate_cancel_client_type_gpc_f(void)
528{
529 return 0x0U;
530}
531static inline u32 fb_mmu_invalidate_cancel_client_type_hub_f(void)
532{
533 return 0x100000U;
534}
535static inline u32 fb_mmu_invalidate_cancel_cache_level_s(void)
536{
537 return 3U;
538}
539static inline u32 fb_mmu_invalidate_cancel_cache_level_f(u32 v)
540{
541 return (v & 0x7U) << 24U;
542}
543static inline u32 fb_mmu_invalidate_cancel_cache_level_m(void)
544{
545 return 0x7U << 24U;
546}
547static inline u32 fb_mmu_invalidate_cancel_cache_level_v(u32 r)
548{
549 return (r >> 24U) & 0x7U;
550}
551static inline u32 fb_mmu_invalidate_cancel_cache_level_all_f(void)
552{
553 return 0x0U;
554}
555static inline u32 fb_mmu_invalidate_cancel_cache_level_pte_only_f(void)
556{
557 return 0x1000000U;
558}
559static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde0_f(void)
560{
561 return 0x2000000U;
562}
563static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde1_f(void)
564{
565 return 0x3000000U;
566}
567static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde2_f(void)
568{
569 return 0x4000000U;
570}
571static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde3_f(void)
572{
573 return 0x5000000U;
574}
575static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde4_f(void)
576{
577 return 0x6000000U;
578}
579static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde5_f(void)
580{
581 return 0x7000000U;
582}
583static inline u32 fb_mmu_invalidate_trigger_s(void)
584{
585 return 1U;
586}
587static inline u32 fb_mmu_invalidate_trigger_f(u32 v)
588{
589 return (v & 0x1U) << 31U;
590}
591static inline u32 fb_mmu_invalidate_trigger_m(void)
592{
593 return 0x1U << 31U;
594}
595static inline u32 fb_mmu_invalidate_trigger_v(u32 r)
596{
597 return (r >> 31U) & 0x1U;
598}
599static inline u32 fb_mmu_invalidate_trigger_true_f(void)
600{
601 return 0x80000000U;
602}
603static inline u32 fb_mmu_debug_wr_r(void)
604{
605 return 0x00100cc8U;
606}
607static inline u32 fb_mmu_debug_wr_aperture_s(void)
608{
609 return 2U;
610}
611static inline u32 fb_mmu_debug_wr_aperture_f(u32 v)
612{
613 return (v & 0x3U) << 0U;
614}
615static inline u32 fb_mmu_debug_wr_aperture_m(void)
616{
617 return 0x3U << 0U;
618}
619static inline u32 fb_mmu_debug_wr_aperture_v(u32 r)
620{
621 return (r >> 0U) & 0x3U;
622}
623static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void)
624{
625 return 0x0U;
626}
627static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void)
628{
629 return 0x2U;
630}
631static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void)
632{
633 return 0x3U;
634}
635static inline u32 fb_mmu_debug_wr_vol_false_f(void)
636{
637 return 0x0U;
638}
639static inline u32 fb_mmu_debug_wr_vol_true_v(void)
640{
641 return 0x00000001U;
642}
643static inline u32 fb_mmu_debug_wr_vol_true_f(void)
644{
645 return 0x4U;
646}
647static inline u32 fb_mmu_debug_wr_addr_f(u32 v)
648{
649 return (v & 0xfffffffU) << 4U;
650}
651static inline u32 fb_mmu_debug_wr_addr_alignment_v(void)
652{
653 return 0x0000000cU;
654}
655static inline u32 fb_mmu_debug_rd_r(void)
656{
657 return 0x00100cccU;
658}
659static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void)
660{
661 return 0x0U;
662}
663static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void)
664{
665 return 0x2U;
666}
667static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void)
668{
669 return 0x3U;
670}
671static inline u32 fb_mmu_debug_rd_vol_false_f(void)
672{
673 return 0x0U;
674}
675static inline u32 fb_mmu_debug_rd_addr_f(u32 v)
676{
677 return (v & 0xfffffffU) << 4U;
678}
679static inline u32 fb_mmu_debug_rd_addr_alignment_v(void)
680{
681 return 0x0000000cU;
682}
683static inline u32 fb_mmu_debug_ctrl_r(void)
684{
685 return 0x00100cc4U;
686}
687static inline u32 fb_mmu_debug_ctrl_debug_v(u32 r)
688{
689 return (r >> 16U) & 0x1U;
690}
691static inline u32 fb_mmu_debug_ctrl_debug_m(void)
692{
693 return 0x1U << 16U;
694}
695static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void)
696{
697 return 0x00000001U;
698}
699static inline u32 fb_mmu_debug_ctrl_debug_enabled_f(void)
700{
701 return 0x10000U;
702}
703static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void)
704{
705 return 0x00000000U;
706}
707static inline u32 fb_mmu_debug_ctrl_debug_disabled_f(void)
708{
709 return 0x0U;
710}
711static inline u32 fb_niso_cfg1_r(void)
712{
713 return 0x00100c14U;
714}
715static inline u32 fb_niso_cfg1_sysmem_nvlink_f(u32 v)
716{
717 return (v & 0x1U) << 17U;
718}
719static inline u32 fb_niso_cfg1_sysmem_nvlink_m(void)
720{
721 return 0x1U << 17U;
722}
723static inline u32 fb_niso_cfg1_sysmem_nvlink_v(u32 r)
724{
725 return (r >> 17U) & 0x1U;
726}
727static inline u32 fb_niso_cfg1_sysmem_nvlink_enabled_v(void)
728{
729 return 0x00000001U;
730}
731static inline u32 fb_niso_cfg1_sysmem_nvlink_enabled_f(void)
732{
733 return 0x20000U;
734}
735static inline u32 fb_niso_flush_sysmem_addr_r(void)
736{
737 return 0x00100c10U;
738}
739static inline u32 fb_niso_intr_r(void)
740{
741 return 0x00100a20U;
742}
743static inline u32 fb_niso_intr_hub_access_counter_notify_m(void)
744{
745 return 0x1U << 0U;
746}
747static inline u32 fb_niso_intr_hub_access_counter_notify_pending_f(void)
748{
749 return 0x1U;
750}
751static inline u32 fb_niso_intr_hub_access_counter_error_m(void)
752{
753 return 0x1U << 1U;
754}
755static inline u32 fb_niso_intr_hub_access_counter_error_pending_f(void)
756{
757 return 0x2U;
758}
759static inline u32 fb_niso_intr_mmu_replayable_fault_notify_m(void)
760{
761 return 0x1U << 27U;
762}
763static inline u32 fb_niso_intr_mmu_replayable_fault_notify_pending_f(void)
764{
765 return 0x8000000U;
766}
767static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_m(void)
768{
769 return 0x1U << 28U;
770}
771static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_pending_f(void)
772{
773 return 0x10000000U;
774}
775static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_m(void)
776{
777 return 0x1U << 29U;
778}
779static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_pending_f(void)
780{
781 return 0x20000000U;
782}
783static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_m(void)
784{
785 return 0x1U << 30U;
786}
787static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_pending_f(void)
788{
789 return 0x40000000U;
790}
791static inline u32 fb_niso_intr_mmu_other_fault_notify_m(void)
792{
793 return 0x1U << 31U;
794}
795static inline u32 fb_niso_intr_mmu_other_fault_notify_pending_f(void)
796{
797 return 0x80000000U;
798}
799static inline u32 fb_niso_intr_en_r(u32 i)
800{
801 return 0x00100a24U + i*4U;
802}
803static inline u32 fb_niso_intr_en__size_1_v(void)
804{
805 return 0x00000002U;
806}
807static inline u32 fb_niso_intr_en_hub_access_counter_notify_f(u32 v)
808{
809 return (v & 0x1U) << 0U;
810}
811static inline u32 fb_niso_intr_en_hub_access_counter_notify_enabled_f(void)
812{
813 return 0x1U;
814}
815static inline u32 fb_niso_intr_en_hub_access_counter_error_f(u32 v)
816{
817 return (v & 0x1U) << 1U;
818}
819static inline u32 fb_niso_intr_en_hub_access_counter_error_enabled_f(void)
820{
821 return 0x2U;
822}
823static inline u32 fb_niso_intr_en_mmu_replayable_fault_notify_f(u32 v)
824{
825 return (v & 0x1U) << 27U;
826}
827static inline u32 fb_niso_intr_en_mmu_replayable_fault_notify_enabled_f(void)
828{
829 return 0x8000000U;
830}
831static inline u32 fb_niso_intr_en_mmu_replayable_fault_overflow_f(u32 v)
832{
833 return (v & 0x1U) << 28U;
834}
835static inline u32 fb_niso_intr_en_mmu_replayable_fault_overflow_enabled_f(void)
836{
837 return 0x10000000U;
838}
839static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_notify_f(u32 v)
840{
841 return (v & 0x1U) << 29U;
842}
843static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_notify_enabled_f(void)
844{
845 return 0x20000000U;
846}
847static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_overflow_f(u32 v)
848{
849 return (v & 0x1U) << 30U;
850}
851static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_overflow_enabled_f(void)
852{
853 return 0x40000000U;
854}
855static inline u32 fb_niso_intr_en_mmu_other_fault_notify_f(u32 v)
856{
857 return (v & 0x1U) << 31U;
858}
859static inline u32 fb_niso_intr_en_mmu_other_fault_notify_enabled_f(void)
860{
861 return 0x80000000U;
862}
863static inline u32 fb_niso_intr_en_set_r(u32 i)
864{
865 return 0x00100a2cU + i*4U;
866}
867static inline u32 fb_niso_intr_en_set__size_1_v(void)
868{
869 return 0x00000002U;
870}
871static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_m(void)
872{
873 return 0x1U << 0U;
874}
875static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_set_f(void)
876{
877 return 0x1U;
878}
879static inline u32 fb_niso_intr_en_set_hub_access_counter_error_m(void)
880{
881 return 0x1U << 1U;
882}
883static inline u32 fb_niso_intr_en_set_hub_access_counter_error_set_f(void)
884{
885 return 0x2U;
886}
887static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_m(void)
888{
889 return 0x1U << 27U;
890}
891static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_set_f(void)
892{
893 return 0x8000000U;
894}
895static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_m(void)
896{
897 return 0x1U << 28U;
898}
899static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_set_f(void)
900{
901 return 0x10000000U;
902}
903static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_m(void)
904{
905 return 0x1U << 29U;
906}
907static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_set_f(void)
908{
909 return 0x20000000U;
910}
911static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_m(void)
912{
913 return 0x1U << 30U;
914}
915static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_set_f(void)
916{
917 return 0x40000000U;
918}
919static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_m(void)
920{
921 return 0x1U << 31U;
922}
923static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_set_f(void)
924{
925 return 0x80000000U;
926}
927static inline u32 fb_niso_intr_en_clr_r(u32 i)
928{
929 return 0x00100a34U + i*4U;
930}
931static inline u32 fb_niso_intr_en_clr__size_1_v(void)
932{
933 return 0x00000002U;
934}
935static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_m(void)
936{
937 return 0x1U << 0U;
938}
939static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_set_f(void)
940{
941 return 0x1U;
942}
943static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_m(void)
944{
945 return 0x1U << 1U;
946}
947static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_set_f(void)
948{
949 return 0x2U;
950}
951static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_m(void)
952{
953 return 0x1U << 27U;
954}
955static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_set_f(void)
956{
957 return 0x8000000U;
958}
959static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_m(void)
960{
961 return 0x1U << 28U;
962}
963static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_set_f(void)
964{
965 return 0x10000000U;
966}
967static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_m(void)
968{
969 return 0x1U << 29U;
970}
971static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_set_f(void)
972{
973 return 0x20000000U;
974}
975static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_m(void)
976{
977 return 0x1U << 30U;
978}
979static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_set_f(void)
980{
981 return 0x40000000U;
982}
983static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_m(void)
984{
985 return 0x1U << 31U;
986}
987static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_set_f(void)
988{
989 return 0x80000000U;
990}
991static inline u32 fb_niso_intr_en_clr_mmu_non_replay_fault_buffer_v(void)
992{
993 return 0x00000000U;
994}
995static inline u32 fb_niso_intr_en_clr_mmu_replay_fault_buffer_v(void)
996{
997 return 0x00000001U;
998}
999static inline u32 fb_mmu_fault_buffer_lo_r(u32 i)
1000{
1001 return 0x00100e24U + i*20U;
1002}
1003static inline u32 fb_mmu_fault_buffer_lo__size_1_v(void)
1004{
1005 return 0x00000002U;
1006}
1007static inline u32 fb_mmu_fault_buffer_lo_addr_mode_f(u32 v)
1008{
1009 return (v & 0x1U) << 0U;
1010}
1011static inline u32 fb_mmu_fault_buffer_lo_addr_mode_v(u32 r)
1012{
1013 return (r >> 0U) & 0x1U;
1014}
1015static inline u32 fb_mmu_fault_buffer_lo_addr_mode_virtual_v(void)
1016{
1017 return 0x00000000U;
1018}
1019static inline u32 fb_mmu_fault_buffer_lo_addr_mode_virtual_f(void)
1020{
1021 return 0x0U;
1022}
1023static inline u32 fb_mmu_fault_buffer_lo_addr_mode_physical_v(void)
1024{
1025 return 0x00000001U;
1026}
1027static inline u32 fb_mmu_fault_buffer_lo_addr_mode_physical_f(void)
1028{
1029 return 0x1U;
1030}
1031static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_f(u32 v)
1032{
1033 return (v & 0x3U) << 1U;
1034}
1035static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_v(u32 r)
1036{
1037 return (r >> 1U) & 0x3U;
1038}
1039static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_coh_v(void)
1040{
1041 return 0x00000002U;
1042}
1043static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_coh_f(void)
1044{
1045 return 0x4U;
1046}
1047static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_nocoh_v(void)
1048{
1049 return 0x00000003U;
1050}
1051static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_nocoh_f(void)
1052{
1053 return 0x6U;
1054}
1055static inline u32 fb_mmu_fault_buffer_lo_phys_vol_f(u32 v)
1056{
1057 return (v & 0x1U) << 3U;
1058}
1059static inline u32 fb_mmu_fault_buffer_lo_phys_vol_v(u32 r)
1060{
1061 return (r >> 3U) & 0x1U;
1062}
1063static inline u32 fb_mmu_fault_buffer_lo_addr_f(u32 v)
1064{
1065 return (v & 0xfffffU) << 12U;
1066}
1067static inline u32 fb_mmu_fault_buffer_lo_addr_v(u32 r)
1068{
1069 return (r >> 12U) & 0xfffffU;
1070}
1071static inline u32 fb_mmu_fault_buffer_hi_r(u32 i)
1072{
1073 return 0x00100e28U + i*20U;
1074}
1075static inline u32 fb_mmu_fault_buffer_hi__size_1_v(void)
1076{
1077 return 0x00000002U;
1078}
1079static inline u32 fb_mmu_fault_buffer_hi_addr_f(u32 v)
1080{
1081 return (v & 0xffffffffU) << 0U;
1082}
1083static inline u32 fb_mmu_fault_buffer_hi_addr_v(u32 r)
1084{
1085 return (r >> 0U) & 0xffffffffU;
1086}
1087static inline u32 fb_mmu_fault_buffer_get_r(u32 i)
1088{
1089 return 0x00100e2cU + i*20U;
1090}
1091static inline u32 fb_mmu_fault_buffer_get__size_1_v(void)
1092{
1093 return 0x00000002U;
1094}
1095static inline u32 fb_mmu_fault_buffer_get_ptr_f(u32 v)
1096{
1097 return (v & 0xfffffU) << 0U;
1098}
1099static inline u32 fb_mmu_fault_buffer_get_ptr_m(void)
1100{
1101 return 0xfffffU << 0U;
1102}
1103static inline u32 fb_mmu_fault_buffer_get_ptr_v(u32 r)
1104{
1105 return (r >> 0U) & 0xfffffU;
1106}
1107static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_f(u32 v)
1108{
1109 return (v & 0x1U) << 30U;
1110}
1111static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_m(void)
1112{
1113 return 0x1U << 30U;
1114}
1115static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_v(void)
1116{
1117 return 0x00000001U;
1118}
1119static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_f(void)
1120{
1121 return 0x40000000U;
1122}
1123static inline u32 fb_mmu_fault_buffer_get_overflow_f(u32 v)
1124{
1125 return (v & 0x1U) << 31U;
1126}
1127static inline u32 fb_mmu_fault_buffer_get_overflow_m(void)
1128{
1129 return 0x1U << 31U;
1130}
1131static inline u32 fb_mmu_fault_buffer_get_overflow_clear_v(void)
1132{
1133 return 0x00000001U;
1134}
1135static inline u32 fb_mmu_fault_buffer_get_overflow_clear_f(void)
1136{
1137 return 0x80000000U;
1138}
1139static inline u32 fb_mmu_fault_buffer_put_r(u32 i)
1140{
1141 return 0x00100e30U + i*20U;
1142}
1143static inline u32 fb_mmu_fault_buffer_put__size_1_v(void)
1144{
1145 return 0x00000002U;
1146}
1147static inline u32 fb_mmu_fault_buffer_put_ptr_f(u32 v)
1148{
1149 return (v & 0xfffffU) << 0U;
1150}
1151static inline u32 fb_mmu_fault_buffer_put_ptr_v(u32 r)
1152{
1153 return (r >> 0U) & 0xfffffU;
1154}
1155static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_f(u32 v)
1156{
1157 return (v & 0x1U) << 30U;
1158}
1159static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_v(u32 r)
1160{
1161 return (r >> 30U) & 0x1U;
1162}
1163static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_yes_v(void)
1164{
1165 return 0x00000001U;
1166}
1167static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_yes_f(void)
1168{
1169 return 0x40000000U;
1170}
1171static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_no_v(void)
1172{
1173 return 0x00000000U;
1174}
1175static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_no_f(void)
1176{
1177 return 0x0U;
1178}
1179static inline u32 fb_mmu_fault_buffer_put_overflow_f(u32 v)
1180{
1181 return (v & 0x1U) << 31U;
1182}
1183static inline u32 fb_mmu_fault_buffer_put_overflow_v(u32 r)
1184{
1185 return (r >> 31U) & 0x1U;
1186}
1187static inline u32 fb_mmu_fault_buffer_put_overflow_yes_v(void)
1188{
1189 return 0x00000001U;
1190}
1191static inline u32 fb_mmu_fault_buffer_put_overflow_yes_f(void)
1192{
1193 return 0x80000000U;
1194}
1195static inline u32 fb_mmu_fault_buffer_size_r(u32 i)
1196{
1197 return 0x00100e34U + i*20U;
1198}
1199static inline u32 fb_mmu_fault_buffer_size__size_1_v(void)
1200{
1201 return 0x00000002U;
1202}
1203static inline u32 fb_mmu_fault_buffer_size_val_f(u32 v)
1204{
1205 return (v & 0xfffffU) << 0U;
1206}
1207static inline u32 fb_mmu_fault_buffer_size_val_v(u32 r)
1208{
1209 return (r >> 0U) & 0xfffffU;
1210}
1211static inline u32 fb_mmu_fault_buffer_size_overflow_intr_f(u32 v)
1212{
1213 return (v & 0x1U) << 29U;
1214}
1215static inline u32 fb_mmu_fault_buffer_size_overflow_intr_v(u32 r)
1216{
1217 return (r >> 29U) & 0x1U;
1218}
1219static inline u32 fb_mmu_fault_buffer_size_overflow_intr_enable_v(void)
1220{
1221 return 0x00000001U;
1222}
1223static inline u32 fb_mmu_fault_buffer_size_overflow_intr_enable_f(void)
1224{
1225 return 0x20000000U;
1226}
1227static inline u32 fb_mmu_fault_buffer_size_set_default_f(u32 v)
1228{
1229 return (v & 0x1U) << 30U;
1230}
1231static inline u32 fb_mmu_fault_buffer_size_set_default_v(u32 r)
1232{
1233 return (r >> 30U) & 0x1U;
1234}
1235static inline u32 fb_mmu_fault_buffer_size_set_default_yes_v(void)
1236{
1237 return 0x00000001U;
1238}
1239static inline u32 fb_mmu_fault_buffer_size_set_default_yes_f(void)
1240{
1241 return 0x40000000U;
1242}
1243static inline u32 fb_mmu_fault_buffer_size_enable_f(u32 v)
1244{
1245 return (v & 0x1U) << 31U;
1246}
1247static inline u32 fb_mmu_fault_buffer_size_enable_m(void)
1248{
1249 return 0x1U << 31U;
1250}
1251static inline u32 fb_mmu_fault_buffer_size_enable_v(u32 r)
1252{
1253 return (r >> 31U) & 0x1U;
1254}
1255static inline u32 fb_mmu_fault_buffer_size_enable_true_v(void)
1256{
1257 return 0x00000001U;
1258}
1259static inline u32 fb_mmu_fault_buffer_size_enable_true_f(void)
1260{
1261 return 0x80000000U;
1262}
1263static inline u32 fb_mmu_fault_addr_lo_r(void)
1264{
1265 return 0x00100e4cU;
1266}
1267static inline u32 fb_mmu_fault_addr_lo_phys_aperture_f(u32 v)
1268{
1269 return (v & 0x3U) << 0U;
1270}
1271static inline u32 fb_mmu_fault_addr_lo_phys_aperture_v(u32 r)
1272{
1273 return (r >> 0U) & 0x3U;
1274}
1275static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_coh_v(void)
1276{
1277 return 0x00000002U;
1278}
1279static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_coh_f(void)
1280{
1281 return 0x2U;
1282}
1283static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_nocoh_v(void)
1284{
1285 return 0x00000003U;
1286}
1287static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_nocoh_f(void)
1288{
1289 return 0x3U;
1290}
1291static inline u32 fb_mmu_fault_addr_lo_addr_f(u32 v)
1292{
1293 return (v & 0xfffffU) << 12U;
1294}
1295static inline u32 fb_mmu_fault_addr_lo_addr_v(u32 r)
1296{
1297 return (r >> 12U) & 0xfffffU;
1298}
1299static inline u32 fb_mmu_fault_addr_hi_r(void)
1300{
1301 return 0x00100e50U;
1302}
1303static inline u32 fb_mmu_fault_addr_hi_addr_f(u32 v)
1304{
1305 return (v & 0xffffffffU) << 0U;
1306}
1307static inline u32 fb_mmu_fault_addr_hi_addr_v(u32 r)
1308{
1309 return (r >> 0U) & 0xffffffffU;
1310}
1311static inline u32 fb_mmu_fault_inst_lo_r(void)
1312{
1313 return 0x00100e54U;
1314}
1315static inline u32 fb_mmu_fault_inst_lo_engine_id_v(u32 r)
1316{
1317 return (r >> 0U) & 0x1ffU;
1318}
1319static inline u32 fb_mmu_fault_inst_lo_aperture_v(u32 r)
1320{
1321 return (r >> 10U) & 0x3U;
1322}
1323static inline u32 fb_mmu_fault_inst_lo_aperture_sys_coh_v(void)
1324{
1325 return 0x00000002U;
1326}
1327static inline u32 fb_mmu_fault_inst_lo_aperture_sys_nocoh_v(void)
1328{
1329 return 0x00000003U;
1330}
1331static inline u32 fb_mmu_fault_inst_lo_addr_f(u32 v)
1332{
1333 return (v & 0xfffffU) << 12U;
1334}
1335static inline u32 fb_mmu_fault_inst_lo_addr_v(u32 r)
1336{
1337 return (r >> 12U) & 0xfffffU;
1338}
1339static inline u32 fb_mmu_fault_inst_hi_r(void)
1340{
1341 return 0x00100e58U;
1342}
1343static inline u32 fb_mmu_fault_inst_hi_addr_v(u32 r)
1344{
1345 return (r >> 0U) & 0xffffffffU;
1346}
1347static inline u32 fb_mmu_fault_info_r(void)
1348{
1349 return 0x00100e5cU;
1350}
1351static inline u32 fb_mmu_fault_info_fault_type_v(u32 r)
1352{
1353 return (r >> 0U) & 0x1fU;
1354}
1355static inline u32 fb_mmu_fault_info_replayable_fault_v(u32 r)
1356{
1357 return (r >> 7U) & 0x1U;
1358}
1359static inline u32 fb_mmu_fault_info_client_v(u32 r)
1360{
1361 return (r >> 8U) & 0x7fU;
1362}
1363static inline u32 fb_mmu_fault_info_access_type_v(u32 r)
1364{
1365 return (r >> 16U) & 0xfU;
1366}
1367static inline u32 fb_mmu_fault_info_client_type_v(u32 r)
1368{
1369 return (r >> 20U) & 0x1U;
1370}
1371static inline u32 fb_mmu_fault_info_gpc_id_v(u32 r)
1372{
1373 return (r >> 24U) & 0x1fU;
1374}
1375static inline u32 fb_mmu_fault_info_protected_mode_v(u32 r)
1376{
1377 return (r >> 29U) & 0x1U;
1378}
1379static inline u32 fb_mmu_fault_info_replayable_fault_en_v(u32 r)
1380{
1381 return (r >> 30U) & 0x1U;
1382}
1383static inline u32 fb_mmu_fault_info_valid_v(u32 r)
1384{
1385 return (r >> 31U) & 0x1U;
1386}
1387static inline u32 fb_mmu_fault_status_r(void)
1388{
1389 return 0x00100e60U;
1390}
1391static inline u32 fb_mmu_fault_status_dropped_bar1_phys_m(void)
1392{
1393 return 0x1U << 0U;
1394}
1395static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_v(void)
1396{
1397 return 0x00000001U;
1398}
1399static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_f(void)
1400{
1401 return 0x1U;
1402}
1403static inline u32 fb_mmu_fault_status_dropped_bar1_phys_clear_v(void)
1404{
1405 return 0x00000001U;
1406}
1407static inline u32 fb_mmu_fault_status_dropped_bar1_phys_clear_f(void)
1408{
1409 return 0x1U;
1410}
1411static inline u32 fb_mmu_fault_status_dropped_bar1_virt_m(void)
1412{
1413 return 0x1U << 1U;
1414}
1415static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_v(void)
1416{
1417 return 0x00000001U;
1418}
1419static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_f(void)
1420{
1421 return 0x2U;
1422}
1423static inline u32 fb_mmu_fault_status_dropped_bar1_virt_clear_v(void)
1424{
1425 return 0x00000001U;
1426}
1427static inline u32 fb_mmu_fault_status_dropped_bar1_virt_clear_f(void)
1428{
1429 return 0x2U;
1430}
1431static inline u32 fb_mmu_fault_status_dropped_bar2_phys_m(void)
1432{
1433 return 0x1U << 2U;
1434}
1435static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_v(void)
1436{
1437 return 0x00000001U;
1438}
1439static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_f(void)
1440{
1441 return 0x4U;
1442}
1443static inline u32 fb_mmu_fault_status_dropped_bar2_phys_clear_v(void)
1444{
1445 return 0x00000001U;
1446}
1447static inline u32 fb_mmu_fault_status_dropped_bar2_phys_clear_f(void)
1448{
1449 return 0x4U;
1450}
1451static inline u32 fb_mmu_fault_status_dropped_bar2_virt_m(void)
1452{
1453 return 0x1U << 3U;
1454}
1455static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_v(void)
1456{
1457 return 0x00000001U;
1458}
1459static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_f(void)
1460{
1461 return 0x8U;
1462}
1463static inline u32 fb_mmu_fault_status_dropped_bar2_virt_clear_v(void)
1464{
1465 return 0x00000001U;
1466}
1467static inline u32 fb_mmu_fault_status_dropped_bar2_virt_clear_f(void)
1468{
1469 return 0x8U;
1470}
1471static inline u32 fb_mmu_fault_status_dropped_ifb_phys_m(void)
1472{
1473 return 0x1U << 4U;
1474}
1475static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_v(void)
1476{
1477 return 0x00000001U;
1478}
1479static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_f(void)
1480{
1481 return 0x10U;
1482}
1483static inline u32 fb_mmu_fault_status_dropped_ifb_phys_clear_v(void)
1484{
1485 return 0x00000001U;
1486}
1487static inline u32 fb_mmu_fault_status_dropped_ifb_phys_clear_f(void)
1488{
1489 return 0x10U;
1490}
1491static inline u32 fb_mmu_fault_status_dropped_ifb_virt_m(void)
1492{
1493 return 0x1U << 5U;
1494}
1495static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_v(void)
1496{
1497 return 0x00000001U;
1498}
1499static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_f(void)
1500{
1501 return 0x20U;
1502}
1503static inline u32 fb_mmu_fault_status_dropped_ifb_virt_clear_v(void)
1504{
1505 return 0x00000001U;
1506}
1507static inline u32 fb_mmu_fault_status_dropped_ifb_virt_clear_f(void)
1508{
1509 return 0x20U;
1510}
1511static inline u32 fb_mmu_fault_status_dropped_other_phys_m(void)
1512{
1513 return 0x1U << 6U;
1514}
1515static inline u32 fb_mmu_fault_status_dropped_other_phys_set_v(void)
1516{
1517 return 0x00000001U;
1518}
1519static inline u32 fb_mmu_fault_status_dropped_other_phys_set_f(void)
1520{
1521 return 0x40U;
1522}
1523static inline u32 fb_mmu_fault_status_dropped_other_phys_clear_v(void)
1524{
1525 return 0x00000001U;
1526}
1527static inline u32 fb_mmu_fault_status_dropped_other_phys_clear_f(void)
1528{
1529 return 0x40U;
1530}
1531static inline u32 fb_mmu_fault_status_dropped_other_virt_m(void)
1532{
1533 return 0x1U << 7U;
1534}
1535static inline u32 fb_mmu_fault_status_dropped_other_virt_set_v(void)
1536{
1537 return 0x00000001U;
1538}
1539static inline u32 fb_mmu_fault_status_dropped_other_virt_set_f(void)
1540{
1541 return 0x80U;
1542}
1543static inline u32 fb_mmu_fault_status_dropped_other_virt_clear_v(void)
1544{
1545 return 0x00000001U;
1546}
1547static inline u32 fb_mmu_fault_status_dropped_other_virt_clear_f(void)
1548{
1549 return 0x80U;
1550}
1551static inline u32 fb_mmu_fault_status_replayable_m(void)
1552{
1553 return 0x1U << 8U;
1554}
1555static inline u32 fb_mmu_fault_status_replayable_set_v(void)
1556{
1557 return 0x00000001U;
1558}
1559static inline u32 fb_mmu_fault_status_replayable_set_f(void)
1560{
1561 return 0x100U;
1562}
1563static inline u32 fb_mmu_fault_status_replayable_reset_f(void)
1564{
1565 return 0x0U;
1566}
1567static inline u32 fb_mmu_fault_status_non_replayable_m(void)
1568{
1569 return 0x1U << 9U;
1570}
1571static inline u32 fb_mmu_fault_status_non_replayable_set_v(void)
1572{
1573 return 0x00000001U;
1574}
1575static inline u32 fb_mmu_fault_status_non_replayable_set_f(void)
1576{
1577 return 0x200U;
1578}
1579static inline u32 fb_mmu_fault_status_non_replayable_reset_f(void)
1580{
1581 return 0x0U;
1582}
1583static inline u32 fb_mmu_fault_status_replayable_error_m(void)
1584{
1585 return 0x1U << 10U;
1586}
1587static inline u32 fb_mmu_fault_status_replayable_error_set_v(void)
1588{
1589 return 0x00000001U;
1590}
1591static inline u32 fb_mmu_fault_status_replayable_error_set_f(void)
1592{
1593 return 0x400U;
1594}
1595static inline u32 fb_mmu_fault_status_replayable_error_reset_f(void)
1596{
1597 return 0x0U;
1598}
1599static inline u32 fb_mmu_fault_status_non_replayable_error_m(void)
1600{
1601 return 0x1U << 11U;
1602}
1603static inline u32 fb_mmu_fault_status_non_replayable_error_set_v(void)
1604{
1605 return 0x00000001U;
1606}
1607static inline u32 fb_mmu_fault_status_non_replayable_error_set_f(void)
1608{
1609 return 0x800U;
1610}
1611static inline u32 fb_mmu_fault_status_non_replayable_error_reset_f(void)
1612{
1613 return 0x0U;
1614}
1615static inline u32 fb_mmu_fault_status_replayable_overflow_m(void)
1616{
1617 return 0x1U << 12U;
1618}
1619static inline u32 fb_mmu_fault_status_replayable_overflow_set_v(void)
1620{
1621 return 0x00000001U;
1622}
1623static inline u32 fb_mmu_fault_status_replayable_overflow_set_f(void)
1624{
1625 return 0x1000U;
1626}
1627static inline u32 fb_mmu_fault_status_replayable_overflow_reset_f(void)
1628{
1629 return 0x0U;
1630}
1631static inline u32 fb_mmu_fault_status_non_replayable_overflow_m(void)
1632{
1633 return 0x1U << 13U;
1634}
1635static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_v(void)
1636{
1637 return 0x00000001U;
1638}
1639static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_f(void)
1640{
1641 return 0x2000U;
1642}
1643static inline u32 fb_mmu_fault_status_non_replayable_overflow_reset_f(void)
1644{
1645 return 0x0U;
1646}
1647static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_m(void)
1648{
1649 return 0x1U << 14U;
1650}
1651static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_v(void)
1652{
1653 return 0x00000001U;
1654}
1655static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_f(void)
1656{
1657 return 0x4000U;
1658}
1659static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_m(void)
1660{
1661 return 0x1U << 15U;
1662}
1663static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_v(void)
1664{
1665 return 0x00000001U;
1666}
1667static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_f(void)
1668{
1669 return 0x8000U;
1670}
1671static inline u32 fb_mmu_fault_status_busy_m(void)
1672{
1673 return 0x1U << 30U;
1674}
1675static inline u32 fb_mmu_fault_status_busy_true_v(void)
1676{
1677 return 0x00000001U;
1678}
1679static inline u32 fb_mmu_fault_status_busy_true_f(void)
1680{
1681 return 0x40000000U;
1682}
1683static inline u32 fb_mmu_fault_status_valid_m(void)
1684{
1685 return 0x1U << 31U;
1686}
1687static inline u32 fb_mmu_fault_status_valid_set_v(void)
1688{
1689 return 0x00000001U;
1690}
1691static inline u32 fb_mmu_fault_status_valid_set_f(void)
1692{
1693 return 0x80000000U;
1694}
1695static inline u32 fb_mmu_fault_status_valid_clear_v(void)
1696{
1697 return 0x00000001U;
1698}
1699static inline u32 fb_mmu_fault_status_valid_clear_f(void)
1700{
1701 return 0x80000000U;
1702}
1703static inline u32 fb_mmu_local_memory_range_r(void)
1704{
1705 return 0x00100ce0U;
1706}
1707static inline u32 fb_mmu_local_memory_range_lower_scale_v(u32 r)
1708{
1709 return (r >> 0U) & 0xfU;
1710}
1711static inline u32 fb_mmu_local_memory_range_lower_mag_v(u32 r)
1712{
1713 return (r >> 4U) & 0x3fU;
1714}
1715static inline u32 fb_mmu_local_memory_range_ecc_mode_v(u32 r)
1716{
1717 return (r >> 30U) & 0x1U;
1718}
1719static inline u32 fb_niso_scrub_status_r(void)
1720{
1721 return 0x00100b20U;
1722}
1723static inline u32 fb_niso_scrub_status_flag_v(u32 r)
1724{
1725 return (r >> 0U) & 0x1U;
1726}
1727static inline u32 fb_mmu_priv_level_mask_r(void)
1728{
1729 return 0x00100cdcU;
1730}
1731static inline u32 fb_mmu_priv_level_mask_write_violation_f(u32 v)
1732{
1733 return (v & 0x1U) << 7U;
1734}
1735static inline u32 fb_mmu_priv_level_mask_write_violation_m(void)
1736{
1737 return 0x1U << 7U;
1738}
1739static inline u32 fb_mmu_priv_level_mask_write_violation_v(u32 r)
1740{
1741 return (r >> 7U) & 0x1U;
1742}
1743static inline u32 fb_hshub_config0_r(void)
1744{
1745 return 0x001fbc00U;
1746}
1747static inline u32 fb_hshub_config0_sysmem_nvlink_mask_f(u32 v)
1748{
1749 return (v & 0xffffU) << 0U;
1750}
1751static inline u32 fb_hshub_config0_sysmem_nvlink_mask_m(void)
1752{
1753 return 0xffffU << 0U;
1754}
1755static inline u32 fb_hshub_config0_sysmem_nvlink_mask_v(u32 r)
1756{
1757 return (r >> 0U) & 0xffffU;
1758}
1759static inline u32 fb_hshub_config0_peer_pcie_mask_f(u32 v)
1760{
1761 return (v & 0xffffU) << 16U;
1762}
1763static inline u32 fb_hshub_config0_peer_pcie_mask_v(u32 r)
1764{
1765 return (r >> 16U) & 0xffffU;
1766}
1767static inline u32 fb_hshub_config1_r(void)
1768{
1769 return 0x001fbc04U;
1770}
1771static inline u32 fb_hshub_config1_peer_0_nvlink_mask_f(u32 v)
1772{
1773 return (v & 0xffU) << 0U;
1774}
1775static inline u32 fb_hshub_config1_peer_0_nvlink_mask_v(u32 r)
1776{
1777 return (r >> 0U) & 0xffU;
1778}
1779static inline u32 fb_hshub_config1_peer_1_nvlink_mask_f(u32 v)
1780{
1781 return (v & 0xffU) << 8U;
1782}
1783static inline u32 fb_hshub_config1_peer_1_nvlink_mask_v(u32 r)
1784{
1785 return (r >> 8U) & 0xffU;
1786}
1787static inline u32 fb_hshub_config1_peer_2_nvlink_mask_f(u32 v)
1788{
1789 return (v & 0xffU) << 16U;
1790}
1791static inline u32 fb_hshub_config1_peer_2_nvlink_mask_v(u32 r)
1792{
1793 return (r >> 16U) & 0xffU;
1794}
1795static inline u32 fb_hshub_config1_peer_3_nvlink_mask_f(u32 v)
1796{
1797 return (v & 0xffU) << 24U;
1798}
1799static inline u32 fb_hshub_config1_peer_3_nvlink_mask_v(u32 r)
1800{
1801 return (r >> 24U) & 0xffU;
1802}
1803static inline u32 fb_hshub_config2_r(void)
1804{
1805 return 0x001fbc08U;
1806}
1807static inline u32 fb_hshub_config2_peer_4_nvlink_mask_f(u32 v)
1808{
1809 return (v & 0xffU) << 0U;
1810}
1811static inline u32 fb_hshub_config2_peer_4_nvlink_mask_v(u32 r)
1812{
1813 return (r >> 0U) & 0xffU;
1814}
1815static inline u32 fb_hshub_config2_peer_5_nvlink_mask_f(u32 v)
1816{
1817 return (v & 0xffU) << 8U;
1818}
1819static inline u32 fb_hshub_config2_peer_5_nvlink_mask_v(u32 r)
1820{
1821 return (r >> 8U) & 0xffU;
1822}
1823static inline u32 fb_hshub_config2_peer_6_nvlink_mask_f(u32 v)
1824{
1825 return (v & 0xffU) << 16U;
1826}
1827static inline u32 fb_hshub_config2_peer_6_nvlink_mask_v(u32 r)
1828{
1829 return (r >> 16U) & 0xffU;
1830}
1831static inline u32 fb_hshub_config2_peer_7_nvlink_mask_f(u32 v)
1832{
1833 return (v & 0xffU) << 24U;
1834}
1835static inline u32 fb_hshub_config2_peer_7_nvlink_mask_v(u32 r)
1836{
1837 return (r >> 24U) & 0xffU;
1838}
1839static inline u32 fb_hshub_config6_r(void)
1840{
1841 return 0x001fbc18U;
1842}
1843static inline u32 fb_hshub_config7_r(void)
1844{
1845 return 0x001fbc1cU;
1846}
1847static inline u32 fb_hshub_config7_nvlink_logical_0_physical_portmap_f(u32 v)
1848{
1849 return (v & 0xfU) << 0U;
1850}
1851static inline u32 fb_hshub_config7_nvlink_logical_0_physical_portmap_v(u32 r)
1852{
1853 return (r >> 0U) & 0xfU;
1854}
1855static inline u32 fb_hshub_config7_nvlink_logical_1_physical_portmap_f(u32 v)
1856{
1857 return (v & 0xfU) << 4U;
1858}
1859static inline u32 fb_hshub_config7_nvlink_logical_1_physical_portmap_v(u32 r)
1860{
1861 return (r >> 4U) & 0xfU;
1862}
1863static inline u32 fb_hshub_config7_nvlink_logical_2_physical_portmap_f(u32 v)
1864{
1865 return (v & 0xfU) << 8U;
1866}
1867static inline u32 fb_hshub_config7_nvlink_logical_2_physical_portmap_v(u32 r)
1868{
1869 return (r >> 8U) & 0xfU;
1870}
1871static inline u32 fb_hshub_config7_nvlink_logical_3_physical_portmap_f(u32 v)
1872{
1873 return (v & 0xfU) << 12U;
1874}
1875static inline u32 fb_hshub_config7_nvlink_logical_3_physical_portmap_v(u32 r)
1876{
1877 return (r >> 12U) & 0xfU;
1878}
1879static inline u32 fb_hshub_config7_nvlink_logical_4_physical_portmap_f(u32 v)
1880{
1881 return (v & 0xfU) << 16U;
1882}
1883static inline u32 fb_hshub_config7_nvlink_logical_4_physical_portmap_v(u32 r)
1884{
1885 return (r >> 16U) & 0xfU;
1886}
1887static inline u32 fb_hshub_config7_nvlink_logical_5_physical_portmap_f(u32 v)
1888{
1889 return (v & 0xfU) << 20U;
1890}
1891static inline u32 fb_hshub_config7_nvlink_logical_5_physical_portmap_v(u32 r)
1892{
1893 return (r >> 20U) & 0xfU;
1894}
1895static inline u32 fb_hshub_config7_nvlink_logical_6_physical_portmap_f(u32 v)
1896{
1897 return (v & 0xfU) << 24U;
1898}
1899static inline u32 fb_hshub_config7_nvlink_logical_6_physical_portmap_v(u32 r)
1900{
1901 return (r >> 24U) & 0xfU;
1902}
1903static inline u32 fb_hshub_config7_nvlink_logical_7_physical_portmap_f(u32 v)
1904{
1905 return (v & 0xfU) << 28U;
1906}
1907static inline u32 fb_hshub_config7_nvlink_logical_7_physical_portmap_v(u32 r)
1908{
1909 return (r >> 28U) & 0xfU;
1910}
1911static inline u32 fb_hshub_nvl_cfg_priv_level_mask_r(void)
1912{
1913 return 0x001fbc50U;
1914}
1915static inline u32 fb_hshub_nvl_cfg_priv_level_mask_write_protection_f(u32 v)
1916{
1917 return (v & 0x7U) << 4U;
1918}
1919static inline u32 fb_hshub_nvl_cfg_priv_level_mask_write_protection_v(u32 r)
1920{
1921 return (r >> 4U) & 0x7U;
1922}
1923#endif
diff --git a/include/nvgpu/hw/gv100/hw_fifo_gv100.h b/include/nvgpu/hw/gv100/hw_fifo_gv100.h
deleted file mode 100644
index 4e9b590..0000000
--- a/include/nvgpu/hw/gv100/hw_fifo_gv100.h
+++ /dev/null
@@ -1,531 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fifo_gv100_h_
57#define _hw_fifo_gv100_h_
58
59static inline u32 fifo_bar1_base_r(void)
60{
61 return 0x00002254U;
62}
63static inline u32 fifo_bar1_base_ptr_f(u32 v)
64{
65 return (v & 0xfffffffU) << 0U;
66}
67static inline u32 fifo_bar1_base_ptr_align_shift_v(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 fifo_bar1_base_valid_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fifo_bar1_base_valid_true_f(void)
76{
77 return 0x10000000U;
78}
79static inline u32 fifo_userd_writeback_r(void)
80{
81 return 0x0000225cU;
82}
83static inline u32 fifo_userd_writeback_timer_f(u32 v)
84{
85 return (v & 0xffU) << 0U;
86}
87static inline u32 fifo_userd_writeback_timer_disabled_v(void)
88{
89 return 0x00000000U;
90}
91static inline u32 fifo_userd_writeback_timer_shorter_v(void)
92{
93 return 0x00000003U;
94}
95static inline u32 fifo_userd_writeback_timer_100us_v(void)
96{
97 return 0x00000064U;
98}
99static inline u32 fifo_userd_writeback_timescale_f(u32 v)
100{
101 return (v & 0xfU) << 12U;
102}
103static inline u32 fifo_userd_writeback_timescale_0_v(void)
104{
105 return 0x00000000U;
106}
107static inline u32 fifo_runlist_base_r(void)
108{
109 return 0x00002270U;
110}
111static inline u32 fifo_runlist_base_ptr_f(u32 v)
112{
113 return (v & 0xfffffffU) << 0U;
114}
115static inline u32 fifo_runlist_base_target_vid_mem_f(void)
116{
117 return 0x0U;
118}
119static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void)
124{
125 return 0x30000000U;
126}
127static inline u32 fifo_runlist_r(void)
128{
129 return 0x00002274U;
130}
131static inline u32 fifo_runlist_engine_f(u32 v)
132{
133 return (v & 0xfU) << 20U;
134}
135static inline u32 fifo_eng_runlist_base_r(u32 i)
136{
137 return 0x00002280U + i*8U;
138}
139static inline u32 fifo_eng_runlist_base__size_1_v(void)
140{
141 return 0x0000000dU;
142}
143static inline u32 fifo_eng_runlist_r(u32 i)
144{
145 return 0x00002284U + i*8U;
146}
147static inline u32 fifo_eng_runlist__size_1_v(void)
148{
149 return 0x0000000dU;
150}
151static inline u32 fifo_eng_runlist_length_f(u32 v)
152{
153 return (v & 0xffffU) << 0U;
154}
155static inline u32 fifo_eng_runlist_length_max_v(void)
156{
157 return 0x0000ffffU;
158}
159static inline u32 fifo_eng_runlist_pending_true_f(void)
160{
161 return 0x100000U;
162}
163static inline u32 fifo_pb_timeslice_r(u32 i)
164{
165 return 0x00002350U + i*4U;
166}
167static inline u32 fifo_pb_timeslice_timeout_16_f(void)
168{
169 return 0x10U;
170}
171static inline u32 fifo_pb_timeslice_timescale_0_f(void)
172{
173 return 0x0U;
174}
175static inline u32 fifo_pb_timeslice_enable_true_f(void)
176{
177 return 0x10000000U;
178}
179static inline u32 fifo_pbdma_map_r(u32 i)
180{
181 return 0x00002390U + i*4U;
182}
183static inline u32 fifo_intr_0_r(void)
184{
185 return 0x00002100U;
186}
187static inline u32 fifo_intr_0_bind_error_pending_f(void)
188{
189 return 0x1U;
190}
191static inline u32 fifo_intr_0_bind_error_reset_f(void)
192{
193 return 0x1U;
194}
195static inline u32 fifo_intr_0_sched_error_pending_f(void)
196{
197 return 0x100U;
198}
199static inline u32 fifo_intr_0_sched_error_reset_f(void)
200{
201 return 0x100U;
202}
203static inline u32 fifo_intr_0_chsw_error_pending_f(void)
204{
205 return 0x10000U;
206}
207static inline u32 fifo_intr_0_chsw_error_reset_f(void)
208{
209 return 0x10000U;
210}
211static inline u32 fifo_intr_0_memop_timeout_pending_f(void)
212{
213 return 0x800000U;
214}
215static inline u32 fifo_intr_0_memop_timeout_reset_f(void)
216{
217 return 0x800000U;
218}
219static inline u32 fifo_intr_0_lb_error_pending_f(void)
220{
221 return 0x1000000U;
222}
223static inline u32 fifo_intr_0_lb_error_reset_f(void)
224{
225 return 0x1000000U;
226}
227static inline u32 fifo_intr_0_pbdma_intr_pending_f(void)
228{
229 return 0x20000000U;
230}
231static inline u32 fifo_intr_0_runlist_event_pending_f(void)
232{
233 return 0x40000000U;
234}
235static inline u32 fifo_intr_0_channel_intr_pending_f(void)
236{
237 return 0x80000000U;
238}
239static inline u32 fifo_intr_en_0_r(void)
240{
241 return 0x00002140U;
242}
243static inline u32 fifo_intr_en_0_sched_error_f(u32 v)
244{
245 return (v & 0x1U) << 8U;
246}
247static inline u32 fifo_intr_en_0_sched_error_m(void)
248{
249 return 0x1U << 8U;
250}
251static inline u32 fifo_intr_en_1_r(void)
252{
253 return 0x00002528U;
254}
255static inline u32 fifo_intr_bind_error_r(void)
256{
257 return 0x0000252cU;
258}
259static inline u32 fifo_intr_sched_error_r(void)
260{
261 return 0x0000254cU;
262}
263static inline u32 fifo_intr_sched_error_code_f(u32 v)
264{
265 return (v & 0xffU) << 0U;
266}
267static inline u32 fifo_intr_chsw_error_r(void)
268{
269 return 0x0000256cU;
270}
271static inline u32 fifo_intr_pbdma_id_r(void)
272{
273 return 0x000025a0U;
274}
275static inline u32 fifo_intr_pbdma_id_status_f(u32 v, u32 i)
276{
277 return (v & 0x1U) << (0U + i*1U);
278}
279static inline u32 fifo_intr_pbdma_id_status_v(u32 r, u32 i)
280{
281 return (r >> (0U + i*1U)) & 0x1U;
282}
283static inline u32 fifo_intr_pbdma_id_status__size_1_v(void)
284{
285 return 0x0000000eU;
286}
287static inline u32 fifo_intr_runlist_r(void)
288{
289 return 0x00002a00U;
290}
291static inline u32 fifo_fb_timeout_r(void)
292{
293 return 0x00002a04U;
294}
295static inline u32 fifo_fb_timeout_period_m(void)
296{
297 return 0x3fffffffU << 0U;
298}
299static inline u32 fifo_fb_timeout_period_max_f(void)
300{
301 return 0x3fffffffU;
302}
303static inline u32 fifo_fb_timeout_period_init_f(void)
304{
305 return 0x3c00U;
306}
307static inline u32 fifo_sched_disable_r(void)
308{
309 return 0x00002630U;
310}
311static inline u32 fifo_sched_disable_runlist_f(u32 v, u32 i)
312{
313 return (v & 0x1U) << (0U + i*1U);
314}
315static inline u32 fifo_sched_disable_runlist_m(u32 i)
316{
317 return 0x1U << (0U + i*1U);
318}
319static inline u32 fifo_sched_disable_true_v(void)
320{
321 return 0x00000001U;
322}
323static inline u32 fifo_runlist_preempt_r(void)
324{
325 return 0x00002638U;
326}
327static inline u32 fifo_runlist_preempt_runlist_f(u32 v, u32 i)
328{
329 return (v & 0x1U) << (0U + i*1U);
330}
331static inline u32 fifo_runlist_preempt_runlist_m(u32 i)
332{
333 return 0x1U << (0U + i*1U);
334}
335static inline u32 fifo_runlist_preempt_runlist_pending_v(void)
336{
337 return 0x00000001U;
338}
339static inline u32 fifo_preempt_r(void)
340{
341 return 0x00002634U;
342}
343static inline u32 fifo_preempt_pending_true_f(void)
344{
345 return 0x100000U;
346}
347static inline u32 fifo_preempt_type_channel_f(void)
348{
349 return 0x0U;
350}
351static inline u32 fifo_preempt_type_tsg_f(void)
352{
353 return 0x1000000U;
354}
355static inline u32 fifo_preempt_chid_f(u32 v)
356{
357 return (v & 0xfffU) << 0U;
358}
359static inline u32 fifo_preempt_id_f(u32 v)
360{
361 return (v & 0xfffU) << 0U;
362}
363static inline u32 fifo_engine_status_r(u32 i)
364{
365 return 0x00002640U + i*8U;
366}
367static inline u32 fifo_engine_status__size_1_v(void)
368{
369 return 0x0000000fU;
370}
371static inline u32 fifo_engine_status_id_v(u32 r)
372{
373 return (r >> 0U) & 0xfffU;
374}
375static inline u32 fifo_engine_status_id_type_v(u32 r)
376{
377 return (r >> 12U) & 0x1U;
378}
379static inline u32 fifo_engine_status_id_type_chid_v(void)
380{
381 return 0x00000000U;
382}
383static inline u32 fifo_engine_status_id_type_tsgid_v(void)
384{
385 return 0x00000001U;
386}
387static inline u32 fifo_engine_status_ctx_status_v(u32 r)
388{
389 return (r >> 13U) & 0x7U;
390}
391static inline u32 fifo_engine_status_ctx_status_valid_v(void)
392{
393 return 0x00000001U;
394}
395static inline u32 fifo_engine_status_ctx_status_ctxsw_load_v(void)
396{
397 return 0x00000005U;
398}
399static inline u32 fifo_engine_status_ctx_status_ctxsw_save_v(void)
400{
401 return 0x00000006U;
402}
403static inline u32 fifo_engine_status_ctx_status_ctxsw_switch_v(void)
404{
405 return 0x00000007U;
406}
407static inline u32 fifo_engine_status_next_id_v(u32 r)
408{
409 return (r >> 16U) & 0xfffU;
410}
411static inline u32 fifo_engine_status_next_id_type_v(u32 r)
412{
413 return (r >> 28U) & 0x1U;
414}
415static inline u32 fifo_engine_status_next_id_type_chid_v(void)
416{
417 return 0x00000000U;
418}
419static inline u32 fifo_engine_status_eng_reload_v(u32 r)
420{
421 return (r >> 29U) & 0x1U;
422}
423static inline u32 fifo_engine_status_faulted_v(u32 r)
424{
425 return (r >> 30U) & 0x1U;
426}
427static inline u32 fifo_engine_status_faulted_true_v(void)
428{
429 return 0x00000001U;
430}
431static inline u32 fifo_engine_status_engine_v(u32 r)
432{
433 return (r >> 31U) & 0x1U;
434}
435static inline u32 fifo_engine_status_engine_idle_v(void)
436{
437 return 0x00000000U;
438}
439static inline u32 fifo_engine_status_engine_busy_v(void)
440{
441 return 0x00000001U;
442}
443static inline u32 fifo_engine_status_ctxsw_v(u32 r)
444{
445 return (r >> 15U) & 0x1U;
446}
447static inline u32 fifo_engine_status_ctxsw_in_progress_v(void)
448{
449 return 0x00000001U;
450}
451static inline u32 fifo_engine_status_ctxsw_in_progress_f(void)
452{
453 return 0x8000U;
454}
455static inline u32 fifo_pbdma_status_r(u32 i)
456{
457 return 0x00003080U + i*4U;
458}
459static inline u32 fifo_pbdma_status__size_1_v(void)
460{
461 return 0x0000000eU;
462}
463static inline u32 fifo_pbdma_status_id_v(u32 r)
464{
465 return (r >> 0U) & 0xfffU;
466}
467static inline u32 fifo_pbdma_status_id_type_v(u32 r)
468{
469 return (r >> 12U) & 0x1U;
470}
471static inline u32 fifo_pbdma_status_id_type_chid_v(void)
472{
473 return 0x00000000U;
474}
475static inline u32 fifo_pbdma_status_id_type_tsgid_v(void)
476{
477 return 0x00000001U;
478}
479static inline u32 fifo_pbdma_status_chan_status_v(u32 r)
480{
481 return (r >> 13U) & 0x7U;
482}
483static inline u32 fifo_pbdma_status_chan_status_valid_v(void)
484{
485 return 0x00000001U;
486}
487static inline u32 fifo_pbdma_status_chan_status_chsw_load_v(void)
488{
489 return 0x00000005U;
490}
491static inline u32 fifo_pbdma_status_chan_status_chsw_save_v(void)
492{
493 return 0x00000006U;
494}
495static inline u32 fifo_pbdma_status_chan_status_chsw_switch_v(void)
496{
497 return 0x00000007U;
498}
499static inline u32 fifo_pbdma_status_next_id_v(u32 r)
500{
501 return (r >> 16U) & 0xfffU;
502}
503static inline u32 fifo_pbdma_status_next_id_type_v(u32 r)
504{
505 return (r >> 28U) & 0x1U;
506}
507static inline u32 fifo_pbdma_status_next_id_type_chid_v(void)
508{
509 return 0x00000000U;
510}
511static inline u32 fifo_pbdma_status_chsw_v(u32 r)
512{
513 return (r >> 15U) & 0x1U;
514}
515static inline u32 fifo_pbdma_status_chsw_in_progress_v(void)
516{
517 return 0x00000001U;
518}
519static inline u32 fifo_cfg0_r(void)
520{
521 return 0x00002004U;
522}
523static inline u32 fifo_cfg0_num_pbdma_v(u32 r)
524{
525 return (r >> 0U) & 0xffU;
526}
527static inline u32 fifo_cfg0_pbdma_fault_id_v(u32 r)
528{
529 return (r >> 16U) & 0xffU;
530}
531#endif
diff --git a/include/nvgpu/hw/gv100/hw_flush_gv100.h b/include/nvgpu/hw/gv100/hw_flush_gv100.h
deleted file mode 100644
index b604562..0000000
--- a/include/nvgpu/hw/gv100/hw_flush_gv100.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_flush_gv100_h_
57#define _hw_flush_gv100_h_
58
59static inline u32 flush_l2_system_invalidate_r(void)
60{
61 return 0x00070004U;
62}
63static inline u32 flush_l2_system_invalidate_pending_v(u32 r)
64{
65 return (r >> 0U) & 0x1U;
66}
67static inline u32 flush_l2_system_invalidate_pending_busy_v(void)
68{
69 return 0x00000001U;
70}
71static inline u32 flush_l2_system_invalidate_pending_busy_f(void)
72{
73 return 0x1U;
74}
75static inline u32 flush_l2_system_invalidate_outstanding_v(u32 r)
76{
77 return (r >> 1U) & 0x1U;
78}
79static inline u32 flush_l2_system_invalidate_outstanding_true_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 flush_l2_flush_dirty_r(void)
84{
85 return 0x00070010U;
86}
87static inline u32 flush_l2_flush_dirty_pending_v(u32 r)
88{
89 return (r >> 0U) & 0x1U;
90}
91static inline u32 flush_l2_flush_dirty_pending_empty_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 flush_l2_flush_dirty_pending_empty_f(void)
96{
97 return 0x0U;
98}
99static inline u32 flush_l2_flush_dirty_pending_busy_v(void)
100{
101 return 0x00000001U;
102}
103static inline u32 flush_l2_flush_dirty_pending_busy_f(void)
104{
105 return 0x1U;
106}
107static inline u32 flush_l2_flush_dirty_outstanding_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 flush_l2_flush_dirty_outstanding_false_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 flush_l2_flush_dirty_outstanding_false_f(void)
116{
117 return 0x0U;
118}
119static inline u32 flush_l2_flush_dirty_outstanding_true_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 flush_l2_clean_comptags_r(void)
124{
125 return 0x0007000cU;
126}
127static inline u32 flush_l2_clean_comptags_pending_v(u32 r)
128{
129 return (r >> 0U) & 0x1U;
130}
131static inline u32 flush_l2_clean_comptags_pending_empty_v(void)
132{
133 return 0x00000000U;
134}
135static inline u32 flush_l2_clean_comptags_pending_empty_f(void)
136{
137 return 0x0U;
138}
139static inline u32 flush_l2_clean_comptags_pending_busy_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 flush_l2_clean_comptags_pending_busy_f(void)
144{
145 return 0x1U;
146}
147static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 flush_l2_clean_comptags_outstanding_false_v(void)
152{
153 return 0x00000000U;
154}
155static inline u32 flush_l2_clean_comptags_outstanding_false_f(void)
156{
157 return 0x0U;
158}
159static inline u32 flush_l2_clean_comptags_outstanding_true_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 flush_fb_flush_r(void)
164{
165 return 0x00070000U;
166}
167static inline u32 flush_fb_flush_pending_v(u32 r)
168{
169 return (r >> 0U) & 0x1U;
170}
171static inline u32 flush_fb_flush_pending_busy_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 flush_fb_flush_pending_busy_f(void)
176{
177 return 0x1U;
178}
179static inline u32 flush_fb_flush_outstanding_v(u32 r)
180{
181 return (r >> 1U) & 0x1U;
182}
183static inline u32 flush_fb_flush_outstanding_true_v(void)
184{
185 return 0x00000001U;
186}
187#endif
diff --git a/include/nvgpu/hw/gv100/hw_fuse_gv100.h b/include/nvgpu/hw/gv100/hw_fuse_gv100.h
deleted file mode 100644
index 48194ea..0000000
--- a/include/nvgpu/hw/gv100/hw_fuse_gv100.h
+++ /dev/null
@@ -1,147 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fuse_gv100_h_
57#define _hw_fuse_gv100_h_
58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
64{
65 return 0x00021c38U + i*4U;
66}
67static inline u32 fuse_ctrl_opt_tpc_gpc_r(u32 i)
68{
69 return 0x00021838U + i*4U;
70}
71static inline u32 fuse_ctrl_opt_ram_svop_pdp_r(void)
72{
73 return 0x00021944U;
74}
75static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_f(u32 v)
76{
77 return (v & 0xffU) << 0U;
78}
79static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_m(void)
80{
81 return 0xffU << 0U;
82}
83static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_v(u32 r)
84{
85 return (r >> 0U) & 0xffU;
86}
87static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_r(void)
88{
89 return 0x00021948U;
90}
91static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_f(u32 v)
92{
93 return (v & 0x1U) << 0U;
94}
95static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_m(void)
96{
97 return 0x1U << 0U;
98}
99static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_yes_f(void)
104{
105 return 0x1U;
106}
107static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_no_f(void)
108{
109 return 0x0U;
110}
111static inline u32 fuse_status_opt_fbio_r(void)
112{
113 return 0x00021c14U;
114}
115static inline u32 fuse_status_opt_fbio_data_f(u32 v)
116{
117 return (v & 0xffffU) << 0U;
118}
119static inline u32 fuse_status_opt_fbio_data_m(void)
120{
121 return 0xffffU << 0U;
122}
123static inline u32 fuse_status_opt_fbio_data_v(u32 r)
124{
125 return (r >> 0U) & 0xffffU;
126}
127static inline u32 fuse_status_opt_rop_l2_fbp_r(u32 i)
128{
129 return 0x00021d70U + i*4U;
130}
131static inline u32 fuse_status_opt_fbp_r(void)
132{
133 return 0x00021d38U;
134}
135static inline u32 fuse_status_opt_fbp_idx_v(u32 r, u32 i)
136{
137 return (r >> (0U + i*1U)) & 0x1U;
138}
139static inline u32 fuse_opt_ecc_en_r(void)
140{
141 return 0x00021228U;
142}
143static inline u32 fuse_opt_feature_fuses_override_disable_r(void)
144{
145 return 0x000213f0U;
146}
147#endif
diff --git a/include/nvgpu/hw/gv100/hw_gmmu_gv100.h b/include/nvgpu/hw/gv100/hw_gmmu_gv100.h
deleted file mode 100644
index 8cccfa9..0000000
--- a/include/nvgpu/hw/gv100/hw_gmmu_gv100.h
+++ /dev/null
@@ -1,355 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gmmu_gv100_h_
57#define _hw_gmmu_gv100_h_
58
59static inline u32 gmmu_new_pde_is_pte_w(void)
60{
61 return 0U;
62}
63static inline u32 gmmu_new_pde_is_pte_false_f(void)
64{
65 return 0x0U;
66}
67static inline u32 gmmu_new_pde_aperture_w(void)
68{
69 return 0U;
70}
71static inline u32 gmmu_new_pde_aperture_invalid_f(void)
72{
73 return 0x0U;
74}
75static inline u32 gmmu_new_pde_aperture_video_memory_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gmmu_new_pde_aperture_sys_mem_coh_f(void)
80{
81 return 0x4U;
82}
83static inline u32 gmmu_new_pde_aperture_sys_mem_ncoh_f(void)
84{
85 return 0x6U;
86}
87static inline u32 gmmu_new_pde_address_sys_f(u32 v)
88{
89 return (v & 0xffffffU) << 8U;
90}
91static inline u32 gmmu_new_pde_address_sys_w(void)
92{
93 return 0U;
94}
95static inline u32 gmmu_new_pde_vol_w(void)
96{
97 return 0U;
98}
99static inline u32 gmmu_new_pde_vol_true_f(void)
100{
101 return 0x8U;
102}
103static inline u32 gmmu_new_pde_vol_false_f(void)
104{
105 return 0x0U;
106}
107static inline u32 gmmu_new_pde_address_shift_v(void)
108{
109 return 0x0000000cU;
110}
111static inline u32 gmmu_new_pde__size_v(void)
112{
113 return 0x00000008U;
114}
115static inline u32 gmmu_new_dual_pde_is_pte_w(void)
116{
117 return 0U;
118}
119static inline u32 gmmu_new_dual_pde_is_pte_false_f(void)
120{
121 return 0x0U;
122}
123static inline u32 gmmu_new_dual_pde_aperture_big_w(void)
124{
125 return 0U;
126}
127static inline u32 gmmu_new_dual_pde_aperture_big_invalid_f(void)
128{
129 return 0x0U;
130}
131static inline u32 gmmu_new_dual_pde_aperture_big_video_memory_f(void)
132{
133 return 0x2U;
134}
135static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_coh_f(void)
136{
137 return 0x4U;
138}
139static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f(void)
140{
141 return 0x6U;
142}
143static inline u32 gmmu_new_dual_pde_address_big_sys_f(u32 v)
144{
145 return (v & 0xfffffffU) << 4U;
146}
147static inline u32 gmmu_new_dual_pde_address_big_sys_w(void)
148{
149 return 0U;
150}
151static inline u32 gmmu_new_dual_pde_aperture_small_w(void)
152{
153 return 2U;
154}
155static inline u32 gmmu_new_dual_pde_aperture_small_invalid_f(void)
156{
157 return 0x0U;
158}
159static inline u32 gmmu_new_dual_pde_aperture_small_video_memory_f(void)
160{
161 return 0x2U;
162}
163static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_coh_f(void)
164{
165 return 0x4U;
166}
167static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f(void)
168{
169 return 0x6U;
170}
171static inline u32 gmmu_new_dual_pde_vol_small_w(void)
172{
173 return 2U;
174}
175static inline u32 gmmu_new_dual_pde_vol_small_true_f(void)
176{
177 return 0x8U;
178}
179static inline u32 gmmu_new_dual_pde_vol_small_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 gmmu_new_dual_pde_vol_big_w(void)
184{
185 return 0U;
186}
187static inline u32 gmmu_new_dual_pde_vol_big_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 gmmu_new_dual_pde_vol_big_false_f(void)
192{
193 return 0x0U;
194}
195static inline u32 gmmu_new_dual_pde_address_small_sys_f(u32 v)
196{
197 return (v & 0xffffffU) << 8U;
198}
199static inline u32 gmmu_new_dual_pde_address_small_sys_w(void)
200{
201 return 2U;
202}
203static inline u32 gmmu_new_dual_pde_address_shift_v(void)
204{
205 return 0x0000000cU;
206}
207static inline u32 gmmu_new_dual_pde_address_big_shift_v(void)
208{
209 return 0x00000008U;
210}
211static inline u32 gmmu_new_dual_pde__size_v(void)
212{
213 return 0x00000010U;
214}
215static inline u32 gmmu_new_pte__size_v(void)
216{
217 return 0x00000008U;
218}
219static inline u32 gmmu_new_pte_valid_w(void)
220{
221 return 0U;
222}
223static inline u32 gmmu_new_pte_valid_true_f(void)
224{
225 return 0x1U;
226}
227static inline u32 gmmu_new_pte_valid_false_f(void)
228{
229 return 0x0U;
230}
231static inline u32 gmmu_new_pte_privilege_w(void)
232{
233 return 0U;
234}
235static inline u32 gmmu_new_pte_privilege_true_f(void)
236{
237 return 0x20U;
238}
239static inline u32 gmmu_new_pte_privilege_false_f(void)
240{
241 return 0x0U;
242}
243static inline u32 gmmu_new_pte_address_sys_f(u32 v)
244{
245 return (v & 0xffffffU) << 8U;
246}
247static inline u32 gmmu_new_pte_address_sys_w(void)
248{
249 return 0U;
250}
251static inline u32 gmmu_new_pte_address_vid_f(u32 v)
252{
253 return (v & 0xffffffU) << 8U;
254}
255static inline u32 gmmu_new_pte_address_vid_w(void)
256{
257 return 0U;
258}
259static inline u32 gmmu_new_pte_vol_w(void)
260{
261 return 0U;
262}
263static inline u32 gmmu_new_pte_vol_true_f(void)
264{
265 return 0x8U;
266}
267static inline u32 gmmu_new_pte_vol_false_f(void)
268{
269 return 0x0U;
270}
271static inline u32 gmmu_new_pte_aperture_w(void)
272{
273 return 0U;
274}
275static inline u32 gmmu_new_pte_aperture_video_memory_f(void)
276{
277 return 0x0U;
278}
279static inline u32 gmmu_new_pte_aperture_sys_mem_coh_f(void)
280{
281 return 0x4U;
282}
283static inline u32 gmmu_new_pte_aperture_sys_mem_ncoh_f(void)
284{
285 return 0x6U;
286}
287static inline u32 gmmu_new_pte_read_only_w(void)
288{
289 return 0U;
290}
291static inline u32 gmmu_new_pte_read_only_true_f(void)
292{
293 return 0x40U;
294}
295static inline u32 gmmu_new_pte_comptagline_f(u32 v)
296{
297 return (v & 0x3ffffU) << 4U;
298}
299static inline u32 gmmu_new_pte_comptagline_w(void)
300{
301 return 1U;
302}
303static inline u32 gmmu_new_pte_kind_f(u32 v)
304{
305 return (v & 0xffU) << 24U;
306}
307static inline u32 gmmu_new_pte_kind_w(void)
308{
309 return 1U;
310}
311static inline u32 gmmu_new_pte_address_shift_v(void)
312{
313 return 0x0000000cU;
314}
315static inline u32 gmmu_pte_kind_f(u32 v)
316{
317 return (v & 0xffU) << 4U;
318}
319static inline u32 gmmu_pte_kind_w(void)
320{
321 return 1U;
322}
323static inline u32 gmmu_pte_kind_invalid_v(void)
324{
325 return 0x000000ffU;
326}
327static inline u32 gmmu_pte_kind_pitch_v(void)
328{
329 return 0x00000000U;
330}
331static inline u32 gmmu_fault_client_type_gpc_v(void)
332{
333 return 0x00000000U;
334}
335static inline u32 gmmu_fault_client_type_hub_v(void)
336{
337 return 0x00000001U;
338}
339static inline u32 gmmu_fault_type_unbound_inst_block_v(void)
340{
341 return 0x00000004U;
342}
343static inline u32 gmmu_fault_mmu_eng_id_bar2_v(void)
344{
345 return 0x00000005U;
346}
347static inline u32 gmmu_fault_mmu_eng_id_physical_v(void)
348{
349 return 0x0000001fU;
350}
351static inline u32 gmmu_fault_mmu_eng_id_ce0_v(void)
352{
353 return 0x0000000fU;
354}
355#endif
diff --git a/include/nvgpu/hw/gv100/hw_gr_gv100.h b/include/nvgpu/hw/gv100/hw_gr_gv100.h
deleted file mode 100644
index 3955a63..0000000
--- a/include/nvgpu/hw/gv100/hw_gr_gv100.h
+++ /dev/null
@@ -1,4123 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gr_gv100_h_
57#define _hw_gr_gv100_h_
58
59static inline u32 gr_intr_r(void)
60{
61 return 0x00400100U;
62}
63static inline u32 gr_intr_notify_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 gr_intr_notify_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gr_intr_semaphore_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gr_intr_semaphore_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gr_intr_illegal_method_pending_f(void)
80{
81 return 0x10U;
82}
83static inline u32 gr_intr_illegal_method_reset_f(void)
84{
85 return 0x10U;
86}
87static inline u32 gr_intr_illegal_notify_pending_f(void)
88{
89 return 0x40U;
90}
91static inline u32 gr_intr_illegal_notify_reset_f(void)
92{
93 return 0x40U;
94}
95static inline u32 gr_intr_firmware_method_f(u32 v)
96{
97 return (v & 0x1U) << 8U;
98}
99static inline u32 gr_intr_firmware_method_pending_f(void)
100{
101 return 0x100U;
102}
103static inline u32 gr_intr_firmware_method_reset_f(void)
104{
105 return 0x100U;
106}
107static inline u32 gr_intr_illegal_class_pending_f(void)
108{
109 return 0x20U;
110}
111static inline u32 gr_intr_illegal_class_reset_f(void)
112{
113 return 0x20U;
114}
115static inline u32 gr_intr_fecs_error_pending_f(void)
116{
117 return 0x80000U;
118}
119static inline u32 gr_intr_fecs_error_reset_f(void)
120{
121 return 0x80000U;
122}
123static inline u32 gr_intr_class_error_pending_f(void)
124{
125 return 0x100000U;
126}
127static inline u32 gr_intr_class_error_reset_f(void)
128{
129 return 0x100000U;
130}
131static inline u32 gr_intr_exception_pending_f(void)
132{
133 return 0x200000U;
134}
135static inline u32 gr_intr_exception_reset_f(void)
136{
137 return 0x200000U;
138}
139static inline u32 gr_fecs_intr_r(void)
140{
141 return 0x00400144U;
142}
143static inline u32 gr_class_error_r(void)
144{
145 return 0x00400110U;
146}
147static inline u32 gr_class_error_code_v(u32 r)
148{
149 return (r >> 0U) & 0xffffU;
150}
151static inline u32 gr_intr_nonstall_r(void)
152{
153 return 0x00400120U;
154}
155static inline u32 gr_intr_nonstall_trap_pending_f(void)
156{
157 return 0x2U;
158}
159static inline u32 gr_intr_en_r(void)
160{
161 return 0x0040013cU;
162}
163static inline u32 gr_exception_r(void)
164{
165 return 0x00400108U;
166}
167static inline u32 gr_exception_fe_m(void)
168{
169 return 0x1U << 0U;
170}
171static inline u32 gr_exception_gpc_m(void)
172{
173 return 0x1U << 24U;
174}
175static inline u32 gr_exception_memfmt_m(void)
176{
177 return 0x1U << 1U;
178}
179static inline u32 gr_exception_ds_m(void)
180{
181 return 0x1U << 4U;
182}
183static inline u32 gr_exception_sked_m(void)
184{
185 return 0x1U << 8U;
186}
187static inline u32 gr_exception_pd_m(void)
188{
189 return 0x1U << 2U;
190}
191static inline u32 gr_exception_scc_m(void)
192{
193 return 0x1U << 3U;
194}
195static inline u32 gr_exception_ssync_m(void)
196{
197 return 0x1U << 5U;
198}
199static inline u32 gr_exception_mme_m(void)
200{
201 return 0x1U << 7U;
202}
203static inline u32 gr_exception1_r(void)
204{
205 return 0x00400118U;
206}
207static inline u32 gr_exception1_gpc_0_pending_f(void)
208{
209 return 0x1U;
210}
211static inline u32 gr_exception2_r(void)
212{
213 return 0x0040011cU;
214}
215static inline u32 gr_exception_en_r(void)
216{
217 return 0x00400138U;
218}
219static inline u32 gr_exception_en_fe_m(void)
220{
221 return 0x1U << 0U;
222}
223static inline u32 gr_exception_en_fe_enabled_f(void)
224{
225 return 0x1U;
226}
227static inline u32 gr_exception_en_gpc_m(void)
228{
229 return 0x1U << 24U;
230}
231static inline u32 gr_exception_en_gpc_enabled_f(void)
232{
233 return 0x1000000U;
234}
235static inline u32 gr_exception_en_memfmt_m(void)
236{
237 return 0x1U << 1U;
238}
239static inline u32 gr_exception_en_memfmt_enabled_f(void)
240{
241 return 0x2U;
242}
243static inline u32 gr_exception_en_ds_m(void)
244{
245 return 0x1U << 4U;
246}
247static inline u32 gr_exception_en_ds_enabled_f(void)
248{
249 return 0x10U;
250}
251static inline u32 gr_exception_en_pd_m(void)
252{
253 return 0x1U << 2U;
254}
255static inline u32 gr_exception_en_pd_enabled_f(void)
256{
257 return 0x4U;
258}
259static inline u32 gr_exception_en_scc_m(void)
260{
261 return 0x1U << 3U;
262}
263static inline u32 gr_exception_en_scc_enabled_f(void)
264{
265 return 0x8U;
266}
267static inline u32 gr_exception_en_ssync_m(void)
268{
269 return 0x1U << 5U;
270}
271static inline u32 gr_exception_en_ssync_enabled_f(void)
272{
273 return 0x20U;
274}
275static inline u32 gr_exception_en_mme_m(void)
276{
277 return 0x1U << 7U;
278}
279static inline u32 gr_exception_en_mme_enabled_f(void)
280{
281 return 0x80U;
282}
283static inline u32 gr_exception_en_sked_m(void)
284{
285 return 0x1U << 8U;
286}
287static inline u32 gr_exception_en_sked_enabled_f(void)
288{
289 return 0x100U;
290}
291static inline u32 gr_exception1_en_r(void)
292{
293 return 0x00400130U;
294}
295static inline u32 gr_exception2_en_r(void)
296{
297 return 0x00400134U;
298}
299static inline u32 gr_gpfifo_ctl_r(void)
300{
301 return 0x00400500U;
302}
303static inline u32 gr_gpfifo_ctl_access_f(u32 v)
304{
305 return (v & 0x1U) << 0U;
306}
307static inline u32 gr_gpfifo_ctl_access_disabled_f(void)
308{
309 return 0x0U;
310}
311static inline u32 gr_gpfifo_ctl_access_enabled_f(void)
312{
313 return 0x1U;
314}
315static inline u32 gr_gpfifo_ctl_semaphore_access_f(u32 v)
316{
317 return (v & 0x1U) << 16U;
318}
319static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_v(void)
320{
321 return 0x00000001U;
322}
323static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_f(void)
324{
325 return 0x10000U;
326}
327static inline u32 gr_gpfifo_status_r(void)
328{
329 return 0x00400504U;
330}
331static inline u32 gr_trapped_addr_r(void)
332{
333 return 0x00400704U;
334}
335static inline u32 gr_trapped_addr_mthd_v(u32 r)
336{
337 return (r >> 2U) & 0xfffU;
338}
339static inline u32 gr_trapped_addr_subch_v(u32 r)
340{
341 return (r >> 16U) & 0x7U;
342}
343static inline u32 gr_trapped_addr_mme_generated_v(u32 r)
344{
345 return (r >> 20U) & 0x1U;
346}
347static inline u32 gr_trapped_addr_datahigh_v(u32 r)
348{
349 return (r >> 24U) & 0x1U;
350}
351static inline u32 gr_trapped_addr_priv_v(u32 r)
352{
353 return (r >> 28U) & 0x1U;
354}
355static inline u32 gr_trapped_addr_status_v(u32 r)
356{
357 return (r >> 31U) & 0x1U;
358}
359static inline u32 gr_trapped_data_lo_r(void)
360{
361 return 0x00400708U;
362}
363static inline u32 gr_trapped_data_hi_r(void)
364{
365 return 0x0040070cU;
366}
367static inline u32 gr_trapped_data_mme_r(void)
368{
369 return 0x00400710U;
370}
371static inline u32 gr_trapped_data_mme_pc_v(u32 r)
372{
373 return (r >> 0U) & 0xfffU;
374}
375static inline u32 gr_status_r(void)
376{
377 return 0x00400700U;
378}
379static inline u32 gr_status_fe_method_upper_v(u32 r)
380{
381 return (r >> 1U) & 0x1U;
382}
383static inline u32 gr_status_fe_method_lower_v(u32 r)
384{
385 return (r >> 2U) & 0x1U;
386}
387static inline u32 gr_status_fe_method_lower_idle_v(void)
388{
389 return 0x00000000U;
390}
391static inline u32 gr_status_fe_gi_v(u32 r)
392{
393 return (r >> 21U) & 0x1U;
394}
395static inline u32 gr_status_mask_r(void)
396{
397 return 0x00400610U;
398}
399static inline u32 gr_status_1_r(void)
400{
401 return 0x00400604U;
402}
403static inline u32 gr_status_2_r(void)
404{
405 return 0x00400608U;
406}
407static inline u32 gr_engine_status_r(void)
408{
409 return 0x0040060cU;
410}
411static inline u32 gr_engine_status_value_busy_f(void)
412{
413 return 0x1U;
414}
415static inline u32 gr_pri_be0_becs_be_exception_r(void)
416{
417 return 0x00410204U;
418}
419static inline u32 gr_pri_be0_becs_be_exception_en_r(void)
420{
421 return 0x00410208U;
422}
423static inline u32 gr_pri_gpc0_gpccs_gpc_exception_r(void)
424{
425 return 0x00502c90U;
426}
427static inline u32 gr_pri_gpc0_gpccs_gpc_exception_en_r(void)
428{
429 return 0x00502c94U;
430}
431static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_r(void)
432{
433 return 0x00504508U;
434}
435static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
436{
437 return 0x0050450cU;
438}
439static inline u32 gr_activity_0_r(void)
440{
441 return 0x00400380U;
442}
443static inline u32 gr_activity_1_r(void)
444{
445 return 0x00400384U;
446}
447static inline u32 gr_activity_2_r(void)
448{
449 return 0x00400388U;
450}
451static inline u32 gr_activity_4_r(void)
452{
453 return 0x00400390U;
454}
455static inline u32 gr_activity_4_gpc0_s(void)
456{
457 return 3U;
458}
459static inline u32 gr_activity_4_gpc0_f(u32 v)
460{
461 return (v & 0x7U) << 0U;
462}
463static inline u32 gr_activity_4_gpc0_m(void)
464{
465 return 0x7U << 0U;
466}
467static inline u32 gr_activity_4_gpc0_v(u32 r)
468{
469 return (r >> 0U) & 0x7U;
470}
471static inline u32 gr_activity_4_gpc0_empty_v(void)
472{
473 return 0x00000000U;
474}
475static inline u32 gr_activity_4_gpc0_preempted_v(void)
476{
477 return 0x00000004U;
478}
479static inline u32 gr_pri_gpc0_gcc_dbg_r(void)
480{
481 return 0x00501000U;
482}
483static inline u32 gr_pri_gpcs_gcc_dbg_r(void)
484{
485 return 0x00419000U;
486}
487static inline u32 gr_pri_gpcs_gcc_dbg_invalidate_m(void)
488{
489 return 0x1U << 1U;
490}
491static inline u32 gr_pri_gpc0_tpc0_sm_cache_control_r(void)
492{
493 return 0x0050433cU;
494}
495static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_r(void)
496{
497 return 0x00419b3cU;
498}
499static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_invalidate_cache_m(void)
500{
501 return 0x1U << 0U;
502}
503static inline u32 gr_pri_sked_activity_r(void)
504{
505 return 0x00407054U;
506}
507static inline u32 gr_pri_gpc0_gpccs_gpc_activity0_r(void)
508{
509 return 0x00502c80U;
510}
511static inline u32 gr_pri_gpc0_gpccs_gpc_activity1_r(void)
512{
513 return 0x00502c84U;
514}
515static inline u32 gr_pri_gpc0_gpccs_gpc_activity2_r(void)
516{
517 return 0x00502c88U;
518}
519static inline u32 gr_pri_gpc0_gpccs_gpc_activity3_r(void)
520{
521 return 0x00502c8cU;
522}
523static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r(void)
524{
525 return 0x00504500U;
526}
527static inline u32 gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r(void)
528{
529 return 0x00504d00U;
530}
531static inline u32 gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r(void)
532{
533 return 0x00501d00U;
534}
535static inline u32 gr_pri_gpcs_gpccs_gpc_activity_0_r(void)
536{
537 return 0x0041ac80U;
538}
539static inline u32 gr_pri_gpcs_gpccs_gpc_activity_1_r(void)
540{
541 return 0x0041ac84U;
542}
543static inline u32 gr_pri_gpcs_gpccs_gpc_activity_2_r(void)
544{
545 return 0x0041ac88U;
546}
547static inline u32 gr_pri_gpcs_gpccs_gpc_activity_3_r(void)
548{
549 return 0x0041ac8cU;
550}
551static inline u32 gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r(void)
552{
553 return 0x0041c500U;
554}
555static inline u32 gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r(void)
556{
557 return 0x0041cd00U;
558}
559static inline u32 gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r(void)
560{
561 return 0x00419d00U;
562}
563static inline u32 gr_pri_be0_becs_be_activity0_r(void)
564{
565 return 0x00410200U;
566}
567static inline u32 gr_pri_be1_becs_be_activity0_r(void)
568{
569 return 0x00410600U;
570}
571static inline u32 gr_pri_bes_becs_be_activity0_r(void)
572{
573 return 0x00408a00U;
574}
575static inline u32 gr_pri_ds_mpipe_status_r(void)
576{
577 return 0x00405858U;
578}
579static inline u32 gr_pri_fe_go_idle_info_r(void)
580{
581 return 0x00404194U;
582}
583static inline u32 gr_pri_fe_chip_def_info_r(void)
584{
585 return 0x00404030U;
586}
587static inline u32 gr_pri_fe_chip_def_info_max_veid_count_v(u32 r)
588{
589 return (r >> 0U) & 0xfffU;
590}
591static inline u32 gr_pri_fe_chip_def_info_max_veid_count_init_v(void)
592{
593 return 0x00000040U;
594}
595static inline u32 gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r(void)
596{
597 return 0x00504238U;
598}
599static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_r(void)
600{
601 return 0x00504358U;
602}
603static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp0_m(void)
604{
605 return 0x1U << 0U;
606}
607static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp1_m(void)
608{
609 return 0x1U << 1U;
610}
611static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp2_m(void)
612{
613 return 0x1U << 2U;
614}
615static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp3_m(void)
616{
617 return 0x1U << 3U;
618}
619static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp4_m(void)
620{
621 return 0x1U << 4U;
622}
623static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp5_m(void)
624{
625 return 0x1U << 5U;
626}
627static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp6_m(void)
628{
629 return 0x1U << 6U;
630}
631static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp7_m(void)
632{
633 return 0x1U << 7U;
634}
635static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp0_m(void)
636{
637 return 0x1U << 8U;
638}
639static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp1_m(void)
640{
641 return 0x1U << 9U;
642}
643static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp2_m(void)
644{
645 return 0x1U << 10U;
646}
647static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp3_m(void)
648{
649 return 0x1U << 11U;
650}
651static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp4_m(void)
652{
653 return 0x1U << 12U;
654}
655static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp5_m(void)
656{
657 return 0x1U << 13U;
658}
659static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp6_m(void)
660{
661 return 0x1U << 14U;
662}
663static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp7_m(void)
664{
665 return 0x1U << 15U;
666}
667static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
668{
669 return (r >> 24U) & 0x1U;
670}
671static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
672{
673 return (r >> 26U) & 0x1U;
674}
675static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_reset_task_f(void)
676{
677 return 0x40000000U;
678}
679static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_r(void)
680{
681 return 0x0050435cU;
682}
683static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_total_s(void)
684{
685 return 16U;
686}
687static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_total_v(u32 r)
688{
689 return (r >> 0U) & 0xffffU;
690}
691static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_r(void)
692{
693 return 0x00504360U;
694}
695static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_total_s(void)
696{
697 return 16U;
698}
699static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_total_v(u32 r)
700{
701 return (r >> 0U) & 0xffffU;
702}
703static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_r(void)
704{
705 return 0x0050436cU;
706}
707static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_corrected_err_el1_0_m(void)
708{
709 return 0x1U << 0U;
710}
711static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_corrected_err_el1_1_m(void)
712{
713 return 0x1U << 1U;
714}
715static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_uncorrected_err_el1_0_m(void)
716{
717 return 0x1U << 2U;
718}
719static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_uncorrected_err_el1_1_m(void)
720{
721 return 0x1U << 3U;
722}
723static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
724{
725 return (r >> 8U) & 0x1U;
726}
727static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
728{
729 return (r >> 10U) & 0x1U;
730}
731static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_reset_task_f(void)
732{
733 return 0x40000000U;
734}
735static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_r(void)
736{
737 return 0x00504370U;
738}
739static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_total_s(void)
740{
741 return 16U;
742}
743static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_total_v(u32 r)
744{
745 return (r >> 0U) & 0xffffU;
746}
747static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_r(void)
748{
749 return 0x00504374U;
750}
751static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_total_s(void)
752{
753 return 16U;
754}
755static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_total_v(u32 r)
756{
757 return (r >> 0U) & 0xffffU;
758}
759static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_r(void)
760{
761 return 0x00504638U;
762}
763static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_warp_sm0_m(void)
764{
765 return 0x1U << 0U;
766}
767static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_warp_sm1_m(void)
768{
769 return 0x1U << 1U;
770}
771static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_barrier_sm0_m(void)
772{
773 return 0x1U << 2U;
774}
775static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_barrier_sm1_m(void)
776{
777 return 0x1U << 3U;
778}
779static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_warp_sm0_m(void)
780{
781 return 0x1U << 4U;
782}
783static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_warp_sm1_m(void)
784{
785 return 0x1U << 5U;
786}
787static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_barrier_sm0_m(void)
788{
789 return 0x1U << 6U;
790}
791static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_barrier_sm1_m(void)
792{
793 return 0x1U << 7U;
794}
795static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
796{
797 return (r >> 16U) & 0x1U;
798}
799static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
800{
801 return (r >> 18U) & 0x1U;
802}
803static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_reset_task_f(void)
804{
805 return 0x40000000U;
806}
807static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_r(void)
808{
809 return 0x0050463cU;
810}
811static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_total_s(void)
812{
813 return 16U;
814}
815static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_total_v(u32 r)
816{
817 return (r >> 0U) & 0xffffU;
818}
819static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_r(void)
820{
821 return 0x00504640U;
822}
823static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_total_s(void)
824{
825 return 16U;
826}
827static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_total_v(u32 r)
828{
829 return (r >> 0U) & 0xffffU;
830}
831static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_r(void)
832{
833 return 0x005042c4U;
834}
835static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_default_f(void)
836{
837 return 0x0U;
838}
839static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe0_f(void)
840{
841 return 0x1U;
842}
843static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe1_f(void)
844{
845 return 0x2U;
846}
847static inline u32 gr_gpc0_tpc0_mpc_hww_esr_r(void)
848{
849 return 0x00504430U;
850}
851static inline u32 gr_gpc0_tpc0_mpc_hww_esr_reset_trigger_f(void)
852{
853 return 0x40000000U;
854}
855static inline u32 gr_gpc0_tpc0_mpc_hww_esr_info_r(void)
856{
857 return 0x00504434U;
858}
859static inline u32 gr_gpc0_tpc0_mpc_hww_esr_info_veid_v(u32 r)
860{
861 return (r >> 0U) & 0x3fU;
862}
863static inline u32 gr_pri_be0_crop_status1_r(void)
864{
865 return 0x00410134U;
866}
867static inline u32 gr_pri_bes_crop_status1_r(void)
868{
869 return 0x00408934U;
870}
871static inline u32 gr_pri_be0_zrop_status_r(void)
872{
873 return 0x00410048U;
874}
875static inline u32 gr_pri_be0_zrop_status2_r(void)
876{
877 return 0x0041004cU;
878}
879static inline u32 gr_pri_bes_zrop_status_r(void)
880{
881 return 0x00408848U;
882}
883static inline u32 gr_pri_bes_zrop_status2_r(void)
884{
885 return 0x0040884cU;
886}
887static inline u32 gr_pipe_bundle_address_r(void)
888{
889 return 0x00400200U;
890}
891static inline u32 gr_pipe_bundle_address_value_v(u32 r)
892{
893 return (r >> 0U) & 0xffffU;
894}
895static inline u32 gr_pipe_bundle_address_veid_f(u32 v)
896{
897 return (v & 0x3fU) << 20U;
898}
899static inline u32 gr_pipe_bundle_address_veid_w(void)
900{
901 return 0U;
902}
903static inline u32 gr_pipe_bundle_data_r(void)
904{
905 return 0x00400204U;
906}
907static inline u32 gr_pipe_bundle_config_r(void)
908{
909 return 0x00400208U;
910}
911static inline u32 gr_pipe_bundle_config_override_pipe_mode_disabled_f(void)
912{
913 return 0x0U;
914}
915static inline u32 gr_pipe_bundle_config_override_pipe_mode_enabled_f(void)
916{
917 return 0x80000000U;
918}
919static inline u32 gr_fe_hww_esr_r(void)
920{
921 return 0x00404000U;
922}
923static inline u32 gr_fe_hww_esr_reset_active_f(void)
924{
925 return 0x40000000U;
926}
927static inline u32 gr_fe_hww_esr_en_enable_f(void)
928{
929 return 0x80000000U;
930}
931static inline u32 gr_fe_hww_esr_info_r(void)
932{
933 return 0x004041b0U;
934}
935static inline u32 gr_gpcs_tpcs_sms_hww_global_esr_report_mask_r(void)
936{
937 return 0x00419eacU;
938}
939static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_r(void)
940{
941 return 0x0050472cU;
942}
943static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_multiple_warp_errors_report_f(void)
944{
945 return 0x4U;
946}
947static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_bpt_int_report_f(void)
948{
949 return 0x10U;
950}
951static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_bpt_pause_report_f(void)
952{
953 return 0x20U;
954}
955static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_single_step_complete_report_f(void)
956{
957 return 0x40U;
958}
959static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_error_in_trap_report_f(void)
960{
961 return 0x100U;
962}
963static inline u32 gr_gpcs_tpcs_sms_hww_global_esr_r(void)
964{
965 return 0x00419eb4U;
966}
967static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_r(void)
968{
969 return 0x00504734U;
970}
971static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_int_m(void)
972{
973 return 0x1U << 4U;
974}
975static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_int_pending_f(void)
976{
977 return 0x10U;
978}
979static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_pause_m(void)
980{
981 return 0x1U << 5U;
982}
983static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_pause_pending_f(void)
984{
985 return 0x20U;
986}
987static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_single_step_complete_m(void)
988{
989 return 0x1U << 6U;
990}
991static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_single_step_complete_pending_f(void)
992{
993 return 0x40U;
994}
995static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_multiple_warp_errors_m(void)
996{
997 return 0x1U << 2U;
998}
999static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_multiple_warp_errors_pending_f(void)
1000{
1001 return 0x4U;
1002}
1003static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_error_in_trap_m(void)
1004{
1005 return 0x1U << 8U;
1006}
1007static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_error_in_trap_pending_f(void)
1008{
1009 return 0x100U;
1010}
1011static inline u32 gr_fe_go_idle_timeout_r(void)
1012{
1013 return 0x00404154U;
1014}
1015static inline u32 gr_fe_go_idle_timeout_count_f(u32 v)
1016{
1017 return (v & 0xffffffffU) << 0U;
1018}
1019static inline u32 gr_fe_go_idle_timeout_count_disabled_f(void)
1020{
1021 return 0x0U;
1022}
1023static inline u32 gr_fe_go_idle_timeout_count_prod_f(void)
1024{
1025 return 0x1800U;
1026}
1027static inline u32 gr_fe_object_table_r(u32 i)
1028{
1029 return 0x00404200U + i*4U;
1030}
1031static inline u32 gr_fe_object_table_nvclass_v(u32 r)
1032{
1033 return (r >> 0U) & 0xffffU;
1034}
1035static inline u32 gr_fe_tpc_fs_r(u32 i)
1036{
1037 return 0x0040a200U + i*4U;
1038}
1039static inline u32 gr_pri_mme_shadow_raw_index_r(void)
1040{
1041 return 0x00404488U;
1042}
1043static inline u32 gr_pri_mme_shadow_raw_index_write_trigger_f(void)
1044{
1045 return 0x80000000U;
1046}
1047static inline u32 gr_pri_mme_shadow_raw_data_r(void)
1048{
1049 return 0x0040448cU;
1050}
1051static inline u32 gr_mme_hww_esr_r(void)
1052{
1053 return 0x00404490U;
1054}
1055static inline u32 gr_mme_hww_esr_reset_active_f(void)
1056{
1057 return 0x40000000U;
1058}
1059static inline u32 gr_mme_hww_esr_en_enable_f(void)
1060{
1061 return 0x80000000U;
1062}
1063static inline u32 gr_mme_hww_esr_info_r(void)
1064{
1065 return 0x00404494U;
1066}
1067static inline u32 gr_memfmt_hww_esr_r(void)
1068{
1069 return 0x00404600U;
1070}
1071static inline u32 gr_memfmt_hww_esr_reset_active_f(void)
1072{
1073 return 0x40000000U;
1074}
1075static inline u32 gr_memfmt_hww_esr_en_enable_f(void)
1076{
1077 return 0x80000000U;
1078}
1079static inline u32 gr_fecs_cpuctl_r(void)
1080{
1081 return 0x00409100U;
1082}
1083static inline u32 gr_fecs_cpuctl_startcpu_f(u32 v)
1084{
1085 return (v & 0x1U) << 1U;
1086}
1087static inline u32 gr_fecs_cpuctl_alias_r(void)
1088{
1089 return 0x00409130U;
1090}
1091static inline u32 gr_fecs_cpuctl_alias_startcpu_f(u32 v)
1092{
1093 return (v & 0x1U) << 1U;
1094}
1095static inline u32 gr_fecs_dmactl_r(void)
1096{
1097 return 0x0040910cU;
1098}
1099static inline u32 gr_fecs_dmactl_require_ctx_f(u32 v)
1100{
1101 return (v & 0x1U) << 0U;
1102}
1103static inline u32 gr_fecs_dmactl_dmem_scrubbing_m(void)
1104{
1105 return 0x1U << 1U;
1106}
1107static inline u32 gr_fecs_dmactl_imem_scrubbing_m(void)
1108{
1109 return 0x1U << 2U;
1110}
1111static inline u32 gr_fecs_os_r(void)
1112{
1113 return 0x00409080U;
1114}
1115static inline u32 gr_fecs_idlestate_r(void)
1116{
1117 return 0x0040904cU;
1118}
1119static inline u32 gr_fecs_mailbox0_r(void)
1120{
1121 return 0x00409040U;
1122}
1123static inline u32 gr_fecs_mailbox1_r(void)
1124{
1125 return 0x00409044U;
1126}
1127static inline u32 gr_fecs_irqstat_r(void)
1128{
1129 return 0x00409008U;
1130}
1131static inline u32 gr_fecs_irqmode_r(void)
1132{
1133 return 0x0040900cU;
1134}
1135static inline u32 gr_fecs_irqmask_r(void)
1136{
1137 return 0x00409018U;
1138}
1139static inline u32 gr_fecs_irqdest_r(void)
1140{
1141 return 0x0040901cU;
1142}
1143static inline u32 gr_fecs_curctx_r(void)
1144{
1145 return 0x00409050U;
1146}
1147static inline u32 gr_fecs_nxtctx_r(void)
1148{
1149 return 0x00409054U;
1150}
1151static inline u32 gr_fecs_engctl_r(void)
1152{
1153 return 0x004090a4U;
1154}
1155static inline u32 gr_fecs_debug1_r(void)
1156{
1157 return 0x00409090U;
1158}
1159static inline u32 gr_fecs_debuginfo_r(void)
1160{
1161 return 0x00409094U;
1162}
1163static inline u32 gr_fecs_icd_cmd_r(void)
1164{
1165 return 0x00409200U;
1166}
1167static inline u32 gr_fecs_icd_cmd_opc_s(void)
1168{
1169 return 4U;
1170}
1171static inline u32 gr_fecs_icd_cmd_opc_f(u32 v)
1172{
1173 return (v & 0xfU) << 0U;
1174}
1175static inline u32 gr_fecs_icd_cmd_opc_m(void)
1176{
1177 return 0xfU << 0U;
1178}
1179static inline u32 gr_fecs_icd_cmd_opc_v(u32 r)
1180{
1181 return (r >> 0U) & 0xfU;
1182}
1183static inline u32 gr_fecs_icd_cmd_opc_rreg_f(void)
1184{
1185 return 0x8U;
1186}
1187static inline u32 gr_fecs_icd_cmd_opc_rstat_f(void)
1188{
1189 return 0xeU;
1190}
1191static inline u32 gr_fecs_icd_cmd_idx_f(u32 v)
1192{
1193 return (v & 0x1fU) << 8U;
1194}
1195static inline u32 gr_fecs_icd_rdata_r(void)
1196{
1197 return 0x0040920cU;
1198}
1199static inline u32 gr_fecs_imemc_r(u32 i)
1200{
1201 return 0x00409180U + i*16U;
1202}
1203static inline u32 gr_fecs_imemc_offs_f(u32 v)
1204{
1205 return (v & 0x3fU) << 2U;
1206}
1207static inline u32 gr_fecs_imemc_blk_f(u32 v)
1208{
1209 return (v & 0xffU) << 8U;
1210}
1211static inline u32 gr_fecs_imemc_aincw_f(u32 v)
1212{
1213 return (v & 0x1U) << 24U;
1214}
1215static inline u32 gr_fecs_imemd_r(u32 i)
1216{
1217 return 0x00409184U + i*16U;
1218}
1219static inline u32 gr_fecs_imemt_r(u32 i)
1220{
1221 return 0x00409188U + i*16U;
1222}
1223static inline u32 gr_fecs_imemt_tag_f(u32 v)
1224{
1225 return (v & 0xffffU) << 0U;
1226}
1227static inline u32 gr_fecs_dmemc_r(u32 i)
1228{
1229 return 0x004091c0U + i*8U;
1230}
1231static inline u32 gr_fecs_dmemc_offs_s(void)
1232{
1233 return 6U;
1234}
1235static inline u32 gr_fecs_dmemc_offs_f(u32 v)
1236{
1237 return (v & 0x3fU) << 2U;
1238}
1239static inline u32 gr_fecs_dmemc_offs_m(void)
1240{
1241 return 0x3fU << 2U;
1242}
1243static inline u32 gr_fecs_dmemc_offs_v(u32 r)
1244{
1245 return (r >> 2U) & 0x3fU;
1246}
1247static inline u32 gr_fecs_dmemc_blk_f(u32 v)
1248{
1249 return (v & 0xffU) << 8U;
1250}
1251static inline u32 gr_fecs_dmemc_aincw_f(u32 v)
1252{
1253 return (v & 0x1U) << 24U;
1254}
1255static inline u32 gr_fecs_dmemd_r(u32 i)
1256{
1257 return 0x004091c4U + i*8U;
1258}
1259static inline u32 gr_fecs_dmatrfbase_r(void)
1260{
1261 return 0x00409110U;
1262}
1263static inline u32 gr_fecs_dmatrfmoffs_r(void)
1264{
1265 return 0x00409114U;
1266}
1267static inline u32 gr_fecs_dmatrffboffs_r(void)
1268{
1269 return 0x0040911cU;
1270}
1271static inline u32 gr_fecs_dmatrfcmd_r(void)
1272{
1273 return 0x00409118U;
1274}
1275static inline u32 gr_fecs_dmatrfcmd_imem_f(u32 v)
1276{
1277 return (v & 0x1U) << 4U;
1278}
1279static inline u32 gr_fecs_dmatrfcmd_write_f(u32 v)
1280{
1281 return (v & 0x1U) << 5U;
1282}
1283static inline u32 gr_fecs_dmatrfcmd_size_f(u32 v)
1284{
1285 return (v & 0x7U) << 8U;
1286}
1287static inline u32 gr_fecs_dmatrfcmd_ctxdma_f(u32 v)
1288{
1289 return (v & 0x7U) << 12U;
1290}
1291static inline u32 gr_fecs_bootvec_r(void)
1292{
1293 return 0x00409104U;
1294}
1295static inline u32 gr_fecs_bootvec_vec_f(u32 v)
1296{
1297 return (v & 0xffffffffU) << 0U;
1298}
1299static inline u32 gr_fecs_falcon_hwcfg_r(void)
1300{
1301 return 0x00409108U;
1302}
1303static inline u32 gr_gpcs_gpccs_falcon_hwcfg_r(void)
1304{
1305 return 0x0041a108U;
1306}
1307static inline u32 gr_fecs_falcon_rm_r(void)
1308{
1309 return 0x00409084U;
1310}
1311static inline u32 gr_fecs_current_ctx_r(void)
1312{
1313 return 0x00409b00U;
1314}
1315static inline u32 gr_fecs_current_ctx_ptr_f(u32 v)
1316{
1317 return (v & 0xfffffffU) << 0U;
1318}
1319static inline u32 gr_fecs_current_ctx_ptr_v(u32 r)
1320{
1321 return (r >> 0U) & 0xfffffffU;
1322}
1323static inline u32 gr_fecs_current_ctx_target_s(void)
1324{
1325 return 2U;
1326}
1327static inline u32 gr_fecs_current_ctx_target_f(u32 v)
1328{
1329 return (v & 0x3U) << 28U;
1330}
1331static inline u32 gr_fecs_current_ctx_target_m(void)
1332{
1333 return 0x3U << 28U;
1334}
1335static inline u32 gr_fecs_current_ctx_target_v(u32 r)
1336{
1337 return (r >> 28U) & 0x3U;
1338}
1339static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void)
1340{
1341 return 0x0U;
1342}
1343static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void)
1344{
1345 return 0x20000000U;
1346}
1347static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void)
1348{
1349 return 0x30000000U;
1350}
1351static inline u32 gr_fecs_current_ctx_valid_s(void)
1352{
1353 return 1U;
1354}
1355static inline u32 gr_fecs_current_ctx_valid_f(u32 v)
1356{
1357 return (v & 0x1U) << 31U;
1358}
1359static inline u32 gr_fecs_current_ctx_valid_m(void)
1360{
1361 return 0x1U << 31U;
1362}
1363static inline u32 gr_fecs_current_ctx_valid_v(u32 r)
1364{
1365 return (r >> 31U) & 0x1U;
1366}
1367static inline u32 gr_fecs_current_ctx_valid_false_f(void)
1368{
1369 return 0x0U;
1370}
1371static inline u32 gr_fecs_method_data_r(void)
1372{
1373 return 0x00409500U;
1374}
1375static inline u32 gr_fecs_method_push_r(void)
1376{
1377 return 0x00409504U;
1378}
1379static inline u32 gr_fecs_method_push_adr_f(u32 v)
1380{
1381 return (v & 0xfffU) << 0U;
1382}
1383static inline u32 gr_fecs_method_push_adr_bind_pointer_v(void)
1384{
1385 return 0x00000003U;
1386}
1387static inline u32 gr_fecs_method_push_adr_bind_pointer_f(void)
1388{
1389 return 0x3U;
1390}
1391static inline u32 gr_fecs_method_push_adr_discover_image_size_v(void)
1392{
1393 return 0x00000010U;
1394}
1395static inline u32 gr_fecs_method_push_adr_wfi_golden_save_v(void)
1396{
1397 return 0x00000009U;
1398}
1399static inline u32 gr_fecs_method_push_adr_restore_golden_v(void)
1400{
1401 return 0x00000015U;
1402}
1403static inline u32 gr_fecs_method_push_adr_discover_zcull_image_size_v(void)
1404{
1405 return 0x00000016U;
1406}
1407static inline u32 gr_fecs_method_push_adr_discover_pm_image_size_v(void)
1408{
1409 return 0x00000025U;
1410}
1411static inline u32 gr_fecs_method_push_adr_discover_reglist_image_size_v(void)
1412{
1413 return 0x00000030U;
1414}
1415static inline u32 gr_fecs_method_push_adr_set_reglist_bind_instance_v(void)
1416{
1417 return 0x00000031U;
1418}
1419static inline u32 gr_fecs_method_push_adr_set_reglist_virtual_address_v(void)
1420{
1421 return 0x00000032U;
1422}
1423static inline u32 gr_fecs_method_push_adr_stop_ctxsw_v(void)
1424{
1425 return 0x00000038U;
1426}
1427static inline u32 gr_fecs_method_push_adr_start_ctxsw_v(void)
1428{
1429 return 0x00000039U;
1430}
1431static inline u32 gr_fecs_method_push_adr_set_watchdog_timeout_f(void)
1432{
1433 return 0x21U;
1434}
1435static inline u32 gr_fecs_method_push_adr_discover_preemption_image_size_v(void)
1436{
1437 return 0x0000001aU;
1438}
1439static inline u32 gr_fecs_method_push_adr_halt_pipeline_v(void)
1440{
1441 return 0x00000004U;
1442}
1443static inline u32 gr_fecs_method_push_adr_configure_interrupt_completion_option_v(void)
1444{
1445 return 0x0000003aU;
1446}
1447static inline u32 gr_fecs_host_int_status_r(void)
1448{
1449 return 0x00409c18U;
1450}
1451static inline u32 gr_fecs_host_int_status_fault_during_ctxsw_f(u32 v)
1452{
1453 return (v & 0x1U) << 16U;
1454}
1455static inline u32 gr_fecs_host_int_status_umimp_firmware_method_f(u32 v)
1456{
1457 return (v & 0x1U) << 17U;
1458}
1459static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v)
1460{
1461 return (v & 0x1U) << 18U;
1462}
1463static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v)
1464{
1465 return (v & 0xffffU) << 0U;
1466}
1467static inline u32 gr_fecs_host_int_clear_r(void)
1468{
1469 return 0x00409c20U;
1470}
1471static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_f(u32 v)
1472{
1473 return (v & 0x1U) << 1U;
1474}
1475static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_clear_f(void)
1476{
1477 return 0x2U;
1478}
1479static inline u32 gr_fecs_host_int_enable_r(void)
1480{
1481 return 0x00409c24U;
1482}
1483static inline u32 gr_fecs_host_int_enable_ctxsw_intr1_enable_f(void)
1484{
1485 return 0x2U;
1486}
1487static inline u32 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f(void)
1488{
1489 return 0x10000U;
1490}
1491static inline u32 gr_fecs_host_int_enable_umimp_firmware_method_enable_f(void)
1492{
1493 return 0x20000U;
1494}
1495static inline u32 gr_fecs_host_int_enable_umimp_illegal_method_enable_f(void)
1496{
1497 return 0x40000U;
1498}
1499static inline u32 gr_fecs_host_int_enable_watchdog_enable_f(void)
1500{
1501 return 0x80000U;
1502}
1503static inline u32 gr_fecs_ctxsw_reset_ctl_r(void)
1504{
1505 return 0x00409614U;
1506}
1507static inline u32 gr_fecs_ctxsw_reset_ctl_sys_halt_disabled_f(void)
1508{
1509 return 0x0U;
1510}
1511static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_halt_disabled_f(void)
1512{
1513 return 0x0U;
1514}
1515static inline u32 gr_fecs_ctxsw_reset_ctl_be_halt_disabled_f(void)
1516{
1517 return 0x0U;
1518}
1519static inline u32 gr_fecs_ctxsw_reset_ctl_sys_engine_reset_disabled_f(void)
1520{
1521 return 0x10U;
1522}
1523static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_engine_reset_disabled_f(void)
1524{
1525 return 0x20U;
1526}
1527static inline u32 gr_fecs_ctxsw_reset_ctl_be_engine_reset_disabled_f(void)
1528{
1529 return 0x40U;
1530}
1531static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_enabled_f(void)
1532{
1533 return 0x0U;
1534}
1535static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_disabled_f(void)
1536{
1537 return 0x100U;
1538}
1539static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_enabled_f(void)
1540{
1541 return 0x0U;
1542}
1543static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_disabled_f(void)
1544{
1545 return 0x200U;
1546}
1547static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_s(void)
1548{
1549 return 1U;
1550}
1551static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_f(u32 v)
1552{
1553 return (v & 0x1U) << 10U;
1554}
1555static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_m(void)
1556{
1557 return 0x1U << 10U;
1558}
1559static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_v(u32 r)
1560{
1561 return (r >> 10U) & 0x1U;
1562}
1563static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_enabled_f(void)
1564{
1565 return 0x0U;
1566}
1567static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_disabled_f(void)
1568{
1569 return 0x400U;
1570}
1571static inline u32 gr_fecs_ctx_state_store_major_rev_id_r(void)
1572{
1573 return 0x0040960cU;
1574}
1575static inline u32 gr_fecs_ctxsw_mailbox_r(u32 i)
1576{
1577 return 0x00409800U + i*4U;
1578}
1579static inline u32 gr_fecs_ctxsw_mailbox__size_1_v(void)
1580{
1581 return 0x00000010U;
1582}
1583static inline u32 gr_fecs_ctxsw_mailbox_value_f(u32 v)
1584{
1585 return (v & 0xffffffffU) << 0U;
1586}
1587static inline u32 gr_fecs_ctxsw_mailbox_value_pass_v(void)
1588{
1589 return 0x00000001U;
1590}
1591static inline u32 gr_fecs_ctxsw_mailbox_value_fail_v(void)
1592{
1593 return 0x00000002U;
1594}
1595static inline u32 gr_fecs_ctxsw_mailbox_set_r(u32 i)
1596{
1597 return 0x004098c0U + i*4U;
1598}
1599static inline u32 gr_fecs_ctxsw_mailbox_set_value_f(u32 v)
1600{
1601 return (v & 0xffffffffU) << 0U;
1602}
1603static inline u32 gr_fecs_ctxsw_mailbox_clear_r(u32 i)
1604{
1605 return 0x00409840U + i*4U;
1606}
1607static inline u32 gr_fecs_ctxsw_mailbox_clear_value_f(u32 v)
1608{
1609 return (v & 0xffffffffU) << 0U;
1610}
1611static inline u32 gr_fecs_fs_r(void)
1612{
1613 return 0x00409604U;
1614}
1615static inline u32 gr_fecs_fs_num_available_gpcs_s(void)
1616{
1617 return 5U;
1618}
1619static inline u32 gr_fecs_fs_num_available_gpcs_f(u32 v)
1620{
1621 return (v & 0x1fU) << 0U;
1622}
1623static inline u32 gr_fecs_fs_num_available_gpcs_m(void)
1624{
1625 return 0x1fU << 0U;
1626}
1627static inline u32 gr_fecs_fs_num_available_gpcs_v(u32 r)
1628{
1629 return (r >> 0U) & 0x1fU;
1630}
1631static inline u32 gr_fecs_fs_num_available_fbps_s(void)
1632{
1633 return 5U;
1634}
1635static inline u32 gr_fecs_fs_num_available_fbps_f(u32 v)
1636{
1637 return (v & 0x1fU) << 16U;
1638}
1639static inline u32 gr_fecs_fs_num_available_fbps_m(void)
1640{
1641 return 0x1fU << 16U;
1642}
1643static inline u32 gr_fecs_fs_num_available_fbps_v(u32 r)
1644{
1645 return (r >> 16U) & 0x1fU;
1646}
1647static inline u32 gr_fecs_cfg_r(void)
1648{
1649 return 0x00409620U;
1650}
1651static inline u32 gr_fecs_cfg_imem_sz_v(u32 r)
1652{
1653 return (r >> 0U) & 0xffU;
1654}
1655static inline u32 gr_fecs_rc_lanes_r(void)
1656{
1657 return 0x00409880U;
1658}
1659static inline u32 gr_fecs_rc_lanes_num_chains_s(void)
1660{
1661 return 6U;
1662}
1663static inline u32 gr_fecs_rc_lanes_num_chains_f(u32 v)
1664{
1665 return (v & 0x3fU) << 0U;
1666}
1667static inline u32 gr_fecs_rc_lanes_num_chains_m(void)
1668{
1669 return 0x3fU << 0U;
1670}
1671static inline u32 gr_fecs_rc_lanes_num_chains_v(u32 r)
1672{
1673 return (r >> 0U) & 0x3fU;
1674}
1675static inline u32 gr_fecs_ctxsw_status_1_r(void)
1676{
1677 return 0x00409400U;
1678}
1679static inline u32 gr_fecs_ctxsw_status_1_arb_busy_s(void)
1680{
1681 return 1U;
1682}
1683static inline u32 gr_fecs_ctxsw_status_1_arb_busy_f(u32 v)
1684{
1685 return (v & 0x1U) << 12U;
1686}
1687static inline u32 gr_fecs_ctxsw_status_1_arb_busy_m(void)
1688{
1689 return 0x1U << 12U;
1690}
1691static inline u32 gr_fecs_ctxsw_status_1_arb_busy_v(u32 r)
1692{
1693 return (r >> 12U) & 0x1U;
1694}
1695static inline u32 gr_fecs_arb_ctx_adr_r(void)
1696{
1697 return 0x00409a24U;
1698}
1699static inline u32 gr_fecs_new_ctx_r(void)
1700{
1701 return 0x00409b04U;
1702}
1703static inline u32 gr_fecs_new_ctx_ptr_s(void)
1704{
1705 return 28U;
1706}
1707static inline u32 gr_fecs_new_ctx_ptr_f(u32 v)
1708{
1709 return (v & 0xfffffffU) << 0U;
1710}
1711static inline u32 gr_fecs_new_ctx_ptr_m(void)
1712{
1713 return 0xfffffffU << 0U;
1714}
1715static inline u32 gr_fecs_new_ctx_ptr_v(u32 r)
1716{
1717 return (r >> 0U) & 0xfffffffU;
1718}
1719static inline u32 gr_fecs_new_ctx_target_s(void)
1720{
1721 return 2U;
1722}
1723static inline u32 gr_fecs_new_ctx_target_f(u32 v)
1724{
1725 return (v & 0x3U) << 28U;
1726}
1727static inline u32 gr_fecs_new_ctx_target_m(void)
1728{
1729 return 0x3U << 28U;
1730}
1731static inline u32 gr_fecs_new_ctx_target_v(u32 r)
1732{
1733 return (r >> 28U) & 0x3U;
1734}
1735static inline u32 gr_fecs_new_ctx_valid_s(void)
1736{
1737 return 1U;
1738}
1739static inline u32 gr_fecs_new_ctx_valid_f(u32 v)
1740{
1741 return (v & 0x1U) << 31U;
1742}
1743static inline u32 gr_fecs_new_ctx_valid_m(void)
1744{
1745 return 0x1U << 31U;
1746}
1747static inline u32 gr_fecs_new_ctx_valid_v(u32 r)
1748{
1749 return (r >> 31U) & 0x1U;
1750}
1751static inline u32 gr_fecs_arb_ctx_ptr_r(void)
1752{
1753 return 0x00409a0cU;
1754}
1755static inline u32 gr_fecs_arb_ctx_ptr_ptr_s(void)
1756{
1757 return 28U;
1758}
1759static inline u32 gr_fecs_arb_ctx_ptr_ptr_f(u32 v)
1760{
1761 return (v & 0xfffffffU) << 0U;
1762}
1763static inline u32 gr_fecs_arb_ctx_ptr_ptr_m(void)
1764{
1765 return 0xfffffffU << 0U;
1766}
1767static inline u32 gr_fecs_arb_ctx_ptr_ptr_v(u32 r)
1768{
1769 return (r >> 0U) & 0xfffffffU;
1770}
1771static inline u32 gr_fecs_arb_ctx_ptr_target_s(void)
1772{
1773 return 2U;
1774}
1775static inline u32 gr_fecs_arb_ctx_ptr_target_f(u32 v)
1776{
1777 return (v & 0x3U) << 28U;
1778}
1779static inline u32 gr_fecs_arb_ctx_ptr_target_m(void)
1780{
1781 return 0x3U << 28U;
1782}
1783static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r)
1784{
1785 return (r >> 28U) & 0x3U;
1786}
1787static inline u32 gr_fecs_arb_ctx_cmd_r(void)
1788{
1789 return 0x00409a10U;
1790}
1791static inline u32 gr_fecs_arb_ctx_cmd_cmd_s(void)
1792{
1793 return 5U;
1794}
1795static inline u32 gr_fecs_arb_ctx_cmd_cmd_f(u32 v)
1796{
1797 return (v & 0x1fU) << 0U;
1798}
1799static inline u32 gr_fecs_arb_ctx_cmd_cmd_m(void)
1800{
1801 return 0x1fU << 0U;
1802}
1803static inline u32 gr_fecs_arb_ctx_cmd_cmd_v(u32 r)
1804{
1805 return (r >> 0U) & 0x1fU;
1806}
1807static inline u32 gr_fecs_ctxsw_status_fe_0_r(void)
1808{
1809 return 0x00409c00U;
1810}
1811static inline u32 gr_gpc0_gpccs_ctxsw_status_gpc_0_r(void)
1812{
1813 return 0x00502c04U;
1814}
1815static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void)
1816{
1817 return 0x00502400U;
1818}
1819static inline u32 gr_gpc0_gpccs_ctxsw_mailbox__size_1_v(void)
1820{
1821 return 0x00000010U;
1822}
1823static inline u32 gr_fecs_ctxsw_idlestate_r(void)
1824{
1825 return 0x00409420U;
1826}
1827static inline u32 gr_fecs_feature_override_ecc_r(void)
1828{
1829 return 0x00409658U;
1830}
1831static inline u32 gr_fecs_feature_override_ecc_sm_lrf_override_v(u32 r)
1832{
1833 return (r >> 3U) & 0x1U;
1834}
1835static inline u32 gr_fecs_feature_override_ecc_ltc_override_v(u32 r)
1836{
1837 return (r >> 15U) & 0x1U;
1838}
1839static inline u32 gr_fecs_feature_override_ecc_sm_lrf_v(u32 r)
1840{
1841 return (r >> 0U) & 0x1U;
1842}
1843static inline u32 gr_fecs_feature_override_ecc_ltc_v(u32 r)
1844{
1845 return (r >> 12U) & 0x1U;
1846}
1847static inline u32 gr_gpc0_gpccs_ctxsw_idlestate_r(void)
1848{
1849 return 0x00502420U;
1850}
1851static inline u32 gr_rstr2d_gpc_map_r(u32 i)
1852{
1853 return 0x0040780cU + i*4U;
1854}
1855static inline u32 gr_rstr2d_map_table_cfg_r(void)
1856{
1857 return 0x004078bcU;
1858}
1859static inline u32 gr_rstr2d_map_table_cfg_row_offset_f(u32 v)
1860{
1861 return (v & 0xffU) << 0U;
1862}
1863static inline u32 gr_rstr2d_map_table_cfg_num_entries_f(u32 v)
1864{
1865 return (v & 0xffU) << 8U;
1866}
1867static inline u32 gr_pd_hww_esr_r(void)
1868{
1869 return 0x00406018U;
1870}
1871static inline u32 gr_pd_hww_esr_reset_active_f(void)
1872{
1873 return 0x40000000U;
1874}
1875static inline u32 gr_pd_hww_esr_en_enable_f(void)
1876{
1877 return 0x80000000U;
1878}
1879static inline u32 gr_pd_num_tpc_per_gpc_r(u32 i)
1880{
1881 return 0x00406028U + i*4U;
1882}
1883static inline u32 gr_pd_num_tpc_per_gpc__size_1_v(void)
1884{
1885 return 0x00000004U;
1886}
1887static inline u32 gr_pd_num_tpc_per_gpc_count0_f(u32 v)
1888{
1889 return (v & 0xfU) << 0U;
1890}
1891static inline u32 gr_pd_num_tpc_per_gpc_count1_f(u32 v)
1892{
1893 return (v & 0xfU) << 4U;
1894}
1895static inline u32 gr_pd_num_tpc_per_gpc_count2_f(u32 v)
1896{
1897 return (v & 0xfU) << 8U;
1898}
1899static inline u32 gr_pd_num_tpc_per_gpc_count3_f(u32 v)
1900{
1901 return (v & 0xfU) << 12U;
1902}
1903static inline u32 gr_pd_num_tpc_per_gpc_count4_f(u32 v)
1904{
1905 return (v & 0xfU) << 16U;
1906}
1907static inline u32 gr_pd_num_tpc_per_gpc_count5_f(u32 v)
1908{
1909 return (v & 0xfU) << 20U;
1910}
1911static inline u32 gr_pd_num_tpc_per_gpc_count6_f(u32 v)
1912{
1913 return (v & 0xfU) << 24U;
1914}
1915static inline u32 gr_pd_num_tpc_per_gpc_count7_f(u32 v)
1916{
1917 return (v & 0xfU) << 28U;
1918}
1919static inline u32 gr_pd_ab_dist_cfg0_r(void)
1920{
1921 return 0x004064c0U;
1922}
1923static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_en_f(void)
1924{
1925 return 0x80000000U;
1926}
1927static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_dis_f(void)
1928{
1929 return 0x0U;
1930}
1931static inline u32 gr_pd_ab_dist_cfg1_r(void)
1932{
1933 return 0x004064c4U;
1934}
1935static inline u32 gr_pd_ab_dist_cfg1_max_batches_init_f(void)
1936{
1937 return 0xffffU;
1938}
1939static inline u32 gr_pd_ab_dist_cfg1_max_output_f(u32 v)
1940{
1941 return (v & 0xffffU) << 16U;
1942}
1943static inline u32 gr_pd_ab_dist_cfg1_max_output_granularity_v(void)
1944{
1945 return 0x00000080U;
1946}
1947static inline u32 gr_pd_ab_dist_cfg2_r(void)
1948{
1949 return 0x004064c8U;
1950}
1951static inline u32 gr_pd_ab_dist_cfg2_token_limit_f(u32 v)
1952{
1953 return (v & 0x1fffU) << 0U;
1954}
1955static inline u32 gr_pd_ab_dist_cfg2_token_limit_init_v(void)
1956{
1957 return 0x00001680U;
1958}
1959static inline u32 gr_pd_ab_dist_cfg2_state_limit_f(u32 v)
1960{
1961 return (v & 0x1fffU) << 16U;
1962}
1963static inline u32 gr_pd_ab_dist_cfg2_state_limit_scc_bundle_granularity_v(void)
1964{
1965 return 0x00000020U;
1966}
1967static inline u32 gr_pd_ab_dist_cfg2_state_limit_min_gpm_fifo_depths_v(void)
1968{
1969 return 0x00001680U;
1970}
1971static inline u32 gr_pd_dist_skip_table_r(u32 i)
1972{
1973 return 0x004064d0U + i*4U;
1974}
1975static inline u32 gr_pd_dist_skip_table__size_1_v(void)
1976{
1977 return 0x00000008U;
1978}
1979static inline u32 gr_pd_dist_skip_table_gpc_4n0_mask_f(u32 v)
1980{
1981 return (v & 0xffU) << 0U;
1982}
1983static inline u32 gr_pd_dist_skip_table_gpc_4n1_mask_f(u32 v)
1984{
1985 return (v & 0xffU) << 8U;
1986}
1987static inline u32 gr_pd_dist_skip_table_gpc_4n2_mask_f(u32 v)
1988{
1989 return (v & 0xffU) << 16U;
1990}
1991static inline u32 gr_pd_dist_skip_table_gpc_4n3_mask_f(u32 v)
1992{
1993 return (v & 0xffU) << 24U;
1994}
1995static inline u32 gr_ds_debug_r(void)
1996{
1997 return 0x00405800U;
1998}
1999static inline u32 gr_ds_debug_timeslice_mode_disable_f(void)
2000{
2001 return 0x0U;
2002}
2003static inline u32 gr_ds_debug_timeslice_mode_enable_f(void)
2004{
2005 return 0x8000000U;
2006}
2007static inline u32 gr_ds_zbc_color_r_r(void)
2008{
2009 return 0x00405804U;
2010}
2011static inline u32 gr_ds_zbc_color_r_val_f(u32 v)
2012{
2013 return (v & 0xffffffffU) << 0U;
2014}
2015static inline u32 gr_ds_zbc_color_g_r(void)
2016{
2017 return 0x00405808U;
2018}
2019static inline u32 gr_ds_zbc_color_g_val_f(u32 v)
2020{
2021 return (v & 0xffffffffU) << 0U;
2022}
2023static inline u32 gr_ds_zbc_color_b_r(void)
2024{
2025 return 0x0040580cU;
2026}
2027static inline u32 gr_ds_zbc_color_b_val_f(u32 v)
2028{
2029 return (v & 0xffffffffU) << 0U;
2030}
2031static inline u32 gr_ds_zbc_color_a_r(void)
2032{
2033 return 0x00405810U;
2034}
2035static inline u32 gr_ds_zbc_color_a_val_f(u32 v)
2036{
2037 return (v & 0xffffffffU) << 0U;
2038}
2039static inline u32 gr_ds_zbc_color_fmt_r(void)
2040{
2041 return 0x00405814U;
2042}
2043static inline u32 gr_ds_zbc_color_fmt_val_f(u32 v)
2044{
2045 return (v & 0x7fU) << 0U;
2046}
2047static inline u32 gr_ds_zbc_color_fmt_val_invalid_f(void)
2048{
2049 return 0x0U;
2050}
2051static inline u32 gr_ds_zbc_color_fmt_val_zero_v(void)
2052{
2053 return 0x00000001U;
2054}
2055static inline u32 gr_ds_zbc_color_fmt_val_unorm_one_v(void)
2056{
2057 return 0x00000002U;
2058}
2059static inline u32 gr_ds_zbc_color_fmt_val_rf32_gf32_bf32_af32_v(void)
2060{
2061 return 0x00000004U;
2062}
2063static inline u32 gr_ds_zbc_color_fmt_val_a8_b8_g8_r8_v(void)
2064{
2065 return 0x00000028U;
2066}
2067static inline u32 gr_ds_zbc_z_r(void)
2068{
2069 return 0x00405818U;
2070}
2071static inline u32 gr_ds_zbc_z_val_s(void)
2072{
2073 return 32U;
2074}
2075static inline u32 gr_ds_zbc_z_val_f(u32 v)
2076{
2077 return (v & 0xffffffffU) << 0U;
2078}
2079static inline u32 gr_ds_zbc_z_val_m(void)
2080{
2081 return 0xffffffffU << 0U;
2082}
2083static inline u32 gr_ds_zbc_z_val_v(u32 r)
2084{
2085 return (r >> 0U) & 0xffffffffU;
2086}
2087static inline u32 gr_ds_zbc_z_val__init_v(void)
2088{
2089 return 0x00000000U;
2090}
2091static inline u32 gr_ds_zbc_z_val__init_f(void)
2092{
2093 return 0x0U;
2094}
2095static inline u32 gr_ds_zbc_z_fmt_r(void)
2096{
2097 return 0x0040581cU;
2098}
2099static inline u32 gr_ds_zbc_z_fmt_val_f(u32 v)
2100{
2101 return (v & 0x1U) << 0U;
2102}
2103static inline u32 gr_ds_zbc_z_fmt_val_invalid_f(void)
2104{
2105 return 0x0U;
2106}
2107static inline u32 gr_ds_zbc_z_fmt_val_fp32_v(void)
2108{
2109 return 0x00000001U;
2110}
2111static inline u32 gr_ds_zbc_tbl_index_r(void)
2112{
2113 return 0x00405820U;
2114}
2115static inline u32 gr_ds_zbc_tbl_index_val_f(u32 v)
2116{
2117 return (v & 0xfU) << 0U;
2118}
2119static inline u32 gr_ds_zbc_tbl_ld_r(void)
2120{
2121 return 0x00405824U;
2122}
2123static inline u32 gr_ds_zbc_tbl_ld_select_c_f(void)
2124{
2125 return 0x0U;
2126}
2127static inline u32 gr_ds_zbc_tbl_ld_select_z_f(void)
2128{
2129 return 0x1U;
2130}
2131static inline u32 gr_ds_zbc_tbl_ld_action_write_f(void)
2132{
2133 return 0x0U;
2134}
2135static inline u32 gr_ds_zbc_tbl_ld_trigger_active_f(void)
2136{
2137 return 0x4U;
2138}
2139static inline u32 gr_ds_tga_constraintlogic_beta_r(void)
2140{
2141 return 0x00405830U;
2142}
2143static inline u32 gr_ds_tga_constraintlogic_beta_cbsize_f(u32 v)
2144{
2145 return (v & 0x3fffffU) << 0U;
2146}
2147static inline u32 gr_ds_tga_constraintlogic_alpha_r(void)
2148{
2149 return 0x0040585cU;
2150}
2151static inline u32 gr_ds_tga_constraintlogic_alpha_cbsize_f(u32 v)
2152{
2153 return (v & 0xffffU) << 0U;
2154}
2155static inline u32 gr_ds_hww_esr_r(void)
2156{
2157 return 0x00405840U;
2158}
2159static inline u32 gr_ds_hww_esr_reset_s(void)
2160{
2161 return 1U;
2162}
2163static inline u32 gr_ds_hww_esr_reset_f(u32 v)
2164{
2165 return (v & 0x1U) << 30U;
2166}
2167static inline u32 gr_ds_hww_esr_reset_m(void)
2168{
2169 return 0x1U << 30U;
2170}
2171static inline u32 gr_ds_hww_esr_reset_v(u32 r)
2172{
2173 return (r >> 30U) & 0x1U;
2174}
2175static inline u32 gr_ds_hww_esr_reset_task_v(void)
2176{
2177 return 0x00000001U;
2178}
2179static inline u32 gr_ds_hww_esr_reset_task_f(void)
2180{
2181 return 0x40000000U;
2182}
2183static inline u32 gr_ds_hww_esr_en_enabled_f(void)
2184{
2185 return 0x80000000U;
2186}
2187static inline u32 gr_ds_hww_esr_2_r(void)
2188{
2189 return 0x00405848U;
2190}
2191static inline u32 gr_ds_hww_esr_2_reset_s(void)
2192{
2193 return 1U;
2194}
2195static inline u32 gr_ds_hww_esr_2_reset_f(u32 v)
2196{
2197 return (v & 0x1U) << 30U;
2198}
2199static inline u32 gr_ds_hww_esr_2_reset_m(void)
2200{
2201 return 0x1U << 30U;
2202}
2203static inline u32 gr_ds_hww_esr_2_reset_v(u32 r)
2204{
2205 return (r >> 30U) & 0x1U;
2206}
2207static inline u32 gr_ds_hww_esr_2_reset_task_v(void)
2208{
2209 return 0x00000001U;
2210}
2211static inline u32 gr_ds_hww_esr_2_reset_task_f(void)
2212{
2213 return 0x40000000U;
2214}
2215static inline u32 gr_ds_hww_esr_2_en_enabled_f(void)
2216{
2217 return 0x80000000U;
2218}
2219static inline u32 gr_ds_hww_report_mask_r(void)
2220{
2221 return 0x00405844U;
2222}
2223static inline u32 gr_ds_hww_report_mask_sph0_err_report_f(void)
2224{
2225 return 0x1U;
2226}
2227static inline u32 gr_ds_hww_report_mask_sph1_err_report_f(void)
2228{
2229 return 0x2U;
2230}
2231static inline u32 gr_ds_hww_report_mask_sph2_err_report_f(void)
2232{
2233 return 0x4U;
2234}
2235static inline u32 gr_ds_hww_report_mask_sph3_err_report_f(void)
2236{
2237 return 0x8U;
2238}
2239static inline u32 gr_ds_hww_report_mask_sph4_err_report_f(void)
2240{
2241 return 0x10U;
2242}
2243static inline u32 gr_ds_hww_report_mask_sph5_err_report_f(void)
2244{
2245 return 0x20U;
2246}
2247static inline u32 gr_ds_hww_report_mask_sph6_err_report_f(void)
2248{
2249 return 0x40U;
2250}
2251static inline u32 gr_ds_hww_report_mask_sph7_err_report_f(void)
2252{
2253 return 0x80U;
2254}
2255static inline u32 gr_ds_hww_report_mask_sph8_err_report_f(void)
2256{
2257 return 0x100U;
2258}
2259static inline u32 gr_ds_hww_report_mask_sph9_err_report_f(void)
2260{
2261 return 0x200U;
2262}
2263static inline u32 gr_ds_hww_report_mask_sph10_err_report_f(void)
2264{
2265 return 0x400U;
2266}
2267static inline u32 gr_ds_hww_report_mask_sph11_err_report_f(void)
2268{
2269 return 0x800U;
2270}
2271static inline u32 gr_ds_hww_report_mask_sph12_err_report_f(void)
2272{
2273 return 0x1000U;
2274}
2275static inline u32 gr_ds_hww_report_mask_sph13_err_report_f(void)
2276{
2277 return 0x2000U;
2278}
2279static inline u32 gr_ds_hww_report_mask_sph14_err_report_f(void)
2280{
2281 return 0x4000U;
2282}
2283static inline u32 gr_ds_hww_report_mask_sph15_err_report_f(void)
2284{
2285 return 0x8000U;
2286}
2287static inline u32 gr_ds_hww_report_mask_sph16_err_report_f(void)
2288{
2289 return 0x10000U;
2290}
2291static inline u32 gr_ds_hww_report_mask_sph17_err_report_f(void)
2292{
2293 return 0x20000U;
2294}
2295static inline u32 gr_ds_hww_report_mask_sph18_err_report_f(void)
2296{
2297 return 0x40000U;
2298}
2299static inline u32 gr_ds_hww_report_mask_sph19_err_report_f(void)
2300{
2301 return 0x80000U;
2302}
2303static inline u32 gr_ds_hww_report_mask_sph20_err_report_f(void)
2304{
2305 return 0x100000U;
2306}
2307static inline u32 gr_ds_hww_report_mask_sph21_err_report_f(void)
2308{
2309 return 0x200000U;
2310}
2311static inline u32 gr_ds_hww_report_mask_sph22_err_report_f(void)
2312{
2313 return 0x400000U;
2314}
2315static inline u32 gr_ds_hww_report_mask_sph23_err_report_f(void)
2316{
2317 return 0x800000U;
2318}
2319static inline u32 gr_ds_hww_report_mask_2_r(void)
2320{
2321 return 0x0040584cU;
2322}
2323static inline u32 gr_ds_hww_report_mask_2_sph24_err_report_f(void)
2324{
2325 return 0x1U;
2326}
2327static inline u32 gr_ds_num_tpc_per_gpc_r(u32 i)
2328{
2329 return 0x00405870U + i*4U;
2330}
2331static inline u32 gr_scc_bundle_cb_base_r(void)
2332{
2333 return 0x00408004U;
2334}
2335static inline u32 gr_scc_bundle_cb_base_addr_39_8_f(u32 v)
2336{
2337 return (v & 0xffffffffU) << 0U;
2338}
2339static inline u32 gr_scc_bundle_cb_base_addr_39_8_align_bits_v(void)
2340{
2341 return 0x00000008U;
2342}
2343static inline u32 gr_scc_bundle_cb_size_r(void)
2344{
2345 return 0x00408008U;
2346}
2347static inline u32 gr_scc_bundle_cb_size_div_256b_f(u32 v)
2348{
2349 return (v & 0x7ffU) << 0U;
2350}
2351static inline u32 gr_scc_bundle_cb_size_div_256b__prod_v(void)
2352{
2353 return 0x00000030U;
2354}
2355static inline u32 gr_scc_bundle_cb_size_div_256b_byte_granularity_v(void)
2356{
2357 return 0x00000100U;
2358}
2359static inline u32 gr_scc_bundle_cb_size_valid_false_v(void)
2360{
2361 return 0x00000000U;
2362}
2363static inline u32 gr_scc_bundle_cb_size_valid_false_f(void)
2364{
2365 return 0x0U;
2366}
2367static inline u32 gr_scc_bundle_cb_size_valid_true_f(void)
2368{
2369 return 0x80000000U;
2370}
2371static inline u32 gr_scc_pagepool_base_r(void)
2372{
2373 return 0x0040800cU;
2374}
2375static inline u32 gr_scc_pagepool_base_addr_39_8_f(u32 v)
2376{
2377 return (v & 0xffffffffU) << 0U;
2378}
2379static inline u32 gr_scc_pagepool_base_addr_39_8_align_bits_v(void)
2380{
2381 return 0x00000008U;
2382}
2383static inline u32 gr_scc_pagepool_r(void)
2384{
2385 return 0x00408010U;
2386}
2387static inline u32 gr_scc_pagepool_total_pages_f(u32 v)
2388{
2389 return (v & 0x3ffU) << 0U;
2390}
2391static inline u32 gr_scc_pagepool_total_pages_hwmax_v(void)
2392{
2393 return 0x00000000U;
2394}
2395static inline u32 gr_scc_pagepool_total_pages_hwmax_value_v(void)
2396{
2397 return 0x00000200U;
2398}
2399static inline u32 gr_scc_pagepool_total_pages_byte_granularity_v(void)
2400{
2401 return 0x00000100U;
2402}
2403static inline u32 gr_scc_pagepool_max_valid_pages_s(void)
2404{
2405 return 10U;
2406}
2407static inline u32 gr_scc_pagepool_max_valid_pages_f(u32 v)
2408{
2409 return (v & 0x3ffU) << 10U;
2410}
2411static inline u32 gr_scc_pagepool_max_valid_pages_m(void)
2412{
2413 return 0x3ffU << 10U;
2414}
2415static inline u32 gr_scc_pagepool_max_valid_pages_v(u32 r)
2416{
2417 return (r >> 10U) & 0x3ffU;
2418}
2419static inline u32 gr_scc_pagepool_valid_true_f(void)
2420{
2421 return 0x80000000U;
2422}
2423static inline u32 gr_scc_init_r(void)
2424{
2425 return 0x0040802cU;
2426}
2427static inline u32 gr_scc_init_ram_trigger_f(void)
2428{
2429 return 0x1U;
2430}
2431static inline u32 gr_scc_hww_esr_r(void)
2432{
2433 return 0x00408030U;
2434}
2435static inline u32 gr_scc_hww_esr_reset_active_f(void)
2436{
2437 return 0x40000000U;
2438}
2439static inline u32 gr_scc_hww_esr_en_enable_f(void)
2440{
2441 return 0x80000000U;
2442}
2443static inline u32 gr_ssync_hww_esr_r(void)
2444{
2445 return 0x00405a14U;
2446}
2447static inline u32 gr_ssync_hww_esr_reset_active_f(void)
2448{
2449 return 0x40000000U;
2450}
2451static inline u32 gr_ssync_hww_esr_en_enable_f(void)
2452{
2453 return 0x80000000U;
2454}
2455static inline u32 gr_sked_hww_esr_r(void)
2456{
2457 return 0x00407020U;
2458}
2459static inline u32 gr_sked_hww_esr_reset_active_f(void)
2460{
2461 return 0x40000000U;
2462}
2463static inline u32 gr_sked_hww_esr_en_r(void)
2464{
2465 return 0x00407024U;
2466}
2467static inline u32 gr_sked_hww_esr_en_skedcheck18_l1_config_too_small_m(void)
2468{
2469 return 0x1U << 25U;
2470}
2471static inline u32 gr_sked_hww_esr_en_skedcheck18_l1_config_too_small_disabled_f(void)
2472{
2473 return 0x0U;
2474}
2475static inline u32 gr_sked_hww_esr_en_skedcheck18_l1_config_too_small_enabled_f(void)
2476{
2477 return 0x2000000U;
2478}
2479static inline u32 gr_cwd_fs_r(void)
2480{
2481 return 0x00405b00U;
2482}
2483static inline u32 gr_cwd_fs_num_gpcs_f(u32 v)
2484{
2485 return (v & 0xffU) << 0U;
2486}
2487static inline u32 gr_cwd_fs_num_tpcs_f(u32 v)
2488{
2489 return (v & 0xffU) << 8U;
2490}
2491static inline u32 gr_cwd_gpc_tpc_id_r(u32 i)
2492{
2493 return 0x00405b60U + i*4U;
2494}
2495static inline u32 gr_cwd_gpc_tpc_id_tpc0_s(void)
2496{
2497 return 4U;
2498}
2499static inline u32 gr_cwd_gpc_tpc_id_tpc0_f(u32 v)
2500{
2501 return (v & 0xfU) << 0U;
2502}
2503static inline u32 gr_cwd_gpc_tpc_id_gpc0_s(void)
2504{
2505 return 4U;
2506}
2507static inline u32 gr_cwd_gpc_tpc_id_gpc0_f(u32 v)
2508{
2509 return (v & 0xfU) << 4U;
2510}
2511static inline u32 gr_cwd_gpc_tpc_id_tpc1_f(u32 v)
2512{
2513 return (v & 0xfU) << 8U;
2514}
2515static inline u32 gr_cwd_sm_id_r(u32 i)
2516{
2517 return 0x00405ba0U + i*4U;
2518}
2519static inline u32 gr_cwd_sm_id__size_1_v(void)
2520{
2521 return 0x00000010U;
2522}
2523static inline u32 gr_cwd_sm_id_tpc0_f(u32 v)
2524{
2525 return (v & 0xffU) << 0U;
2526}
2527static inline u32 gr_cwd_sm_id_tpc1_f(u32 v)
2528{
2529 return (v & 0xffU) << 8U;
2530}
2531static inline u32 gr_gpc0_fs_gpc_r(void)
2532{
2533 return 0x00502608U;
2534}
2535static inline u32 gr_gpc0_fs_gpc_num_available_tpcs_v(u32 r)
2536{
2537 return (r >> 0U) & 0x1fU;
2538}
2539static inline u32 gr_gpc0_fs_gpc_num_available_zculls_v(u32 r)
2540{
2541 return (r >> 16U) & 0x1fU;
2542}
2543static inline u32 gr_gpc0_cfg_r(void)
2544{
2545 return 0x00502620U;
2546}
2547static inline u32 gr_gpc0_cfg_imem_sz_v(u32 r)
2548{
2549 return (r >> 0U) & 0xffU;
2550}
2551static inline u32 gr_gpccs_rc_lanes_r(void)
2552{
2553 return 0x00502880U;
2554}
2555static inline u32 gr_gpccs_rc_lanes_num_chains_s(void)
2556{
2557 return 6U;
2558}
2559static inline u32 gr_gpccs_rc_lanes_num_chains_f(u32 v)
2560{
2561 return (v & 0x3fU) << 0U;
2562}
2563static inline u32 gr_gpccs_rc_lanes_num_chains_m(void)
2564{
2565 return 0x3fU << 0U;
2566}
2567static inline u32 gr_gpccs_rc_lanes_num_chains_v(u32 r)
2568{
2569 return (r >> 0U) & 0x3fU;
2570}
2571static inline u32 gr_gpccs_rc_lane_size_r(void)
2572{
2573 return 0x00502910U;
2574}
2575static inline u32 gr_gpccs_rc_lane_size_v_s(void)
2576{
2577 return 24U;
2578}
2579static inline u32 gr_gpccs_rc_lane_size_v_f(u32 v)
2580{
2581 return (v & 0xffffffU) << 0U;
2582}
2583static inline u32 gr_gpccs_rc_lane_size_v_m(void)
2584{
2585 return 0xffffffU << 0U;
2586}
2587static inline u32 gr_gpccs_rc_lane_size_v_v(u32 r)
2588{
2589 return (r >> 0U) & 0xffffffU;
2590}
2591static inline u32 gr_gpccs_rc_lane_size_v_0_v(void)
2592{
2593 return 0x00000000U;
2594}
2595static inline u32 gr_gpccs_rc_lane_size_v_0_f(void)
2596{
2597 return 0x0U;
2598}
2599static inline u32 gr_gpc0_zcull_fs_r(void)
2600{
2601 return 0x00500910U;
2602}
2603static inline u32 gr_gpc0_zcull_fs_num_sms_f(u32 v)
2604{
2605 return (v & 0x1ffU) << 0U;
2606}
2607static inline u32 gr_gpc0_zcull_fs_num_active_banks_f(u32 v)
2608{
2609 return (v & 0xfU) << 16U;
2610}
2611static inline u32 gr_gpc0_zcull_ram_addr_r(void)
2612{
2613 return 0x00500914U;
2614}
2615static inline u32 gr_gpc0_zcull_ram_addr_tiles_per_hypertile_row_per_gpc_f(u32 v)
2616{
2617 return (v & 0xfU) << 0U;
2618}
2619static inline u32 gr_gpc0_zcull_ram_addr_row_offset_f(u32 v)
2620{
2621 return (v & 0xfU) << 8U;
2622}
2623static inline u32 gr_gpc0_zcull_sm_num_rcp_r(void)
2624{
2625 return 0x00500918U;
2626}
2627static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative_f(u32 v)
2628{
2629 return (v & 0xffffffU) << 0U;
2630}
2631static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative__max_v(void)
2632{
2633 return 0x00800000U;
2634}
2635static inline u32 gr_gpc0_zcull_total_ram_size_r(void)
2636{
2637 return 0x00500920U;
2638}
2639static inline u32 gr_gpc0_zcull_total_ram_size_num_aliquots_f(u32 v)
2640{
2641 return (v & 0xffffU) << 0U;
2642}
2643static inline u32 gr_gpc0_zcull_zcsize_r(u32 i)
2644{
2645 return 0x00500a04U + i*32U;
2646}
2647static inline u32 gr_gpc0_zcull_zcsize_height_subregion__multiple_v(void)
2648{
2649 return 0x00000040U;
2650}
2651static inline u32 gr_gpc0_zcull_zcsize_width_subregion__multiple_v(void)
2652{
2653 return 0x00000010U;
2654}
2655static inline u32 gr_gpc0_gpm_pd_sm_id_r(u32 i)
2656{
2657 return 0x00500c10U + i*4U;
2658}
2659static inline u32 gr_gpc0_gpm_pd_sm_id_id_f(u32 v)
2660{
2661 return (v & 0xffU) << 0U;
2662}
2663static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_r(u32 i)
2664{
2665 return 0x00500c30U + i*4U;
2666}
2667static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(u32 r)
2668{
2669 return (r >> 0U) & 0xffU;
2670}
2671static inline u32 gr_gpc0_tpc0_pe_cfg_smid_r(void)
2672{
2673 return 0x00504088U;
2674}
2675static inline u32 gr_gpc0_tpc0_pe_cfg_smid_value_f(u32 v)
2676{
2677 return (v & 0xffffU) << 0U;
2678}
2679static inline u32 gr_gpc0_tpc0_sm_cfg_r(void)
2680{
2681 return 0x00504608U;
2682}
2683static inline u32 gr_gpc0_tpc0_sm_cfg_tpc_id_f(u32 v)
2684{
2685 return (v & 0xffffU) << 0U;
2686}
2687static inline u32 gr_gpc0_tpc0_sm_cfg_tpc_id_v(u32 r)
2688{
2689 return (r >> 0U) & 0xffffU;
2690}
2691static inline u32 gr_gpc0_tpc0_sm_arch_r(void)
2692{
2693 return 0x00504330U;
2694}
2695static inline u32 gr_gpc0_tpc0_sm_arch_warp_count_v(u32 r)
2696{
2697 return (r >> 0U) & 0xffU;
2698}
2699static inline u32 gr_gpc0_tpc0_sm_arch_spa_version_v(u32 r)
2700{
2701 return (r >> 8U) & 0xfffU;
2702}
2703static inline u32 gr_gpc0_tpc0_sm_arch_sm_version_v(u32 r)
2704{
2705 return (r >> 20U) & 0xfffU;
2706}
2707static inline u32 gr_gpc0_ppc0_pes_vsc_strem_r(void)
2708{
2709 return 0x00503018U;
2710}
2711static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_m(void)
2712{
2713 return 0x1U << 0U;
2714}
2715static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_true_f(void)
2716{
2717 return 0x1U;
2718}
2719static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_r(void)
2720{
2721 return 0x005030c0U;
2722}
2723static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_f(u32 v)
2724{
2725 return (v & 0x3fffffU) << 0U;
2726}
2727static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_m(void)
2728{
2729 return 0x3fffffU << 0U;
2730}
2731static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_default_v(void)
2732{
2733 return 0x00000480U;
2734}
2735static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_gfxp_v(void)
2736{
2737 return 0x00000d10U;
2738}
2739static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v(void)
2740{
2741 return 0x00000020U;
2742}
2743static inline u32 gr_gpc0_ppc0_cbm_beta_cb_offset_r(void)
2744{
2745 return 0x005030f4U;
2746}
2747static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_r(void)
2748{
2749 return 0x005030e4U;
2750}
2751static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(u32 v)
2752{
2753 return (v & 0xffffU) << 0U;
2754}
2755static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_m(void)
2756{
2757 return 0xffffU << 0U;
2758}
2759static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_default_v(void)
2760{
2761 return 0x00000800U;
2762}
2763static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_granularity_v(void)
2764{
2765 return 0x00000020U;
2766}
2767static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_offset_r(void)
2768{
2769 return 0x005030f8U;
2770}
2771static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_r(void)
2772{
2773 return 0x005030f0U;
2774}
2775static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_f(u32 v)
2776{
2777 return (v & 0x3fffffU) << 0U;
2778}
2779static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_default_v(void)
2780{
2781 return 0x00000480U;
2782}
2783static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_r(void)
2784{
2785 return 0x00419e00U;
2786}
2787static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_base_addr_43_12_f(u32 v)
2788{
2789 return (v & 0xffffffffU) << 0U;
2790}
2791static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_r(void)
2792{
2793 return 0x00419e04U;
2794}
2795static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_s(void)
2796{
2797 return 21U;
2798}
2799static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_f(u32 v)
2800{
2801 return (v & 0x1fffffU) << 0U;
2802}
2803static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_m(void)
2804{
2805 return 0x1fffffU << 0U;
2806}
2807static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_v(u32 r)
2808{
2809 return (r >> 0U) & 0x1fffffU;
2810}
2811static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_granularity_f(void)
2812{
2813 return 0x80U;
2814}
2815static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_s(void)
2816{
2817 return 1U;
2818}
2819static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_f(u32 v)
2820{
2821 return (v & 0x1U) << 31U;
2822}
2823static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_m(void)
2824{
2825 return 0x1U << 31U;
2826}
2827static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_v(u32 r)
2828{
2829 return (r >> 31U) & 0x1U;
2830}
2831static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_true_f(void)
2832{
2833 return 0x80000000U;
2834}
2835static inline u32 gr_gpccs_falcon_addr_r(void)
2836{
2837 return 0x0041a0acU;
2838}
2839static inline u32 gr_gpccs_falcon_addr_lsb_s(void)
2840{
2841 return 6U;
2842}
2843static inline u32 gr_gpccs_falcon_addr_lsb_f(u32 v)
2844{
2845 return (v & 0x3fU) << 0U;
2846}
2847static inline u32 gr_gpccs_falcon_addr_lsb_m(void)
2848{
2849 return 0x3fU << 0U;
2850}
2851static inline u32 gr_gpccs_falcon_addr_lsb_v(u32 r)
2852{
2853 return (r >> 0U) & 0x3fU;
2854}
2855static inline u32 gr_gpccs_falcon_addr_lsb_init_v(void)
2856{
2857 return 0x00000000U;
2858}
2859static inline u32 gr_gpccs_falcon_addr_lsb_init_f(void)
2860{
2861 return 0x0U;
2862}
2863static inline u32 gr_gpccs_falcon_addr_msb_s(void)
2864{
2865 return 6U;
2866}
2867static inline u32 gr_gpccs_falcon_addr_msb_f(u32 v)
2868{
2869 return (v & 0x3fU) << 6U;
2870}
2871static inline u32 gr_gpccs_falcon_addr_msb_m(void)
2872{
2873 return 0x3fU << 6U;
2874}
2875static inline u32 gr_gpccs_falcon_addr_msb_v(u32 r)
2876{
2877 return (r >> 6U) & 0x3fU;
2878}
2879static inline u32 gr_gpccs_falcon_addr_msb_init_v(void)
2880{
2881 return 0x00000000U;
2882}
2883static inline u32 gr_gpccs_falcon_addr_msb_init_f(void)
2884{
2885 return 0x0U;
2886}
2887static inline u32 gr_gpccs_falcon_addr_ext_s(void)
2888{
2889 return 12U;
2890}
2891static inline u32 gr_gpccs_falcon_addr_ext_f(u32 v)
2892{
2893 return (v & 0xfffU) << 0U;
2894}
2895static inline u32 gr_gpccs_falcon_addr_ext_m(void)
2896{
2897 return 0xfffU << 0U;
2898}
2899static inline u32 gr_gpccs_falcon_addr_ext_v(u32 r)
2900{
2901 return (r >> 0U) & 0xfffU;
2902}
2903static inline u32 gr_gpccs_cpuctl_r(void)
2904{
2905 return 0x0041a100U;
2906}
2907static inline u32 gr_gpccs_cpuctl_startcpu_f(u32 v)
2908{
2909 return (v & 0x1U) << 1U;
2910}
2911static inline u32 gr_gpccs_dmactl_r(void)
2912{
2913 return 0x0041a10cU;
2914}
2915static inline u32 gr_gpccs_dmactl_require_ctx_f(u32 v)
2916{
2917 return (v & 0x1U) << 0U;
2918}
2919static inline u32 gr_gpccs_dmactl_dmem_scrubbing_m(void)
2920{
2921 return 0x1U << 1U;
2922}
2923static inline u32 gr_gpccs_dmactl_imem_scrubbing_m(void)
2924{
2925 return 0x1U << 2U;
2926}
2927static inline u32 gr_gpccs_imemc_r(u32 i)
2928{
2929 return 0x0041a180U + i*16U;
2930}
2931static inline u32 gr_gpccs_imemc_offs_f(u32 v)
2932{
2933 return (v & 0x3fU) << 2U;
2934}
2935static inline u32 gr_gpccs_imemc_blk_f(u32 v)
2936{
2937 return (v & 0xffU) << 8U;
2938}
2939static inline u32 gr_gpccs_imemc_aincw_f(u32 v)
2940{
2941 return (v & 0x1U) << 24U;
2942}
2943static inline u32 gr_gpccs_imemd_r(u32 i)
2944{
2945 return 0x0041a184U + i*16U;
2946}
2947static inline u32 gr_gpccs_imemt_r(u32 i)
2948{
2949 return 0x0041a188U + i*16U;
2950}
2951static inline u32 gr_gpccs_imemt__size_1_v(void)
2952{
2953 return 0x00000004U;
2954}
2955static inline u32 gr_gpccs_imemt_tag_f(u32 v)
2956{
2957 return (v & 0xffffU) << 0U;
2958}
2959static inline u32 gr_gpccs_dmemc_r(u32 i)
2960{
2961 return 0x0041a1c0U + i*8U;
2962}
2963static inline u32 gr_gpccs_dmemc_offs_f(u32 v)
2964{
2965 return (v & 0x3fU) << 2U;
2966}
2967static inline u32 gr_gpccs_dmemc_blk_f(u32 v)
2968{
2969 return (v & 0xffU) << 8U;
2970}
2971static inline u32 gr_gpccs_dmemc_aincw_f(u32 v)
2972{
2973 return (v & 0x1U) << 24U;
2974}
2975static inline u32 gr_gpccs_dmemd_r(u32 i)
2976{
2977 return 0x0041a1c4U + i*8U;
2978}
2979static inline u32 gr_gpccs_ctxsw_mailbox_r(u32 i)
2980{
2981 return 0x0041a800U + i*4U;
2982}
2983static inline u32 gr_gpccs_ctxsw_mailbox_value_f(u32 v)
2984{
2985 return (v & 0xffffffffU) << 0U;
2986}
2987static inline u32 gr_gpcs_swdx_bundle_cb_base_r(void)
2988{
2989 return 0x00418e24U;
2990}
2991static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_s(void)
2992{
2993 return 32U;
2994}
2995static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_f(u32 v)
2996{
2997 return (v & 0xffffffffU) << 0U;
2998}
2999static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_m(void)
3000{
3001 return 0xffffffffU << 0U;
3002}
3003static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_v(u32 r)
3004{
3005 return (r >> 0U) & 0xffffffffU;
3006}
3007static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_v(void)
3008{
3009 return 0x00000000U;
3010}
3011static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_f(void)
3012{
3013 return 0x0U;
3014}
3015static inline u32 gr_gpcs_swdx_bundle_cb_size_r(void)
3016{
3017 return 0x00418e28U;
3018}
3019static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_s(void)
3020{
3021 return 11U;
3022}
3023static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_f(u32 v)
3024{
3025 return (v & 0x7ffU) << 0U;
3026}
3027static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_m(void)
3028{
3029 return 0x7ffU << 0U;
3030}
3031static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_v(u32 r)
3032{
3033 return (r >> 0U) & 0x7ffU;
3034}
3035static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_v(void)
3036{
3037 return 0x00000030U;
3038}
3039static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_f(void)
3040{
3041 return 0x30U;
3042}
3043static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_s(void)
3044{
3045 return 1U;
3046}
3047static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_f(u32 v)
3048{
3049 return (v & 0x1U) << 31U;
3050}
3051static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_m(void)
3052{
3053 return 0x1U << 31U;
3054}
3055static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_v(u32 r)
3056{
3057 return (r >> 31U) & 0x1U;
3058}
3059static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_v(void)
3060{
3061 return 0x00000000U;
3062}
3063static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_f(void)
3064{
3065 return 0x0U;
3066}
3067static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_v(void)
3068{
3069 return 0x00000001U;
3070}
3071static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_f(void)
3072{
3073 return 0x80000000U;
3074}
3075static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_r(void)
3076{
3077 return 0x005001dcU;
3078}
3079static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_f(u32 v)
3080{
3081 return (v & 0xffffU) << 0U;
3082}
3083static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_default_v(void)
3084{
3085 return 0x000004b0U;
3086}
3087static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_byte_granularity_v(void)
3088{
3089 return 0x00000100U;
3090}
3091static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_r(void)
3092{
3093 return 0x005001d8U;
3094}
3095static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_f(u32 v)
3096{
3097 return (v & 0xffffffffU) << 0U;
3098}
3099static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_align_bits_v(void)
3100{
3101 return 0x00000008U;
3102}
3103static inline u32 gr_gpcs_swdx_beta_cb_ctrl_r(void)
3104{
3105 return 0x004181e4U;
3106}
3107static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_f(u32 v)
3108{
3109 return (v & 0xfffU) << 0U;
3110}
3111static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_gfxp_v(void)
3112{
3113 return 0x00000100U;
3114}
3115static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_r(void)
3116{
3117 return 0x0041befcU;
3118}
3119static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_cbes_reserve_f(u32 v)
3120{
3121 return (v & 0xfffU) << 0U;
3122}
3123static inline u32 gr_gpcs_swdx_tc_beta_cb_size_r(u32 i)
3124{
3125 return 0x00418ea0U + i*4U;
3126}
3127static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_f(u32 v)
3128{
3129 return (v & 0x3fffffU) << 0U;
3130}
3131static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_m(void)
3132{
3133 return 0x3fffffU << 0U;
3134}
3135static inline u32 gr_gpcs_swdx_dss_zbc_color_r_r(u32 i)
3136{
3137 return 0x00418010U + i*4U;
3138}
3139static inline u32 gr_gpcs_swdx_dss_zbc_color_r_val_f(u32 v)
3140{
3141 return (v & 0xffffffffU) << 0U;
3142}
3143static inline u32 gr_gpcs_swdx_dss_zbc_color_g_r(u32 i)
3144{
3145 return 0x0041804cU + i*4U;
3146}
3147static inline u32 gr_gpcs_swdx_dss_zbc_color_g_val_f(u32 v)
3148{
3149 return (v & 0xffffffffU) << 0U;
3150}
3151static inline u32 gr_gpcs_swdx_dss_zbc_color_b_r(u32 i)
3152{
3153 return 0x00418088U + i*4U;
3154}
3155static inline u32 gr_gpcs_swdx_dss_zbc_color_b_val_f(u32 v)
3156{
3157 return (v & 0xffffffffU) << 0U;
3158}
3159static inline u32 gr_gpcs_swdx_dss_zbc_color_a_r(u32 i)
3160{
3161 return 0x004180c4U + i*4U;
3162}
3163static inline u32 gr_gpcs_swdx_dss_zbc_color_a_val_f(u32 v)
3164{
3165 return (v & 0xffffffffU) << 0U;
3166}
3167static inline u32 gr_gpcs_swdx_dss_zbc_c_01_to_04_format_r(void)
3168{
3169 return 0x00418100U;
3170}
3171static inline u32 gr_gpcs_swdx_dss_zbc_z_r(u32 i)
3172{
3173 return 0x00418110U + i*4U;
3174}
3175static inline u32 gr_gpcs_swdx_dss_zbc_z_val_f(u32 v)
3176{
3177 return (v & 0xffffffffU) << 0U;
3178}
3179static inline u32 gr_gpcs_swdx_dss_zbc_z_01_to_04_format_r(void)
3180{
3181 return 0x0041814cU;
3182}
3183static inline u32 gr_gpcs_swdx_dss_zbc_s_r(u32 i)
3184{
3185 return 0x0041815cU + i*4U;
3186}
3187static inline u32 gr_gpcs_swdx_dss_zbc_s_val_f(u32 v)
3188{
3189 return (v & 0xffU) << 0U;
3190}
3191static inline u32 gr_gpcs_swdx_dss_zbc_s_01_to_04_format_r(void)
3192{
3193 return 0x00418198U;
3194}
3195static inline u32 gr_gpcs_setup_attrib_cb_base_r(void)
3196{
3197 return 0x00418810U;
3198}
3199static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_f(u32 v)
3200{
3201 return (v & 0xfffffffU) << 0U;
3202}
3203static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_align_bits_v(void)
3204{
3205 return 0x0000000cU;
3206}
3207static inline u32 gr_gpcs_setup_attrib_cb_base_valid_true_f(void)
3208{
3209 return 0x80000000U;
3210}
3211static inline u32 gr_crstr_gpc_map_r(u32 i)
3212{
3213 return 0x00418b08U + i*4U;
3214}
3215static inline u32 gr_crstr_gpc_map_tile0_f(u32 v)
3216{
3217 return (v & 0x1fU) << 0U;
3218}
3219static inline u32 gr_crstr_gpc_map_tile1_f(u32 v)
3220{
3221 return (v & 0x1fU) << 5U;
3222}
3223static inline u32 gr_crstr_gpc_map_tile2_f(u32 v)
3224{
3225 return (v & 0x1fU) << 10U;
3226}
3227static inline u32 gr_crstr_gpc_map_tile3_f(u32 v)
3228{
3229 return (v & 0x1fU) << 15U;
3230}
3231static inline u32 gr_crstr_gpc_map_tile4_f(u32 v)
3232{
3233 return (v & 0x1fU) << 20U;
3234}
3235static inline u32 gr_crstr_gpc_map_tile5_f(u32 v)
3236{
3237 return (v & 0x1fU) << 25U;
3238}
3239static inline u32 gr_crstr_map_table_cfg_r(void)
3240{
3241 return 0x00418bb8U;
3242}
3243static inline u32 gr_crstr_map_table_cfg_row_offset_f(u32 v)
3244{
3245 return (v & 0xffU) << 0U;
3246}
3247static inline u32 gr_crstr_map_table_cfg_num_entries_f(u32 v)
3248{
3249 return (v & 0xffU) << 8U;
3250}
3251static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_r(u32 i)
3252{
3253 return 0x00418980U + i*4U;
3254}
3255static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_0_f(u32 v)
3256{
3257 return (v & 0x7U) << 0U;
3258}
3259static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_1_f(u32 v)
3260{
3261 return (v & 0x7U) << 4U;
3262}
3263static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_2_f(u32 v)
3264{
3265 return (v & 0x7U) << 8U;
3266}
3267static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_3_f(u32 v)
3268{
3269 return (v & 0x7U) << 12U;
3270}
3271static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_4_f(u32 v)
3272{
3273 return (v & 0x7U) << 16U;
3274}
3275static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_5_f(u32 v)
3276{
3277 return (v & 0x7U) << 20U;
3278}
3279static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_6_f(u32 v)
3280{
3281 return (v & 0x7U) << 24U;
3282}
3283static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_7_f(u32 v)
3284{
3285 return (v & 0x7U) << 28U;
3286}
3287static inline u32 gr_gpcs_gpm_pd_cfg_r(void)
3288{
3289 return 0x00418c6cU;
3290}
3291static inline u32 gr_gpcs_gcc_pagepool_base_r(void)
3292{
3293 return 0x00419004U;
3294}
3295static inline u32 gr_gpcs_gcc_pagepool_base_addr_39_8_f(u32 v)
3296{
3297 return (v & 0xffffffffU) << 0U;
3298}
3299static inline u32 gr_gpcs_gcc_pagepool_r(void)
3300{
3301 return 0x00419008U;
3302}
3303static inline u32 gr_gpcs_gcc_pagepool_total_pages_f(u32 v)
3304{
3305 return (v & 0x3ffU) << 0U;
3306}
3307static inline u32 gr_gpcs_tpcs_pe_vaf_r(void)
3308{
3309 return 0x0041980cU;
3310}
3311static inline u32 gr_gpcs_tpcs_pe_vaf_fast_mode_switch_true_f(void)
3312{
3313 return 0x10U;
3314}
3315static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_r(void)
3316{
3317 return 0x00419848U;
3318}
3319static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_v_f(u32 v)
3320{
3321 return (v & 0xfffffffU) << 0U;
3322}
3323static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_f(u32 v)
3324{
3325 return (v & 0x1U) << 28U;
3326}
3327static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_true_f(void)
3328{
3329 return 0x10000000U;
3330}
3331static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_r(void)
3332{
3333 return 0x00419c00U;
3334}
3335static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_disabled_f(void)
3336{
3337 return 0x0U;
3338}
3339static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_enabled_f(void)
3340{
3341 return 0x8U;
3342}
3343static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_r(void)
3344{
3345 return 0x00419c2cU;
3346}
3347static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_v_f(u32 v)
3348{
3349 return (v & 0xfffffffU) << 0U;
3350}
3351static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_f(u32 v)
3352{
3353 return (v & 0x1U) << 28U;
3354}
3355static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_true_f(void)
3356{
3357 return 0x10000000U;
3358}
3359static inline u32 gr_gpcs_tpcs_sms_hww_warp_esr_report_mask_r(void)
3360{
3361 return 0x00419ea8U;
3362}
3363static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_r(void)
3364{
3365 return 0x00504728U;
3366}
3367static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_stack_error_report_f(void)
3368{
3369 return 0x2U;
3370}
3371static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_api_stack_error_report_f(void)
3372{
3373 return 0x4U;
3374}
3375static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_pc_wrap_report_f(void)
3376{
3377 return 0x10U;
3378}
3379static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_misaligned_pc_report_f(void)
3380{
3381 return 0x20U;
3382}
3383static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_pc_overflow_report_f(void)
3384{
3385 return 0x40U;
3386}
3387static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_misaligned_reg_report_f(void)
3388{
3389 return 0x100U;
3390}
3391static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_illegal_instr_encoding_report_f(void)
3392{
3393 return 0x200U;
3394}
3395static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_illegal_instr_param_report_f(void)
3396{
3397 return 0x800U;
3398}
3399static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_oor_reg_report_f(void)
3400{
3401 return 0x2000U;
3402}
3403static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_oor_addr_report_f(void)
3404{
3405 return 0x4000U;
3406}
3407static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_misaligned_addr_report_f(void)
3408{
3409 return 0x8000U;
3410}
3411static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_invalid_addr_space_report_f(void)
3412{
3413 return 0x10000U;
3414}
3415static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_invalid_const_addr_ldc_report_f(void)
3416{
3417 return 0x40000U;
3418}
3419static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_mmu_fault_report_f(void)
3420{
3421 return 0x800000U;
3422}
3423static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_stack_overflow_report_f(void)
3424{
3425 return 0x400000U;
3426}
3427static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_mmu_nack_report_f(void)
3428{
3429 return 0x4000000U;
3430}
3431static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void)
3432{
3433 return 0x00419d0cU;
3434}
3435static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f(void)
3436{
3437 return 0x2U;
3438}
3439static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_tex_enabled_f(void)
3440{
3441 return 0x1U;
3442}
3443static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_mpc_enabled_f(void)
3444{
3445 return 0x10U;
3446}
3447static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
3448{
3449 return 0x0050450cU;
3450}
3451static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_v(u32 r)
3452{
3453 return (r >> 1U) & 0x1U;
3454}
3455static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_enabled_f(void)
3456{
3457 return 0x2U;
3458}
3459static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_mpc_enabled_f(void)
3460{
3461 return 0x10U;
3462}
3463static inline u32 gr_gpcs_gpccs_gpc_exception_en_r(void)
3464{
3465 return 0x0041ac94U;
3466}
3467static inline u32 gr_gpcs_gpccs_gpc_exception_en_gcc_f(u32 v)
3468{
3469 return (v & 0x1U) << 2U;
3470}
3471static inline u32 gr_gpcs_gpccs_gpc_exception_en_tpc_f(u32 v)
3472{
3473 return (v & 0xffU) << 16U;
3474}
3475static inline u32 gr_gpc0_gpccs_gpc_exception_r(void)
3476{
3477 return 0x00502c90U;
3478}
3479static inline u32 gr_gpc0_gpccs_gpc_exception_gcc_v(u32 r)
3480{
3481 return (r >> 2U) & 0x1U;
3482}
3483static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_v(u32 r)
3484{
3485 return (r >> 16U) & 0xffU;
3486}
3487static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_0_pending_v(void)
3488{
3489 return 0x00000001U;
3490}
3491static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_r(void)
3492{
3493 return 0x00504508U;
3494}
3495static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_v(u32 r)
3496{
3497 return (r >> 0U) & 0x1U;
3498}
3499static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_pending_v(void)
3500{
3501 return 0x00000001U;
3502}
3503static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_v(u32 r)
3504{
3505 return (r >> 1U) & 0x1U;
3506}
3507static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_pending_v(void)
3508{
3509 return 0x00000001U;
3510}
3511static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_mpc_m(void)
3512{
3513 return 0x1U << 4U;
3514}
3515static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_mpc_pending_f(void)
3516{
3517 return 0x10U;
3518}
3519static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_r(void)
3520{
3521 return 0x00504704U;
3522}
3523static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_m(void)
3524{
3525 return 0x1U << 0U;
3526}
3527static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_v(u32 r)
3528{
3529 return (r >> 0U) & 0x1U;
3530}
3531static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_on_v(void)
3532{
3533 return 0x00000001U;
3534}
3535static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_on_f(void)
3536{
3537 return 0x1U;
3538}
3539static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_off_v(void)
3540{
3541 return 0x00000000U;
3542}
3543static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_off_f(void)
3544{
3545 return 0x0U;
3546}
3547static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_stop_trigger_m(void)
3548{
3549 return 0x1U << 31U;
3550}
3551static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_stop_trigger_enable_f(void)
3552{
3553 return 0x80000000U;
3554}
3555static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_stop_trigger_disable_f(void)
3556{
3557 return 0x0U;
3558}
3559static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_single_step_mode_m(void)
3560{
3561 return 0x1U << 3U;
3562}
3563static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_single_step_mode_enable_f(void)
3564{
3565 return 0x8U;
3566}
3567static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_single_step_mode_disable_f(void)
3568{
3569 return 0x0U;
3570}
3571static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_run_trigger_task_f(void)
3572{
3573 return 0x40000000U;
3574}
3575static inline u32 gr_gpc0_tpc0_sm0_warp_valid_mask_0_r(void)
3576{
3577 return 0x00504708U;
3578}
3579static inline u32 gr_gpc0_tpc0_sm0_warp_valid_mask_1_r(void)
3580{
3581 return 0x0050470cU;
3582}
3583static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_pause_mask_0_r(void)
3584{
3585 return 0x00504710U;
3586}
3587static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_pause_mask_1_r(void)
3588{
3589 return 0x00504714U;
3590}
3591static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_trap_mask_0_r(void)
3592{
3593 return 0x00504718U;
3594}
3595static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_trap_mask_1_r(void)
3596{
3597 return 0x0050471cU;
3598}
3599static inline u32 gr_gpcs_tpcs_sms_dbgr_bpt_pause_mask_0_r(void)
3600{
3601 return 0x00419e90U;
3602}
3603static inline u32 gr_gpcs_tpcs_sms_dbgr_bpt_pause_mask_1_r(void)
3604{
3605 return 0x00419e94U;
3606}
3607static inline u32 gr_gpcs_tpcs_sms_dbgr_status0_r(void)
3608{
3609 return 0x00419e80U;
3610}
3611static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_r(void)
3612{
3613 return 0x00504700U;
3614}
3615static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_sm_in_trap_mode_v(u32 r)
3616{
3617 return (r >> 0U) & 0x1U;
3618}
3619static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_locked_down_v(u32 r)
3620{
3621 return (r >> 4U) & 0x1U;
3622}
3623static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_locked_down_true_v(void)
3624{
3625 return 0x00000001U;
3626}
3627static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_r(void)
3628{
3629 return 0x00504730U;
3630}
3631static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_v(u32 r)
3632{
3633 return (r >> 0U) & 0xffffU;
3634}
3635static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_none_v(void)
3636{
3637 return 0x00000000U;
3638}
3639static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_none_f(void)
3640{
3641 return 0x0U;
3642}
3643static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_stack_error_f(void)
3644{
3645 return 0x1U;
3646}
3647static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_api_stack_error_f(void)
3648{
3649 return 0x2U;
3650}
3651static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_pc_wrap_f(void)
3652{
3653 return 0x4U;
3654}
3655static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_misaligned_pc_f(void)
3656{
3657 return 0x5U;
3658}
3659static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_pc_overflow_f(void)
3660{
3661 return 0x6U;
3662}
3663static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_misaligned_reg_f(void)
3664{
3665 return 0x8U;
3666}
3667static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_illegal_instr_encoding_f(void)
3668{
3669 return 0x9U;
3670}
3671static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_illegal_instr_param_f(void)
3672{
3673 return 0xbU;
3674}
3675static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_oor_reg_f(void)
3676{
3677 return 0xdU;
3678}
3679static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_oor_addr_f(void)
3680{
3681 return 0xeU;
3682}
3683static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_misaligned_addr_f(void)
3684{
3685 return 0xfU;
3686}
3687static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_invalid_addr_space_f(void)
3688{
3689 return 0x10U;
3690}
3691static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_invalid_const_addr_ldc_f(void)
3692{
3693 return 0x12U;
3694}
3695static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_stack_overflow_f(void)
3696{
3697 return 0x16U;
3698}
3699static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_mmu_fault_f(void)
3700{
3701 return 0x17U;
3702}
3703static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_tex_format_f(void)
3704{
3705 return 0x18U;
3706}
3707static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_tex_layout_f(void)
3708{
3709 return 0x19U;
3710}
3711static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_mmu_nack_f(void)
3712{
3713 return 0x20U;
3714}
3715static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_wrap_id_m(void)
3716{
3717 return 0xffU << 16U;
3718}
3719static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_addr_error_type_m(void)
3720{
3721 return 0xfU << 24U;
3722}
3723static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_addr_error_type_none_f(void)
3724{
3725 return 0x0U;
3726}
3727static inline u32 gr_gpc0_tpc0_sm_tpc_esr_sm_sel_r(void)
3728{
3729 return 0x0050460cU;
3730}
3731static inline u32 gr_gpc0_tpc0_sm_tpc_esr_sm_sel_sm0_error_v(u32 r)
3732{
3733 return (r >> 0U) & 0x1U;
3734}
3735static inline u32 gr_gpc0_tpc0_sm_tpc_esr_sm_sel_sm1_error_v(u32 r)
3736{
3737 return (r >> 1U) & 0x1U;
3738}
3739static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_pc_r(void)
3740{
3741 return 0x00504738U;
3742}
3743static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_pc_hi_r(void)
3744{
3745 return 0x0050473cU;
3746}
3747static inline u32 gr_gpc0_tpc0_sm_halfctl_ctrl_r(void)
3748{
3749 return 0x005043a0U;
3750}
3751static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_r(void)
3752{
3753 return 0x00419ba0U;
3754}
3755static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_m(void)
3756{
3757 return 0x1U << 4U;
3758}
3759static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_f(u32 v)
3760{
3761 return (v & 0x1U) << 4U;
3762}
3763static inline u32 gr_gpc0_tpc0_sm_debug_sfe_control_r(void)
3764{
3765 return 0x005043b0U;
3766}
3767static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_r(void)
3768{
3769 return 0x00419bb0U;
3770}
3771static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_m(void)
3772{
3773 return 0x1U << 0U;
3774}
3775static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_f(u32 v)
3776{
3777 return (v & 0x1U) << 0U;
3778}
3779static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_r(void)
3780{
3781 return 0x0041be08U;
3782}
3783static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_fast_mode_switch_true_f(void)
3784{
3785 return 0x4U;
3786}
3787static inline u32 gr_ppcs_wwdx_map_gpc_map_r(u32 i)
3788{
3789 return 0x0041bf00U + i*4U;
3790}
3791static inline u32 gr_ppcs_wwdx_map_table_cfg_r(void)
3792{
3793 return 0x0041bfd0U;
3794}
3795static inline u32 gr_ppcs_wwdx_map_table_cfg_row_offset_f(u32 v)
3796{
3797 return (v & 0xffU) << 0U;
3798}
3799static inline u32 gr_ppcs_wwdx_map_table_cfg_num_entries_f(u32 v)
3800{
3801 return (v & 0xffU) << 8U;
3802}
3803static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_num_entries_f(u32 v)
3804{
3805 return (v & 0x1fU) << 16U;
3806}
3807static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_shift_value_f(u32 v)
3808{
3809 return (v & 0x7U) << 21U;
3810}
3811static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_r(void)
3812{
3813 return 0x0041bfd4U;
3814}
3815static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_conservative_f(u32 v)
3816{
3817 return (v & 0xffffffU) << 0U;
3818}
3819static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_r(u32 i)
3820{
3821 return 0x0041bfb0U + i*4U;
3822}
3823static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff__size_1_v(void)
3824{
3825 return 0x00000005U;
3826}
3827static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_0_mod_value_f(u32 v)
3828{
3829 return (v & 0xffU) << 0U;
3830}
3831static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_1_mod_value_f(u32 v)
3832{
3833 return (v & 0xffU) << 8U;
3834}
3835static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_2_mod_value_f(u32 v)
3836{
3837 return (v & 0xffU) << 16U;
3838}
3839static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_3_mod_value_f(u32 v)
3840{
3841 return (v & 0xffU) << 24U;
3842}
3843static inline u32 gr_bes_zrop_settings_r(void)
3844{
3845 return 0x00408850U;
3846}
3847static inline u32 gr_bes_zrop_settings_num_active_ltcs_f(u32 v)
3848{
3849 return (v & 0xfU) << 0U;
3850}
3851static inline u32 gr_be0_crop_debug3_r(void)
3852{
3853 return 0x00410108U;
3854}
3855static inline u32 gr_bes_crop_debug3_r(void)
3856{
3857 return 0x00408908U;
3858}
3859static inline u32 gr_bes_crop_debug3_comp_vdc_4to2_disable_m(void)
3860{
3861 return 0x1U << 31U;
3862}
3863static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_m(void)
3864{
3865 return 0x1U << 1U;
3866}
3867static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_disabled_f(void)
3868{
3869 return 0x0U;
3870}
3871static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_enabled_f(void)
3872{
3873 return 0x2U;
3874}
3875static inline u32 gr_bes_crop_debug3_blendopt_fill_override_m(void)
3876{
3877 return 0x1U << 2U;
3878}
3879static inline u32 gr_bes_crop_debug3_blendopt_fill_override_disabled_f(void)
3880{
3881 return 0x0U;
3882}
3883static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
3884{
3885 return 0x4U;
3886}
3887static inline u32 gr_bes_crop_debug4_r(void)
3888{
3889 return 0x0040894cU;
3890}
3891static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
3892{
3893 return 0x1U << 18U;
3894}
3895static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
3896{
3897 return 0x0U;
3898}
3899static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
3900{
3901 return 0x40000U;
3902}
3903static inline u32 gr_bes_crop_settings_r(void)
3904{
3905 return 0x00408958U;
3906}
3907static inline u32 gr_bes_crop_settings_num_active_ltcs_f(u32 v)
3908{
3909 return (v & 0xfU) << 0U;
3910}
3911static inline u32 gr_zcull_bytes_per_aliquot_per_gpu_v(void)
3912{
3913 return 0x00000020U;
3914}
3915static inline u32 gr_zcull_save_restore_header_bytes_per_gpc_v(void)
3916{
3917 return 0x00000020U;
3918}
3919static inline u32 gr_zcull_save_restore_subregion_header_bytes_per_gpc_v(void)
3920{
3921 return 0x000000c0U;
3922}
3923static inline u32 gr_zcull_subregion_qty_v(void)
3924{
3925 return 0x00000010U;
3926}
3927static inline u32 gr_gpcs_tpcs_tex_in_dbg_r(void)
3928{
3929 return 0x00419a00U;
3930}
3931static inline u32 gr_gpcs_tpcs_tex_in_dbg_tsl1_rvch_invalidate_f(u32 v)
3932{
3933 return (v & 0x1U) << 19U;
3934}
3935static inline u32 gr_gpcs_tpcs_tex_in_dbg_tsl1_rvch_invalidate_m(void)
3936{
3937 return 0x1U << 19U;
3938}
3939static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_r(void)
3940{
3941 return 0x00419bf0U;
3942}
3943static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_ld_f(u32 v)
3944{
3945 return (v & 0x1U) << 5U;
3946}
3947static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_ld_m(void)
3948{
3949 return 0x1U << 5U;
3950}
3951static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_st_f(u32 v)
3952{
3953 return (v & 0x1U) << 10U;
3954}
3955static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_st_m(void)
3956{
3957 return 0x1U << 10U;
3958}
3959static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_m(void)
3960{
3961 return 0x1U << 28U;
3962}
3963static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_disable_f(void)
3964{
3965 return 0x0U;
3966}
3967static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_enable_f(void)
3968{
3969 return 0x10000000U;
3970}
3971static inline u32 gr_fe_pwr_mode_r(void)
3972{
3973 return 0x00404170U;
3974}
3975static inline u32 gr_fe_pwr_mode_mode_auto_f(void)
3976{
3977 return 0x0U;
3978}
3979static inline u32 gr_fe_pwr_mode_mode_force_on_f(void)
3980{
3981 return 0x2U;
3982}
3983static inline u32 gr_fe_pwr_mode_req_v(u32 r)
3984{
3985 return (r >> 4U) & 0x1U;
3986}
3987static inline u32 gr_fe_pwr_mode_req_send_f(void)
3988{
3989 return 0x10U;
3990}
3991static inline u32 gr_fe_pwr_mode_req_done_v(void)
3992{
3993 return 0x00000000U;
3994}
3995static inline u32 gr_gpcs_pri_mmu_ctrl_r(void)
3996{
3997 return 0x00418880U;
3998}
3999static inline u32 gr_gpcs_pri_mmu_ctrl_vm_pg_size_m(void)
4000{
4001 return 0x1U << 0U;
4002}
4003static inline u32 gr_gpcs_pri_mmu_ctrl_use_pdb_big_page_size_m(void)
4004{
4005 return 0x1U << 11U;
4006}
4007static inline u32 gr_gpcs_pri_mmu_ctrl_vol_fault_m(void)
4008{
4009 return 0x1U << 1U;
4010}
4011static inline u32 gr_gpcs_pri_mmu_ctrl_comp_fault_m(void)
4012{
4013 return 0x1U << 2U;
4014}
4015static inline u32 gr_gpcs_pri_mmu_ctrl_miss_gran_m(void)
4016{
4017 return 0x3U << 3U;
4018}
4019static inline u32 gr_gpcs_pri_mmu_ctrl_cache_mode_m(void)
4020{
4021 return 0x3U << 5U;
4022}
4023static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_aperture_m(void)
4024{
4025 return 0x3U << 28U;
4026}
4027static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_vol_m(void)
4028{
4029 return 0x1U << 30U;
4030}
4031static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_disable_m(void)
4032{
4033 return 0x1U << 31U;
4034}
4035static inline u32 gr_gpcs_pri_mmu_pm_unit_mask_r(void)
4036{
4037 return 0x00418890U;
4038}
4039static inline u32 gr_gpcs_pri_mmu_pm_req_mask_r(void)
4040{
4041 return 0x00418894U;
4042}
4043static inline u32 gr_gpcs_pri_mmu_debug_ctrl_r(void)
4044{
4045 return 0x004188b0U;
4046}
4047static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_v(u32 r)
4048{
4049 return (r >> 16U) & 0x1U;
4050}
4051static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(void)
4052{
4053 return 0x00000001U;
4054}
4055static inline u32 gr_gpcs_pri_mmu_debug_wr_r(void)
4056{
4057 return 0x004188b4U;
4058}
4059static inline u32 gr_gpcs_pri_mmu_debug_rd_r(void)
4060{
4061 return 0x004188b8U;
4062}
4063static inline u32 gr_gpcs_mmu_num_active_ltcs_r(void)
4064{
4065 return 0x004188acU;
4066}
4067static inline u32 gr_gpcs_tpcs_sms_dbgr_control0_r(void)
4068{
4069 return 0x00419e84U;
4070}
4071static inline u32 gr_fe_gfxp_wfi_timeout_r(void)
4072{
4073 return 0x004041c0U;
4074}
4075static inline u32 gr_fe_gfxp_wfi_timeout_count_f(u32 v)
4076{
4077 return (v & 0xffffffffU) << 0U;
4078}
4079static inline u32 gr_fe_gfxp_wfi_timeout_count_disabled_f(void)
4080{
4081 return 0x0U;
4082}
4083static inline u32 gr_gpcs_tpcs_sm_texio_control_r(void)
4084{
4085 return 0x00419bd8U;
4086}
4087static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_f(u32 v)
4088{
4089 return (v & 0x7U) << 8U;
4090}
4091static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_m(void)
4092{
4093 return 0x7U << 8U;
4094}
4095static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_arm_63_48_match_f(void)
4096{
4097 return 0x100U;
4098}
4099static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_r(void)
4100{
4101 return 0x00419ba4U;
4102}
4103static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_m(void)
4104{
4105 return 0x3U << 11U;
4106}
4107static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_disable_f(void)
4108{
4109 return 0x1000U;
4110}
4111static inline u32 gr_gpcs_tc_debug0_r(void)
4112{
4113 return 0x00418708U;
4114}
4115static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_f(u32 v)
4116{
4117 return (v & 0x1ffU) << 0U;
4118}
4119static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_m(void)
4120{
4121 return 0x1ffU << 0U;
4122}
4123#endif
diff --git a/include/nvgpu/hw/gv100/hw_ioctrl_gv100.h b/include/nvgpu/hw/gv100/hw_ioctrl_gv100.h
deleted file mode 100644
index c27e607..0000000
--- a/include/nvgpu/hw/gv100/hw_ioctrl_gv100.h
+++ /dev/null
@@ -1,331 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ioctrl_gv100_h_
57#define _hw_ioctrl_gv100_h_
58
59static inline u32 ioctrl_reset_r(void)
60{
61 return 0x00000140U;
62}
63static inline u32 ioctrl_reset_sw_post_reset_delay_microseconds_v(void)
64{
65 return 0x00000008U;
66}
67static inline u32 ioctrl_reset_linkreset_f(u32 v)
68{
69 return (v & 0x3fU) << 8U;
70}
71static inline u32 ioctrl_reset_linkreset_m(void)
72{
73 return 0x3fU << 8U;
74}
75static inline u32 ioctrl_reset_linkreset_v(u32 r)
76{
77 return (r >> 8U) & 0x3fU;
78}
79static inline u32 ioctrl_debug_reset_r(void)
80{
81 return 0x00000144U;
82}
83static inline u32 ioctrl_debug_reset_link_f(u32 v)
84{
85 return (v & 0x3fU) << 0U;
86}
87static inline u32 ioctrl_debug_reset_link_m(void)
88{
89 return 0x3fU << 0U;
90}
91static inline u32 ioctrl_debug_reset_link_v(u32 r)
92{
93 return (r >> 0U) & 0x3fU;
94}
95static inline u32 ioctrl_debug_reset_common_f(u32 v)
96{
97 return (v & 0x1U) << 31U;
98}
99static inline u32 ioctrl_debug_reset_common_m(void)
100{
101 return 0x1U << 31U;
102}
103static inline u32 ioctrl_debug_reset_common_v(u32 r)
104{
105 return (r >> 31U) & 0x1U;
106}
107static inline u32 ioctrl_clock_control_r(u32 i)
108{
109 return 0x00000180U + i*4U;
110}
111static inline u32 ioctrl_clock_control__size_1_v(void)
112{
113 return 0x00000006U;
114}
115static inline u32 ioctrl_clock_control_clkdis_f(u32 v)
116{
117 return (v & 0x1U) << 0U;
118}
119static inline u32 ioctrl_clock_control_clkdis_m(void)
120{
121 return 0x1U << 0U;
122}
123static inline u32 ioctrl_clock_control_clkdis_v(u32 r)
124{
125 return (r >> 0U) & 0x1U;
126}
127static inline u32 ioctrl_top_intr_0_status_r(void)
128{
129 return 0x00000200U;
130}
131static inline u32 ioctrl_top_intr_0_status_link_f(u32 v)
132{
133 return (v & 0x3fU) << 0U;
134}
135static inline u32 ioctrl_top_intr_0_status_link_m(void)
136{
137 return 0x3fU << 0U;
138}
139static inline u32 ioctrl_top_intr_0_status_link_v(u32 r)
140{
141 return (r >> 0U) & 0x3fU;
142}
143static inline u32 ioctrl_top_intr_0_status_common_f(u32 v)
144{
145 return (v & 0x1U) << 31U;
146}
147static inline u32 ioctrl_top_intr_0_status_common_m(void)
148{
149 return 0x1U << 31U;
150}
151static inline u32 ioctrl_top_intr_0_status_common_v(u32 r)
152{
153 return (r >> 31U) & 0x1U;
154}
155static inline u32 ioctrl_common_intr_0_mask_r(void)
156{
157 return 0x00000220U;
158}
159static inline u32 ioctrl_common_intr_0_mask_fatal_f(u32 v)
160{
161 return (v & 0x1U) << 0U;
162}
163static inline u32 ioctrl_common_intr_0_mask_fatal_v(u32 r)
164{
165 return (r >> 0U) & 0x1U;
166}
167static inline u32 ioctrl_common_intr_0_mask_nonfatal_f(u32 v)
168{
169 return (v & 0x1U) << 1U;
170}
171static inline u32 ioctrl_common_intr_0_mask_nonfatal_v(u32 r)
172{
173 return (r >> 1U) & 0x1U;
174}
175static inline u32 ioctrl_common_intr_0_mask_correctable_f(u32 v)
176{
177 return (v & 0x1U) << 2U;
178}
179static inline u32 ioctrl_common_intr_0_mask_correctable_v(u32 r)
180{
181 return (r >> 2U) & 0x1U;
182}
183static inline u32 ioctrl_common_intr_0_mask_intra_f(u32 v)
184{
185 return (v & 0x1U) << 3U;
186}
187static inline u32 ioctrl_common_intr_0_mask_intra_v(u32 r)
188{
189 return (r >> 3U) & 0x1U;
190}
191static inline u32 ioctrl_common_intr_0_mask_intrb_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 ioctrl_common_intr_0_mask_intrb_v(u32 r)
196{
197 return (r >> 4U) & 0x1U;
198}
199static inline u32 ioctrl_common_intr_0_status_r(void)
200{
201 return 0x00000224U;
202}
203static inline u32 ioctrl_common_intr_0_status_fatal_f(u32 v)
204{
205 return (v & 0x1U) << 0U;
206}
207static inline u32 ioctrl_common_intr_0_status_fatal_v(u32 r)
208{
209 return (r >> 0U) & 0x1U;
210}
211static inline u32 ioctrl_common_intr_0_status_nonfatal_f(u32 v)
212{
213 return (v & 0x1U) << 1U;
214}
215static inline u32 ioctrl_common_intr_0_status_nonfatal_v(u32 r)
216{
217 return (r >> 1U) & 0x1U;
218}
219static inline u32 ioctrl_common_intr_0_status_correctable_f(u32 v)
220{
221 return (v & 0x1U) << 2U;
222}
223static inline u32 ioctrl_common_intr_0_status_correctable_v(u32 r)
224{
225 return (r >> 2U) & 0x1U;
226}
227static inline u32 ioctrl_common_intr_0_status_intra_f(u32 v)
228{
229 return (v & 0x1U) << 3U;
230}
231static inline u32 ioctrl_common_intr_0_status_intra_v(u32 r)
232{
233 return (r >> 3U) & 0x1U;
234}
235static inline u32 ioctrl_common_intr_0_status_intrb_f(u32 v)
236{
237 return (v & 0x1U) << 4U;
238}
239static inline u32 ioctrl_common_intr_0_status_intrb_v(u32 r)
240{
241 return (r >> 4U) & 0x1U;
242}
243static inline u32 ioctrl_link_intr_0_mask_r(u32 i)
244{
245 return 0x00000240U + i*20U;
246}
247static inline u32 ioctrl_link_intr_0_mask_fatal_f(u32 v)
248{
249 return (v & 0x1U) << 0U;
250}
251static inline u32 ioctrl_link_intr_0_mask_fatal_v(u32 r)
252{
253 return (r >> 0U) & 0x1U;
254}
255static inline u32 ioctrl_link_intr_0_mask_nonfatal_f(u32 v)
256{
257 return (v & 0x1U) << 1U;
258}
259static inline u32 ioctrl_link_intr_0_mask_nonfatal_v(u32 r)
260{
261 return (r >> 1U) & 0x1U;
262}
263static inline u32 ioctrl_link_intr_0_mask_correctable_f(u32 v)
264{
265 return (v & 0x1U) << 2U;
266}
267static inline u32 ioctrl_link_intr_0_mask_correctable_v(u32 r)
268{
269 return (r >> 2U) & 0x1U;
270}
271static inline u32 ioctrl_link_intr_0_mask_intra_f(u32 v)
272{
273 return (v & 0x1U) << 3U;
274}
275static inline u32 ioctrl_link_intr_0_mask_intra_v(u32 r)
276{
277 return (r >> 3U) & 0x1U;
278}
279static inline u32 ioctrl_link_intr_0_mask_intrb_f(u32 v)
280{
281 return (v & 0x1U) << 4U;
282}
283static inline u32 ioctrl_link_intr_0_mask_intrb_v(u32 r)
284{
285 return (r >> 4U) & 0x1U;
286}
287static inline u32 ioctrl_link_intr_0_status_r(u32 i)
288{
289 return 0x00000244U + i*20U;
290}
291static inline u32 ioctrl_link_intr_0_status_fatal_f(u32 v)
292{
293 return (v & 0x1U) << 0U;
294}
295static inline u32 ioctrl_link_intr_0_status_fatal_v(u32 r)
296{
297 return (r >> 0U) & 0x1U;
298}
299static inline u32 ioctrl_link_intr_0_status_nonfatal_f(u32 v)
300{
301 return (v & 0x1U) << 1U;
302}
303static inline u32 ioctrl_link_intr_0_status_nonfatal_v(u32 r)
304{
305 return (r >> 1U) & 0x1U;
306}
307static inline u32 ioctrl_link_intr_0_status_correctable_f(u32 v)
308{
309 return (v & 0x1U) << 2U;
310}
311static inline u32 ioctrl_link_intr_0_status_correctable_v(u32 r)
312{
313 return (r >> 2U) & 0x1U;
314}
315static inline u32 ioctrl_link_intr_0_status_intra_f(u32 v)
316{
317 return (v & 0x1U) << 3U;
318}
319static inline u32 ioctrl_link_intr_0_status_intra_v(u32 r)
320{
321 return (r >> 3U) & 0x1U;
322}
323static inline u32 ioctrl_link_intr_0_status_intrb_f(u32 v)
324{
325 return (v & 0x1U) << 4U;
326}
327static inline u32 ioctrl_link_intr_0_status_intrb_v(u32 r)
328{
329 return (r >> 4U) & 0x1U;
330}
331#endif
diff --git a/include/nvgpu/hw/gv100/hw_ioctrlmif_gv100.h b/include/nvgpu/hw/gv100/hw_ioctrlmif_gv100.h
deleted file mode 100644
index 5747a9b..0000000
--- a/include/nvgpu/hw/gv100/hw_ioctrlmif_gv100.h
+++ /dev/null
@@ -1,331 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ioctrlmif_gv100_h_
57#define _hw_ioctrlmif_gv100_h_
58
59static inline u32 ioctrlmif_rx_err_contain_en_0_r(void)
60{
61 return 0x00000e0cU;
62}
63static inline u32 ioctrlmif_rx_err_contain_en_0_rxramdataparityerr_f(u32 v)
64{
65 return (v & 0x1U) << 3U;
66}
67static inline u32 ioctrlmif_rx_err_contain_en_0_rxramdataparityerr_m(void)
68{
69 return 0x1U << 3U;
70}
71static inline u32 ioctrlmif_rx_err_contain_en_0_rxramdataparityerr_v(u32 r)
72{
73 return (r >> 3U) & 0x1U;
74}
75static inline u32 ioctrlmif_rx_err_contain_en_0_rxramdataparityerr__prod_v(void)
76{
77 return 0x00000001U;
78}
79static inline u32 ioctrlmif_rx_err_contain_en_0_rxramdataparityerr__prod_f(void)
80{
81 return 0x8U;
82}
83static inline u32 ioctrlmif_rx_err_contain_en_0_rxramhdrparityerr_f(u32 v)
84{
85 return (v & 0x1U) << 4U;
86}
87static inline u32 ioctrlmif_rx_err_contain_en_0_rxramhdrparityerr_m(void)
88{
89 return 0x1U << 4U;
90}
91static inline u32 ioctrlmif_rx_err_contain_en_0_rxramhdrparityerr_v(u32 r)
92{
93 return (r >> 4U) & 0x1U;
94}
95static inline u32 ioctrlmif_rx_err_contain_en_0_rxramhdrparityerr__prod_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 ioctrlmif_rx_err_contain_en_0_rxramhdrparityerr__prod_f(void)
100{
101 return 0x10U;
102}
103static inline u32 ioctrlmif_rx_err_log_en_0_r(void)
104{
105 return 0x00000e04U;
106}
107static inline u32 ioctrlmif_rx_err_log_en_0_rxramdataparityerr_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 ioctrlmif_rx_err_log_en_0_rxramdataparityerr_m(void)
112{
113 return 0x1U << 3U;
114}
115static inline u32 ioctrlmif_rx_err_log_en_0_rxramdataparityerr_v(u32 r)
116{
117 return (r >> 3U) & 0x1U;
118}
119static inline u32 ioctrlmif_rx_err_log_en_0_rxramhdrparityerr_f(u32 v)
120{
121 return (v & 0x1U) << 4U;
122}
123static inline u32 ioctrlmif_rx_err_log_en_0_rxramhdrparityerr_m(void)
124{
125 return 0x1U << 4U;
126}
127static inline u32 ioctrlmif_rx_err_log_en_0_rxramhdrparityerr_v(u32 r)
128{
129 return (r >> 4U) & 0x1U;
130}
131static inline u32 ioctrlmif_rx_err_report_en_0_r(void)
132{
133 return 0x00000e08U;
134}
135static inline u32 ioctrlmif_rx_err_report_en_0_rxramdataparityerr_f(u32 v)
136{
137 return (v & 0x1U) << 3U;
138}
139static inline u32 ioctrlmif_rx_err_report_en_0_rxramdataparityerr_m(void)
140{
141 return 0x1U << 3U;
142}
143static inline u32 ioctrlmif_rx_err_report_en_0_rxramdataparityerr_v(u32 r)
144{
145 return (r >> 3U) & 0x1U;
146}
147static inline u32 ioctrlmif_rx_err_report_en_0_rxramhdrparityerr_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 ioctrlmif_rx_err_report_en_0_rxramhdrparityerr_m(void)
152{
153 return 0x1U << 4U;
154}
155static inline u32 ioctrlmif_rx_err_report_en_0_rxramhdrparityerr_v(u32 r)
156{
157 return (r >> 4U) & 0x1U;
158}
159static inline u32 ioctrlmif_rx_err_status_0_r(void)
160{
161 return 0x00000e00U;
162}
163static inline u32 ioctrlmif_rx_err_status_0_rxramdataparityerr_f(u32 v)
164{
165 return (v & 0x1U) << 3U;
166}
167static inline u32 ioctrlmif_rx_err_status_0_rxramdataparityerr_m(void)
168{
169 return 0x1U << 3U;
170}
171static inline u32 ioctrlmif_rx_err_status_0_rxramdataparityerr_v(u32 r)
172{
173 return (r >> 3U) & 0x1U;
174}
175static inline u32 ioctrlmif_rx_err_status_0_rxramhdrparityerr_f(u32 v)
176{
177 return (v & 0x1U) << 4U;
178}
179static inline u32 ioctrlmif_rx_err_status_0_rxramhdrparityerr_m(void)
180{
181 return 0x1U << 4U;
182}
183static inline u32 ioctrlmif_rx_err_status_0_rxramhdrparityerr_v(u32 r)
184{
185 return (r >> 4U) & 0x1U;
186}
187static inline u32 ioctrlmif_rx_err_first_0_r(void)
188{
189 return 0x00000e14U;
190}
191static inline u32 ioctrlmif_tx_err_contain_en_0_r(void)
192{
193 return 0x00000a90U;
194}
195static inline u32 ioctrlmif_tx_err_contain_en_0_txramdataparityerr_f(u32 v)
196{
197 return (v & 0x1U) << 0U;
198}
199static inline u32 ioctrlmif_tx_err_contain_en_0_txramdataparityerr_m(void)
200{
201 return 0x1U << 0U;
202}
203static inline u32 ioctrlmif_tx_err_contain_en_0_txramdataparityerr_v(u32 r)
204{
205 return (r >> 0U) & 0x1U;
206}
207static inline u32 ioctrlmif_tx_err_contain_en_0_txramdataparityerr__prod_v(void)
208{
209 return 0x00000001U;
210}
211static inline u32 ioctrlmif_tx_err_contain_en_0_txramdataparityerr__prod_f(void)
212{
213 return 0x1U;
214}
215static inline u32 ioctrlmif_tx_err_contain_en_0_txramhdrparityerr_f(u32 v)
216{
217 return (v & 0x1U) << 1U;
218}
219static inline u32 ioctrlmif_tx_err_contain_en_0_txramhdrparityerr_m(void)
220{
221 return 0x1U << 1U;
222}
223static inline u32 ioctrlmif_tx_err_contain_en_0_txramhdrparityerr_v(u32 r)
224{
225 return (r >> 1U) & 0x1U;
226}
227static inline u32 ioctrlmif_tx_err_contain_en_0_txramhdrparityerr__prod_v(void)
228{
229 return 0x00000001U;
230}
231static inline u32 ioctrlmif_tx_err_contain_en_0_txramhdrparityerr__prod_f(void)
232{
233 return 0x2U;
234}
235static inline u32 ioctrlmif_tx_err_log_en_0_r(void)
236{
237 return 0x00000a88U;
238}
239static inline u32 ioctrlmif_tx_err_log_en_0_txramdataparityerr_f(u32 v)
240{
241 return (v & 0x1U) << 0U;
242}
243static inline u32 ioctrlmif_tx_err_log_en_0_txramdataparityerr_m(void)
244{
245 return 0x1U << 0U;
246}
247static inline u32 ioctrlmif_tx_err_log_en_0_txramdataparityerr_v(u32 r)
248{
249 return (r >> 0U) & 0x1U;
250}
251static inline u32 ioctrlmif_tx_err_log_en_0_txramhdrparityerr_f(u32 v)
252{
253 return (v & 0x1U) << 1U;
254}
255static inline u32 ioctrlmif_tx_err_log_en_0_txramhdrparityerr_m(void)
256{
257 return 0x1U << 1U;
258}
259static inline u32 ioctrlmif_tx_err_log_en_0_txramhdrparityerr_v(u32 r)
260{
261 return (r >> 1U) & 0x1U;
262}
263static inline u32 ioctrlmif_tx_err_report_en_0_r(void)
264{
265 return 0x00000e08U;
266}
267static inline u32 ioctrlmif_tx_err_report_en_0_txramdataparityerr_f(u32 v)
268{
269 return (v & 0x1U) << 0U;
270}
271static inline u32 ioctrlmif_tx_err_report_en_0_txramdataparityerr_m(void)
272{
273 return 0x1U << 0U;
274}
275static inline u32 ioctrlmif_tx_err_report_en_0_txramdataparityerr_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 ioctrlmif_tx_err_report_en_0_txramhdrparityerr_f(u32 v)
280{
281 return (v & 0x1U) << 1U;
282}
283static inline u32 ioctrlmif_tx_err_report_en_0_txramhdrparityerr_m(void)
284{
285 return 0x1U << 1U;
286}
287static inline u32 ioctrlmif_tx_err_report_en_0_txramhdrparityerr_v(u32 r)
288{
289 return (r >> 1U) & 0x1U;
290}
291static inline u32 ioctrlmif_tx_err_status_0_r(void)
292{
293 return 0x00000a84U;
294}
295static inline u32 ioctrlmif_tx_err_status_0_txramdataparityerr_f(u32 v)
296{
297 return (v & 0x1U) << 0U;
298}
299static inline u32 ioctrlmif_tx_err_status_0_txramdataparityerr_m(void)
300{
301 return 0x1U << 0U;
302}
303static inline u32 ioctrlmif_tx_err_status_0_txramdataparityerr_v(u32 r)
304{
305 return (r >> 0U) & 0x1U;
306}
307static inline u32 ioctrlmif_tx_err_status_0_txramhdrparityerr_f(u32 v)
308{
309 return (v & 0x1U) << 1U;
310}
311static inline u32 ioctrlmif_tx_err_status_0_txramhdrparityerr_m(void)
312{
313 return 0x1U << 1U;
314}
315static inline u32 ioctrlmif_tx_err_status_0_txramhdrparityerr_v(u32 r)
316{
317 return (r >> 1U) & 0x1U;
318}
319static inline u32 ioctrlmif_tx_err_first_0_r(void)
320{
321 return 0x00000a98U;
322}
323static inline u32 ioctrlmif_tx_ctrl_buffer_ready_r(void)
324{
325 return 0x00000a7cU;
326}
327static inline u32 ioctrlmif_rx_ctrl_buffer_ready_r(void)
328{
329 return 0x00000dfcU;
330}
331#endif
diff --git a/include/nvgpu/hw/gv100/hw_ltc_gv100.h b/include/nvgpu/hw/gv100/hw_ltc_gv100.h
deleted file mode 100644
index 042cb7d..0000000
--- a/include/nvgpu/hw/gv100/hw_ltc_gv100.h
+++ /dev/null
@@ -1,631 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ltc_gv100_h_
57#define _hw_ltc_gv100_h_
58
59static inline u32 ltc_pltcg_base_v(void)
60{
61 return 0x00140000U;
62}
63static inline u32 ltc_pltcg_extent_v(void)
64{
65 return 0x0017ffffU;
66}
67static inline u32 ltc_ltc0_ltss_v(void)
68{
69 return 0x00140200U;
70}
71static inline u32 ltc_ltc0_lts0_v(void)
72{
73 return 0x00140400U;
74}
75static inline u32 ltc_ltcs_ltss_v(void)
76{
77 return 0x0017e200U;
78}
79static inline u32 ltc_ltcs_lts0_cbc_ctrl1_r(void)
80{
81 return 0x0014046cU;
82}
83static inline u32 ltc_ltc0_lts0_dstg_cfg0_r(void)
84{
85 return 0x00140518U;
86}
87static inline u32 ltc_ltcs_ltss_dstg_cfg0_r(void)
88{
89 return 0x0017e318U;
90}
91static inline u32 ltc_ltcs_ltss_dstg_cfg0_vdc_4to2_disable_m(void)
92{
93 return 0x1U << 15U;
94}
95static inline u32 ltc_ltc0_lts0_tstg_cfg1_r(void)
96{
97 return 0x00140494U;
98}
99static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_ways_v(u32 r)
100{
101 return (r >> 0U) & 0xffffU;
102}
103static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_v(u32 r)
104{
105 return (r >> 16U) & 0x3U;
106}
107static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_all_v(void)
108{
109 return 0x00000000U;
110}
111static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_half_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v(void)
116{
117 return 0x00000002U;
118}
119static inline u32 ltc_ltcs_ltss_cbc_ctrl1_r(void)
120{
121 return 0x0017e26cU;
122}
123static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clean_active_f(void)
124{
125 return 0x1U;
126}
127static inline u32 ltc_ltcs_ltss_cbc_ctrl1_invalidate_active_f(void)
128{
129 return 0x2U;
130}
131static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_v(u32 r)
132{
133 return (r >> 2U) & 0x1U;
134}
135static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_v(void)
136{
137 return 0x00000001U;
138}
139static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_f(void)
140{
141 return 0x4U;
142}
143static inline u32 ltc_ltc0_lts0_cbc_ctrl1_r(void)
144{
145 return 0x0014046cU;
146}
147static inline u32 ltc_ltcs_ltss_cbc_ctrl2_r(void)
148{
149 return 0x0017e270U;
150}
151static inline u32 ltc_ltcs_ltss_cbc_ctrl2_clear_lower_bound_f(u32 v)
152{
153 return (v & 0x3ffffU) << 0U;
154}
155static inline u32 ltc_ltcs_ltss_cbc_ctrl3_r(void)
156{
157 return 0x0017e274U;
158}
159static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_f(u32 v)
160{
161 return (v & 0x3ffffU) << 0U;
162}
163static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_init_v(void)
164{
165 return 0x0003ffffU;
166}
167static inline u32 ltc_ltcs_ltss_cbc_base_r(void)
168{
169 return 0x0017e278U;
170}
171static inline u32 ltc_ltcs_ltss_cbc_base_alignment_shift_v(void)
172{
173 return 0x0000000bU;
174}
175static inline u32 ltc_ltcs_ltss_cbc_base_address_v(u32 r)
176{
177 return (r >> 0U) & 0x3ffffffU;
178}
179static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_r(void)
180{
181 return 0x0017e27cU;
182}
183static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs__v(u32 r)
184{
185 return (r >> 0U) & 0x1fU;
186}
187static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_nvlink_peer_through_l2_f(u32 v)
188{
189 return (v & 0x1U) << 24U;
190}
191static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_nvlink_peer_through_l2_v(u32 r)
192{
193 return (r >> 24U) & 0x1U;
194}
195static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_serialize_f(u32 v)
196{
197 return (v & 0x1U) << 25U;
198}
199static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_serialize_v(u32 r)
200{
201 return (r >> 25U) & 0x1U;
202}
203static inline u32 ltc_ltcs_misc_ltc_num_active_ltcs_r(void)
204{
205 return 0x0017e000U;
206}
207static inline u32 ltc_ltcs_ltss_cbc_param_r(void)
208{
209 return 0x0017e280U;
210}
211static inline u32 ltc_ltcs_ltss_cbc_param_comptags_per_cache_line_v(u32 r)
212{
213 return (r >> 0U) & 0xffffU;
214}
215static inline u32 ltc_ltcs_ltss_cbc_param_cache_line_size_v(u32 r)
216{
217 return (r >> 24U) & 0xfU;
218}
219static inline u32 ltc_ltcs_ltss_cbc_param_slices_per_ltc_v(u32 r)
220{
221 return (r >> 28U) & 0xfU;
222}
223static inline u32 ltc_ltcs_ltss_cbc_param2_r(void)
224{
225 return 0x0017e3f4U;
226}
227static inline u32 ltc_ltcs_ltss_cbc_param2_gobs_per_comptagline_per_slice_v(u32 r)
228{
229 return (r >> 0U) & 0xffffU;
230}
231static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_r(void)
232{
233 return 0x0017e2acU;
234}
235static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(u32 v)
236{
237 return (v & 0x1fU) << 16U;
238}
239static inline u32 ltc_ltcs_ltss_dstg_zbc_index_r(void)
240{
241 return 0x0017e338U;
242}
243static inline u32 ltc_ltcs_ltss_dstg_zbc_index_address_f(u32 v)
244{
245 return (v & 0xfU) << 0U;
246}
247static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value_r(u32 i)
248{
249 return 0x0017e33cU + i*4U;
250}
251static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value__size_1_v(void)
252{
253 return 0x00000004U;
254}
255static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_r(void)
256{
257 return 0x0017e34cU;
258}
259static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_s(void)
260{
261 return 32U;
262}
263static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_f(u32 v)
264{
265 return (v & 0xffffffffU) << 0U;
266}
267static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_m(void)
268{
269 return 0xffffffffU << 0U;
270}
271static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_v(u32 r)
272{
273 return (r >> 0U) & 0xffffffffU;
274}
275static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_r(void)
276{
277 return 0x0017e204U;
278}
279static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_s(void)
280{
281 return 8U;
282}
283static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_f(u32 v)
284{
285 return (v & 0xffU) << 0U;
286}
287static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_m(void)
288{
289 return 0xffU << 0U;
290}
291static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_v(u32 r)
292{
293 return (r >> 0U) & 0xffU;
294}
295static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_r(void)
296{
297 return 0x0017e2b0U;
298}
299static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_l2_bypass_mode_enabled_f(void)
300{
301 return 0x10000000U;
302}
303static inline u32 ltc_ltcs_ltss_g_elpg_r(void)
304{
305 return 0x0017e214U;
306}
307static inline u32 ltc_ltcs_ltss_g_elpg_flush_v(u32 r)
308{
309 return (r >> 0U) & 0x1U;
310}
311static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_v(void)
312{
313 return 0x00000001U;
314}
315static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_f(void)
316{
317 return 0x1U;
318}
319static inline u32 ltc_ltc0_ltss_g_elpg_r(void)
320{
321 return 0x00140214U;
322}
323static inline u32 ltc_ltc0_ltss_g_elpg_flush_v(u32 r)
324{
325 return (r >> 0U) & 0x1U;
326}
327static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_v(void)
328{
329 return 0x00000001U;
330}
331static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_f(void)
332{
333 return 0x1U;
334}
335static inline u32 ltc_ltc1_ltss_g_elpg_r(void)
336{
337 return 0x00142214U;
338}
339static inline u32 ltc_ltc1_ltss_g_elpg_flush_v(u32 r)
340{
341 return (r >> 0U) & 0x1U;
342}
343static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_v(void)
344{
345 return 0x00000001U;
346}
347static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_f(void)
348{
349 return 0x1U;
350}
351static inline u32 ltc_ltcs_ltss_intr_r(void)
352{
353 return 0x0017e20cU;
354}
355static inline u32 ltc_ltcs_ltss_intr_ecc_sec_error_pending_f(void)
356{
357 return 0x100U;
358}
359static inline u32 ltc_ltcs_ltss_intr_ecc_ded_error_pending_f(void)
360{
361 return 0x200U;
362}
363static inline u32 ltc_ltcs_ltss_intr_en_evicted_cb_m(void)
364{
365 return 0x1U << 20U;
366}
367static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_m(void)
368{
369 return 0x1U << 21U;
370}
371static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_enabled_f(void)
372{
373 return 0x200000U;
374}
375static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_disabled_f(void)
376{
377 return 0x0U;
378}
379static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_access_m(void)
380{
381 return 0x1U << 30U;
382}
383static inline u32 ltc_ltcs_ltss_intr_en_ecc_sec_error_enabled_f(void)
384{
385 return 0x1000000U;
386}
387static inline u32 ltc_ltcs_ltss_intr_en_ecc_ded_error_enabled_f(void)
388{
389 return 0x2000000U;
390}
391static inline u32 ltc_ltc0_lts0_intr_r(void)
392{
393 return 0x0014040cU;
394}
395static inline u32 ltc_ltc0_lts0_dstg_ecc_report_r(void)
396{
397 return 0x0014051cU;
398}
399static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_m(void)
400{
401 return 0xffU << 0U;
402}
403static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_v(u32 r)
404{
405 return (r >> 0U) & 0xffU;
406}
407static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_m(void)
408{
409 return 0xffU << 16U;
410}
411static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_v(u32 r)
412{
413 return (r >> 16U) & 0xffU;
414}
415static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_r(void)
416{
417 return 0x0017e2a0U;
418}
419static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_v(u32 r)
420{
421 return (r >> 0U) & 0x1U;
422}
423static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_v(void)
424{
425 return 0x00000001U;
426}
427static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_f(void)
428{
429 return 0x1U;
430}
431static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_v(u32 r)
432{
433 return (r >> 8U) & 0xfU;
434}
435static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_v(void)
436{
437 return 0x00000003U;
438}
439static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_f(void)
440{
441 return 0x300U;
442}
443static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_v(u32 r)
444{
445 return (r >> 28U) & 0x1U;
446}
447static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_v(void)
448{
449 return 0x00000001U;
450}
451static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_f(void)
452{
453 return 0x10000000U;
454}
455static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_v(u32 r)
456{
457 return (r >> 29U) & 0x1U;
458}
459static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_v(void)
460{
461 return 0x00000001U;
462}
463static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_f(void)
464{
465 return 0x20000000U;
466}
467static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_v(u32 r)
468{
469 return (r >> 30U) & 0x1U;
470}
471static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_v(void)
472{
473 return 0x00000001U;
474}
475static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_f(void)
476{
477 return 0x40000000U;
478}
479static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_r(void)
480{
481 return 0x0017e2a4U;
482}
483static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_v(u32 r)
484{
485 return (r >> 0U) & 0x1U;
486}
487static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_v(void)
488{
489 return 0x00000001U;
490}
491static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_f(void)
492{
493 return 0x1U;
494}
495static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_v(u32 r)
496{
497 return (r >> 8U) & 0xfU;
498}
499static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_v(void)
500{
501 return 0x00000003U;
502}
503static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_f(void)
504{
505 return 0x300U;
506}
507static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_v(u32 r)
508{
509 return (r >> 16U) & 0x1U;
510}
511static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_v(void)
512{
513 return 0x00000001U;
514}
515static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_f(void)
516{
517 return 0x10000U;
518}
519static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_v(u32 r)
520{
521 return (r >> 28U) & 0x1U;
522}
523static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_v(void)
524{
525 return 0x00000001U;
526}
527static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_f(void)
528{
529 return 0x10000000U;
530}
531static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_v(u32 r)
532{
533 return (r >> 29U) & 0x1U;
534}
535static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_v(void)
536{
537 return 0x00000001U;
538}
539static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_f(void)
540{
541 return 0x20000000U;
542}
543static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_v(u32 r)
544{
545 return (r >> 30U) & 0x1U;
546}
547static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_v(void)
548{
549 return 0x00000001U;
550}
551static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_f(void)
552{
553 return 0x40000000U;
554}
555static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_r(void)
556{
557 return 0x001402a0U;
558}
559static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_v(u32 r)
560{
561 return (r >> 0U) & 0x1U;
562}
563static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_v(void)
564{
565 return 0x00000001U;
566}
567static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_f(void)
568{
569 return 0x1U;
570}
571static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_r(void)
572{
573 return 0x001402a4U;
574}
575static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_v(u32 r)
576{
577 return (r >> 0U) & 0x1U;
578}
579static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_v(void)
580{
581 return 0x00000001U;
582}
583static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_f(void)
584{
585 return 0x1U;
586}
587static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_r(void)
588{
589 return 0x001422a0U;
590}
591static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_v(u32 r)
592{
593 return (r >> 0U) & 0x1U;
594}
595static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_v(void)
596{
597 return 0x00000001U;
598}
599static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_f(void)
600{
601 return 0x1U;
602}
603static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_r(void)
604{
605 return 0x001422a4U;
606}
607static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_v(u32 r)
608{
609 return (r >> 0U) & 0x1U;
610}
611static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_v(void)
612{
613 return 0x00000001U;
614}
615static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_f(void)
616{
617 return 0x1U;
618}
619static inline u32 ltc_ltc0_lts0_tstg_info_1_r(void)
620{
621 return 0x0014058cU;
622}
623static inline u32 ltc_ltc0_lts0_tstg_info_1_slice_size_in_kb_v(u32 r)
624{
625 return (r >> 0U) & 0xffffU;
626}
627static inline u32 ltc_ltc0_lts0_tstg_info_1_slices_per_l2_v(u32 r)
628{
629 return (r >> 16U) & 0x1fU;
630}
631#endif
diff --git a/include/nvgpu/hw/gv100/hw_mc_gv100.h b/include/nvgpu/hw/gv100/hw_mc_gv100.h
deleted file mode 100644
index cf406c3..0000000
--- a/include/nvgpu/hw/gv100/hw_mc_gv100.h
+++ /dev/null
@@ -1,259 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_mc_gv100_h_
57#define _hw_mc_gv100_h_
58
59static inline u32 mc_boot_0_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 mc_boot_0_architecture_v(u32 r)
64{
65 return (r >> 24U) & 0x1fU;
66}
67static inline u32 mc_boot_0_implementation_v(u32 r)
68{
69 return (r >> 20U) & 0xfU;
70}
71static inline u32 mc_boot_0_major_revision_v(u32 r)
72{
73 return (r >> 4U) & 0xfU;
74}
75static inline u32 mc_boot_0_minor_revision_v(u32 r)
76{
77 return (r >> 0U) & 0xfU;
78}
79static inline u32 mc_intr_r(u32 i)
80{
81 return 0x00000100U + i*4U;
82}
83static inline u32 mc_intr_pfifo_pending_f(void)
84{
85 return 0x100U;
86}
87static inline u32 mc_intr_hub_pending_f(void)
88{
89 return 0x200U;
90}
91static inline u32 mc_intr_pgraph_pending_f(void)
92{
93 return 0x1000U;
94}
95static inline u32 mc_intr_pmu_pending_f(void)
96{
97 return 0x1000000U;
98}
99static inline u32 mc_intr_ltc_pending_f(void)
100{
101 return 0x2000000U;
102}
103static inline u32 mc_intr_priv_ring_pending_f(void)
104{
105 return 0x40000000U;
106}
107static inline u32 mc_intr_pbus_pending_f(void)
108{
109 return 0x10000000U;
110}
111static inline u32 mc_intr_nvlink_pending_f(void)
112{
113 return 0x400000U;
114}
115static inline u32 mc_intr_en_r(u32 i)
116{
117 return 0x00000140U + i*4U;
118}
119static inline u32 mc_intr_en_set_r(u32 i)
120{
121 return 0x00000160U + i*4U;
122}
123static inline u32 mc_intr_en_clear_r(u32 i)
124{
125 return 0x00000180U + i*4U;
126}
127static inline u32 mc_enable_r(void)
128{
129 return 0x00000200U;
130}
131static inline u32 mc_enable_xbar_enabled_f(void)
132{
133 return 0x4U;
134}
135static inline u32 mc_enable_l2_enabled_f(void)
136{
137 return 0x8U;
138}
139static inline u32 mc_enable_pmedia_s(void)
140{
141 return 1U;
142}
143static inline u32 mc_enable_pmedia_f(u32 v)
144{
145 return (v & 0x1U) << 4U;
146}
147static inline u32 mc_enable_pmedia_m(void)
148{
149 return 0x1U << 4U;
150}
151static inline u32 mc_enable_pmedia_v(u32 r)
152{
153 return (r >> 4U) & 0x1U;
154}
155static inline u32 mc_enable_ce0_m(void)
156{
157 return 0x1U << 6U;
158}
159static inline u32 mc_enable_pfifo_enabled_f(void)
160{
161 return 0x100U;
162}
163static inline u32 mc_enable_pgraph_enabled_f(void)
164{
165 return 0x1000U;
166}
167static inline u32 mc_enable_pwr_v(u32 r)
168{
169 return (r >> 13U) & 0x1U;
170}
171static inline u32 mc_enable_pwr_disabled_v(void)
172{
173 return 0x00000000U;
174}
175static inline u32 mc_enable_pwr_enabled_f(void)
176{
177 return 0x2000U;
178}
179static inline u32 mc_enable_pfb_enabled_f(void)
180{
181 return 0x100000U;
182}
183static inline u32 mc_enable_ce2_m(void)
184{
185 return 0x1U << 21U;
186}
187static inline u32 mc_enable_ce2_enabled_f(void)
188{
189 return 0x200000U;
190}
191static inline u32 mc_enable_blg_enabled_f(void)
192{
193 return 0x8000000U;
194}
195static inline u32 mc_enable_perfmon_enabled_f(void)
196{
197 return 0x10000000U;
198}
199static inline u32 mc_enable_hub_enabled_f(void)
200{
201 return 0x20000000U;
202}
203static inline u32 mc_enable_nvdec_disabled_v(void)
204{
205 return 0x00000000U;
206}
207static inline u32 mc_enable_nvdec_enabled_f(void)
208{
209 return 0x8000U;
210}
211static inline u32 mc_enable_nvlink_disabled_v(void)
212{
213 return 0x00000000U;
214}
215static inline u32 mc_enable_nvlink_disabled_f(void)
216{
217 return 0x0U;
218}
219static inline u32 mc_enable_nvlink_enabled_v(void)
220{
221 return 0x00000001U;
222}
223static inline u32 mc_enable_nvlink_enabled_f(void)
224{
225 return 0x2000000U;
226}
227static inline u32 mc_intr_ltc_r(void)
228{
229 return 0x000001c0U;
230}
231static inline u32 mc_enable_pb_r(void)
232{
233 return 0x00000204U;
234}
235static inline u32 mc_enable_pb_0_s(void)
236{
237 return 1U;
238}
239static inline u32 mc_enable_pb_0_f(u32 v)
240{
241 return (v & 0x1U) << 0U;
242}
243static inline u32 mc_enable_pb_0_m(void)
244{
245 return 0x1U << 0U;
246}
247static inline u32 mc_enable_pb_0_v(u32 r)
248{
249 return (r >> 0U) & 0x1U;
250}
251static inline u32 mc_enable_pb_0_enabled_v(void)
252{
253 return 0x00000001U;
254}
255static inline u32 mc_enable_pb_sel_f(u32 v, u32 i)
256{
257 return (v & 0x1U) << (0U + i*1U);
258}
259#endif
diff --git a/include/nvgpu/hw/gv100/hw_minion_gv100.h b/include/nvgpu/hw/gv100/hw_minion_gv100.h
deleted file mode 100644
index e4bbf23..0000000
--- a/include/nvgpu/hw/gv100/hw_minion_gv100.h
+++ /dev/null
@@ -1,943 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_minion_gv100_h_
57#define _hw_minion_gv100_h_
58
59static inline u32 minion_minion_status_r(void)
60{
61 return 0x00000830U;
62}
63static inline u32 minion_minion_status_status_f(u32 v)
64{
65 return (v & 0xffU) << 0U;
66}
67static inline u32 minion_minion_status_status_m(void)
68{
69 return 0xffU << 0U;
70}
71static inline u32 minion_minion_status_status_v(u32 r)
72{
73 return (r >> 0U) & 0xffU;
74}
75static inline u32 minion_minion_status_status_boot_v(void)
76{
77 return 0x00000001U;
78}
79static inline u32 minion_minion_status_status_boot_f(void)
80{
81 return 0x1U;
82}
83static inline u32 minion_minion_status_intr_code_f(u32 v)
84{
85 return (v & 0xffffffU) << 8U;
86}
87static inline u32 minion_minion_status_intr_code_m(void)
88{
89 return 0xffffffU << 8U;
90}
91static inline u32 minion_minion_status_intr_code_v(u32 r)
92{
93 return (r >> 8U) & 0xffffffU;
94}
95static inline u32 minion_falcon_irqstat_r(void)
96{
97 return 0x00000008U;
98}
99static inline u32 minion_falcon_irqstat_halt_f(u32 v)
100{
101 return (v & 0x1U) << 4U;
102}
103static inline u32 minion_falcon_irqstat_halt_v(u32 r)
104{
105 return (r >> 4U) & 0x1U;
106}
107static inline u32 minion_falcon_irqstat_exterr_f(u32 v)
108{
109 return (v & 0x1U) << 5U;
110}
111static inline u32 minion_falcon_irqstat_exterr_v(u32 r)
112{
113 return (r >> 5U) & 0x1U;
114}
115static inline u32 minion_falcon_irqstat_exterr_true_v(void)
116{
117 return 0x00000001U;
118}
119static inline u32 minion_falcon_irqstat_exterr_true_f(void)
120{
121 return 0x20U;
122}
123static inline u32 minion_falcon_irqmask_r(void)
124{
125 return 0x00000018U;
126}
127static inline u32 minion_falcon_irqsclr_r(void)
128{
129 return 0x00000004U;
130}
131static inline u32 minion_falcon_irqsset_r(void)
132{
133 return 0x00000000U;
134}
135static inline u32 minion_falcon_irqmset_r(void)
136{
137 return 0x00000010U;
138}
139static inline u32 minion_falcon_irqmset_wdtmr_f(u32 v)
140{
141 return (v & 0x1U) << 1U;
142}
143static inline u32 minion_falcon_irqmset_wdtmr_m(void)
144{
145 return 0x1U << 1U;
146}
147static inline u32 minion_falcon_irqmset_wdtmr_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 minion_falcon_irqmset_wdtmr_set_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 minion_falcon_irqmset_wdtmr_set_f(void)
156{
157 return 0x2U;
158}
159static inline u32 minion_falcon_irqmset_halt_f(u32 v)
160{
161 return (v & 0x1U) << 4U;
162}
163static inline u32 minion_falcon_irqmset_halt_m(void)
164{
165 return 0x1U << 4U;
166}
167static inline u32 minion_falcon_irqmset_halt_v(u32 r)
168{
169 return (r >> 4U) & 0x1U;
170}
171static inline u32 minion_falcon_irqmset_halt_set_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 minion_falcon_irqmset_halt_set_f(void)
176{
177 return 0x10U;
178}
179static inline u32 minion_falcon_irqmset_exterr_f(u32 v)
180{
181 return (v & 0x1U) << 5U;
182}
183static inline u32 minion_falcon_irqmset_exterr_m(void)
184{
185 return 0x1U << 5U;
186}
187static inline u32 minion_falcon_irqmset_exterr_v(u32 r)
188{
189 return (r >> 5U) & 0x1U;
190}
191static inline u32 minion_falcon_irqmset_exterr_set_v(void)
192{
193 return 0x00000001U;
194}
195static inline u32 minion_falcon_irqmset_exterr_set_f(void)
196{
197 return 0x20U;
198}
199static inline u32 minion_falcon_irqmset_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 minion_falcon_irqmset_swgen0_m(void)
204{
205 return 0x1U << 6U;
206}
207static inline u32 minion_falcon_irqmset_swgen0_v(u32 r)
208{
209 return (r >> 6U) & 0x1U;
210}
211static inline u32 minion_falcon_irqmset_swgen0_set_v(void)
212{
213 return 0x00000001U;
214}
215static inline u32 minion_falcon_irqmset_swgen0_set_f(void)
216{
217 return 0x40U;
218}
219static inline u32 minion_falcon_irqmset_swgen1_f(u32 v)
220{
221 return (v & 0x1U) << 7U;
222}
223static inline u32 minion_falcon_irqmset_swgen1_m(void)
224{
225 return 0x1U << 7U;
226}
227static inline u32 minion_falcon_irqmset_swgen1_v(u32 r)
228{
229 return (r >> 7U) & 0x1U;
230}
231static inline u32 minion_falcon_irqmset_swgen1_set_v(void)
232{
233 return 0x00000001U;
234}
235static inline u32 minion_falcon_irqmset_swgen1_set_f(void)
236{
237 return 0x80U;
238}
239static inline u32 minion_falcon_irqdest_r(void)
240{
241 return 0x0000001cU;
242}
243static inline u32 minion_falcon_irqdest_host_wdtmr_f(u32 v)
244{
245 return (v & 0x1U) << 1U;
246}
247static inline u32 minion_falcon_irqdest_host_wdtmr_m(void)
248{
249 return 0x1U << 1U;
250}
251static inline u32 minion_falcon_irqdest_host_wdtmr_v(u32 r)
252{
253 return (r >> 1U) & 0x1U;
254}
255static inline u32 minion_falcon_irqdest_host_wdtmr_host_v(void)
256{
257 return 0x00000001U;
258}
259static inline u32 minion_falcon_irqdest_host_wdtmr_host_f(void)
260{
261 return 0x2U;
262}
263static inline u32 minion_falcon_irqdest_host_halt_f(u32 v)
264{
265 return (v & 0x1U) << 4U;
266}
267static inline u32 minion_falcon_irqdest_host_halt_m(void)
268{
269 return 0x1U << 4U;
270}
271static inline u32 minion_falcon_irqdest_host_halt_v(u32 r)
272{
273 return (r >> 4U) & 0x1U;
274}
275static inline u32 minion_falcon_irqdest_host_halt_host_v(void)
276{
277 return 0x00000001U;
278}
279static inline u32 minion_falcon_irqdest_host_halt_host_f(void)
280{
281 return 0x10U;
282}
283static inline u32 minion_falcon_irqdest_host_exterr_f(u32 v)
284{
285 return (v & 0x1U) << 5U;
286}
287static inline u32 minion_falcon_irqdest_host_exterr_m(void)
288{
289 return 0x1U << 5U;
290}
291static inline u32 minion_falcon_irqdest_host_exterr_v(u32 r)
292{
293 return (r >> 5U) & 0x1U;
294}
295static inline u32 minion_falcon_irqdest_host_exterr_host_v(void)
296{
297 return 0x00000001U;
298}
299static inline u32 minion_falcon_irqdest_host_exterr_host_f(void)
300{
301 return 0x20U;
302}
303static inline u32 minion_falcon_irqdest_host_swgen0_f(u32 v)
304{
305 return (v & 0x1U) << 6U;
306}
307static inline u32 minion_falcon_irqdest_host_swgen0_m(void)
308{
309 return 0x1U << 6U;
310}
311static inline u32 minion_falcon_irqdest_host_swgen0_v(u32 r)
312{
313 return (r >> 6U) & 0x1U;
314}
315static inline u32 minion_falcon_irqdest_host_swgen0_host_v(void)
316{
317 return 0x00000001U;
318}
319static inline u32 minion_falcon_irqdest_host_swgen0_host_f(void)
320{
321 return 0x40U;
322}
323static inline u32 minion_falcon_irqdest_host_swgen1_f(u32 v)
324{
325 return (v & 0x1U) << 7U;
326}
327static inline u32 minion_falcon_irqdest_host_swgen1_m(void)
328{
329 return 0x1U << 7U;
330}
331static inline u32 minion_falcon_irqdest_host_swgen1_v(u32 r)
332{
333 return (r >> 7U) & 0x1U;
334}
335static inline u32 minion_falcon_irqdest_host_swgen1_host_v(void)
336{
337 return 0x00000001U;
338}
339static inline u32 minion_falcon_irqdest_host_swgen1_host_f(void)
340{
341 return 0x80U;
342}
343static inline u32 minion_falcon_irqdest_target_wdtmr_f(u32 v)
344{
345 return (v & 0x1U) << 17U;
346}
347static inline u32 minion_falcon_irqdest_target_wdtmr_m(void)
348{
349 return 0x1U << 17U;
350}
351static inline u32 minion_falcon_irqdest_target_wdtmr_v(u32 r)
352{
353 return (r >> 17U) & 0x1U;
354}
355static inline u32 minion_falcon_irqdest_target_wdtmr_host_normal_v(void)
356{
357 return 0x00000000U;
358}
359static inline u32 minion_falcon_irqdest_target_wdtmr_host_normal_f(void)
360{
361 return 0x0U;
362}
363static inline u32 minion_falcon_irqdest_target_halt_f(u32 v)
364{
365 return (v & 0x1U) << 20U;
366}
367static inline u32 minion_falcon_irqdest_target_halt_m(void)
368{
369 return 0x1U << 20U;
370}
371static inline u32 minion_falcon_irqdest_target_halt_v(u32 r)
372{
373 return (r >> 20U) & 0x1U;
374}
375static inline u32 minion_falcon_irqdest_target_halt_host_normal_v(void)
376{
377 return 0x00000000U;
378}
379static inline u32 minion_falcon_irqdest_target_halt_host_normal_f(void)
380{
381 return 0x0U;
382}
383static inline u32 minion_falcon_irqdest_target_exterr_f(u32 v)
384{
385 return (v & 0x1U) << 21U;
386}
387static inline u32 minion_falcon_irqdest_target_exterr_m(void)
388{
389 return 0x1U << 21U;
390}
391static inline u32 minion_falcon_irqdest_target_exterr_v(u32 r)
392{
393 return (r >> 21U) & 0x1U;
394}
395static inline u32 minion_falcon_irqdest_target_exterr_host_normal_v(void)
396{
397 return 0x00000000U;
398}
399static inline u32 minion_falcon_irqdest_target_exterr_host_normal_f(void)
400{
401 return 0x0U;
402}
403static inline u32 minion_falcon_irqdest_target_swgen0_f(u32 v)
404{
405 return (v & 0x1U) << 22U;
406}
407static inline u32 minion_falcon_irqdest_target_swgen0_m(void)
408{
409 return 0x1U << 22U;
410}
411static inline u32 minion_falcon_irqdest_target_swgen0_v(u32 r)
412{
413 return (r >> 22U) & 0x1U;
414}
415static inline u32 minion_falcon_irqdest_target_swgen0_host_normal_v(void)
416{
417 return 0x00000000U;
418}
419static inline u32 minion_falcon_irqdest_target_swgen0_host_normal_f(void)
420{
421 return 0x0U;
422}
423static inline u32 minion_falcon_irqdest_target_swgen1_f(u32 v)
424{
425 return (v & 0x1U) << 23U;
426}
427static inline u32 minion_falcon_irqdest_target_swgen1_m(void)
428{
429 return 0x1U << 23U;
430}
431static inline u32 minion_falcon_irqdest_target_swgen1_v(u32 r)
432{
433 return (r >> 23U) & 0x1U;
434}
435static inline u32 minion_falcon_irqdest_target_swgen1_host_normal_v(void)
436{
437 return 0x00000000U;
438}
439static inline u32 minion_falcon_irqdest_target_swgen1_host_normal_f(void)
440{
441 return 0x0U;
442}
443static inline u32 minion_falcon_os_r(void)
444{
445 return 0x00000080U;
446}
447static inline u32 minion_falcon_mailbox1_r(void)
448{
449 return 0x00000044U;
450}
451static inline u32 minion_minion_intr_r(void)
452{
453 return 0x00000810U;
454}
455static inline u32 minion_minion_intr_fatal_f(u32 v)
456{
457 return (v & 0x1U) << 0U;
458}
459static inline u32 minion_minion_intr_fatal_m(void)
460{
461 return 0x1U << 0U;
462}
463static inline u32 minion_minion_intr_fatal_v(u32 r)
464{
465 return (r >> 0U) & 0x1U;
466}
467static inline u32 minion_minion_intr_nonfatal_f(u32 v)
468{
469 return (v & 0x1U) << 1U;
470}
471static inline u32 minion_minion_intr_nonfatal_m(void)
472{
473 return 0x1U << 1U;
474}
475static inline u32 minion_minion_intr_nonfatal_v(u32 r)
476{
477 return (r >> 1U) & 0x1U;
478}
479static inline u32 minion_minion_intr_falcon_stall_f(u32 v)
480{
481 return (v & 0x1U) << 2U;
482}
483static inline u32 minion_minion_intr_falcon_stall_m(void)
484{
485 return 0x1U << 2U;
486}
487static inline u32 minion_minion_intr_falcon_stall_v(u32 r)
488{
489 return (r >> 2U) & 0x1U;
490}
491static inline u32 minion_minion_intr_falcon_nostall_f(u32 v)
492{
493 return (v & 0x1U) << 3U;
494}
495static inline u32 minion_minion_intr_falcon_nostall_m(void)
496{
497 return 0x1U << 3U;
498}
499static inline u32 minion_minion_intr_falcon_nostall_v(u32 r)
500{
501 return (r >> 3U) & 0x1U;
502}
503static inline u32 minion_minion_intr_link_f(u32 v)
504{
505 return (v & 0xffffU) << 16U;
506}
507static inline u32 minion_minion_intr_link_m(void)
508{
509 return 0xffffU << 16U;
510}
511static inline u32 minion_minion_intr_link_v(u32 r)
512{
513 return (r >> 16U) & 0xffffU;
514}
515static inline u32 minion_minion_intr_nonstall_en_r(void)
516{
517 return 0x0000081cU;
518}
519static inline u32 minion_minion_intr_stall_en_r(void)
520{
521 return 0x00000818U;
522}
523static inline u32 minion_minion_intr_stall_en_fatal_f(u32 v)
524{
525 return (v & 0x1U) << 0U;
526}
527static inline u32 minion_minion_intr_stall_en_fatal_m(void)
528{
529 return 0x1U << 0U;
530}
531static inline u32 minion_minion_intr_stall_en_fatal_v(u32 r)
532{
533 return (r >> 0U) & 0x1U;
534}
535static inline u32 minion_minion_intr_stall_en_fatal_enable_v(void)
536{
537 return 0x00000001U;
538}
539static inline u32 minion_minion_intr_stall_en_fatal_enable_f(void)
540{
541 return 0x1U;
542}
543static inline u32 minion_minion_intr_stall_en_fatal_disable_v(void)
544{
545 return 0x00000000U;
546}
547static inline u32 minion_minion_intr_stall_en_fatal_disable_f(void)
548{
549 return 0x0U;
550}
551static inline u32 minion_minion_intr_stall_en_nonfatal_f(u32 v)
552{
553 return (v & 0x1U) << 1U;
554}
555static inline u32 minion_minion_intr_stall_en_nonfatal_m(void)
556{
557 return 0x1U << 1U;
558}
559static inline u32 minion_minion_intr_stall_en_nonfatal_v(u32 r)
560{
561 return (r >> 1U) & 0x1U;
562}
563static inline u32 minion_minion_intr_stall_en_nonfatal_enable_v(void)
564{
565 return 0x00000001U;
566}
567static inline u32 minion_minion_intr_stall_en_nonfatal_enable_f(void)
568{
569 return 0x2U;
570}
571static inline u32 minion_minion_intr_stall_en_nonfatal_disable_v(void)
572{
573 return 0x00000000U;
574}
575static inline u32 minion_minion_intr_stall_en_nonfatal_disable_f(void)
576{
577 return 0x0U;
578}
579static inline u32 minion_minion_intr_stall_en_falcon_stall_f(u32 v)
580{
581 return (v & 0x1U) << 2U;
582}
583static inline u32 minion_minion_intr_stall_en_falcon_stall_m(void)
584{
585 return 0x1U << 2U;
586}
587static inline u32 minion_minion_intr_stall_en_falcon_stall_v(u32 r)
588{
589 return (r >> 2U) & 0x1U;
590}
591static inline u32 minion_minion_intr_stall_en_falcon_stall_enable_v(void)
592{
593 return 0x00000001U;
594}
595static inline u32 minion_minion_intr_stall_en_falcon_stall_enable_f(void)
596{
597 return 0x4U;
598}
599static inline u32 minion_minion_intr_stall_en_falcon_stall_disable_v(void)
600{
601 return 0x00000000U;
602}
603static inline u32 minion_minion_intr_stall_en_falcon_stall_disable_f(void)
604{
605 return 0x0U;
606}
607static inline u32 minion_minion_intr_stall_en_falcon_nostall_f(u32 v)
608{
609 return (v & 0x1U) << 3U;
610}
611static inline u32 minion_minion_intr_stall_en_falcon_nostall_m(void)
612{
613 return 0x1U << 3U;
614}
615static inline u32 minion_minion_intr_stall_en_falcon_nostall_v(u32 r)
616{
617 return (r >> 3U) & 0x1U;
618}
619static inline u32 minion_minion_intr_stall_en_falcon_nostall_enable_v(void)
620{
621 return 0x00000001U;
622}
623static inline u32 minion_minion_intr_stall_en_falcon_nostall_enable_f(void)
624{
625 return 0x8U;
626}
627static inline u32 minion_minion_intr_stall_en_falcon_nostall_disable_v(void)
628{
629 return 0x00000000U;
630}
631static inline u32 minion_minion_intr_stall_en_falcon_nostall_disable_f(void)
632{
633 return 0x0U;
634}
635static inline u32 minion_minion_intr_stall_en_link_f(u32 v)
636{
637 return (v & 0xffffU) << 16U;
638}
639static inline u32 minion_minion_intr_stall_en_link_m(void)
640{
641 return 0xffffU << 16U;
642}
643static inline u32 minion_minion_intr_stall_en_link_v(u32 r)
644{
645 return (r >> 16U) & 0xffffU;
646}
647static inline u32 minion_nvlink_dl_cmd_r(u32 i)
648{
649 return 0x00000900U + i*4U;
650}
651static inline u32 minion_nvlink_dl_cmd___size_1_v(void)
652{
653 return 0x00000006U;
654}
655static inline u32 minion_nvlink_dl_cmd_command_f(u32 v)
656{
657 return (v & 0xffU) << 0U;
658}
659static inline u32 minion_nvlink_dl_cmd_command_v(u32 r)
660{
661 return (r >> 0U) & 0xffU;
662}
663static inline u32 minion_nvlink_dl_cmd_command_configeom_v(void)
664{
665 return 0x00000040U;
666}
667static inline u32 minion_nvlink_dl_cmd_command_configeom_f(void)
668{
669 return 0x40U;
670}
671static inline u32 minion_nvlink_dl_cmd_command_nop_v(void)
672{
673 return 0x00000000U;
674}
675static inline u32 minion_nvlink_dl_cmd_command_nop_f(void)
676{
677 return 0x0U;
678}
679static inline u32 minion_nvlink_dl_cmd_command_initphy_v(void)
680{
681 return 0x00000001U;
682}
683static inline u32 minion_nvlink_dl_cmd_command_initphy_f(void)
684{
685 return 0x1U;
686}
687static inline u32 minion_nvlink_dl_cmd_command_initlaneenable_v(void)
688{
689 return 0x00000003U;
690}
691static inline u32 minion_nvlink_dl_cmd_command_initlaneenable_f(void)
692{
693 return 0x3U;
694}
695static inline u32 minion_nvlink_dl_cmd_command_initdlpl_v(void)
696{
697 return 0x00000004U;
698}
699static inline u32 minion_nvlink_dl_cmd_command_initdlpl_f(void)
700{
701 return 0x4U;
702}
703static inline u32 minion_nvlink_dl_cmd_command_lanedisable_v(void)
704{
705 return 0x00000008U;
706}
707static inline u32 minion_nvlink_dl_cmd_command_lanedisable_f(void)
708{
709 return 0x8U;
710}
711static inline u32 minion_nvlink_dl_cmd_command_fastlanedisable_v(void)
712{
713 return 0x00000009U;
714}
715static inline u32 minion_nvlink_dl_cmd_command_fastlanedisable_f(void)
716{
717 return 0x9U;
718}
719static inline u32 minion_nvlink_dl_cmd_command_laneshutdown_v(void)
720{
721 return 0x0000000cU;
722}
723static inline u32 minion_nvlink_dl_cmd_command_laneshutdown_f(void)
724{
725 return 0xcU;
726}
727static inline u32 minion_nvlink_dl_cmd_command_setacmode_v(void)
728{
729 return 0x0000000aU;
730}
731static inline u32 minion_nvlink_dl_cmd_command_setacmode_f(void)
732{
733 return 0xaU;
734}
735static inline u32 minion_nvlink_dl_cmd_command_clracmode_v(void)
736{
737 return 0x0000000bU;
738}
739static inline u32 minion_nvlink_dl_cmd_command_clracmode_f(void)
740{
741 return 0xbU;
742}
743static inline u32 minion_nvlink_dl_cmd_command_enablepm_v(void)
744{
745 return 0x00000010U;
746}
747static inline u32 minion_nvlink_dl_cmd_command_enablepm_f(void)
748{
749 return 0x10U;
750}
751static inline u32 minion_nvlink_dl_cmd_command_disablepm_v(void)
752{
753 return 0x00000011U;
754}
755static inline u32 minion_nvlink_dl_cmd_command_disablepm_f(void)
756{
757 return 0x11U;
758}
759static inline u32 minion_nvlink_dl_cmd_command_savestate_v(void)
760{
761 return 0x00000018U;
762}
763static inline u32 minion_nvlink_dl_cmd_command_savestate_f(void)
764{
765 return 0x18U;
766}
767static inline u32 minion_nvlink_dl_cmd_command_restorestate_v(void)
768{
769 return 0x00000019U;
770}
771static inline u32 minion_nvlink_dl_cmd_command_restorestate_f(void)
772{
773 return 0x19U;
774}
775static inline u32 minion_nvlink_dl_cmd_command_initpll_0_v(void)
776{
777 return 0x00000020U;
778}
779static inline u32 minion_nvlink_dl_cmd_command_initpll_0_f(void)
780{
781 return 0x20U;
782}
783static inline u32 minion_nvlink_dl_cmd_command_initpll_1_v(void)
784{
785 return 0x00000021U;
786}
787static inline u32 minion_nvlink_dl_cmd_command_initpll_1_f(void)
788{
789 return 0x21U;
790}
791static inline u32 minion_nvlink_dl_cmd_command_initpll_2_v(void)
792{
793 return 0x00000022U;
794}
795static inline u32 minion_nvlink_dl_cmd_command_initpll_2_f(void)
796{
797 return 0x22U;
798}
799static inline u32 minion_nvlink_dl_cmd_command_initpll_3_v(void)
800{
801 return 0x00000023U;
802}
803static inline u32 minion_nvlink_dl_cmd_command_initpll_3_f(void)
804{
805 return 0x23U;
806}
807static inline u32 minion_nvlink_dl_cmd_command_initpll_4_v(void)
808{
809 return 0x00000024U;
810}
811static inline u32 minion_nvlink_dl_cmd_command_initpll_4_f(void)
812{
813 return 0x24U;
814}
815static inline u32 minion_nvlink_dl_cmd_command_initpll_5_v(void)
816{
817 return 0x00000025U;
818}
819static inline u32 minion_nvlink_dl_cmd_command_initpll_5_f(void)
820{
821 return 0x25U;
822}
823static inline u32 minion_nvlink_dl_cmd_command_initpll_6_v(void)
824{
825 return 0x00000026U;
826}
827static inline u32 minion_nvlink_dl_cmd_command_initpll_6_f(void)
828{
829 return 0x26U;
830}
831static inline u32 minion_nvlink_dl_cmd_command_initpll_7_v(void)
832{
833 return 0x00000027U;
834}
835static inline u32 minion_nvlink_dl_cmd_command_initpll_7_f(void)
836{
837 return 0x27U;
838}
839static inline u32 minion_nvlink_dl_cmd_fault_f(u32 v)
840{
841 return (v & 0x1U) << 30U;
842}
843static inline u32 minion_nvlink_dl_cmd_fault_v(u32 r)
844{
845 return (r >> 30U) & 0x1U;
846}
847static inline u32 minion_nvlink_dl_cmd_ready_f(u32 v)
848{
849 return (v & 0x1U) << 31U;
850}
851static inline u32 minion_nvlink_dl_cmd_ready_v(u32 r)
852{
853 return (r >> 31U) & 0x1U;
854}
855static inline u32 minion_misc_0_r(void)
856{
857 return 0x000008b0U;
858}
859static inline u32 minion_misc_0_scratch_swrw_0_f(u32 v)
860{
861 return (v & 0xffffffffU) << 0U;
862}
863static inline u32 minion_misc_0_scratch_swrw_0_v(u32 r)
864{
865 return (r >> 0U) & 0xffffffffU;
866}
867static inline u32 minion_nvlink_link_intr_r(u32 i)
868{
869 return 0x00000a00U + i*4U;
870}
871static inline u32 minion_nvlink_link_intr___size_1_v(void)
872{
873 return 0x00000006U;
874}
875static inline u32 minion_nvlink_link_intr_code_f(u32 v)
876{
877 return (v & 0xffU) << 0U;
878}
879static inline u32 minion_nvlink_link_intr_code_m(void)
880{
881 return 0xffU << 0U;
882}
883static inline u32 minion_nvlink_link_intr_code_v(u32 r)
884{
885 return (r >> 0U) & 0xffU;
886}
887static inline u32 minion_nvlink_link_intr_code_na_v(void)
888{
889 return 0x00000000U;
890}
891static inline u32 minion_nvlink_link_intr_code_na_f(void)
892{
893 return 0x0U;
894}
895static inline u32 minion_nvlink_link_intr_code_swreq_v(void)
896{
897 return 0x00000001U;
898}
899static inline u32 minion_nvlink_link_intr_code_swreq_f(void)
900{
901 return 0x1U;
902}
903static inline u32 minion_nvlink_link_intr_code_dlreq_v(void)
904{
905 return 0x00000002U;
906}
907static inline u32 minion_nvlink_link_intr_code_dlreq_f(void)
908{
909 return 0x2U;
910}
911static inline u32 minion_nvlink_link_intr_code_pmdisabled_v(void)
912{
913 return 0x00000003U;
914}
915static inline u32 minion_nvlink_link_intr_code_pmdisabled_f(void)
916{
917 return 0x3U;
918}
919static inline u32 minion_nvlink_link_intr_subcode_f(u32 v)
920{
921 return (v & 0xffU) << 8U;
922}
923static inline u32 minion_nvlink_link_intr_subcode_m(void)
924{
925 return 0xffU << 8U;
926}
927static inline u32 minion_nvlink_link_intr_subcode_v(u32 r)
928{
929 return (r >> 8U) & 0xffU;
930}
931static inline u32 minion_nvlink_link_intr_state_f(u32 v)
932{
933 return (v & 0x1U) << 31U;
934}
935static inline u32 minion_nvlink_link_intr_state_m(void)
936{
937 return 0x1U << 31U;
938}
939static inline u32 minion_nvlink_link_intr_state_v(u32 r)
940{
941 return (r >> 31U) & 0x1U;
942}
943#endif
diff --git a/include/nvgpu/hw/gv100/hw_nvl_gv100.h b/include/nvgpu/hw/gv100/hw_nvl_gv100.h
deleted file mode 100644
index 2e4ec16..0000000
--- a/include/nvgpu/hw/gv100/hw_nvl_gv100.h
+++ /dev/null
@@ -1,1571 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_nvl_gv100_h_
57#define _hw_nvl_gv100_h_
58
59static inline u32 nvl_link_state_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 nvl_link_state_state_f(u32 v)
64{
65 return (v & 0xffU) << 0U;
66}
67static inline u32 nvl_link_state_state_m(void)
68{
69 return 0xffU << 0U;
70}
71static inline u32 nvl_link_state_state_v(u32 r)
72{
73 return (r >> 0U) & 0xffU;
74}
75static inline u32 nvl_link_state_state_init_v(void)
76{
77 return 0x00000000U;
78}
79static inline u32 nvl_link_state_state_init_f(void)
80{
81 return 0x0U;
82}
83static inline u32 nvl_link_state_state_hwcfg_v(void)
84{
85 return 0x00000001U;
86}
87static inline u32 nvl_link_state_state_hwcfg_f(void)
88{
89 return 0x1U;
90}
91static inline u32 nvl_link_state_state_swcfg_v(void)
92{
93 return 0x00000002U;
94}
95static inline u32 nvl_link_state_state_swcfg_f(void)
96{
97 return 0x2U;
98}
99static inline u32 nvl_link_state_state_active_v(void)
100{
101 return 0x00000003U;
102}
103static inline u32 nvl_link_state_state_active_f(void)
104{
105 return 0x3U;
106}
107static inline u32 nvl_link_state_state_fault_v(void)
108{
109 return 0x00000004U;
110}
111static inline u32 nvl_link_state_state_fault_f(void)
112{
113 return 0x4U;
114}
115static inline u32 nvl_link_state_state_rcvy_ac_v(void)
116{
117 return 0x00000008U;
118}
119static inline u32 nvl_link_state_state_rcvy_ac_f(void)
120{
121 return 0x8U;
122}
123static inline u32 nvl_link_state_state_rcvy_sw_v(void)
124{
125 return 0x00000009U;
126}
127static inline u32 nvl_link_state_state_rcvy_sw_f(void)
128{
129 return 0x9U;
130}
131static inline u32 nvl_link_state_state_rcvy_rx_v(void)
132{
133 return 0x0000000aU;
134}
135static inline u32 nvl_link_state_state_rcvy_rx_f(void)
136{
137 return 0xaU;
138}
139static inline u32 nvl_link_state_an0_busy_f(u32 v)
140{
141 return (v & 0x1U) << 12U;
142}
143static inline u32 nvl_link_state_an0_busy_m(void)
144{
145 return 0x1U << 12U;
146}
147static inline u32 nvl_link_state_an0_busy_v(u32 r)
148{
149 return (r >> 12U) & 0x1U;
150}
151static inline u32 nvl_link_state_tl_busy_f(u32 v)
152{
153 return (v & 0x1U) << 13U;
154}
155static inline u32 nvl_link_state_tl_busy_m(void)
156{
157 return 0x1U << 13U;
158}
159static inline u32 nvl_link_state_tl_busy_v(u32 r)
160{
161 return (r >> 13U) & 0x1U;
162}
163static inline u32 nvl_link_state_dbg_substate_f(u32 v)
164{
165 return (v & 0xffffU) << 16U;
166}
167static inline u32 nvl_link_state_dbg_substate_m(void)
168{
169 return 0xffffU << 16U;
170}
171static inline u32 nvl_link_state_dbg_substate_v(u32 r)
172{
173 return (r >> 16U) & 0xffffU;
174}
175static inline u32 nvl_link_activity_r(void)
176{
177 return 0x0000000cU;
178}
179static inline u32 nvl_link_activity_blkact_f(u32 v)
180{
181 return (v & 0x7U) << 0U;
182}
183static inline u32 nvl_link_activity_blkact_m(void)
184{
185 return 0x7U << 0U;
186}
187static inline u32 nvl_link_activity_blkact_v(u32 r)
188{
189 return (r >> 0U) & 0x7U;
190}
191static inline u32 nvl_sublink_activity_r(u32 i)
192{
193 return 0x00000010U + i*4U;
194}
195static inline u32 nvl_sublink_activity_blkact0_f(u32 v)
196{
197 return (v & 0x7U) << 0U;
198}
199static inline u32 nvl_sublink_activity_blkact0_m(void)
200{
201 return 0x7U << 0U;
202}
203static inline u32 nvl_sublink_activity_blkact0_v(u32 r)
204{
205 return (r >> 0U) & 0x7U;
206}
207static inline u32 nvl_sublink_activity_blkact1_f(u32 v)
208{
209 return (v & 0x7U) << 8U;
210}
211static inline u32 nvl_sublink_activity_blkact1_m(void)
212{
213 return 0x7U << 8U;
214}
215static inline u32 nvl_sublink_activity_blkact1_v(u32 r)
216{
217 return (r >> 8U) & 0x7U;
218}
219static inline u32 nvl_link_config_r(void)
220{
221 return 0x00000018U;
222}
223static inline u32 nvl_link_config_ac_safe_en_f(u32 v)
224{
225 return (v & 0x1U) << 30U;
226}
227static inline u32 nvl_link_config_ac_safe_en_m(void)
228{
229 return 0x1U << 30U;
230}
231static inline u32 nvl_link_config_ac_safe_en_v(u32 r)
232{
233 return (r >> 30U) & 0x1U;
234}
235static inline u32 nvl_link_config_ac_safe_en_on_v(void)
236{
237 return 0x00000001U;
238}
239static inline u32 nvl_link_config_ac_safe_en_on_f(void)
240{
241 return 0x40000000U;
242}
243static inline u32 nvl_link_config_link_en_f(u32 v)
244{
245 return (v & 0x1U) << 31U;
246}
247static inline u32 nvl_link_config_link_en_m(void)
248{
249 return 0x1U << 31U;
250}
251static inline u32 nvl_link_config_link_en_v(u32 r)
252{
253 return (r >> 31U) & 0x1U;
254}
255static inline u32 nvl_link_config_link_en_on_v(void)
256{
257 return 0x00000001U;
258}
259static inline u32 nvl_link_config_link_en_on_f(void)
260{
261 return 0x80000000U;
262}
263static inline u32 nvl_link_change_r(void)
264{
265 return 0x00000040U;
266}
267static inline u32 nvl_link_change_oldstate_mask_f(u32 v)
268{
269 return (v & 0xfU) << 16U;
270}
271static inline u32 nvl_link_change_oldstate_mask_m(void)
272{
273 return 0xfU << 16U;
274}
275static inline u32 nvl_link_change_oldstate_mask_v(u32 r)
276{
277 return (r >> 16U) & 0xfU;
278}
279static inline u32 nvl_link_change_oldstate_mask_dontcare_v(void)
280{
281 return 0x0000000fU;
282}
283static inline u32 nvl_link_change_oldstate_mask_dontcare_f(void)
284{
285 return 0xf0000U;
286}
287static inline u32 nvl_link_change_newstate_f(u32 v)
288{
289 return (v & 0xfU) << 4U;
290}
291static inline u32 nvl_link_change_newstate_m(void)
292{
293 return 0xfU << 4U;
294}
295static inline u32 nvl_link_change_newstate_v(u32 r)
296{
297 return (r >> 4U) & 0xfU;
298}
299static inline u32 nvl_link_change_newstate_hwcfg_v(void)
300{
301 return 0x00000001U;
302}
303static inline u32 nvl_link_change_newstate_hwcfg_f(void)
304{
305 return 0x10U;
306}
307static inline u32 nvl_link_change_newstate_swcfg_v(void)
308{
309 return 0x00000002U;
310}
311static inline u32 nvl_link_change_newstate_swcfg_f(void)
312{
313 return 0x20U;
314}
315static inline u32 nvl_link_change_newstate_active_v(void)
316{
317 return 0x00000003U;
318}
319static inline u32 nvl_link_change_newstate_active_f(void)
320{
321 return 0x30U;
322}
323static inline u32 nvl_link_change_action_f(u32 v)
324{
325 return (v & 0x3U) << 2U;
326}
327static inline u32 nvl_link_change_action_m(void)
328{
329 return 0x3U << 2U;
330}
331static inline u32 nvl_link_change_action_v(u32 r)
332{
333 return (r >> 2U) & 0x3U;
334}
335static inline u32 nvl_link_change_action_ltssm_change_v(void)
336{
337 return 0x00000001U;
338}
339static inline u32 nvl_link_change_action_ltssm_change_f(void)
340{
341 return 0x4U;
342}
343static inline u32 nvl_link_change_status_f(u32 v)
344{
345 return (v & 0x3U) << 0U;
346}
347static inline u32 nvl_link_change_status_m(void)
348{
349 return 0x3U << 0U;
350}
351static inline u32 nvl_link_change_status_v(u32 r)
352{
353 return (r >> 0U) & 0x3U;
354}
355static inline u32 nvl_link_change_status_done_v(void)
356{
357 return 0x00000000U;
358}
359static inline u32 nvl_link_change_status_done_f(void)
360{
361 return 0x0U;
362}
363static inline u32 nvl_link_change_status_busy_v(void)
364{
365 return 0x00000001U;
366}
367static inline u32 nvl_link_change_status_busy_f(void)
368{
369 return 0x1U;
370}
371static inline u32 nvl_link_change_status_fault_v(void)
372{
373 return 0x00000002U;
374}
375static inline u32 nvl_link_change_status_fault_f(void)
376{
377 return 0x2U;
378}
379static inline u32 nvl_sublink_change_r(void)
380{
381 return 0x00000044U;
382}
383static inline u32 nvl_sublink_change_countdown_f(u32 v)
384{
385 return (v & 0xfffU) << 20U;
386}
387static inline u32 nvl_sublink_change_countdown_m(void)
388{
389 return 0xfffU << 20U;
390}
391static inline u32 nvl_sublink_change_countdown_v(u32 r)
392{
393 return (r >> 20U) & 0xfffU;
394}
395static inline u32 nvl_sublink_change_oldstate_mask_f(u32 v)
396{
397 return (v & 0xfU) << 16U;
398}
399static inline u32 nvl_sublink_change_oldstate_mask_m(void)
400{
401 return 0xfU << 16U;
402}
403static inline u32 nvl_sublink_change_oldstate_mask_v(u32 r)
404{
405 return (r >> 16U) & 0xfU;
406}
407static inline u32 nvl_sublink_change_oldstate_mask_dontcare_v(void)
408{
409 return 0x0000000fU;
410}
411static inline u32 nvl_sublink_change_oldstate_mask_dontcare_f(void)
412{
413 return 0xf0000U;
414}
415static inline u32 nvl_sublink_change_sublink_f(u32 v)
416{
417 return (v & 0xfU) << 12U;
418}
419static inline u32 nvl_sublink_change_sublink_m(void)
420{
421 return 0xfU << 12U;
422}
423static inline u32 nvl_sublink_change_sublink_v(u32 r)
424{
425 return (r >> 12U) & 0xfU;
426}
427static inline u32 nvl_sublink_change_sublink_tx_v(void)
428{
429 return 0x00000000U;
430}
431static inline u32 nvl_sublink_change_sublink_tx_f(void)
432{
433 return 0x0U;
434}
435static inline u32 nvl_sublink_change_sublink_rx_v(void)
436{
437 return 0x00000001U;
438}
439static inline u32 nvl_sublink_change_sublink_rx_f(void)
440{
441 return 0x1000U;
442}
443static inline u32 nvl_sublink_change_newstate_f(u32 v)
444{
445 return (v & 0xfU) << 4U;
446}
447static inline u32 nvl_sublink_change_newstate_m(void)
448{
449 return 0xfU << 4U;
450}
451static inline u32 nvl_sublink_change_newstate_v(u32 r)
452{
453 return (r >> 4U) & 0xfU;
454}
455static inline u32 nvl_sublink_change_newstate_hs_v(void)
456{
457 return 0x00000000U;
458}
459static inline u32 nvl_sublink_change_newstate_hs_f(void)
460{
461 return 0x0U;
462}
463static inline u32 nvl_sublink_change_newstate_eighth_v(void)
464{
465 return 0x00000004U;
466}
467static inline u32 nvl_sublink_change_newstate_eighth_f(void)
468{
469 return 0x40U;
470}
471static inline u32 nvl_sublink_change_newstate_train_v(void)
472{
473 return 0x00000005U;
474}
475static inline u32 nvl_sublink_change_newstate_train_f(void)
476{
477 return 0x50U;
478}
479static inline u32 nvl_sublink_change_newstate_safe_v(void)
480{
481 return 0x00000006U;
482}
483static inline u32 nvl_sublink_change_newstate_safe_f(void)
484{
485 return 0x60U;
486}
487static inline u32 nvl_sublink_change_newstate_off_v(void)
488{
489 return 0x00000007U;
490}
491static inline u32 nvl_sublink_change_newstate_off_f(void)
492{
493 return 0x70U;
494}
495static inline u32 nvl_sublink_change_action_f(u32 v)
496{
497 return (v & 0x3U) << 2U;
498}
499static inline u32 nvl_sublink_change_action_m(void)
500{
501 return 0x3U << 2U;
502}
503static inline u32 nvl_sublink_change_action_v(u32 r)
504{
505 return (r >> 2U) & 0x3U;
506}
507static inline u32 nvl_sublink_change_action_slsm_change_v(void)
508{
509 return 0x00000001U;
510}
511static inline u32 nvl_sublink_change_action_slsm_change_f(void)
512{
513 return 0x4U;
514}
515static inline u32 nvl_sublink_change_status_f(u32 v)
516{
517 return (v & 0x3U) << 0U;
518}
519static inline u32 nvl_sublink_change_status_m(void)
520{
521 return 0x3U << 0U;
522}
523static inline u32 nvl_sublink_change_status_v(u32 r)
524{
525 return (r >> 0U) & 0x3U;
526}
527static inline u32 nvl_sublink_change_status_done_v(void)
528{
529 return 0x00000000U;
530}
531static inline u32 nvl_sublink_change_status_done_f(void)
532{
533 return 0x0U;
534}
535static inline u32 nvl_sublink_change_status_busy_v(void)
536{
537 return 0x00000001U;
538}
539static inline u32 nvl_sublink_change_status_busy_f(void)
540{
541 return 0x1U;
542}
543static inline u32 nvl_sublink_change_status_fault_v(void)
544{
545 return 0x00000002U;
546}
547static inline u32 nvl_sublink_change_status_fault_f(void)
548{
549 return 0x2U;
550}
551static inline u32 nvl_link_test_r(void)
552{
553 return 0x00000048U;
554}
555static inline u32 nvl_link_test_mode_f(u32 v)
556{
557 return (v & 0x1U) << 0U;
558}
559static inline u32 nvl_link_test_mode_m(void)
560{
561 return 0x1U << 0U;
562}
563static inline u32 nvl_link_test_mode_v(u32 r)
564{
565 return (r >> 0U) & 0x1U;
566}
567static inline u32 nvl_link_test_mode_enable_v(void)
568{
569 return 0x00000001U;
570}
571static inline u32 nvl_link_test_mode_enable_f(void)
572{
573 return 0x1U;
574}
575static inline u32 nvl_link_test_auto_hwcfg_f(u32 v)
576{
577 return (v & 0x1U) << 30U;
578}
579static inline u32 nvl_link_test_auto_hwcfg_m(void)
580{
581 return 0x1U << 30U;
582}
583static inline u32 nvl_link_test_auto_hwcfg_v(u32 r)
584{
585 return (r >> 30U) & 0x1U;
586}
587static inline u32 nvl_link_test_auto_hwcfg_enable_v(void)
588{
589 return 0x00000001U;
590}
591static inline u32 nvl_link_test_auto_hwcfg_enable_f(void)
592{
593 return 0x40000000U;
594}
595static inline u32 nvl_link_test_auto_nvhs_f(u32 v)
596{
597 return (v & 0x1U) << 31U;
598}
599static inline u32 nvl_link_test_auto_nvhs_m(void)
600{
601 return 0x1U << 31U;
602}
603static inline u32 nvl_link_test_auto_nvhs_v(u32 r)
604{
605 return (r >> 31U) & 0x1U;
606}
607static inline u32 nvl_link_test_auto_nvhs_enable_v(void)
608{
609 return 0x00000001U;
610}
611static inline u32 nvl_link_test_auto_nvhs_enable_f(void)
612{
613 return 0x80000000U;
614}
615static inline u32 nvl_sl0_slsm_status_tx_r(void)
616{
617 return 0x00002024U;
618}
619static inline u32 nvl_sl0_slsm_status_tx_substate_f(u32 v)
620{
621 return (v & 0xfU) << 0U;
622}
623static inline u32 nvl_sl0_slsm_status_tx_substate_m(void)
624{
625 return 0xfU << 0U;
626}
627static inline u32 nvl_sl0_slsm_status_tx_substate_v(u32 r)
628{
629 return (r >> 0U) & 0xfU;
630}
631static inline u32 nvl_sl0_slsm_status_tx_primary_state_f(u32 v)
632{
633 return (v & 0xfU) << 4U;
634}
635static inline u32 nvl_sl0_slsm_status_tx_primary_state_m(void)
636{
637 return 0xfU << 4U;
638}
639static inline u32 nvl_sl0_slsm_status_tx_primary_state_v(u32 r)
640{
641 return (r >> 4U) & 0xfU;
642}
643static inline u32 nvl_sl0_slsm_status_tx_primary_state_hs_v(void)
644{
645 return 0x00000000U;
646}
647static inline u32 nvl_sl0_slsm_status_tx_primary_state_hs_f(void)
648{
649 return 0x0U;
650}
651static inline u32 nvl_sl0_slsm_status_tx_primary_state_eighth_v(void)
652{
653 return 0x00000004U;
654}
655static inline u32 nvl_sl0_slsm_status_tx_primary_state_eighth_f(void)
656{
657 return 0x40U;
658}
659static inline u32 nvl_sl0_slsm_status_tx_primary_state_train_v(void)
660{
661 return 0x00000005U;
662}
663static inline u32 nvl_sl0_slsm_status_tx_primary_state_train_f(void)
664{
665 return 0x50U;
666}
667static inline u32 nvl_sl0_slsm_status_tx_primary_state_off_v(void)
668{
669 return 0x00000007U;
670}
671static inline u32 nvl_sl0_slsm_status_tx_primary_state_off_f(void)
672{
673 return 0x70U;
674}
675static inline u32 nvl_sl0_slsm_status_tx_primary_state_safe_v(void)
676{
677 return 0x00000006U;
678}
679static inline u32 nvl_sl0_slsm_status_tx_primary_state_safe_f(void)
680{
681 return 0x60U;
682}
683static inline u32 nvl_sl1_slsm_status_rx_r(void)
684{
685 return 0x00003014U;
686}
687static inline u32 nvl_sl1_slsm_status_rx_substate_f(u32 v)
688{
689 return (v & 0xfU) << 0U;
690}
691static inline u32 nvl_sl1_slsm_status_rx_substate_m(void)
692{
693 return 0xfU << 0U;
694}
695static inline u32 nvl_sl1_slsm_status_rx_substate_v(u32 r)
696{
697 return (r >> 0U) & 0xfU;
698}
699static inline u32 nvl_sl1_slsm_status_rx_primary_state_f(u32 v)
700{
701 return (v & 0xfU) << 4U;
702}
703static inline u32 nvl_sl1_slsm_status_rx_primary_state_m(void)
704{
705 return 0xfU << 4U;
706}
707static inline u32 nvl_sl1_slsm_status_rx_primary_state_v(u32 r)
708{
709 return (r >> 4U) & 0xfU;
710}
711static inline u32 nvl_sl1_slsm_status_rx_primary_state_hs_v(void)
712{
713 return 0x00000000U;
714}
715static inline u32 nvl_sl1_slsm_status_rx_primary_state_hs_f(void)
716{
717 return 0x0U;
718}
719static inline u32 nvl_sl1_slsm_status_rx_primary_state_eighth_v(void)
720{
721 return 0x00000004U;
722}
723static inline u32 nvl_sl1_slsm_status_rx_primary_state_eighth_f(void)
724{
725 return 0x40U;
726}
727static inline u32 nvl_sl1_slsm_status_rx_primary_state_train_v(void)
728{
729 return 0x00000005U;
730}
731static inline u32 nvl_sl1_slsm_status_rx_primary_state_train_f(void)
732{
733 return 0x50U;
734}
735static inline u32 nvl_sl1_slsm_status_rx_primary_state_off_v(void)
736{
737 return 0x00000007U;
738}
739static inline u32 nvl_sl1_slsm_status_rx_primary_state_off_f(void)
740{
741 return 0x70U;
742}
743static inline u32 nvl_sl1_slsm_status_rx_primary_state_safe_v(void)
744{
745 return 0x00000006U;
746}
747static inline u32 nvl_sl1_slsm_status_rx_primary_state_safe_f(void)
748{
749 return 0x60U;
750}
751static inline u32 nvl_sl0_safe_ctrl2_tx_r(void)
752{
753 return 0x00002008U;
754}
755static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_init_f(u32 v)
756{
757 return (v & 0x7ffU) << 0U;
758}
759static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_init_m(void)
760{
761 return 0x7ffU << 0U;
762}
763static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_init_v(u32 r)
764{
765 return (r >> 0U) & 0x7ffU;
766}
767static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_init_init_v(void)
768{
769 return 0x00000728U;
770}
771static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_init_init_f(void)
772{
773 return 0x728U;
774}
775static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_initscl_f(u32 v)
776{
777 return (v & 0x1fU) << 11U;
778}
779static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_initscl_m(void)
780{
781 return 0x1fU << 11U;
782}
783static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_initscl_v(u32 r)
784{
785 return (r >> 11U) & 0x1fU;
786}
787static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_initscl_init_v(void)
788{
789 return 0x0000000fU;
790}
791static inline u32 nvl_sl0_safe_ctrl2_tx_ctr_initscl_init_f(void)
792{
793 return 0x7800U;
794}
795static inline u32 nvl_sl1_error_rate_ctrl_r(void)
796{
797 return 0x00003284U;
798}
799static inline u32 nvl_sl1_error_rate_ctrl_short_threshold_man_f(u32 v)
800{
801 return (v & 0x7U) << 0U;
802}
803static inline u32 nvl_sl1_error_rate_ctrl_short_threshold_man_m(void)
804{
805 return 0x7U << 0U;
806}
807static inline u32 nvl_sl1_error_rate_ctrl_short_threshold_man_v(u32 r)
808{
809 return (r >> 0U) & 0x7U;
810}
811static inline u32 nvl_sl1_error_rate_ctrl_long_threshold_man_f(u32 v)
812{
813 return (v & 0x7U) << 16U;
814}
815static inline u32 nvl_sl1_error_rate_ctrl_long_threshold_man_m(void)
816{
817 return 0x7U << 16U;
818}
819static inline u32 nvl_sl1_error_rate_ctrl_long_threshold_man_v(u32 r)
820{
821 return (r >> 16U) & 0x7U;
822}
823static inline u32 nvl_sl1_rxslsm_timeout_2_r(void)
824{
825 return 0x00003034U;
826}
827static inline u32 nvl_txiobist_configreg_r(void)
828{
829 return 0x00002e14U;
830}
831static inline u32 nvl_txiobist_configreg_io_bist_mode_in_f(u32 v)
832{
833 return (v & 0x1U) << 17U;
834}
835static inline u32 nvl_txiobist_configreg_io_bist_mode_in_m(void)
836{
837 return 0x1U << 17U;
838}
839static inline u32 nvl_txiobist_configreg_io_bist_mode_in_v(u32 r)
840{
841 return (r >> 17U) & 0x1U;
842}
843static inline u32 nvl_txiobist_config_r(void)
844{
845 return 0x00002e10U;
846}
847static inline u32 nvl_txiobist_config_dpg_prbsseedld_f(u32 v)
848{
849 return (v & 0x1U) << 2U;
850}
851static inline u32 nvl_txiobist_config_dpg_prbsseedld_m(void)
852{
853 return 0x1U << 2U;
854}
855static inline u32 nvl_txiobist_config_dpg_prbsseedld_v(u32 r)
856{
857 return (r >> 2U) & 0x1U;
858}
859static inline u32 nvl_intr_r(void)
860{
861 return 0x00000050U;
862}
863static inline u32 nvl_intr_tx_replay_f(u32 v)
864{
865 return (v & 0x1U) << 0U;
866}
867static inline u32 nvl_intr_tx_replay_m(void)
868{
869 return 0x1U << 0U;
870}
871static inline u32 nvl_intr_tx_replay_v(u32 r)
872{
873 return (r >> 0U) & 0x1U;
874}
875static inline u32 nvl_intr_tx_recovery_short_f(u32 v)
876{
877 return (v & 0x1U) << 1U;
878}
879static inline u32 nvl_intr_tx_recovery_short_m(void)
880{
881 return 0x1U << 1U;
882}
883static inline u32 nvl_intr_tx_recovery_short_v(u32 r)
884{
885 return (r >> 1U) & 0x1U;
886}
887static inline u32 nvl_intr_tx_recovery_long_f(u32 v)
888{
889 return (v & 0x1U) << 2U;
890}
891static inline u32 nvl_intr_tx_recovery_long_m(void)
892{
893 return 0x1U << 2U;
894}
895static inline u32 nvl_intr_tx_recovery_long_v(u32 r)
896{
897 return (r >> 2U) & 0x1U;
898}
899static inline u32 nvl_intr_tx_fault_ram_f(u32 v)
900{
901 return (v & 0x1U) << 4U;
902}
903static inline u32 nvl_intr_tx_fault_ram_m(void)
904{
905 return 0x1U << 4U;
906}
907static inline u32 nvl_intr_tx_fault_ram_v(u32 r)
908{
909 return (r >> 4U) & 0x1U;
910}
911static inline u32 nvl_intr_tx_fault_interface_f(u32 v)
912{
913 return (v & 0x1U) << 5U;
914}
915static inline u32 nvl_intr_tx_fault_interface_m(void)
916{
917 return 0x1U << 5U;
918}
919static inline u32 nvl_intr_tx_fault_interface_v(u32 r)
920{
921 return (r >> 5U) & 0x1U;
922}
923static inline u32 nvl_intr_tx_fault_sublink_change_f(u32 v)
924{
925 return (v & 0x1U) << 8U;
926}
927static inline u32 nvl_intr_tx_fault_sublink_change_m(void)
928{
929 return 0x1U << 8U;
930}
931static inline u32 nvl_intr_tx_fault_sublink_change_v(u32 r)
932{
933 return (r >> 8U) & 0x1U;
934}
935static inline u32 nvl_intr_rx_fault_sublink_change_f(u32 v)
936{
937 return (v & 0x1U) << 16U;
938}
939static inline u32 nvl_intr_rx_fault_sublink_change_m(void)
940{
941 return 0x1U << 16U;
942}
943static inline u32 nvl_intr_rx_fault_sublink_change_v(u32 r)
944{
945 return (r >> 16U) & 0x1U;
946}
947static inline u32 nvl_intr_rx_fault_dl_protocol_f(u32 v)
948{
949 return (v & 0x1U) << 20U;
950}
951static inline u32 nvl_intr_rx_fault_dl_protocol_m(void)
952{
953 return 0x1U << 20U;
954}
955static inline u32 nvl_intr_rx_fault_dl_protocol_v(u32 r)
956{
957 return (r >> 20U) & 0x1U;
958}
959static inline u32 nvl_intr_rx_short_error_rate_f(u32 v)
960{
961 return (v & 0x1U) << 21U;
962}
963static inline u32 nvl_intr_rx_short_error_rate_m(void)
964{
965 return 0x1U << 21U;
966}
967static inline u32 nvl_intr_rx_short_error_rate_v(u32 r)
968{
969 return (r >> 21U) & 0x1U;
970}
971static inline u32 nvl_intr_rx_long_error_rate_f(u32 v)
972{
973 return (v & 0x1U) << 22U;
974}
975static inline u32 nvl_intr_rx_long_error_rate_m(void)
976{
977 return 0x1U << 22U;
978}
979static inline u32 nvl_intr_rx_long_error_rate_v(u32 r)
980{
981 return (r >> 22U) & 0x1U;
982}
983static inline u32 nvl_intr_rx_ila_trigger_f(u32 v)
984{
985 return (v & 0x1U) << 23U;
986}
987static inline u32 nvl_intr_rx_ila_trigger_m(void)
988{
989 return 0x1U << 23U;
990}
991static inline u32 nvl_intr_rx_ila_trigger_v(u32 r)
992{
993 return (r >> 23U) & 0x1U;
994}
995static inline u32 nvl_intr_rx_crc_counter_f(u32 v)
996{
997 return (v & 0x1U) << 24U;
998}
999static inline u32 nvl_intr_rx_crc_counter_m(void)
1000{
1001 return 0x1U << 24U;
1002}
1003static inline u32 nvl_intr_rx_crc_counter_v(u32 r)
1004{
1005 return (r >> 24U) & 0x1U;
1006}
1007static inline u32 nvl_intr_ltssm_fault_f(u32 v)
1008{
1009 return (v & 0x1U) << 28U;
1010}
1011static inline u32 nvl_intr_ltssm_fault_m(void)
1012{
1013 return 0x1U << 28U;
1014}
1015static inline u32 nvl_intr_ltssm_fault_v(u32 r)
1016{
1017 return (r >> 28U) & 0x1U;
1018}
1019static inline u32 nvl_intr_ltssm_protocol_f(u32 v)
1020{
1021 return (v & 0x1U) << 29U;
1022}
1023static inline u32 nvl_intr_ltssm_protocol_m(void)
1024{
1025 return 0x1U << 29U;
1026}
1027static inline u32 nvl_intr_ltssm_protocol_v(u32 r)
1028{
1029 return (r >> 29U) & 0x1U;
1030}
1031static inline u32 nvl_intr_minion_request_f(u32 v)
1032{
1033 return (v & 0x1U) << 30U;
1034}
1035static inline u32 nvl_intr_minion_request_m(void)
1036{
1037 return 0x1U << 30U;
1038}
1039static inline u32 nvl_intr_minion_request_v(u32 r)
1040{
1041 return (r >> 30U) & 0x1U;
1042}
1043static inline u32 nvl_intr_sw2_r(void)
1044{
1045 return 0x00000054U;
1046}
1047static inline u32 nvl_intr_minion_r(void)
1048{
1049 return 0x00000060U;
1050}
1051static inline u32 nvl_intr_minion_tx_replay_f(u32 v)
1052{
1053 return (v & 0x1U) << 0U;
1054}
1055static inline u32 nvl_intr_minion_tx_replay_m(void)
1056{
1057 return 0x1U << 0U;
1058}
1059static inline u32 nvl_intr_minion_tx_replay_v(u32 r)
1060{
1061 return (r >> 0U) & 0x1U;
1062}
1063static inline u32 nvl_intr_minion_tx_recovery_short_f(u32 v)
1064{
1065 return (v & 0x1U) << 1U;
1066}
1067static inline u32 nvl_intr_minion_tx_recovery_short_m(void)
1068{
1069 return 0x1U << 1U;
1070}
1071static inline u32 nvl_intr_minion_tx_recovery_short_v(u32 r)
1072{
1073 return (r >> 1U) & 0x1U;
1074}
1075static inline u32 nvl_intr_minion_tx_recovery_long_f(u32 v)
1076{
1077 return (v & 0x1U) << 2U;
1078}
1079static inline u32 nvl_intr_minion_tx_recovery_long_m(void)
1080{
1081 return 0x1U << 2U;
1082}
1083static inline u32 nvl_intr_minion_tx_recovery_long_v(u32 r)
1084{
1085 return (r >> 2U) & 0x1U;
1086}
1087static inline u32 nvl_intr_minion_tx_fault_ram_f(u32 v)
1088{
1089 return (v & 0x1U) << 4U;
1090}
1091static inline u32 nvl_intr_minion_tx_fault_ram_m(void)
1092{
1093 return 0x1U << 4U;
1094}
1095static inline u32 nvl_intr_minion_tx_fault_ram_v(u32 r)
1096{
1097 return (r >> 4U) & 0x1U;
1098}
1099static inline u32 nvl_intr_minion_tx_fault_interface_f(u32 v)
1100{
1101 return (v & 0x1U) << 5U;
1102}
1103static inline u32 nvl_intr_minion_tx_fault_interface_m(void)
1104{
1105 return 0x1U << 5U;
1106}
1107static inline u32 nvl_intr_minion_tx_fault_interface_v(u32 r)
1108{
1109 return (r >> 5U) & 0x1U;
1110}
1111static inline u32 nvl_intr_minion_tx_fault_sublink_change_f(u32 v)
1112{
1113 return (v & 0x1U) << 8U;
1114}
1115static inline u32 nvl_intr_minion_tx_fault_sublink_change_m(void)
1116{
1117 return 0x1U << 8U;
1118}
1119static inline u32 nvl_intr_minion_tx_fault_sublink_change_v(u32 r)
1120{
1121 return (r >> 8U) & 0x1U;
1122}
1123static inline u32 nvl_intr_minion_rx_fault_sublink_change_f(u32 v)
1124{
1125 return (v & 0x1U) << 16U;
1126}
1127static inline u32 nvl_intr_minion_rx_fault_sublink_change_m(void)
1128{
1129 return 0x1U << 16U;
1130}
1131static inline u32 nvl_intr_minion_rx_fault_sublink_change_v(u32 r)
1132{
1133 return (r >> 16U) & 0x1U;
1134}
1135static inline u32 nvl_intr_minion_rx_fault_dl_protocol_f(u32 v)
1136{
1137 return (v & 0x1U) << 20U;
1138}
1139static inline u32 nvl_intr_minion_rx_fault_dl_protocol_m(void)
1140{
1141 return 0x1U << 20U;
1142}
1143static inline u32 nvl_intr_minion_rx_fault_dl_protocol_v(u32 r)
1144{
1145 return (r >> 20U) & 0x1U;
1146}
1147static inline u32 nvl_intr_minion_rx_short_error_rate_f(u32 v)
1148{
1149 return (v & 0x1U) << 21U;
1150}
1151static inline u32 nvl_intr_minion_rx_short_error_rate_m(void)
1152{
1153 return 0x1U << 21U;
1154}
1155static inline u32 nvl_intr_minion_rx_short_error_rate_v(u32 r)
1156{
1157 return (r >> 21U) & 0x1U;
1158}
1159static inline u32 nvl_intr_minion_rx_long_error_rate_f(u32 v)
1160{
1161 return (v & 0x1U) << 22U;
1162}
1163static inline u32 nvl_intr_minion_rx_long_error_rate_m(void)
1164{
1165 return 0x1U << 22U;
1166}
1167static inline u32 nvl_intr_minion_rx_long_error_rate_v(u32 r)
1168{
1169 return (r >> 22U) & 0x1U;
1170}
1171static inline u32 nvl_intr_minion_rx_ila_trigger_f(u32 v)
1172{
1173 return (v & 0x1U) << 23U;
1174}
1175static inline u32 nvl_intr_minion_rx_ila_trigger_m(void)
1176{
1177 return 0x1U << 23U;
1178}
1179static inline u32 nvl_intr_minion_rx_ila_trigger_v(u32 r)
1180{
1181 return (r >> 23U) & 0x1U;
1182}
1183static inline u32 nvl_intr_minion_rx_crc_counter_f(u32 v)
1184{
1185 return (v & 0x1U) << 24U;
1186}
1187static inline u32 nvl_intr_minion_rx_crc_counter_m(void)
1188{
1189 return 0x1U << 24U;
1190}
1191static inline u32 nvl_intr_minion_rx_crc_counter_v(u32 r)
1192{
1193 return (r >> 24U) & 0x1U;
1194}
1195static inline u32 nvl_intr_minion_ltssm_fault_f(u32 v)
1196{
1197 return (v & 0x1U) << 28U;
1198}
1199static inline u32 nvl_intr_minion_ltssm_fault_m(void)
1200{
1201 return 0x1U << 28U;
1202}
1203static inline u32 nvl_intr_minion_ltssm_fault_v(u32 r)
1204{
1205 return (r >> 28U) & 0x1U;
1206}
1207static inline u32 nvl_intr_minion_ltssm_protocol_f(u32 v)
1208{
1209 return (v & 0x1U) << 29U;
1210}
1211static inline u32 nvl_intr_minion_ltssm_protocol_m(void)
1212{
1213 return 0x1U << 29U;
1214}
1215static inline u32 nvl_intr_minion_ltssm_protocol_v(u32 r)
1216{
1217 return (r >> 29U) & 0x1U;
1218}
1219static inline u32 nvl_intr_minion_minion_request_f(u32 v)
1220{
1221 return (v & 0x1U) << 30U;
1222}
1223static inline u32 nvl_intr_minion_minion_request_m(void)
1224{
1225 return 0x1U << 30U;
1226}
1227static inline u32 nvl_intr_minion_minion_request_v(u32 r)
1228{
1229 return (r >> 30U) & 0x1U;
1230}
1231static inline u32 nvl_intr_nonstall_en_r(void)
1232{
1233 return 0x0000005cU;
1234}
1235static inline u32 nvl_intr_stall_en_r(void)
1236{
1237 return 0x00000058U;
1238}
1239static inline u32 nvl_intr_stall_en_tx_replay_f(u32 v)
1240{
1241 return (v & 0x1U) << 0U;
1242}
1243static inline u32 nvl_intr_stall_en_tx_replay_m(void)
1244{
1245 return 0x1U << 0U;
1246}
1247static inline u32 nvl_intr_stall_en_tx_replay_v(u32 r)
1248{
1249 return (r >> 0U) & 0x1U;
1250}
1251static inline u32 nvl_intr_stall_en_tx_recovery_short_f(u32 v)
1252{
1253 return (v & 0x1U) << 1U;
1254}
1255static inline u32 nvl_intr_stall_en_tx_recovery_short_m(void)
1256{
1257 return 0x1U << 1U;
1258}
1259static inline u32 nvl_intr_stall_en_tx_recovery_short_v(u32 r)
1260{
1261 return (r >> 1U) & 0x1U;
1262}
1263static inline u32 nvl_intr_stall_en_tx_recovery_short_enable_v(void)
1264{
1265 return 0x00000001U;
1266}
1267static inline u32 nvl_intr_stall_en_tx_recovery_short_enable_f(void)
1268{
1269 return 0x2U;
1270}
1271static inline u32 nvl_intr_stall_en_tx_recovery_long_f(u32 v)
1272{
1273 return (v & 0x1U) << 2U;
1274}
1275static inline u32 nvl_intr_stall_en_tx_recovery_long_m(void)
1276{
1277 return 0x1U << 2U;
1278}
1279static inline u32 nvl_intr_stall_en_tx_recovery_long_v(u32 r)
1280{
1281 return (r >> 2U) & 0x1U;
1282}
1283static inline u32 nvl_intr_stall_en_tx_recovery_long_enable_v(void)
1284{
1285 return 0x00000001U;
1286}
1287static inline u32 nvl_intr_stall_en_tx_recovery_long_enable_f(void)
1288{
1289 return 0x4U;
1290}
1291static inline u32 nvl_intr_stall_en_tx_fault_ram_f(u32 v)
1292{
1293 return (v & 0x1U) << 4U;
1294}
1295static inline u32 nvl_intr_stall_en_tx_fault_ram_m(void)
1296{
1297 return 0x1U << 4U;
1298}
1299static inline u32 nvl_intr_stall_en_tx_fault_ram_v(u32 r)
1300{
1301 return (r >> 4U) & 0x1U;
1302}
1303static inline u32 nvl_intr_stall_en_tx_fault_ram_enable_v(void)
1304{
1305 return 0x00000001U;
1306}
1307static inline u32 nvl_intr_stall_en_tx_fault_ram_enable_f(void)
1308{
1309 return 0x10U;
1310}
1311static inline u32 nvl_intr_stall_en_tx_fault_interface_f(u32 v)
1312{
1313 return (v & 0x1U) << 5U;
1314}
1315static inline u32 nvl_intr_stall_en_tx_fault_interface_m(void)
1316{
1317 return 0x1U << 5U;
1318}
1319static inline u32 nvl_intr_stall_en_tx_fault_interface_v(u32 r)
1320{
1321 return (r >> 5U) & 0x1U;
1322}
1323static inline u32 nvl_intr_stall_en_tx_fault_interface_enable_v(void)
1324{
1325 return 0x00000001U;
1326}
1327static inline u32 nvl_intr_stall_en_tx_fault_interface_enable_f(void)
1328{
1329 return 0x20U;
1330}
1331static inline u32 nvl_intr_stall_en_tx_fault_sublink_change_f(u32 v)
1332{
1333 return (v & 0x1U) << 8U;
1334}
1335static inline u32 nvl_intr_stall_en_tx_fault_sublink_change_m(void)
1336{
1337 return 0x1U << 8U;
1338}
1339static inline u32 nvl_intr_stall_en_tx_fault_sublink_change_v(u32 r)
1340{
1341 return (r >> 8U) & 0x1U;
1342}
1343static inline u32 nvl_intr_stall_en_tx_fault_sublink_change_enable_v(void)
1344{
1345 return 0x00000001U;
1346}
1347static inline u32 nvl_intr_stall_en_tx_fault_sublink_change_enable_f(void)
1348{
1349 return 0x100U;
1350}
1351static inline u32 nvl_intr_stall_en_rx_fault_sublink_change_f(u32 v)
1352{
1353 return (v & 0x1U) << 16U;
1354}
1355static inline u32 nvl_intr_stall_en_rx_fault_sublink_change_m(void)
1356{
1357 return 0x1U << 16U;
1358}
1359static inline u32 nvl_intr_stall_en_rx_fault_sublink_change_v(u32 r)
1360{
1361 return (r >> 16U) & 0x1U;
1362}
1363static inline u32 nvl_intr_stall_en_rx_fault_sublink_change_enable_v(void)
1364{
1365 return 0x00000001U;
1366}
1367static inline u32 nvl_intr_stall_en_rx_fault_sublink_change_enable_f(void)
1368{
1369 return 0x10000U;
1370}
1371static inline u32 nvl_intr_stall_en_rx_fault_dl_protocol_f(u32 v)
1372{
1373 return (v & 0x1U) << 20U;
1374}
1375static inline u32 nvl_intr_stall_en_rx_fault_dl_protocol_m(void)
1376{
1377 return 0x1U << 20U;
1378}
1379static inline u32 nvl_intr_stall_en_rx_fault_dl_protocol_v(u32 r)
1380{
1381 return (r >> 20U) & 0x1U;
1382}
1383static inline u32 nvl_intr_stall_en_rx_fault_dl_protocol_enable_v(void)
1384{
1385 return 0x00000001U;
1386}
1387static inline u32 nvl_intr_stall_en_rx_fault_dl_protocol_enable_f(void)
1388{
1389 return 0x100000U;
1390}
1391static inline u32 nvl_intr_stall_en_rx_short_error_rate_f(u32 v)
1392{
1393 return (v & 0x1U) << 21U;
1394}
1395static inline u32 nvl_intr_stall_en_rx_short_error_rate_m(void)
1396{
1397 return 0x1U << 21U;
1398}
1399static inline u32 nvl_intr_stall_en_rx_short_error_rate_v(u32 r)
1400{
1401 return (r >> 21U) & 0x1U;
1402}
1403static inline u32 nvl_intr_stall_en_rx_short_error_rate_enable_v(void)
1404{
1405 return 0x00000001U;
1406}
1407static inline u32 nvl_intr_stall_en_rx_short_error_rate_enable_f(void)
1408{
1409 return 0x200000U;
1410}
1411static inline u32 nvl_intr_stall_en_rx_long_error_rate_f(u32 v)
1412{
1413 return (v & 0x1U) << 22U;
1414}
1415static inline u32 nvl_intr_stall_en_rx_long_error_rate_m(void)
1416{
1417 return 0x1U << 22U;
1418}
1419static inline u32 nvl_intr_stall_en_rx_long_error_rate_v(u32 r)
1420{
1421 return (r >> 22U) & 0x1U;
1422}
1423static inline u32 nvl_intr_stall_en_rx_long_error_rate_enable_v(void)
1424{
1425 return 0x00000001U;
1426}
1427static inline u32 nvl_intr_stall_en_rx_long_error_rate_enable_f(void)
1428{
1429 return 0x400000U;
1430}
1431static inline u32 nvl_intr_stall_en_rx_ila_trigger_f(u32 v)
1432{
1433 return (v & 0x1U) << 23U;
1434}
1435static inline u32 nvl_intr_stall_en_rx_ila_trigger_m(void)
1436{
1437 return 0x1U << 23U;
1438}
1439static inline u32 nvl_intr_stall_en_rx_ila_trigger_v(u32 r)
1440{
1441 return (r >> 23U) & 0x1U;
1442}
1443static inline u32 nvl_intr_stall_en_rx_ila_trigger_enable_v(void)
1444{
1445 return 0x00000001U;
1446}
1447static inline u32 nvl_intr_stall_en_rx_ila_trigger_enable_f(void)
1448{
1449 return 0x800000U;
1450}
1451static inline u32 nvl_intr_stall_en_rx_crc_counter_f(u32 v)
1452{
1453 return (v & 0x1U) << 24U;
1454}
1455static inline u32 nvl_intr_stall_en_rx_crc_counter_m(void)
1456{
1457 return 0x1U << 24U;
1458}
1459static inline u32 nvl_intr_stall_en_rx_crc_counter_v(u32 r)
1460{
1461 return (r >> 24U) & 0x1U;
1462}
1463static inline u32 nvl_intr_stall_en_rx_crc_counter_enable_v(void)
1464{
1465 return 0x00000001U;
1466}
1467static inline u32 nvl_intr_stall_en_rx_crc_counter_enable_f(void)
1468{
1469 return 0x1000000U;
1470}
1471static inline u32 nvl_intr_stall_en_ltssm_fault_f(u32 v)
1472{
1473 return (v & 0x1U) << 28U;
1474}
1475static inline u32 nvl_intr_stall_en_ltssm_fault_m(void)
1476{
1477 return 0x1U << 28U;
1478}
1479static inline u32 nvl_intr_stall_en_ltssm_fault_v(u32 r)
1480{
1481 return (r >> 28U) & 0x1U;
1482}
1483static inline u32 nvl_intr_stall_en_ltssm_fault_enable_v(void)
1484{
1485 return 0x00000001U;
1486}
1487static inline u32 nvl_intr_stall_en_ltssm_fault_enable_f(void)
1488{
1489 return 0x10000000U;
1490}
1491static inline u32 nvl_intr_stall_en_ltssm_protocol_f(u32 v)
1492{
1493 return (v & 0x1U) << 29U;
1494}
1495static inline u32 nvl_intr_stall_en_ltssm_protocol_m(void)
1496{
1497 return 0x1U << 29U;
1498}
1499static inline u32 nvl_intr_stall_en_ltssm_protocol_v(u32 r)
1500{
1501 return (r >> 29U) & 0x1U;
1502}
1503static inline u32 nvl_intr_stall_en_ltssm_protocol_enable_v(void)
1504{
1505 return 0x00000001U;
1506}
1507static inline u32 nvl_intr_stall_en_ltssm_protocol_enable_f(void)
1508{
1509 return 0x20000000U;
1510}
1511static inline u32 nvl_intr_stall_en_minion_request_f(u32 v)
1512{
1513 return (v & 0x1U) << 30U;
1514}
1515static inline u32 nvl_intr_stall_en_minion_request_m(void)
1516{
1517 return 0x1U << 30U;
1518}
1519static inline u32 nvl_intr_stall_en_minion_request_v(u32 r)
1520{
1521 return (r >> 30U) & 0x1U;
1522}
1523static inline u32 nvl_intr_stall_en_minion_request_enable_v(void)
1524{
1525 return 0x00000001U;
1526}
1527static inline u32 nvl_intr_stall_en_minion_request_enable_f(void)
1528{
1529 return 0x40000000U;
1530}
1531static inline u32 nvl_br0_cfg_cal_r(void)
1532{
1533 return 0x0000281cU;
1534}
1535static inline u32 nvl_br0_cfg_cal_rxcal_f(u32 v)
1536{
1537 return (v & 0x1U) << 0U;
1538}
1539static inline u32 nvl_br0_cfg_cal_rxcal_m(void)
1540{
1541 return 0x1U << 0U;
1542}
1543static inline u32 nvl_br0_cfg_cal_rxcal_v(u32 r)
1544{
1545 return (r >> 0U) & 0x1U;
1546}
1547static inline u32 nvl_br0_cfg_cal_rxcal_on_v(void)
1548{
1549 return 0x00000001U;
1550}
1551static inline u32 nvl_br0_cfg_cal_rxcal_on_f(void)
1552{
1553 return 0x1U;
1554}
1555static inline u32 nvl_br0_cfg_status_cal_r(void)
1556{
1557 return 0x00002838U;
1558}
1559static inline u32 nvl_br0_cfg_status_cal_rxcal_done_f(u32 v)
1560{
1561 return (v & 0x1U) << 2U;
1562}
1563static inline u32 nvl_br0_cfg_status_cal_rxcal_done_m(void)
1564{
1565 return 0x1U << 2U;
1566}
1567static inline u32 nvl_br0_cfg_status_cal_rxcal_done_v(u32 r)
1568{
1569 return (r >> 2U) & 0x1U;
1570}
1571#endif
diff --git a/include/nvgpu/hw/gv100/hw_nvlinkip_discovery_gv100.h b/include/nvgpu/hw/gv100/hw_nvlinkip_discovery_gv100.h
deleted file mode 100644
index 9d33a9f..0000000
--- a/include/nvgpu/hw/gv100/hw_nvlinkip_discovery_gv100.h
+++ /dev/null
@@ -1,311 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_nvlinkip_discovery_gv100_h_
57#define _hw_nvlinkip_discovery_gv100_h_
58
59static inline u32 nvlinkip_discovery_common_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 nvlinkip_discovery_common_entry_f(u32 v)
64{
65 return (v & 0x3U) << 0U;
66}
67static inline u32 nvlinkip_discovery_common_entry_v(u32 r)
68{
69 return (r >> 0U) & 0x3U;
70}
71static inline u32 nvlinkip_discovery_common_entry_invalid_v(void)
72{
73 return 0x00000000U;
74}
75static inline u32 nvlinkip_discovery_common_entry_enum_v(void)
76{
77 return 0x00000001U;
78}
79static inline u32 nvlinkip_discovery_common_entry_data1_v(void)
80{
81 return 0x00000002U;
82}
83static inline u32 nvlinkip_discovery_common_entry_data2_v(void)
84{
85 return 0x00000003U;
86}
87static inline u32 nvlinkip_discovery_common_contents_f(u32 v)
88{
89 return (v & 0x1fffffffU) << 2U;
90}
91static inline u32 nvlinkip_discovery_common_contents_v(u32 r)
92{
93 return (r >> 2U) & 0x1fffffffU;
94}
95static inline u32 nvlinkip_discovery_common_chain_f(u32 v)
96{
97 return (v & 0x1U) << 31U;
98}
99static inline u32 nvlinkip_discovery_common_chain_v(u32 r)
100{
101 return (r >> 31U) & 0x1U;
102}
103static inline u32 nvlinkip_discovery_common_chain_enable_v(void)
104{
105 return 0x00000001U;
106}
107static inline u32 nvlinkip_discovery_common_device_f(u32 v)
108{
109 return (v & 0x3fU) << 2U;
110}
111static inline u32 nvlinkip_discovery_common_device_v(u32 r)
112{
113 return (r >> 2U) & 0x3fU;
114}
115static inline u32 nvlinkip_discovery_common_device_invalid_v(void)
116{
117 return 0x00000000U;
118}
119static inline u32 nvlinkip_discovery_common_device_ioctrl_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 nvlinkip_discovery_common_device_nvltl_v(void)
124{
125 return 0x00000002U;
126}
127static inline u32 nvlinkip_discovery_common_device_nvlink_v(void)
128{
129 return 0x00000003U;
130}
131static inline u32 nvlinkip_discovery_common_device_minion_v(void)
132{
133 return 0x00000004U;
134}
135static inline u32 nvlinkip_discovery_common_device_nvlipt_v(void)
136{
137 return 0x00000005U;
138}
139static inline u32 nvlinkip_discovery_common_device_nvltlc_v(void)
140{
141 return 0x00000006U;
142}
143static inline u32 nvlinkip_discovery_common_device_dlpl_v(void)
144{
145 return 0x0000000bU;
146}
147static inline u32 nvlinkip_discovery_common_device_ioctrlmif_v(void)
148{
149 return 0x00000007U;
150}
151static inline u32 nvlinkip_discovery_common_device_dlpl_multicast_v(void)
152{
153 return 0x00000008U;
154}
155static inline u32 nvlinkip_discovery_common_device_nvltlc_multicast_v(void)
156{
157 return 0x00000009U;
158}
159static inline u32 nvlinkip_discovery_common_device_ioctrlmif_multicast_v(void)
160{
161 return 0x0000000aU;
162}
163static inline u32 nvlinkip_discovery_common_device_sioctrl_v(void)
164{
165 return 0x0000000cU;
166}
167static inline u32 nvlinkip_discovery_common_device_tioctrl_v(void)
168{
169 return 0x0000000dU;
170}
171static inline u32 nvlinkip_discovery_common_id_f(u32 v)
172{
173 return (v & 0xffU) << 8U;
174}
175static inline u32 nvlinkip_discovery_common_id_v(u32 r)
176{
177 return (r >> 8U) & 0xffU;
178}
179static inline u32 nvlinkip_discovery_common_version_f(u32 v)
180{
181 return (v & 0x7ffU) << 20U;
182}
183static inline u32 nvlinkip_discovery_common_version_v(u32 r)
184{
185 return (r >> 20U) & 0x7ffU;
186}
187static inline u32 nvlinkip_discovery_common_pri_base_f(u32 v)
188{
189 return (v & 0xfffU) << 12U;
190}
191static inline u32 nvlinkip_discovery_common_pri_base_v(u32 r)
192{
193 return (r >> 12U) & 0xfffU;
194}
195static inline u32 nvlinkip_discovery_common_intr_f(u32 v)
196{
197 return (v & 0x1fU) << 7U;
198}
199static inline u32 nvlinkip_discovery_common_intr_v(u32 r)
200{
201 return (r >> 7U) & 0x1fU;
202}
203static inline u32 nvlinkip_discovery_common_reset_f(u32 v)
204{
205 return (v & 0x1fU) << 2U;
206}
207static inline u32 nvlinkip_discovery_common_reset_v(u32 r)
208{
209 return (r >> 2U) & 0x1fU;
210}
211static inline u32 nvlinkip_discovery_common_ioctrl_length_f(u32 v)
212{
213 return (v & 0x3fU) << 24U;
214}
215static inline u32 nvlinkip_discovery_common_ioctrl_length_v(u32 r)
216{
217 return (r >> 24U) & 0x3fU;
218}
219static inline u32 nvlinkip_discovery_common_dlpl_num_tx_f(u32 v)
220{
221 return (v & 0x7U) << 24U;
222}
223static inline u32 nvlinkip_discovery_common_dlpl_num_tx_v(u32 r)
224{
225 return (r >> 24U) & 0x7U;
226}
227static inline u32 nvlinkip_discovery_common_dlpl_num_rx_f(u32 v)
228{
229 return (v & 0x7U) << 27U;
230}
231static inline u32 nvlinkip_discovery_common_dlpl_num_rx_v(u32 r)
232{
233 return (r >> 27U) & 0x7U;
234}
235static inline u32 nvlinkip_discovery_common_data1_ioctrl_length_f(u32 v)
236{
237 return (v & 0x7ffffU) << 12U;
238}
239static inline u32 nvlinkip_discovery_common_data1_ioctrl_length_v(u32 r)
240{
241 return (r >> 12U) & 0x7ffffU;
242}
243static inline u32 nvlinkip_discovery_common_data2_type_f(u32 v)
244{
245 return (v & 0x1fU) << 26U;
246}
247static inline u32 nvlinkip_discovery_common_data2_type_v(u32 r)
248{
249 return (r >> 26U) & 0x1fU;
250}
251static inline u32 nvlinkip_discovery_common_data2_type_invalid_v(void)
252{
253 return 0x00000000U;
254}
255static inline u32 nvlinkip_discovery_common_data2_type_pllcontrol_v(void)
256{
257 return 0x00000001U;
258}
259static inline u32 nvlinkip_discovery_common_data2_type_resetreg_v(void)
260{
261 return 0x00000002U;
262}
263static inline u32 nvlinkip_discovery_common_data2_type_intrreg_v(void)
264{
265 return 0x00000003U;
266}
267static inline u32 nvlinkip_discovery_common_data2_type_discovery_v(void)
268{
269 return 0x00000004U;
270}
271static inline u32 nvlinkip_discovery_common_data2_type_unicast_v(void)
272{
273 return 0x00000005U;
274}
275static inline u32 nvlinkip_discovery_common_data2_type_broadcast_v(void)
276{
277 return 0x00000006U;
278}
279static inline u32 nvlinkip_discovery_common_data2_addr_f(u32 v)
280{
281 return (v & 0xffffffU) << 2U;
282}
283static inline u32 nvlinkip_discovery_common_data2_addr_v(u32 r)
284{
285 return (r >> 2U) & 0xffffffU;
286}
287static inline u32 nvlinkip_discovery_common_dlpl_data2_type_f(u32 v)
288{
289 return (v & 0x1fU) << 26U;
290}
291static inline u32 nvlinkip_discovery_common_dlpl_data2_type_v(u32 r)
292{
293 return (r >> 26U) & 0x1fU;
294}
295static inline u32 nvlinkip_discovery_common_dlpl_data2_master_f(u32 v)
296{
297 return (v & 0x1U) << 15U;
298}
299static inline u32 nvlinkip_discovery_common_dlpl_data2_master_v(u32 r)
300{
301 return (r >> 15U) & 0x1U;
302}
303static inline u32 nvlinkip_discovery_common_dlpl_data2_masterid_f(u32 v)
304{
305 return (v & 0x7fU) << 8U;
306}
307static inline u32 nvlinkip_discovery_common_dlpl_data2_masterid_v(u32 r)
308{
309 return (r >> 8U) & 0x7fU;
310}
311#endif
diff --git a/include/nvgpu/hw/gv100/hw_nvlipt_gv100.h b/include/nvgpu/hw/gv100/hw_nvlipt_gv100.h
deleted file mode 100644
index 5f73fab..0000000
--- a/include/nvgpu/hw/gv100/hw_nvlipt_gv100.h
+++ /dev/null
@@ -1,279 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_nvlipt_gv100_h_
57#define _hw_nvlipt_gv100_h_
58
59static inline u32 nvlipt_intr_control_link0_r(void)
60{
61 return 0x000004b4U;
62}
63static inline u32 nvlipt_intr_control_link0_stallenable_f(u32 v)
64{
65 return (v & 0x1U) << 0U;
66}
67static inline u32 nvlipt_intr_control_link0_stallenable_m(void)
68{
69 return 0x1U << 0U;
70}
71static inline u32 nvlipt_intr_control_link0_stallenable_v(u32 r)
72{
73 return (r >> 0U) & 0x1U;
74}
75static inline u32 nvlipt_intr_control_link0_nostallenable_f(u32 v)
76{
77 return (v & 0x1U) << 1U;
78}
79static inline u32 nvlipt_intr_control_link0_nostallenable_m(void)
80{
81 return 0x1U << 1U;
82}
83static inline u32 nvlipt_intr_control_link0_nostallenable_v(u32 r)
84{
85 return (r >> 1U) & 0x1U;
86}
87static inline u32 nvlipt_err_uc_status_link0_r(void)
88{
89 return 0x00000524U;
90}
91static inline u32 nvlipt_err_uc_status_link0_dlprotocol_f(u32 v)
92{
93 return (v & 0x1U) << 4U;
94}
95static inline u32 nvlipt_err_uc_status_link0_dlprotocol_v(u32 r)
96{
97 return (r >> 4U) & 0x1U;
98}
99static inline u32 nvlipt_err_uc_status_link0_datapoisoned_f(u32 v)
100{
101 return (v & 0x1U) << 12U;
102}
103static inline u32 nvlipt_err_uc_status_link0_datapoisoned_v(u32 r)
104{
105 return (r >> 12U) & 0x1U;
106}
107static inline u32 nvlipt_err_uc_status_link0_flowcontrol_f(u32 v)
108{
109 return (v & 0x1U) << 13U;
110}
111static inline u32 nvlipt_err_uc_status_link0_flowcontrol_v(u32 r)
112{
113 return (r >> 13U) & 0x1U;
114}
115static inline u32 nvlipt_err_uc_status_link0_responsetimeout_f(u32 v)
116{
117 return (v & 0x1U) << 14U;
118}
119static inline u32 nvlipt_err_uc_status_link0_responsetimeout_v(u32 r)
120{
121 return (r >> 14U) & 0x1U;
122}
123static inline u32 nvlipt_err_uc_status_link0_targeterror_f(u32 v)
124{
125 return (v & 0x1U) << 15U;
126}
127static inline u32 nvlipt_err_uc_status_link0_targeterror_v(u32 r)
128{
129 return (r >> 15U) & 0x1U;
130}
131static inline u32 nvlipt_err_uc_status_link0_unexpectedresponse_f(u32 v)
132{
133 return (v & 0x1U) << 16U;
134}
135static inline u32 nvlipt_err_uc_status_link0_unexpectedresponse_v(u32 r)
136{
137 return (r >> 16U) & 0x1U;
138}
139static inline u32 nvlipt_err_uc_status_link0_receiveroverflow_f(u32 v)
140{
141 return (v & 0x1U) << 17U;
142}
143static inline u32 nvlipt_err_uc_status_link0_receiveroverflow_v(u32 r)
144{
145 return (r >> 17U) & 0x1U;
146}
147static inline u32 nvlipt_err_uc_status_link0_malformedpacket_f(u32 v)
148{
149 return (v & 0x1U) << 18U;
150}
151static inline u32 nvlipt_err_uc_status_link0_malformedpacket_v(u32 r)
152{
153 return (r >> 18U) & 0x1U;
154}
155static inline u32 nvlipt_err_uc_status_link0_stompedpacketreceived_f(u32 v)
156{
157 return (v & 0x1U) << 19U;
158}
159static inline u32 nvlipt_err_uc_status_link0_stompedpacketreceived_v(u32 r)
160{
161 return (r >> 19U) & 0x1U;
162}
163static inline u32 nvlipt_err_uc_status_link0_unsupportedrequest_f(u32 v)
164{
165 return (v & 0x1U) << 20U;
166}
167static inline u32 nvlipt_err_uc_status_link0_unsupportedrequest_v(u32 r)
168{
169 return (r >> 20U) & 0x1U;
170}
171static inline u32 nvlipt_err_uc_status_link0_ucinternal_f(u32 v)
172{
173 return (v & 0x1U) << 22U;
174}
175static inline u32 nvlipt_err_uc_status_link0_ucinternal_v(u32 r)
176{
177 return (r >> 22U) & 0x1U;
178}
179static inline u32 nvlipt_err_uc_mask_link0_r(void)
180{
181 return 0x00000528U;
182}
183static inline u32 nvlipt_err_uc_severity_link0_r(void)
184{
185 return 0x0000052cU;
186}
187static inline u32 nvlipt_err_uc_first_link0_r(void)
188{
189 return 0x00000530U;
190}
191static inline u32 nvlipt_err_uc_advisory_link0_r(void)
192{
193 return 0x00000534U;
194}
195static inline u32 nvlipt_err_c_status_link0_r(void)
196{
197 return 0x00000538U;
198}
199static inline u32 nvlipt_err_c_mask_link0_r(void)
200{
201 return 0x0000053cU;
202}
203static inline u32 nvlipt_err_c_first_link0_r(void)
204{
205 return 0x00000540U;
206}
207static inline u32 nvlipt_err_control_link0_r(void)
208{
209 return 0x00000544U;
210}
211static inline u32 nvlipt_err_control_link0_fatalenable_f(u32 v)
212{
213 return (v & 0x1U) << 1U;
214}
215static inline u32 nvlipt_err_control_link0_fatalenable_m(void)
216{
217 return 0x1U << 1U;
218}
219static inline u32 nvlipt_err_control_link0_fatalenable_v(u32 r)
220{
221 return (r >> 1U) & 0x1U;
222}
223static inline u32 nvlipt_err_control_link0_nonfatalenable_f(u32 v)
224{
225 return (v & 0x1U) << 2U;
226}
227static inline u32 nvlipt_err_control_link0_nonfatalenable_m(void)
228{
229 return 0x1U << 2U;
230}
231static inline u32 nvlipt_err_control_link0_nonfatalenable_v(u32 r)
232{
233 return (r >> 2U) & 0x1U;
234}
235static inline u32 nvlipt_intr_control_common_r(void)
236{
237 return 0x000004b0U;
238}
239static inline u32 nvlipt_intr_control_common_stallenable_f(u32 v)
240{
241 return (v & 0x1U) << 0U;
242}
243static inline u32 nvlipt_intr_control_common_stallenable_m(void)
244{
245 return 0x1U << 0U;
246}
247static inline u32 nvlipt_intr_control_common_stallenable_v(u32 r)
248{
249 return (r >> 0U) & 0x1U;
250}
251static inline u32 nvlipt_intr_control_common_nonstallenable_f(u32 v)
252{
253 return (v & 0x1U) << 1U;
254}
255static inline u32 nvlipt_intr_control_common_nonstallenable_m(void)
256{
257 return 0x1U << 1U;
258}
259static inline u32 nvlipt_intr_control_common_nonstallenable_v(u32 r)
260{
261 return (r >> 1U) & 0x1U;
262}
263static inline u32 nvlipt_scratch_cold_r(void)
264{
265 return 0x000007d4U;
266}
267static inline u32 nvlipt_scratch_cold_data_f(u32 v)
268{
269 return (v & 0xffffffffU) << 0U;
270}
271static inline u32 nvlipt_scratch_cold_data_v(u32 r)
272{
273 return (r >> 0U) & 0xffffffffU;
274}
275static inline u32 nvlipt_scratch_cold_data_init_v(void)
276{
277 return 0xdeadbaadU;
278}
279#endif
diff --git a/include/nvgpu/hw/gv100/hw_nvtlc_gv100.h b/include/nvgpu/hw/gv100/hw_nvtlc_gv100.h
deleted file mode 100644
index cc31b12..0000000
--- a/include/nvgpu/hw/gv100/hw_nvtlc_gv100.h
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_nvtlc_gv100_h_
57#define _hw_nvtlc_gv100_h_
58
59static inline u32 nvtlc_tx_err_report_en_0_r(void)
60{
61 return 0x00000708U;
62}
63static inline u32 nvtlc_rx_err_report_en_0_r(void)
64{
65 return 0x00000f08U;
66}
67static inline u32 nvtlc_rx_err_report_en_1_r(void)
68{
69 return 0x00000f20U;
70}
71static inline u32 nvtlc_tx_err_status_0_r(void)
72{
73 return 0x00000700U;
74}
75static inline u32 nvtlc_rx_err_status_0_r(void)
76{
77 return 0x00000f00U;
78}
79static inline u32 nvtlc_rx_err_status_1_r(void)
80{
81 return 0x00000f18U;
82}
83static inline u32 nvtlc_tx_err_first_0_r(void)
84{
85 return 0x00000714U;
86}
87static inline u32 nvtlc_rx_err_first_0_r(void)
88{
89 return 0x00000f14U;
90}
91static inline u32 nvtlc_rx_err_first_1_r(void)
92{
93 return 0x00000f2cU;
94}
95#endif
diff --git a/include/nvgpu/hw/gv100/hw_pbdma_gv100.h b/include/nvgpu/hw/gv100/hw_pbdma_gv100.h
deleted file mode 100644
index 41d7d1b..0000000
--- a/include/nvgpu/hw/gv100/hw_pbdma_gv100.h
+++ /dev/null
@@ -1,651 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pbdma_gv100_h_
57#define _hw_pbdma_gv100_h_
58
59static inline u32 pbdma_gp_entry1_r(void)
60{
61 return 0x10000004U;
62}
63static inline u32 pbdma_gp_entry1_get_hi_v(u32 r)
64{
65 return (r >> 0U) & 0xffU;
66}
67static inline u32 pbdma_gp_entry1_length_f(u32 v)
68{
69 return (v & 0x1fffffU) << 10U;
70}
71static inline u32 pbdma_gp_entry1_length_v(u32 r)
72{
73 return (r >> 10U) & 0x1fffffU;
74}
75static inline u32 pbdma_gp_base_r(u32 i)
76{
77 return 0x00040048U + i*8192U;
78}
79static inline u32 pbdma_gp_base__size_1_v(void)
80{
81 return 0x0000000eU;
82}
83static inline u32 pbdma_gp_base_offset_f(u32 v)
84{
85 return (v & 0x1fffffffU) << 3U;
86}
87static inline u32 pbdma_gp_base_rsvd_s(void)
88{
89 return 3U;
90}
91static inline u32 pbdma_gp_base_hi_r(u32 i)
92{
93 return 0x0004004cU + i*8192U;
94}
95static inline u32 pbdma_gp_base_hi_offset_f(u32 v)
96{
97 return (v & 0xffU) << 0U;
98}
99static inline u32 pbdma_gp_base_hi_limit2_f(u32 v)
100{
101 return (v & 0x1fU) << 16U;
102}
103static inline u32 pbdma_gp_fetch_r(u32 i)
104{
105 return 0x00040050U + i*8192U;
106}
107static inline u32 pbdma_gp_get_r(u32 i)
108{
109 return 0x00040014U + i*8192U;
110}
111static inline u32 pbdma_gp_put_r(u32 i)
112{
113 return 0x00040000U + i*8192U;
114}
115static inline u32 pbdma_pb_fetch_r(u32 i)
116{
117 return 0x00040054U + i*8192U;
118}
119static inline u32 pbdma_pb_fetch_hi_r(u32 i)
120{
121 return 0x00040058U + i*8192U;
122}
123static inline u32 pbdma_get_r(u32 i)
124{
125 return 0x00040018U + i*8192U;
126}
127static inline u32 pbdma_get_hi_r(u32 i)
128{
129 return 0x0004001cU + i*8192U;
130}
131static inline u32 pbdma_put_r(u32 i)
132{
133 return 0x0004005cU + i*8192U;
134}
135static inline u32 pbdma_put_hi_r(u32 i)
136{
137 return 0x00040060U + i*8192U;
138}
139static inline u32 pbdma_pb_header_r(u32 i)
140{
141 return 0x00040084U + i*8192U;
142}
143static inline u32 pbdma_pb_header_priv_user_f(void)
144{
145 return 0x0U;
146}
147static inline u32 pbdma_pb_header_method_zero_f(void)
148{
149 return 0x0U;
150}
151static inline u32 pbdma_pb_header_subchannel_zero_f(void)
152{
153 return 0x0U;
154}
155static inline u32 pbdma_pb_header_level_main_f(void)
156{
157 return 0x0U;
158}
159static inline u32 pbdma_pb_header_first_true_f(void)
160{
161 return 0x400000U;
162}
163static inline u32 pbdma_pb_header_type_inc_f(void)
164{
165 return 0x20000000U;
166}
167static inline u32 pbdma_pb_header_type_non_inc_f(void)
168{
169 return 0x60000000U;
170}
171static inline u32 pbdma_hdr_shadow_r(u32 i)
172{
173 return 0x00040118U + i*8192U;
174}
175static inline u32 pbdma_gp_shadow_0_r(u32 i)
176{
177 return 0x00040110U + i*8192U;
178}
179static inline u32 pbdma_gp_shadow_1_r(u32 i)
180{
181 return 0x00040114U + i*8192U;
182}
183static inline u32 pbdma_subdevice_r(u32 i)
184{
185 return 0x00040094U + i*8192U;
186}
187static inline u32 pbdma_subdevice_id_f(u32 v)
188{
189 return (v & 0xfffU) << 0U;
190}
191static inline u32 pbdma_subdevice_status_active_f(void)
192{
193 return 0x10000000U;
194}
195static inline u32 pbdma_subdevice_channel_dma_enable_f(void)
196{
197 return 0x20000000U;
198}
199static inline u32 pbdma_method0_r(u32 i)
200{
201 return 0x000400c0U + i*8192U;
202}
203static inline u32 pbdma_method0_fifo_size_v(void)
204{
205 return 0x00000004U;
206}
207static inline u32 pbdma_method0_addr_f(u32 v)
208{
209 return (v & 0xfffU) << 2U;
210}
211static inline u32 pbdma_method0_addr_v(u32 r)
212{
213 return (r >> 2U) & 0xfffU;
214}
215static inline u32 pbdma_method0_subch_v(u32 r)
216{
217 return (r >> 16U) & 0x7U;
218}
219static inline u32 pbdma_method0_first_true_f(void)
220{
221 return 0x400000U;
222}
223static inline u32 pbdma_method0_valid_true_f(void)
224{
225 return 0x80000000U;
226}
227static inline u32 pbdma_method1_r(u32 i)
228{
229 return 0x000400c8U + i*8192U;
230}
231static inline u32 pbdma_method2_r(u32 i)
232{
233 return 0x000400d0U + i*8192U;
234}
235static inline u32 pbdma_method3_r(u32 i)
236{
237 return 0x000400d8U + i*8192U;
238}
239static inline u32 pbdma_data0_r(u32 i)
240{
241 return 0x000400c4U + i*8192U;
242}
243static inline u32 pbdma_acquire_r(u32 i)
244{
245 return 0x00040030U + i*8192U;
246}
247static inline u32 pbdma_acquire_retry_man_2_f(void)
248{
249 return 0x2U;
250}
251static inline u32 pbdma_acquire_retry_exp_2_f(void)
252{
253 return 0x100U;
254}
255static inline u32 pbdma_acquire_timeout_exp_f(u32 v)
256{
257 return (v & 0xfU) << 11U;
258}
259static inline u32 pbdma_acquire_timeout_exp_max_v(void)
260{
261 return 0x0000000fU;
262}
263static inline u32 pbdma_acquire_timeout_exp_max_f(void)
264{
265 return 0x7800U;
266}
267static inline u32 pbdma_acquire_timeout_man_f(u32 v)
268{
269 return (v & 0xffffU) << 15U;
270}
271static inline u32 pbdma_acquire_timeout_man_max_v(void)
272{
273 return 0x0000ffffU;
274}
275static inline u32 pbdma_acquire_timeout_man_max_f(void)
276{
277 return 0x7fff8000U;
278}
279static inline u32 pbdma_acquire_timeout_en_enable_f(void)
280{
281 return 0x80000000U;
282}
283static inline u32 pbdma_acquire_timeout_en_disable_f(void)
284{
285 return 0x0U;
286}
287static inline u32 pbdma_status_r(u32 i)
288{
289 return 0x00040100U + i*8192U;
290}
291static inline u32 pbdma_channel_r(u32 i)
292{
293 return 0x00040120U + i*8192U;
294}
295static inline u32 pbdma_signature_r(u32 i)
296{
297 return 0x00040010U + i*8192U;
298}
299static inline u32 pbdma_signature_hw_valid_f(void)
300{
301 return 0xfaceU;
302}
303static inline u32 pbdma_signature_sw_zero_f(void)
304{
305 return 0x0U;
306}
307static inline u32 pbdma_userd_r(u32 i)
308{
309 return 0x00040008U + i*8192U;
310}
311static inline u32 pbdma_userd_target_vid_mem_f(void)
312{
313 return 0x0U;
314}
315static inline u32 pbdma_userd_target_sys_mem_coh_f(void)
316{
317 return 0x2U;
318}
319static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void)
320{
321 return 0x3U;
322}
323static inline u32 pbdma_userd_addr_f(u32 v)
324{
325 return (v & 0x7fffffU) << 9U;
326}
327static inline u32 pbdma_config_r(u32 i)
328{
329 return 0x000400f4U + i*8192U;
330}
331static inline u32 pbdma_config_l2_evict_first_f(void)
332{
333 return 0x0U;
334}
335static inline u32 pbdma_config_l2_evict_normal_f(void)
336{
337 return 0x1U;
338}
339static inline u32 pbdma_config_ce_split_enable_f(void)
340{
341 return 0x0U;
342}
343static inline u32 pbdma_config_ce_split_disable_f(void)
344{
345 return 0x10U;
346}
347static inline u32 pbdma_config_auth_level_non_privileged_f(void)
348{
349 return 0x0U;
350}
351static inline u32 pbdma_config_auth_level_privileged_f(void)
352{
353 return 0x100U;
354}
355static inline u32 pbdma_config_userd_writeback_disable_f(void)
356{
357 return 0x0U;
358}
359static inline u32 pbdma_config_userd_writeback_enable_f(void)
360{
361 return 0x1000U;
362}
363static inline u32 pbdma_userd_hi_r(u32 i)
364{
365 return 0x0004000cU + i*8192U;
366}
367static inline u32 pbdma_userd_hi_addr_f(u32 v)
368{
369 return (v & 0xffU) << 0U;
370}
371static inline u32 pbdma_hce_ctrl_r(u32 i)
372{
373 return 0x000400e4U + i*8192U;
374}
375static inline u32 pbdma_hce_ctrl_hce_priv_mode_yes_f(void)
376{
377 return 0x20U;
378}
379static inline u32 pbdma_intr_0_r(u32 i)
380{
381 return 0x00040108U + i*8192U;
382}
383static inline u32 pbdma_intr_0_memreq_v(u32 r)
384{
385 return (r >> 0U) & 0x1U;
386}
387static inline u32 pbdma_intr_0_memreq_pending_f(void)
388{
389 return 0x1U;
390}
391static inline u32 pbdma_intr_0_memack_timeout_pending_f(void)
392{
393 return 0x2U;
394}
395static inline u32 pbdma_intr_0_memack_extra_pending_f(void)
396{
397 return 0x4U;
398}
399static inline u32 pbdma_intr_0_memdat_timeout_pending_f(void)
400{
401 return 0x8U;
402}
403static inline u32 pbdma_intr_0_memdat_extra_pending_f(void)
404{
405 return 0x10U;
406}
407static inline u32 pbdma_intr_0_memflush_pending_f(void)
408{
409 return 0x20U;
410}
411static inline u32 pbdma_intr_0_memop_pending_f(void)
412{
413 return 0x40U;
414}
415static inline u32 pbdma_intr_0_lbconnect_pending_f(void)
416{
417 return 0x80U;
418}
419static inline u32 pbdma_intr_0_lbreq_pending_f(void)
420{
421 return 0x100U;
422}
423static inline u32 pbdma_intr_0_lback_timeout_pending_f(void)
424{
425 return 0x200U;
426}
427static inline u32 pbdma_intr_0_lback_extra_pending_f(void)
428{
429 return 0x400U;
430}
431static inline u32 pbdma_intr_0_lbdat_timeout_pending_f(void)
432{
433 return 0x800U;
434}
435static inline u32 pbdma_intr_0_lbdat_extra_pending_f(void)
436{
437 return 0x1000U;
438}
439static inline u32 pbdma_intr_0_gpfifo_pending_f(void)
440{
441 return 0x2000U;
442}
443static inline u32 pbdma_intr_0_gpptr_pending_f(void)
444{
445 return 0x4000U;
446}
447static inline u32 pbdma_intr_0_gpentry_pending_f(void)
448{
449 return 0x8000U;
450}
451static inline u32 pbdma_intr_0_gpcrc_pending_f(void)
452{
453 return 0x10000U;
454}
455static inline u32 pbdma_intr_0_pbptr_pending_f(void)
456{
457 return 0x20000U;
458}
459static inline u32 pbdma_intr_0_pbentry_pending_f(void)
460{
461 return 0x40000U;
462}
463static inline u32 pbdma_intr_0_pbcrc_pending_f(void)
464{
465 return 0x80000U;
466}
467static inline u32 pbdma_intr_0_clear_faulted_error_pending_f(void)
468{
469 return 0x100000U;
470}
471static inline u32 pbdma_intr_0_method_pending_f(void)
472{
473 return 0x200000U;
474}
475static inline u32 pbdma_intr_0_methodcrc_pending_f(void)
476{
477 return 0x400000U;
478}
479static inline u32 pbdma_intr_0_device_pending_f(void)
480{
481 return 0x800000U;
482}
483static inline u32 pbdma_intr_0_eng_reset_pending_f(void)
484{
485 return 0x1000000U;
486}
487static inline u32 pbdma_intr_0_semaphore_pending_f(void)
488{
489 return 0x2000000U;
490}
491static inline u32 pbdma_intr_0_acquire_pending_f(void)
492{
493 return 0x4000000U;
494}
495static inline u32 pbdma_intr_0_pri_pending_f(void)
496{
497 return 0x8000000U;
498}
499static inline u32 pbdma_intr_0_no_ctxsw_seg_pending_f(void)
500{
501 return 0x20000000U;
502}
503static inline u32 pbdma_intr_0_pbseg_pending_f(void)
504{
505 return 0x40000000U;
506}
507static inline u32 pbdma_intr_0_signature_pending_f(void)
508{
509 return 0x80000000U;
510}
511static inline u32 pbdma_intr_1_r(u32 i)
512{
513 return 0x00040148U + i*8192U;
514}
515static inline u32 pbdma_intr_1_ctxnotvalid_m(void)
516{
517 return 0x1U << 31U;
518}
519static inline u32 pbdma_intr_1_ctxnotvalid_pending_f(void)
520{
521 return 0x80000000U;
522}
523static inline u32 pbdma_intr_en_0_r(u32 i)
524{
525 return 0x0004010cU + i*8192U;
526}
527static inline u32 pbdma_intr_en_0_lbreq_enabled_f(void)
528{
529 return 0x100U;
530}
531static inline u32 pbdma_intr_en_1_r(u32 i)
532{
533 return 0x0004014cU + i*8192U;
534}
535static inline u32 pbdma_intr_stall_r(u32 i)
536{
537 return 0x0004013cU + i*8192U;
538}
539static inline u32 pbdma_intr_stall_lbreq_enabled_f(void)
540{
541 return 0x100U;
542}
543static inline u32 pbdma_intr_stall_1_r(u32 i)
544{
545 return 0x00040140U + i*8192U;
546}
547static inline u32 pbdma_intr_stall_1_hce_illegal_op_enabled_f(void)
548{
549 return 0x1U;
550}
551static inline u32 pbdma_udma_nop_r(void)
552{
553 return 0x00000008U;
554}
555static inline u32 pbdma_runlist_timeslice_r(u32 i)
556{
557 return 0x000400f8U + i*8192U;
558}
559static inline u32 pbdma_runlist_timeslice_timeout_128_f(void)
560{
561 return 0x80U;
562}
563static inline u32 pbdma_runlist_timeslice_timescale_3_f(void)
564{
565 return 0x3000U;
566}
567static inline u32 pbdma_runlist_timeslice_enable_true_f(void)
568{
569 return 0x10000000U;
570}
571static inline u32 pbdma_target_r(u32 i)
572{
573 return 0x000400acU + i*8192U;
574}
575static inline u32 pbdma_target_engine_sw_f(void)
576{
577 return 0x1fU;
578}
579static inline u32 pbdma_target_eng_ctx_valid_true_f(void)
580{
581 return 0x10000U;
582}
583static inline u32 pbdma_target_eng_ctx_valid_false_f(void)
584{
585 return 0x0U;
586}
587static inline u32 pbdma_target_ce_ctx_valid_true_f(void)
588{
589 return 0x20000U;
590}
591static inline u32 pbdma_target_ce_ctx_valid_false_f(void)
592{
593 return 0x0U;
594}
595static inline u32 pbdma_target_host_tsg_event_reason_pbdma_idle_f(void)
596{
597 return 0x0U;
598}
599static inline u32 pbdma_target_host_tsg_event_reason_semaphore_acquire_failure_f(void)
600{
601 return 0x1000000U;
602}
603static inline u32 pbdma_target_host_tsg_event_reason_tsg_yield_f(void)
604{
605 return 0x2000000U;
606}
607static inline u32 pbdma_target_host_tsg_event_reason_host_subchannel_switch_f(void)
608{
609 return 0x3000000U;
610}
611static inline u32 pbdma_target_should_send_tsg_event_true_f(void)
612{
613 return 0x20000000U;
614}
615static inline u32 pbdma_target_should_send_tsg_event_false_f(void)
616{
617 return 0x0U;
618}
619static inline u32 pbdma_target_needs_host_tsg_event_true_f(void)
620{
621 return 0x80000000U;
622}
623static inline u32 pbdma_target_needs_host_tsg_event_false_f(void)
624{
625 return 0x0U;
626}
627static inline u32 pbdma_set_channel_info_r(u32 i)
628{
629 return 0x000400fcU + i*8192U;
630}
631static inline u32 pbdma_set_channel_info_veid_f(u32 v)
632{
633 return (v & 0x3fU) << 8U;
634}
635static inline u32 pbdma_timeout_r(u32 i)
636{
637 return 0x0004012cU + i*8192U;
638}
639static inline u32 pbdma_timeout_period_m(void)
640{
641 return 0xffffffffU << 0U;
642}
643static inline u32 pbdma_timeout_period_max_f(void)
644{
645 return 0xffffffffU;
646}
647static inline u32 pbdma_timeout_period_init_f(void)
648{
649 return 0x10000U;
650}
651#endif
diff --git a/include/nvgpu/hw/gv100/hw_perf_gv100.h b/include/nvgpu/hw/gv100/hw_perf_gv100.h
deleted file mode 100644
index 40107ee..0000000
--- a/include/nvgpu/hw/gv100/hw_perf_gv100.h
+++ /dev/null
@@ -1,263 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_perf_gv100_h_
57#define _hw_perf_gv100_h_
58
59static inline u32 perf_pmmgpc_perdomain_offset_v(void)
60{
61 return 0x00000200U;
62}
63static inline u32 perf_pmmsys_perdomain_offset_v(void)
64{
65 return 0x00000200U;
66}
67static inline u32 perf_pmmgpc_base_v(void)
68{
69 return 0x00180000U;
70}
71static inline u32 perf_pmmgpc_extent_v(void)
72{
73 return 0x00183fffU;
74}
75static inline u32 perf_pmmsys_base_v(void)
76{
77 return 0x00240000U;
78}
79static inline u32 perf_pmmsys_extent_v(void)
80{
81 return 0x00243fffU;
82}
83static inline u32 perf_pmmfbp_base_v(void)
84{
85 return 0x00200000U;
86}
87static inline u32 perf_pmasys_control_r(void)
88{
89 return 0x0024a000U;
90}
91static inline u32 perf_pmasys_control_membuf_status_v(u32 r)
92{
93 return (r >> 4U) & 0x1U;
94}
95static inline u32 perf_pmasys_control_membuf_status_overflowed_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 perf_pmasys_control_membuf_status_overflowed_f(void)
100{
101 return 0x10U;
102}
103static inline u32 perf_pmasys_control_membuf_clear_status_f(u32 v)
104{
105 return (v & 0x1U) << 5U;
106}
107static inline u32 perf_pmasys_control_membuf_clear_status_v(u32 r)
108{
109 return (r >> 5U) & 0x1U;
110}
111static inline u32 perf_pmasys_control_membuf_clear_status_doit_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 perf_pmasys_control_membuf_clear_status_doit_f(void)
116{
117 return 0x20U;
118}
119static inline u32 perf_pmasys_mem_block_r(void)
120{
121 return 0x0024a070U;
122}
123static inline u32 perf_pmasys_mem_block_base_f(u32 v)
124{
125 return (v & 0xfffffffU) << 0U;
126}
127static inline u32 perf_pmasys_mem_block_target_f(u32 v)
128{
129 return (v & 0x3U) << 28U;
130}
131static inline u32 perf_pmasys_mem_block_target_v(u32 r)
132{
133 return (r >> 28U) & 0x3U;
134}
135static inline u32 perf_pmasys_mem_block_target_lfb_v(void)
136{
137 return 0x00000000U;
138}
139static inline u32 perf_pmasys_mem_block_target_lfb_f(void)
140{
141 return 0x0U;
142}
143static inline u32 perf_pmasys_mem_block_target_sys_coh_v(void)
144{
145 return 0x00000002U;
146}
147static inline u32 perf_pmasys_mem_block_target_sys_coh_f(void)
148{
149 return 0x20000000U;
150}
151static inline u32 perf_pmasys_mem_block_target_sys_ncoh_v(void)
152{
153 return 0x00000003U;
154}
155static inline u32 perf_pmasys_mem_block_target_sys_ncoh_f(void)
156{
157 return 0x30000000U;
158}
159static inline u32 perf_pmasys_mem_block_valid_f(u32 v)
160{
161 return (v & 0x1U) << 31U;
162}
163static inline u32 perf_pmasys_mem_block_valid_v(u32 r)
164{
165 return (r >> 31U) & 0x1U;
166}
167static inline u32 perf_pmasys_mem_block_valid_true_v(void)
168{
169 return 0x00000001U;
170}
171static inline u32 perf_pmasys_mem_block_valid_true_f(void)
172{
173 return 0x80000000U;
174}
175static inline u32 perf_pmasys_mem_block_valid_false_v(void)
176{
177 return 0x00000000U;
178}
179static inline u32 perf_pmasys_mem_block_valid_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 perf_pmasys_outbase_r(void)
184{
185 return 0x0024a074U;
186}
187static inline u32 perf_pmasys_outbase_ptr_f(u32 v)
188{
189 return (v & 0x7ffffffU) << 5U;
190}
191static inline u32 perf_pmasys_outbaseupper_r(void)
192{
193 return 0x0024a078U;
194}
195static inline u32 perf_pmasys_outbaseupper_ptr_f(u32 v)
196{
197 return (v & 0xffU) << 0U;
198}
199static inline u32 perf_pmasys_outsize_r(void)
200{
201 return 0x0024a07cU;
202}
203static inline u32 perf_pmasys_outsize_numbytes_f(u32 v)
204{
205 return (v & 0x7ffffffU) << 5U;
206}
207static inline u32 perf_pmasys_mem_bytes_r(void)
208{
209 return 0x0024a084U;
210}
211static inline u32 perf_pmasys_mem_bytes_numbytes_f(u32 v)
212{
213 return (v & 0xfffffffU) << 4U;
214}
215static inline u32 perf_pmasys_mem_bump_r(void)
216{
217 return 0x0024a088U;
218}
219static inline u32 perf_pmasys_mem_bump_numbytes_f(u32 v)
220{
221 return (v & 0xfffffffU) << 4U;
222}
223static inline u32 perf_pmasys_enginestatus_r(void)
224{
225 return 0x0024a0a4U;
226}
227static inline u32 perf_pmasys_enginestatus_rbufempty_f(u32 v)
228{
229 return (v & 0x1U) << 4U;
230}
231static inline u32 perf_pmasys_enginestatus_rbufempty_empty_v(void)
232{
233 return 0x00000001U;
234}
235static inline u32 perf_pmasys_enginestatus_rbufempty_empty_f(void)
236{
237 return 0x10U;
238}
239static inline u32 perf_pmmsys_engine_sel_r(u32 i)
240{
241 return 0x0024006cU + i*512U;
242}
243static inline u32 perf_pmmsys_engine_sel__size_1_v(void)
244{
245 return 0x00000020U;
246}
247static inline u32 perf_pmmfbp_engine_sel_r(u32 i)
248{
249 return 0x0020006cU + i*512U;
250}
251static inline u32 perf_pmmfbp_engine_sel__size_1_v(void)
252{
253 return 0x00000020U;
254}
255static inline u32 perf_pmmgpc_engine_sel_r(u32 i)
256{
257 return 0x0018006cU + i*512U;
258}
259static inline u32 perf_pmmgpc_engine_sel__size_1_v(void)
260{
261 return 0x00000020U;
262}
263#endif
diff --git a/include/nvgpu/hw/gv100/hw_pgsp_gv100.h b/include/nvgpu/hw/gv100/hw_pgsp_gv100.h
deleted file mode 100644
index 34d0eae..0000000
--- a/include/nvgpu/hw/gv100/hw_pgsp_gv100.h
+++ /dev/null
@@ -1,643 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pgsp_gv100_h_
57#define _hw_pgsp_gv100_h_
58
59static inline u32 pgsp_falcon_irqsset_r(void)
60{
61 return 0x00110000U;
62}
63static inline u32 pgsp_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 pgsp_falcon_irqsclr_r(void)
68{
69 return 0x00110004U;
70}
71static inline u32 pgsp_falcon_irqstat_r(void)
72{
73 return 0x00110008U;
74}
75static inline u32 pgsp_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 pgsp_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 pgsp_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 pgsp_falcon_irqmode_r(void)
88{
89 return 0x0011000cU;
90}
91static inline u32 pgsp_falcon_irqmset_r(void)
92{
93 return 0x00110010U;
94}
95static inline u32 pgsp_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 pgsp_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 pgsp_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 pgsp_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 pgsp_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 pgsp_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 pgsp_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 pgsp_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 pgsp_falcon_irqmclr_r(void)
128{
129 return 0x00110014U;
130}
131static inline u32 pgsp_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 pgsp_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 pgsp_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 pgsp_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 pgsp_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 pgsp_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 pgsp_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 pgsp_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 pgsp_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 pgsp_falcon_irqmask_r(void)
168{
169 return 0x00110018U;
170}
171static inline u32 pgsp_falcon_irqdest_r(void)
172{
173 return 0x0011001cU;
174}
175static inline u32 pgsp_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 pgsp_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 pgsp_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 pgsp_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 pgsp_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 pgsp_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 pgsp_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 pgsp_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 pgsp_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 pgsp_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 pgsp_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 pgsp_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 pgsp_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 pgsp_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 pgsp_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 pgsp_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 pgsp_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 pgsp_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 pgsp_falcon_curctx_r(void)
248{
249 return 0x00110050U;
250}
251static inline u32 pgsp_falcon_nxtctx_r(void)
252{
253 return 0x00110054U;
254}
255static inline u32 pgsp_falcon_nxtctx_ctxptr_f(u32 v)
256{
257 return (v & 0xfffffffU) << 0U;
258}
259static inline u32 pgsp_falcon_nxtctx_ctxtgt_fb_f(void)
260{
261 return 0x0U;
262}
263static inline u32 pgsp_falcon_nxtctx_ctxtgt_sys_coh_f(void)
264{
265 return 0x20000000U;
266}
267static inline u32 pgsp_falcon_nxtctx_ctxtgt_sys_ncoh_f(void)
268{
269 return 0x30000000U;
270}
271static inline u32 pgsp_falcon_nxtctx_ctxvalid_f(u32 v)
272{
273 return (v & 0x1U) << 30U;
274}
275static inline u32 pgsp_falcon_mailbox0_r(void)
276{
277 return 0x00110040U;
278}
279static inline u32 pgsp_falcon_mailbox1_r(void)
280{
281 return 0x00110044U;
282}
283static inline u32 pgsp_falcon_itfen_r(void)
284{
285 return 0x00110048U;
286}
287static inline u32 pgsp_falcon_itfen_ctxen_enable_f(void)
288{
289 return 0x1U;
290}
291static inline u32 pgsp_falcon_idlestate_r(void)
292{
293 return 0x0011004cU;
294}
295static inline u32 pgsp_falcon_idlestate_falcon_busy_v(u32 r)
296{
297 return (r >> 0U) & 0x1U;
298}
299static inline u32 pgsp_falcon_idlestate_ext_busy_v(u32 r)
300{
301 return (r >> 1U) & 0x7fffU;
302}
303static inline u32 pgsp_falcon_os_r(void)
304{
305 return 0x00110080U;
306}
307static inline u32 pgsp_falcon_engctl_r(void)
308{
309 return 0x001100a4U;
310}
311static inline u32 pgsp_falcon_engctl_switch_context_true_f(void)
312{
313 return 0x8U;
314}
315static inline u32 pgsp_falcon_engctl_switch_context_false_f(void)
316{
317 return 0x0U;
318}
319static inline u32 pgsp_falcon_cpuctl_r(void)
320{
321 return 0x00110100U;
322}
323static inline u32 pgsp_falcon_cpuctl_startcpu_f(u32 v)
324{
325 return (v & 0x1U) << 1U;
326}
327static inline u32 pgsp_falcon_cpuctl_halt_intr_f(u32 v)
328{
329 return (v & 0x1U) << 4U;
330}
331static inline u32 pgsp_falcon_cpuctl_halt_intr_m(void)
332{
333 return 0x1U << 4U;
334}
335static inline u32 pgsp_falcon_cpuctl_halt_intr_v(u32 r)
336{
337 return (r >> 4U) & 0x1U;
338}
339static inline u32 pgsp_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
340{
341 return (v & 0x1U) << 6U;
342}
343static inline u32 pgsp_falcon_cpuctl_cpuctl_alias_en_m(void)
344{
345 return 0x1U << 6U;
346}
347static inline u32 pgsp_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
348{
349 return (r >> 6U) & 0x1U;
350}
351static inline u32 pgsp_falcon_cpuctl_alias_r(void)
352{
353 return 0x00110130U;
354}
355static inline u32 pgsp_falcon_cpuctl_alias_startcpu_f(u32 v)
356{
357 return (v & 0x1U) << 1U;
358}
359static inline u32 pgsp_falcon_imemc_r(u32 i)
360{
361 return 0x00110180U + i*16U;
362}
363static inline u32 pgsp_falcon_imemc_offs_f(u32 v)
364{
365 return (v & 0x3fU) << 2U;
366}
367static inline u32 pgsp_falcon_imemc_blk_f(u32 v)
368{
369 return (v & 0xffU) << 8U;
370}
371static inline u32 pgsp_falcon_imemc_aincw_f(u32 v)
372{
373 return (v & 0x1U) << 24U;
374}
375static inline u32 pgsp_falcon_imemd_r(u32 i)
376{
377 return 0x00110184U + i*16U;
378}
379static inline u32 pgsp_falcon_imemt_r(u32 i)
380{
381 return 0x00110188U + i*16U;
382}
383static inline u32 pgsp_falcon_sctl_r(void)
384{
385 return 0x00110240U;
386}
387static inline u32 pgsp_falcon_mmu_phys_sec_r(void)
388{
389 return 0x00100ce4U;
390}
391static inline u32 pgsp_falcon_bootvec_r(void)
392{
393 return 0x00110104U;
394}
395static inline u32 pgsp_falcon_bootvec_vec_f(u32 v)
396{
397 return (v & 0xffffffffU) << 0U;
398}
399static inline u32 pgsp_falcon_dmactl_r(void)
400{
401 return 0x0011010cU;
402}
403static inline u32 pgsp_falcon_dmactl_dmem_scrubbing_m(void)
404{
405 return 0x1U << 1U;
406}
407static inline u32 pgsp_falcon_dmactl_imem_scrubbing_m(void)
408{
409 return 0x1U << 2U;
410}
411static inline u32 pgsp_falcon_dmactl_require_ctx_f(u32 v)
412{
413 return (v & 0x1U) << 0U;
414}
415static inline u32 pgsp_falcon_hwcfg_r(void)
416{
417 return 0x00110108U;
418}
419static inline u32 pgsp_falcon_hwcfg_imem_size_v(u32 r)
420{
421 return (r >> 0U) & 0x1ffU;
422}
423static inline u32 pgsp_falcon_hwcfg_dmem_size_v(u32 r)
424{
425 return (r >> 9U) & 0x1ffU;
426}
427static inline u32 pgsp_falcon_dmatrfbase_r(void)
428{
429 return 0x00110110U;
430}
431static inline u32 pgsp_falcon_dmatrfbase1_r(void)
432{
433 return 0x00110128U;
434}
435static inline u32 pgsp_falcon_dmatrfmoffs_r(void)
436{
437 return 0x00110114U;
438}
439static inline u32 pgsp_falcon_dmatrfcmd_r(void)
440{
441 return 0x00110118U;
442}
443static inline u32 pgsp_falcon_dmatrfcmd_imem_f(u32 v)
444{
445 return (v & 0x1U) << 4U;
446}
447static inline u32 pgsp_falcon_dmatrfcmd_write_f(u32 v)
448{
449 return (v & 0x1U) << 5U;
450}
451static inline u32 pgsp_falcon_dmatrfcmd_size_f(u32 v)
452{
453 return (v & 0x7U) << 8U;
454}
455static inline u32 pgsp_falcon_dmatrfcmd_ctxdma_f(u32 v)
456{
457 return (v & 0x7U) << 12U;
458}
459static inline u32 pgsp_falcon_dmatrffboffs_r(void)
460{
461 return 0x0011011cU;
462}
463static inline u32 pgsp_falcon_exterraddr_r(void)
464{
465 return 0x00110168U;
466}
467static inline u32 pgsp_falcon_exterrstat_r(void)
468{
469 return 0x0011016cU;
470}
471static inline u32 pgsp_falcon_exterrstat_valid_m(void)
472{
473 return 0x1U << 31U;
474}
475static inline u32 pgsp_falcon_exterrstat_valid_v(u32 r)
476{
477 return (r >> 31U) & 0x1U;
478}
479static inline u32 pgsp_falcon_exterrstat_valid_true_v(void)
480{
481 return 0x00000001U;
482}
483static inline u32 pgsp_sec2_falcon_icd_cmd_r(void)
484{
485 return 0x00110200U;
486}
487static inline u32 pgsp_sec2_falcon_icd_cmd_opc_s(void)
488{
489 return 4U;
490}
491static inline u32 pgsp_sec2_falcon_icd_cmd_opc_f(u32 v)
492{
493 return (v & 0xfU) << 0U;
494}
495static inline u32 pgsp_sec2_falcon_icd_cmd_opc_m(void)
496{
497 return 0xfU << 0U;
498}
499static inline u32 pgsp_sec2_falcon_icd_cmd_opc_v(u32 r)
500{
501 return (r >> 0U) & 0xfU;
502}
503static inline u32 pgsp_sec2_falcon_icd_cmd_opc_rreg_f(void)
504{
505 return 0x8U;
506}
507static inline u32 pgsp_sec2_falcon_icd_cmd_opc_rstat_f(void)
508{
509 return 0xeU;
510}
511static inline u32 pgsp_sec2_falcon_icd_cmd_idx_f(u32 v)
512{
513 return (v & 0x1fU) << 8U;
514}
515static inline u32 pgsp_sec2_falcon_icd_rdata_r(void)
516{
517 return 0x0011020cU;
518}
519static inline u32 pgsp_falcon_dmemc_r(u32 i)
520{
521 return 0x001101c0U + i*8U;
522}
523static inline u32 pgsp_falcon_dmemc_offs_f(u32 v)
524{
525 return (v & 0x3fU) << 2U;
526}
527static inline u32 pgsp_falcon_dmemc_offs_m(void)
528{
529 return 0x3fU << 2U;
530}
531static inline u32 pgsp_falcon_dmemc_blk_f(u32 v)
532{
533 return (v & 0xffU) << 8U;
534}
535static inline u32 pgsp_falcon_dmemc_blk_m(void)
536{
537 return 0xffU << 8U;
538}
539static inline u32 pgsp_falcon_dmemc_aincw_f(u32 v)
540{
541 return (v & 0x1U) << 24U;
542}
543static inline u32 pgsp_falcon_dmemc_aincr_f(u32 v)
544{
545 return (v & 0x1U) << 25U;
546}
547static inline u32 pgsp_falcon_dmemd_r(u32 i)
548{
549 return 0x001101c4U + i*8U;
550}
551static inline u32 pgsp_falcon_debug1_r(void)
552{
553 return 0x00110090U;
554}
555static inline u32 pgsp_falcon_debug1_ctxsw_mode_s(void)
556{
557 return 1U;
558}
559static inline u32 pgsp_falcon_debug1_ctxsw_mode_f(u32 v)
560{
561 return (v & 0x1U) << 16U;
562}
563static inline u32 pgsp_falcon_debug1_ctxsw_mode_m(void)
564{
565 return 0x1U << 16U;
566}
567static inline u32 pgsp_falcon_debug1_ctxsw_mode_v(u32 r)
568{
569 return (r >> 16U) & 0x1U;
570}
571static inline u32 pgsp_falcon_debug1_ctxsw_mode_init_f(void)
572{
573 return 0x0U;
574}
575static inline u32 pgsp_fbif_transcfg_r(u32 i)
576{
577 return 0x00110600U + i*4U;
578}
579static inline u32 pgsp_fbif_transcfg_target_local_fb_f(void)
580{
581 return 0x0U;
582}
583static inline u32 pgsp_fbif_transcfg_target_coherent_sysmem_f(void)
584{
585 return 0x1U;
586}
587static inline u32 pgsp_fbif_transcfg_target_noncoherent_sysmem_f(void)
588{
589 return 0x2U;
590}
591static inline u32 pgsp_fbif_transcfg_mem_type_s(void)
592{
593 return 1U;
594}
595static inline u32 pgsp_fbif_transcfg_mem_type_f(u32 v)
596{
597 return (v & 0x1U) << 2U;
598}
599static inline u32 pgsp_fbif_transcfg_mem_type_m(void)
600{
601 return 0x1U << 2U;
602}
603static inline u32 pgsp_fbif_transcfg_mem_type_v(u32 r)
604{
605 return (r >> 2U) & 0x1U;
606}
607static inline u32 pgsp_fbif_transcfg_mem_type_virtual_f(void)
608{
609 return 0x0U;
610}
611static inline u32 pgsp_fbif_transcfg_mem_type_physical_f(void)
612{
613 return 0x4U;
614}
615static inline u32 pgsp_falcon_engine_r(void)
616{
617 return 0x001103c0U;
618}
619static inline u32 pgsp_falcon_engine_reset_true_f(void)
620{
621 return 0x1U;
622}
623static inline u32 pgsp_falcon_engine_reset_false_f(void)
624{
625 return 0x0U;
626}
627static inline u32 pgsp_fbif_ctl_r(void)
628{
629 return 0x00110624U;
630}
631static inline u32 pgsp_fbif_ctl_allow_phys_no_ctx_init_f(void)
632{
633 return 0x0U;
634}
635static inline u32 pgsp_fbif_ctl_allow_phys_no_ctx_disallow_f(void)
636{
637 return 0x0U;
638}
639static inline u32 pgsp_fbif_ctl_allow_phys_no_ctx_allow_f(void)
640{
641 return 0x80U;
642}
643#endif
diff --git a/include/nvgpu/hw/gv100/hw_pram_gv100.h b/include/nvgpu/hw/gv100/hw_pram_gv100.h
deleted file mode 100644
index 8f005a2..0000000
--- a/include/nvgpu/hw/gv100/hw_pram_gv100.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pram_gv100_h_
57#define _hw_pram_gv100_h_
58
59static inline u32 pram_data032_r(u32 i)
60{
61 return 0x00700000U + i*4U;
62}
63#endif
diff --git a/include/nvgpu/hw/gv100/hw_pri_ringmaster_gv100.h b/include/nvgpu/hw/gv100/hw_pri_ringmaster_gv100.h
deleted file mode 100644
index 5eca93c..0000000
--- a/include/nvgpu/hw/gv100/hw_pri_ringmaster_gv100.h
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringmaster_gv100_h_
57#define _hw_pri_ringmaster_gv100_h_
58
59static inline u32 pri_ringmaster_command_r(void)
60{
61 return 0x0012004cU;
62}
63static inline u32 pri_ringmaster_command_cmd_m(void)
64{
65 return 0x3fU << 0U;
66}
67static inline u32 pri_ringmaster_command_cmd_v(u32 r)
68{
69 return (r >> 0U) & 0x3fU;
70}
71static inline u32 pri_ringmaster_command_cmd_no_cmd_v(void)
72{
73 return 0x00000000U;
74}
75static inline u32 pri_ringmaster_command_cmd_start_ring_f(void)
76{
77 return 0x1U;
78}
79static inline u32 pri_ringmaster_command_cmd_ack_interrupt_f(void)
80{
81 return 0x2U;
82}
83static inline u32 pri_ringmaster_command_cmd_enumerate_stations_f(void)
84{
85 return 0x3U;
86}
87static inline u32 pri_ringmaster_command_cmd_enumerate_stations_bc_grp_all_f(void)
88{
89 return 0x0U;
90}
91static inline u32 pri_ringmaster_command_data_r(void)
92{
93 return 0x00120048U;
94}
95static inline u32 pri_ringmaster_start_results_r(void)
96{
97 return 0x00120050U;
98}
99static inline u32 pri_ringmaster_start_results_connectivity_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 pri_ringmaster_start_results_connectivity_pass_v(void)
104{
105 return 0x00000001U;
106}
107static inline u32 pri_ringmaster_intr_status0_r(void)
108{
109 return 0x00120058U;
110}
111static inline u32 pri_ringmaster_intr_status0_ring_start_conn_fault_v(u32 r)
112{
113 return (r >> 0U) & 0x1U;
114}
115static inline u32 pri_ringmaster_intr_status0_disconnect_fault_v(u32 r)
116{
117 return (r >> 1U) & 0x1U;
118}
119static inline u32 pri_ringmaster_intr_status0_overflow_fault_v(u32 r)
120{
121 return (r >> 2U) & 0x1U;
122}
123static inline u32 pri_ringmaster_intr_status0_gbl_write_error_sys_v(u32 r)
124{
125 return (r >> 8U) & 0x1U;
126}
127static inline u32 pri_ringmaster_intr_status1_r(void)
128{
129 return 0x0012005cU;
130}
131static inline u32 pri_ringmaster_global_ctl_r(void)
132{
133 return 0x00120060U;
134}
135static inline u32 pri_ringmaster_global_ctl_ring_reset_asserted_f(void)
136{
137 return 0x1U;
138}
139static inline u32 pri_ringmaster_global_ctl_ring_reset_deasserted_f(void)
140{
141 return 0x0U;
142}
143static inline u32 pri_ringmaster_enum_fbp_r(void)
144{
145 return 0x00120074U;
146}
147static inline u32 pri_ringmaster_enum_fbp_count_v(u32 r)
148{
149 return (r >> 0U) & 0x1fU;
150}
151static inline u32 pri_ringmaster_enum_gpc_r(void)
152{
153 return 0x00120078U;
154}
155static inline u32 pri_ringmaster_enum_gpc_count_v(u32 r)
156{
157 return (r >> 0U) & 0x1fU;
158}
159static inline u32 pri_ringmaster_enum_ltc_r(void)
160{
161 return 0x0012006cU;
162}
163static inline u32 pri_ringmaster_enum_ltc_count_v(u32 r)
164{
165 return (r >> 0U) & 0x1fU;
166}
167#endif
diff --git a/include/nvgpu/hw/gv100/hw_pri_ringstation_gpc_gv100.h b/include/nvgpu/hw/gv100/hw_pri_ringstation_gpc_gv100.h
deleted file mode 100644
index fc522d5..0000000
--- a/include/nvgpu/hw/gv100/hw_pri_ringstation_gpc_gv100.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_gpc_gv100_h_
57#define _hw_pri_ringstation_gpc_gv100_h_
58
59static inline u32 pri_ringstation_gpc_master_config_r(u32 i)
60{
61 return 0x00128300U + i*4U;
62}
63static inline u32 pri_ringstation_gpc_gpc0_priv_error_adr_r(void)
64{
65 return 0x00128120U;
66}
67static inline u32 pri_ringstation_gpc_gpc0_priv_error_wrdat_r(void)
68{
69 return 0x00128124U;
70}
71static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_r(void)
72{
73 return 0x00128128U;
74}
75static inline u32 pri_ringstation_gpc_gpc0_priv_error_code_r(void)
76{
77 return 0x0012812cU;
78}
79#endif
diff --git a/include/nvgpu/hw/gv100/hw_pri_ringstation_sys_gv100.h b/include/nvgpu/hw/gv100/hw_pri_ringstation_sys_gv100.h
deleted file mode 100644
index 885ea30..0000000
--- a/include/nvgpu/hw/gv100/hw_pri_ringstation_sys_gv100.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_sys_gv100_h_
57#define _hw_pri_ringstation_sys_gv100_h_
58
59static inline u32 pri_ringstation_sys_master_config_r(u32 i)
60{
61 return 0x00122300U + i*4U;
62}
63static inline u32 pri_ringstation_sys_decode_config_r(void)
64{
65 return 0x00122204U;
66}
67static inline u32 pri_ringstation_sys_decode_config_ring_m(void)
68{
69 return 0x7U << 0U;
70}
71static inline u32 pri_ringstation_sys_decode_config_ring_drop_on_ring_not_started_f(void)
72{
73 return 0x1U;
74}
75static inline u32 pri_ringstation_sys_priv_error_adr_r(void)
76{
77 return 0x00122120U;
78}
79static inline u32 pri_ringstation_sys_priv_error_wrdat_r(void)
80{
81 return 0x00122124U;
82}
83static inline u32 pri_ringstation_sys_priv_error_info_r(void)
84{
85 return 0x00122128U;
86}
87static inline u32 pri_ringstation_sys_priv_error_code_r(void)
88{
89 return 0x0012212cU;
90}
91#endif
diff --git a/include/nvgpu/hw/gv100/hw_proj_gv100.h b/include/nvgpu/hw/gv100/hw_proj_gv100.h
deleted file mode 100644
index f46eaa0..0000000
--- a/include/nvgpu/hw/gv100/hw_proj_gv100.h
+++ /dev/null
@@ -1,199 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_proj_gv100_h_
57#define _hw_proj_gv100_h_
58
59static inline u32 proj_gpc_base_v(void)
60{
61 return 0x00500000U;
62}
63static inline u32 proj_gpc_shared_base_v(void)
64{
65 return 0x00418000U;
66}
67static inline u32 proj_gpc_stride_v(void)
68{
69 return 0x00008000U;
70}
71static inline u32 proj_gpc_priv_stride_v(void)
72{
73 return 0x00000800U;
74}
75static inline u32 proj_ltc_stride_v(void)
76{
77 return 0x00002000U;
78}
79static inline u32 proj_lts_stride_v(void)
80{
81 return 0x00000200U;
82}
83static inline u32 proj_fbpa_base_v(void)
84{
85 return 0x00900000U;
86}
87static inline u32 proj_fbpa_shared_base_v(void)
88{
89 return 0x009a0000U;
90}
91static inline u32 proj_fbpa_stride_v(void)
92{
93 return 0x00004000U;
94}
95static inline u32 proj_ppc_in_gpc_base_v(void)
96{
97 return 0x00003000U;
98}
99static inline u32 proj_ppc_in_gpc_shared_base_v(void)
100{
101 return 0x00003e00U;
102}
103static inline u32 proj_ppc_in_gpc_stride_v(void)
104{
105 return 0x00000200U;
106}
107static inline u32 proj_rop_base_v(void)
108{
109 return 0x00410000U;
110}
111static inline u32 proj_rop_shared_base_v(void)
112{
113 return 0x00408800U;
114}
115static inline u32 proj_rop_stride_v(void)
116{
117 return 0x00000400U;
118}
119static inline u32 proj_tpc_in_gpc_base_v(void)
120{
121 return 0x00004000U;
122}
123static inline u32 proj_tpc_in_gpc_stride_v(void)
124{
125 return 0x00000800U;
126}
127static inline u32 proj_tpc_in_gpc_shared_base_v(void)
128{
129 return 0x00001800U;
130}
131static inline u32 proj_smpc_base_v(void)
132{
133 return 0x00000200U;
134}
135static inline u32 proj_smpc_shared_base_v(void)
136{
137 return 0x00000300U;
138}
139static inline u32 proj_smpc_unique_base_v(void)
140{
141 return 0x00000600U;
142}
143static inline u32 proj_smpc_stride_v(void)
144{
145 return 0x00000100U;
146}
147static inline u32 proj_host_num_engines_v(void)
148{
149 return 0x0000000fU;
150}
151static inline u32 proj_host_num_pbdma_v(void)
152{
153 return 0x0000000eU;
154}
155static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void)
156{
157 return 0x00000007U;
158}
159static inline u32 proj_scal_litter_num_fbps_v(void)
160{
161 return 0x00000008U;
162}
163static inline u32 proj_scal_litter_num_fbpas_v(void)
164{
165 return 0x00000010U;
166}
167static inline u32 proj_scal_litter_num_gpcs_v(void)
168{
169 return 0x00000006U;
170}
171static inline u32 proj_scal_litter_num_pes_per_gpc_v(void)
172{
173 return 0x00000003U;
174}
175static inline u32 proj_scal_litter_num_tpcs_per_pes_v(void)
176{
177 return 0x00000003U;
178}
179static inline u32 proj_scal_litter_num_zcull_banks_v(void)
180{
181 return 0x00000004U;
182}
183static inline u32 proj_scal_litter_num_sm_per_tpc_v(void)
184{
185 return 0x00000002U;
186}
187static inline u32 proj_scal_max_gpcs_v(void)
188{
189 return 0x00000020U;
190}
191static inline u32 proj_scal_max_tpc_per_gpc_v(void)
192{
193 return 0x00000008U;
194}
195static inline u32 proj_sm_stride_v(void)
196{
197 return 0x00000080U;
198}
199#endif
diff --git a/include/nvgpu/hw/gv100/hw_pwr_gv100.h b/include/nvgpu/hw/gv100/hw_pwr_gv100.h
deleted file mode 100644
index c719226..0000000
--- a/include/nvgpu/hw/gv100/hw_pwr_gv100.h
+++ /dev/null
@@ -1,983 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pwr_gv100_h_
57#define _hw_pwr_gv100_h_
58
59static inline u32 pwr_falcon_irqsset_r(void)
60{
61 return 0x0010a000U;
62}
63static inline u32 pwr_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 pwr_falcon_irqsclr_r(void)
68{
69 return 0x0010a004U;
70}
71static inline u32 pwr_falcon_irqstat_r(void)
72{
73 return 0x0010a008U;
74}
75static inline u32 pwr_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 pwr_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 pwr_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 pwr_falcon_irqstat_ext_second_true_f(void)
88{
89 return 0x800U;
90}
91static inline u32 pwr_falcon_irqmode_r(void)
92{
93 return 0x0010a00cU;
94}
95static inline u32 pwr_falcon_irqmset_r(void)
96{
97 return 0x0010a010U;
98}
99static inline u32 pwr_falcon_irqmset_gptmr_f(u32 v)
100{
101 return (v & 0x1U) << 0U;
102}
103static inline u32 pwr_falcon_irqmset_wdtmr_f(u32 v)
104{
105 return (v & 0x1U) << 1U;
106}
107static inline u32 pwr_falcon_irqmset_mthd_f(u32 v)
108{
109 return (v & 0x1U) << 2U;
110}
111static inline u32 pwr_falcon_irqmset_ctxsw_f(u32 v)
112{
113 return (v & 0x1U) << 3U;
114}
115static inline u32 pwr_falcon_irqmset_halt_f(u32 v)
116{
117 return (v & 0x1U) << 4U;
118}
119static inline u32 pwr_falcon_irqmset_exterr_f(u32 v)
120{
121 return (v & 0x1U) << 5U;
122}
123static inline u32 pwr_falcon_irqmset_swgen0_f(u32 v)
124{
125 return (v & 0x1U) << 6U;
126}
127static inline u32 pwr_falcon_irqmset_swgen1_f(u32 v)
128{
129 return (v & 0x1U) << 7U;
130}
131static inline u32 pwr_falcon_irqmset_ext_f(u32 v)
132{
133 return (v & 0xffU) << 8U;
134}
135static inline u32 pwr_falcon_irqmset_ext_ctxe_f(u32 v)
136{
137 return (v & 0x1U) << 8U;
138}
139static inline u32 pwr_falcon_irqmset_ext_limitv_f(u32 v)
140{
141 return (v & 0x1U) << 9U;
142}
143static inline u32 pwr_falcon_irqmset_ext_second_f(u32 v)
144{
145 return (v & 0x1U) << 11U;
146}
147static inline u32 pwr_falcon_irqmset_ext_therm_f(u32 v)
148{
149 return (v & 0x1U) << 12U;
150}
151static inline u32 pwr_falcon_irqmset_ext_miscio_f(u32 v)
152{
153 return (v & 0x1U) << 13U;
154}
155static inline u32 pwr_falcon_irqmset_ext_rttimer_f(u32 v)
156{
157 return (v & 0x1U) << 14U;
158}
159static inline u32 pwr_falcon_irqmclr_r(void)
160{
161 return 0x0010a014U;
162}
163static inline u32 pwr_falcon_irqmclr_gptmr_f(u32 v)
164{
165 return (v & 0x1U) << 0U;
166}
167static inline u32 pwr_falcon_irqmclr_wdtmr_f(u32 v)
168{
169 return (v & 0x1U) << 1U;
170}
171static inline u32 pwr_falcon_irqmclr_mthd_f(u32 v)
172{
173 return (v & 0x1U) << 2U;
174}
175static inline u32 pwr_falcon_irqmclr_ctxsw_f(u32 v)
176{
177 return (v & 0x1U) << 3U;
178}
179static inline u32 pwr_falcon_irqmclr_halt_f(u32 v)
180{
181 return (v & 0x1U) << 4U;
182}
183static inline u32 pwr_falcon_irqmclr_exterr_f(u32 v)
184{
185 return (v & 0x1U) << 5U;
186}
187static inline u32 pwr_falcon_irqmclr_swgen0_f(u32 v)
188{
189 return (v & 0x1U) << 6U;
190}
191static inline u32 pwr_falcon_irqmclr_swgen1_f(u32 v)
192{
193 return (v & 0x1U) << 7U;
194}
195static inline u32 pwr_falcon_irqmclr_ext_f(u32 v)
196{
197 return (v & 0xffU) << 8U;
198}
199static inline u32 pwr_falcon_irqmclr_ext_ctxe_f(u32 v)
200{
201 return (v & 0x1U) << 8U;
202}
203static inline u32 pwr_falcon_irqmclr_ext_limitv_f(u32 v)
204{
205 return (v & 0x1U) << 9U;
206}
207static inline u32 pwr_falcon_irqmclr_ext_second_f(u32 v)
208{
209 return (v & 0x1U) << 11U;
210}
211static inline u32 pwr_falcon_irqmclr_ext_therm_f(u32 v)
212{
213 return (v & 0x1U) << 12U;
214}
215static inline u32 pwr_falcon_irqmclr_ext_miscio_f(u32 v)
216{
217 return (v & 0x1U) << 13U;
218}
219static inline u32 pwr_falcon_irqmclr_ext_rttimer_f(u32 v)
220{
221 return (v & 0x1U) << 14U;
222}
223static inline u32 pwr_falcon_irqmask_r(void)
224{
225 return 0x0010a018U;
226}
227static inline u32 pwr_falcon_irqdest_r(void)
228{
229 return 0x0010a01cU;
230}
231static inline u32 pwr_falcon_irqdest_host_gptmr_f(u32 v)
232{
233 return (v & 0x1U) << 0U;
234}
235static inline u32 pwr_falcon_irqdest_host_wdtmr_f(u32 v)
236{
237 return (v & 0x1U) << 1U;
238}
239static inline u32 pwr_falcon_irqdest_host_mthd_f(u32 v)
240{
241 return (v & 0x1U) << 2U;
242}
243static inline u32 pwr_falcon_irqdest_host_ctxsw_f(u32 v)
244{
245 return (v & 0x1U) << 3U;
246}
247static inline u32 pwr_falcon_irqdest_host_halt_f(u32 v)
248{
249 return (v & 0x1U) << 4U;
250}
251static inline u32 pwr_falcon_irqdest_host_exterr_f(u32 v)
252{
253 return (v & 0x1U) << 5U;
254}
255static inline u32 pwr_falcon_irqdest_host_swgen0_f(u32 v)
256{
257 return (v & 0x1U) << 6U;
258}
259static inline u32 pwr_falcon_irqdest_host_swgen1_f(u32 v)
260{
261 return (v & 0x1U) << 7U;
262}
263static inline u32 pwr_falcon_irqdest_host_ext_f(u32 v)
264{
265 return (v & 0xffU) << 8U;
266}
267static inline u32 pwr_falcon_irqdest_host_ext_ctxe_f(u32 v)
268{
269 return (v & 0x1U) << 8U;
270}
271static inline u32 pwr_falcon_irqdest_host_ext_limitv_f(u32 v)
272{
273 return (v & 0x1U) << 9U;
274}
275static inline u32 pwr_falcon_irqdest_host_ext_second_f(u32 v)
276{
277 return (v & 0x1U) << 11U;
278}
279static inline u32 pwr_falcon_irqdest_host_ext_therm_f(u32 v)
280{
281 return (v & 0x1U) << 12U;
282}
283static inline u32 pwr_falcon_irqdest_host_ext_miscio_f(u32 v)
284{
285 return (v & 0x1U) << 13U;
286}
287static inline u32 pwr_falcon_irqdest_host_ext_rttimer_f(u32 v)
288{
289 return (v & 0x1U) << 14U;
290}
291static inline u32 pwr_falcon_irqdest_target_gptmr_f(u32 v)
292{
293 return (v & 0x1U) << 16U;
294}
295static inline u32 pwr_falcon_irqdest_target_wdtmr_f(u32 v)
296{
297 return (v & 0x1U) << 17U;
298}
299static inline u32 pwr_falcon_irqdest_target_mthd_f(u32 v)
300{
301 return (v & 0x1U) << 18U;
302}
303static inline u32 pwr_falcon_irqdest_target_ctxsw_f(u32 v)
304{
305 return (v & 0x1U) << 19U;
306}
307static inline u32 pwr_falcon_irqdest_target_halt_f(u32 v)
308{
309 return (v & 0x1U) << 20U;
310}
311static inline u32 pwr_falcon_irqdest_target_exterr_f(u32 v)
312{
313 return (v & 0x1U) << 21U;
314}
315static inline u32 pwr_falcon_irqdest_target_swgen0_f(u32 v)
316{
317 return (v & 0x1U) << 22U;
318}
319static inline u32 pwr_falcon_irqdest_target_swgen1_f(u32 v)
320{
321 return (v & 0x1U) << 23U;
322}
323static inline u32 pwr_falcon_irqdest_target_ext_f(u32 v)
324{
325 return (v & 0xffU) << 24U;
326}
327static inline u32 pwr_falcon_irqdest_target_ext_ctxe_f(u32 v)
328{
329 return (v & 0x1U) << 24U;
330}
331static inline u32 pwr_falcon_irqdest_target_ext_limitv_f(u32 v)
332{
333 return (v & 0x1U) << 25U;
334}
335static inline u32 pwr_falcon_irqdest_target_ext_second_f(u32 v)
336{
337 return (v & 0x1U) << 27U;
338}
339static inline u32 pwr_falcon_irqdest_target_ext_therm_f(u32 v)
340{
341 return (v & 0x1U) << 28U;
342}
343static inline u32 pwr_falcon_irqdest_target_ext_miscio_f(u32 v)
344{
345 return (v & 0x1U) << 29U;
346}
347static inline u32 pwr_falcon_irqdest_target_ext_rttimer_f(u32 v)
348{
349 return (v & 0x1U) << 30U;
350}
351static inline u32 pwr_falcon_curctx_r(void)
352{
353 return 0x0010a050U;
354}
355static inline u32 pwr_falcon_nxtctx_r(void)
356{
357 return 0x0010a054U;
358}
359static inline u32 pwr_falcon_mailbox0_r(void)
360{
361 return 0x0010a040U;
362}
363static inline u32 pwr_falcon_mailbox1_r(void)
364{
365 return 0x0010a044U;
366}
367static inline u32 pwr_falcon_itfen_r(void)
368{
369 return 0x0010a048U;
370}
371static inline u32 pwr_falcon_itfen_ctxen_enable_f(void)
372{
373 return 0x1U;
374}
375static inline u32 pwr_falcon_idlestate_r(void)
376{
377 return 0x0010a04cU;
378}
379static inline u32 pwr_falcon_idlestate_falcon_busy_v(u32 r)
380{
381 return (r >> 0U) & 0x1U;
382}
383static inline u32 pwr_falcon_idlestate_ext_busy_v(u32 r)
384{
385 return (r >> 1U) & 0x7fffU;
386}
387static inline u32 pwr_falcon_os_r(void)
388{
389 return 0x0010a080U;
390}
391static inline u32 pwr_falcon_engctl_r(void)
392{
393 return 0x0010a0a4U;
394}
395static inline u32 pwr_falcon_cpuctl_r(void)
396{
397 return 0x0010a100U;
398}
399static inline u32 pwr_falcon_cpuctl_startcpu_f(u32 v)
400{
401 return (v & 0x1U) << 1U;
402}
403static inline u32 pwr_falcon_cpuctl_halt_intr_f(u32 v)
404{
405 return (v & 0x1U) << 4U;
406}
407static inline u32 pwr_falcon_cpuctl_halt_intr_m(void)
408{
409 return 0x1U << 4U;
410}
411static inline u32 pwr_falcon_cpuctl_halt_intr_v(u32 r)
412{
413 return (r >> 4U) & 0x1U;
414}
415static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
416{
417 return (v & 0x1U) << 6U;
418}
419static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_m(void)
420{
421 return 0x1U << 6U;
422}
423static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
424{
425 return (r >> 6U) & 0x1U;
426}
427static inline u32 pwr_falcon_cpuctl_alias_r(void)
428{
429 return 0x0010a130U;
430}
431static inline u32 pwr_falcon_cpuctl_alias_startcpu_f(u32 v)
432{
433 return (v & 0x1U) << 1U;
434}
435static inline u32 pwr_pmu_scpctl_stat_r(void)
436{
437 return 0x0010ac08U;
438}
439static inline u32 pwr_pmu_scpctl_stat_debug_mode_f(u32 v)
440{
441 return (v & 0x1U) << 20U;
442}
443static inline u32 pwr_pmu_scpctl_stat_debug_mode_m(void)
444{
445 return 0x1U << 20U;
446}
447static inline u32 pwr_pmu_scpctl_stat_debug_mode_v(u32 r)
448{
449 return (r >> 20U) & 0x1U;
450}
451static inline u32 pwr_falcon_imemc_r(u32 i)
452{
453 return 0x0010a180U + i*16U;
454}
455static inline u32 pwr_falcon_imemc_offs_f(u32 v)
456{
457 return (v & 0x3fU) << 2U;
458}
459static inline u32 pwr_falcon_imemc_blk_f(u32 v)
460{
461 return (v & 0xffU) << 8U;
462}
463static inline u32 pwr_falcon_imemc_aincw_f(u32 v)
464{
465 return (v & 0x1U) << 24U;
466}
467static inline u32 pwr_falcon_imemd_r(u32 i)
468{
469 return 0x0010a184U + i*16U;
470}
471static inline u32 pwr_falcon_imemt_r(u32 i)
472{
473 return 0x0010a188U + i*16U;
474}
475static inline u32 pwr_falcon_sctl_r(void)
476{
477 return 0x0010a240U;
478}
479static inline u32 pwr_falcon_mmu_phys_sec_r(void)
480{
481 return 0x00100ce4U;
482}
483static inline u32 pwr_falcon_bootvec_r(void)
484{
485 return 0x0010a104U;
486}
487static inline u32 pwr_falcon_bootvec_vec_f(u32 v)
488{
489 return (v & 0xffffffffU) << 0U;
490}
491static inline u32 pwr_falcon_dmactl_r(void)
492{
493 return 0x0010a10cU;
494}
495static inline u32 pwr_falcon_dmactl_dmem_scrubbing_m(void)
496{
497 return 0x1U << 1U;
498}
499static inline u32 pwr_falcon_dmactl_imem_scrubbing_m(void)
500{
501 return 0x1U << 2U;
502}
503static inline u32 pwr_falcon_hwcfg_r(void)
504{
505 return 0x0010a108U;
506}
507static inline u32 pwr_falcon_hwcfg_imem_size_v(u32 r)
508{
509 return (r >> 0U) & 0x1ffU;
510}
511static inline u32 pwr_falcon_hwcfg_dmem_size_v(u32 r)
512{
513 return (r >> 9U) & 0x1ffU;
514}
515static inline u32 pwr_falcon_dmatrfbase_r(void)
516{
517 return 0x0010a110U;
518}
519static inline u32 pwr_falcon_dmatrfbase1_r(void)
520{
521 return 0x0010a128U;
522}
523static inline u32 pwr_falcon_dmatrfmoffs_r(void)
524{
525 return 0x0010a114U;
526}
527static inline u32 pwr_falcon_dmatrfcmd_r(void)
528{
529 return 0x0010a118U;
530}
531static inline u32 pwr_falcon_dmatrfcmd_imem_f(u32 v)
532{
533 return (v & 0x1U) << 4U;
534}
535static inline u32 pwr_falcon_dmatrfcmd_write_f(u32 v)
536{
537 return (v & 0x1U) << 5U;
538}
539static inline u32 pwr_falcon_dmatrfcmd_size_f(u32 v)
540{
541 return (v & 0x7U) << 8U;
542}
543static inline u32 pwr_falcon_dmatrfcmd_ctxdma_f(u32 v)
544{
545 return (v & 0x7U) << 12U;
546}
547static inline u32 pwr_falcon_dmatrffboffs_r(void)
548{
549 return 0x0010a11cU;
550}
551static inline u32 pwr_falcon_exterraddr_r(void)
552{
553 return 0x0010a168U;
554}
555static inline u32 pwr_falcon_exterrstat_r(void)
556{
557 return 0x0010a16cU;
558}
559static inline u32 pwr_falcon_exterrstat_valid_m(void)
560{
561 return 0x1U << 31U;
562}
563static inline u32 pwr_falcon_exterrstat_valid_v(u32 r)
564{
565 return (r >> 31U) & 0x1U;
566}
567static inline u32 pwr_falcon_exterrstat_valid_true_v(void)
568{
569 return 0x00000001U;
570}
571static inline u32 pwr_pmu_falcon_icd_cmd_r(void)
572{
573 return 0x0010a200U;
574}
575static inline u32 pwr_pmu_falcon_icd_cmd_opc_s(void)
576{
577 return 4U;
578}
579static inline u32 pwr_pmu_falcon_icd_cmd_opc_f(u32 v)
580{
581 return (v & 0xfU) << 0U;
582}
583static inline u32 pwr_pmu_falcon_icd_cmd_opc_m(void)
584{
585 return 0xfU << 0U;
586}
587static inline u32 pwr_pmu_falcon_icd_cmd_opc_v(u32 r)
588{
589 return (r >> 0U) & 0xfU;
590}
591static inline u32 pwr_pmu_falcon_icd_cmd_opc_rreg_f(void)
592{
593 return 0x8U;
594}
595static inline u32 pwr_pmu_falcon_icd_cmd_opc_rstat_f(void)
596{
597 return 0xeU;
598}
599static inline u32 pwr_pmu_falcon_icd_cmd_idx_f(u32 v)
600{
601 return (v & 0x1fU) << 8U;
602}
603static inline u32 pwr_pmu_falcon_icd_rdata_r(void)
604{
605 return 0x0010a20cU;
606}
607static inline u32 pwr_falcon_dmemc_r(u32 i)
608{
609 return 0x0010a1c0U + i*8U;
610}
611static inline u32 pwr_falcon_dmemc_offs_f(u32 v)
612{
613 return (v & 0x3fU) << 2U;
614}
615static inline u32 pwr_falcon_dmemc_offs_m(void)
616{
617 return 0x3fU << 2U;
618}
619static inline u32 pwr_falcon_dmemc_blk_f(u32 v)
620{
621 return (v & 0xffU) << 8U;
622}
623static inline u32 pwr_falcon_dmemc_blk_m(void)
624{
625 return 0xffU << 8U;
626}
627static inline u32 pwr_falcon_dmemc_aincw_f(u32 v)
628{
629 return (v & 0x1U) << 24U;
630}
631static inline u32 pwr_falcon_dmemc_aincr_f(u32 v)
632{
633 return (v & 0x1U) << 25U;
634}
635static inline u32 pwr_falcon_dmemd_r(u32 i)
636{
637 return 0x0010a1c4U + i*8U;
638}
639static inline u32 pwr_pmu_new_instblk_r(void)
640{
641 return 0x0010a480U;
642}
643static inline u32 pwr_pmu_new_instblk_ptr_f(u32 v)
644{
645 return (v & 0xfffffffU) << 0U;
646}
647static inline u32 pwr_pmu_new_instblk_target_fb_f(void)
648{
649 return 0x0U;
650}
651static inline u32 pwr_pmu_new_instblk_target_sys_coh_f(void)
652{
653 return 0x20000000U;
654}
655static inline u32 pwr_pmu_new_instblk_target_sys_ncoh_f(void)
656{
657 return 0x30000000U;
658}
659static inline u32 pwr_pmu_new_instblk_valid_f(u32 v)
660{
661 return (v & 0x1U) << 30U;
662}
663static inline u32 pwr_pmu_mutex_id_r(void)
664{
665 return 0x0010a488U;
666}
667static inline u32 pwr_pmu_mutex_id_value_v(u32 r)
668{
669 return (r >> 0U) & 0xffU;
670}
671static inline u32 pwr_pmu_mutex_id_value_init_v(void)
672{
673 return 0x00000000U;
674}
675static inline u32 pwr_pmu_mutex_id_value_not_avail_v(void)
676{
677 return 0x000000ffU;
678}
679static inline u32 pwr_pmu_mutex_id_release_r(void)
680{
681 return 0x0010a48cU;
682}
683static inline u32 pwr_pmu_mutex_id_release_value_f(u32 v)
684{
685 return (v & 0xffU) << 0U;
686}
687static inline u32 pwr_pmu_mutex_id_release_value_m(void)
688{
689 return 0xffU << 0U;
690}
691static inline u32 pwr_pmu_mutex_id_release_value_init_v(void)
692{
693 return 0x00000000U;
694}
695static inline u32 pwr_pmu_mutex_id_release_value_init_f(void)
696{
697 return 0x0U;
698}
699static inline u32 pwr_pmu_mutex_r(u32 i)
700{
701 return 0x0010a580U + i*4U;
702}
703static inline u32 pwr_pmu_mutex__size_1_v(void)
704{
705 return 0x00000010U;
706}
707static inline u32 pwr_pmu_mutex_value_f(u32 v)
708{
709 return (v & 0xffU) << 0U;
710}
711static inline u32 pwr_pmu_mutex_value_v(u32 r)
712{
713 return (r >> 0U) & 0xffU;
714}
715static inline u32 pwr_pmu_mutex_value_initial_lock_f(void)
716{
717 return 0x0U;
718}
719static inline u32 pwr_pmu_queue_head_r(u32 i)
720{
721 return 0x0010a800U + i*4U;
722}
723static inline u32 pwr_pmu_queue_head__size_1_v(void)
724{
725 return 0x00000008U;
726}
727static inline u32 pwr_pmu_queue_head_address_f(u32 v)
728{
729 return (v & 0xffffffffU) << 0U;
730}
731static inline u32 pwr_pmu_queue_head_address_v(u32 r)
732{
733 return (r >> 0U) & 0xffffffffU;
734}
735static inline u32 pwr_pmu_queue_tail_r(u32 i)
736{
737 return 0x0010a820U + i*4U;
738}
739static inline u32 pwr_pmu_queue_tail__size_1_v(void)
740{
741 return 0x00000008U;
742}
743static inline u32 pwr_pmu_queue_tail_address_f(u32 v)
744{
745 return (v & 0xffffffffU) << 0U;
746}
747static inline u32 pwr_pmu_queue_tail_address_v(u32 r)
748{
749 return (r >> 0U) & 0xffffffffU;
750}
751static inline u32 pwr_pmu_msgq_head_r(void)
752{
753 return 0x0010a4c8U;
754}
755static inline u32 pwr_pmu_msgq_head_val_f(u32 v)
756{
757 return (v & 0xffffffffU) << 0U;
758}
759static inline u32 pwr_pmu_msgq_head_val_v(u32 r)
760{
761 return (r >> 0U) & 0xffffffffU;
762}
763static inline u32 pwr_pmu_msgq_tail_r(void)
764{
765 return 0x0010a4ccU;
766}
767static inline u32 pwr_pmu_msgq_tail_val_f(u32 v)
768{
769 return (v & 0xffffffffU) << 0U;
770}
771static inline u32 pwr_pmu_msgq_tail_val_v(u32 r)
772{
773 return (r >> 0U) & 0xffffffffU;
774}
775static inline u32 pwr_pmu_idle_mask_r(u32 i)
776{
777 return 0x0010a504U + i*16U;
778}
779static inline u32 pwr_pmu_idle_mask_gr_enabled_f(void)
780{
781 return 0x1U;
782}
783static inline u32 pwr_pmu_idle_mask_ce_2_enabled_f(void)
784{
785 return 0x200000U;
786}
787static inline u32 pwr_pmu_idle_count_r(u32 i)
788{
789 return 0x0010a508U + i*16U;
790}
791static inline u32 pwr_pmu_idle_count_value_f(u32 v)
792{
793 return (v & 0x7fffffffU) << 0U;
794}
795static inline u32 pwr_pmu_idle_count_value_v(u32 r)
796{
797 return (r >> 0U) & 0x7fffffffU;
798}
799static inline u32 pwr_pmu_idle_count_reset_f(u32 v)
800{
801 return (v & 0x1U) << 31U;
802}
803static inline u32 pwr_pmu_idle_ctrl_r(u32 i)
804{
805 return 0x0010a50cU + i*16U;
806}
807static inline u32 pwr_pmu_idle_ctrl_value_m(void)
808{
809 return 0x3U << 0U;
810}
811static inline u32 pwr_pmu_idle_ctrl_value_busy_f(void)
812{
813 return 0x2U;
814}
815static inline u32 pwr_pmu_idle_ctrl_value_always_f(void)
816{
817 return 0x3U;
818}
819static inline u32 pwr_pmu_idle_ctrl_filter_m(void)
820{
821 return 0x1U << 2U;
822}
823static inline u32 pwr_pmu_idle_ctrl_filter_disabled_f(void)
824{
825 return 0x0U;
826}
827static inline u32 pwr_pmu_idle_threshold_r(u32 i)
828{
829 return 0x0010a8a0U + i*4U;
830}
831static inline u32 pwr_pmu_idle_threshold_value_f(u32 v)
832{
833 return (v & 0x7fffffffU) << 0U;
834}
835static inline u32 pwr_pmu_idle_intr_r(void)
836{
837 return 0x0010a9e8U;
838}
839static inline u32 pwr_pmu_idle_intr_en_f(u32 v)
840{
841 return (v & 0x1U) << 0U;
842}
843static inline u32 pwr_pmu_idle_intr_en_disabled_v(void)
844{
845 return 0x00000000U;
846}
847static inline u32 pwr_pmu_idle_intr_en_enabled_v(void)
848{
849 return 0x00000001U;
850}
851static inline u32 pwr_pmu_idle_intr_status_r(void)
852{
853 return 0x0010a9ecU;
854}
855static inline u32 pwr_pmu_idle_intr_status_intr_f(u32 v)
856{
857 return (v & 0x1U) << 0U;
858}
859static inline u32 pwr_pmu_idle_intr_status_intr_m(void)
860{
861 return U32(0x1U) << 0U;
862}
863static inline u32 pwr_pmu_idle_intr_status_intr_v(u32 r)
864{
865 return (r >> 0U) & 0x1U;
866}
867static inline u32 pwr_pmu_idle_intr_status_intr_pending_v(void)
868{
869 return 0x00000001U;
870}
871static inline u32 pwr_pmu_idle_intr_status_intr_clear_v(void)
872{
873 return 0x00000001U;
874}
875static inline u32 pwr_pmu_idle_mask_supp_r(u32 i)
876{
877 return 0x0010a9f0U + i*8U;
878}
879static inline u32 pwr_pmu_idle_mask_1_supp_r(u32 i)
880{
881 return 0x0010a9f4U + i*8U;
882}
883static inline u32 pwr_pmu_idle_ctrl_supp_r(u32 i)
884{
885 return 0x0010aa30U + i*8U;
886}
887static inline u32 pwr_pmu_debug_r(u32 i)
888{
889 return 0x0010a5c0U + i*4U;
890}
891static inline u32 pwr_pmu_debug__size_1_v(void)
892{
893 return 0x00000004U;
894}
895static inline u32 pwr_pmu_mailbox_r(u32 i)
896{
897 return 0x0010a450U + i*4U;
898}
899static inline u32 pwr_pmu_mailbox__size_1_v(void)
900{
901 return 0x0000000cU;
902}
903static inline u32 pwr_pmu_bar0_addr_r(void)
904{
905 return 0x0010a7a0U;
906}
907static inline u32 pwr_pmu_bar0_data_r(void)
908{
909 return 0x0010a7a4U;
910}
911static inline u32 pwr_pmu_bar0_ctl_r(void)
912{
913 return 0x0010a7acU;
914}
915static inline u32 pwr_pmu_bar0_timeout_r(void)
916{
917 return 0x0010a7a8U;
918}
919static inline u32 pwr_pmu_bar0_fecs_error_r(void)
920{
921 return 0x0010a988U;
922}
923static inline u32 pwr_pmu_bar0_error_status_r(void)
924{
925 return 0x0010a7b0U;
926}
927static inline u32 pwr_pmu_pg_idlefilth_r(u32 i)
928{
929 return 0x0010a6c0U + i*4U;
930}
931static inline u32 pwr_pmu_pg_ppuidlefilth_r(u32 i)
932{
933 return 0x0010a6e8U + i*4U;
934}
935static inline u32 pwr_pmu_pg_idle_cnt_r(u32 i)
936{
937 return 0x0010a710U + i*4U;
938}
939static inline u32 pwr_pmu_pg_intren_r(u32 i)
940{
941 return 0x0010a760U + i*4U;
942}
943static inline u32 pwr_fbif_transcfg_r(u32 i)
944{
945 return 0x0010ae00U + i*4U;
946}
947static inline u32 pwr_fbif_transcfg_target_local_fb_f(void)
948{
949 return 0x0U;
950}
951static inline u32 pwr_fbif_transcfg_target_coherent_sysmem_f(void)
952{
953 return 0x1U;
954}
955static inline u32 pwr_fbif_transcfg_target_noncoherent_sysmem_f(void)
956{
957 return 0x2U;
958}
959static inline u32 pwr_fbif_transcfg_mem_type_s(void)
960{
961 return 1U;
962}
963static inline u32 pwr_fbif_transcfg_mem_type_f(u32 v)
964{
965 return (v & 0x1U) << 2U;
966}
967static inline u32 pwr_fbif_transcfg_mem_type_m(void)
968{
969 return 0x1U << 2U;
970}
971static inline u32 pwr_fbif_transcfg_mem_type_v(u32 r)
972{
973 return (r >> 2U) & 0x1U;
974}
975static inline u32 pwr_fbif_transcfg_mem_type_virtual_f(void)
976{
977 return 0x0U;
978}
979static inline u32 pwr_fbif_transcfg_mem_type_physical_f(void)
980{
981 return 0x4U;
982}
983#endif
diff --git a/include/nvgpu/hw/gv100/hw_ram_gv100.h b/include/nvgpu/hw/gv100/hw_ram_gv100.h
deleted file mode 100644
index 55aa25f..0000000
--- a/include/nvgpu/hw/gv100/hw_ram_gv100.h
+++ /dev/null
@@ -1,791 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ram_gv100_h_
57#define _hw_ram_gv100_h_
58
59static inline u32 ram_in_ramfc_s(void)
60{
61 return 4096U;
62}
63static inline u32 ram_in_ramfc_w(void)
64{
65 return 0U;
66}
67static inline u32 ram_in_page_dir_base_target_f(u32 v)
68{
69 return (v & 0x3U) << 0U;
70}
71static inline u32 ram_in_page_dir_base_target_w(void)
72{
73 return 128U;
74}
75static inline u32 ram_in_page_dir_base_target_vid_mem_f(void)
76{
77 return 0x0U;
78}
79static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void)
80{
81 return 0x2U;
82}
83static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void)
84{
85 return 0x3U;
86}
87static inline u32 ram_in_page_dir_base_vol_w(void)
88{
89 return 128U;
90}
91static inline u32 ram_in_page_dir_base_vol_true_f(void)
92{
93 return 0x4U;
94}
95static inline u32 ram_in_page_dir_base_vol_false_f(void)
96{
97 return 0x0U;
98}
99static inline u32 ram_in_page_dir_base_fault_replay_tex_f(u32 v)
100{
101 return (v & 0x1U) << 4U;
102}
103static inline u32 ram_in_page_dir_base_fault_replay_tex_m(void)
104{
105 return 0x1U << 4U;
106}
107static inline u32 ram_in_page_dir_base_fault_replay_tex_w(void)
108{
109 return 128U;
110}
111static inline u32 ram_in_page_dir_base_fault_replay_tex_true_f(void)
112{
113 return 0x10U;
114}
115static inline u32 ram_in_page_dir_base_fault_replay_gcc_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 ram_in_page_dir_base_fault_replay_gcc_m(void)
120{
121 return 0x1U << 5U;
122}
123static inline u32 ram_in_page_dir_base_fault_replay_gcc_w(void)
124{
125 return 128U;
126}
127static inline u32 ram_in_page_dir_base_fault_replay_gcc_true_f(void)
128{
129 return 0x20U;
130}
131static inline u32 ram_in_use_ver2_pt_format_f(u32 v)
132{
133 return (v & 0x1U) << 10U;
134}
135static inline u32 ram_in_use_ver2_pt_format_m(void)
136{
137 return 0x1U << 10U;
138}
139static inline u32 ram_in_use_ver2_pt_format_w(void)
140{
141 return 128U;
142}
143static inline u32 ram_in_use_ver2_pt_format_true_f(void)
144{
145 return 0x400U;
146}
147static inline u32 ram_in_use_ver2_pt_format_false_f(void)
148{
149 return 0x0U;
150}
151static inline u32 ram_in_big_page_size_f(u32 v)
152{
153 return (v & 0x1U) << 11U;
154}
155static inline u32 ram_in_big_page_size_m(void)
156{
157 return 0x1U << 11U;
158}
159static inline u32 ram_in_big_page_size_w(void)
160{
161 return 128U;
162}
163static inline u32 ram_in_big_page_size_128kb_f(void)
164{
165 return 0x0U;
166}
167static inline u32 ram_in_big_page_size_64kb_f(void)
168{
169 return 0x800U;
170}
171static inline u32 ram_in_page_dir_base_lo_f(u32 v)
172{
173 return (v & 0xfffffU) << 12U;
174}
175static inline u32 ram_in_page_dir_base_lo_w(void)
176{
177 return 128U;
178}
179static inline u32 ram_in_page_dir_base_hi_f(u32 v)
180{
181 return (v & 0xffffffffU) << 0U;
182}
183static inline u32 ram_in_page_dir_base_hi_w(void)
184{
185 return 129U;
186}
187static inline u32 ram_in_engine_cs_w(void)
188{
189 return 132U;
190}
191static inline u32 ram_in_engine_cs_wfi_v(void)
192{
193 return 0x00000000U;
194}
195static inline u32 ram_in_engine_cs_wfi_f(void)
196{
197 return 0x0U;
198}
199static inline u32 ram_in_engine_cs_fg_v(void)
200{
201 return 0x00000001U;
202}
203static inline u32 ram_in_engine_cs_fg_f(void)
204{
205 return 0x8U;
206}
207static inline u32 ram_in_engine_wfi_mode_f(u32 v)
208{
209 return (v & 0x1U) << 2U;
210}
211static inline u32 ram_in_engine_wfi_mode_w(void)
212{
213 return 132U;
214}
215static inline u32 ram_in_engine_wfi_mode_physical_v(void)
216{
217 return 0x00000000U;
218}
219static inline u32 ram_in_engine_wfi_mode_virtual_v(void)
220{
221 return 0x00000001U;
222}
223static inline u32 ram_in_engine_wfi_target_f(u32 v)
224{
225 return (v & 0x3U) << 0U;
226}
227static inline u32 ram_in_engine_wfi_target_w(void)
228{
229 return 132U;
230}
231static inline u32 ram_in_engine_wfi_target_sys_mem_coh_v(void)
232{
233 return 0x00000002U;
234}
235static inline u32 ram_in_engine_wfi_target_sys_mem_ncoh_v(void)
236{
237 return 0x00000003U;
238}
239static inline u32 ram_in_engine_wfi_target_local_mem_v(void)
240{
241 return 0x00000000U;
242}
243static inline u32 ram_in_engine_wfi_ptr_lo_f(u32 v)
244{
245 return (v & 0xfffffU) << 12U;
246}
247static inline u32 ram_in_engine_wfi_ptr_lo_w(void)
248{
249 return 132U;
250}
251static inline u32 ram_in_engine_wfi_ptr_hi_f(u32 v)
252{
253 return (v & 0xffU) << 0U;
254}
255static inline u32 ram_in_engine_wfi_ptr_hi_w(void)
256{
257 return 133U;
258}
259static inline u32 ram_in_engine_wfi_veid_f(u32 v)
260{
261 return (v & 0x3fU) << 0U;
262}
263static inline u32 ram_in_engine_wfi_veid_w(void)
264{
265 return 134U;
266}
267static inline u32 ram_in_eng_method_buffer_addr_lo_f(u32 v)
268{
269 return (v & 0xffffffffU) << 0U;
270}
271static inline u32 ram_in_eng_method_buffer_addr_lo_w(void)
272{
273 return 136U;
274}
275static inline u32 ram_in_eng_method_buffer_addr_hi_f(u32 v)
276{
277 return (v & 0x1ffffU) << 0U;
278}
279static inline u32 ram_in_eng_method_buffer_addr_hi_w(void)
280{
281 return 137U;
282}
283static inline u32 ram_in_sc_page_dir_base_target_f(u32 v, u32 i)
284{
285 return (v & 0x3U) << (0U + i*0U);
286}
287static inline u32 ram_in_sc_page_dir_base_target__size_1_v(void)
288{
289 return 0x00000040U;
290}
291static inline u32 ram_in_sc_page_dir_base_target_vid_mem_v(void)
292{
293 return 0x00000000U;
294}
295static inline u32 ram_in_sc_page_dir_base_target_invalid_v(void)
296{
297 return 0x00000001U;
298}
299static inline u32 ram_in_sc_page_dir_base_target_sys_mem_coh_v(void)
300{
301 return 0x00000002U;
302}
303static inline u32 ram_in_sc_page_dir_base_target_sys_mem_ncoh_v(void)
304{
305 return 0x00000003U;
306}
307static inline u32 ram_in_sc_page_dir_base_vol_f(u32 v, u32 i)
308{
309 return (v & 0x1U) << (2U + i*0U);
310}
311static inline u32 ram_in_sc_page_dir_base_vol__size_1_v(void)
312{
313 return 0x00000040U;
314}
315static inline u32 ram_in_sc_page_dir_base_vol_true_v(void)
316{
317 return 0x00000001U;
318}
319static inline u32 ram_in_sc_page_dir_base_vol_false_v(void)
320{
321 return 0x00000000U;
322}
323static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_f(u32 v, u32 i)
324{
325 return (v & 0x1U) << (4U + i*0U);
326}
327static inline u32 ram_in_sc_page_dir_base_fault_replay_tex__size_1_v(void)
328{
329 return 0x00000040U;
330}
331static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_enabled_v(void)
332{
333 return 0x00000001U;
334}
335static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_disabled_v(void)
336{
337 return 0x00000000U;
338}
339static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_f(u32 v, u32 i)
340{
341 return (v & 0x1U) << (5U + i*0U);
342}
343static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc__size_1_v(void)
344{
345 return 0x00000040U;
346}
347static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_enabled_v(void)
348{
349 return 0x00000001U;
350}
351static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_disabled_v(void)
352{
353 return 0x00000000U;
354}
355static inline u32 ram_in_sc_use_ver2_pt_format_f(u32 v, u32 i)
356{
357 return (v & 0x1U) << (10U + i*0U);
358}
359static inline u32 ram_in_sc_use_ver2_pt_format__size_1_v(void)
360{
361 return 0x00000040U;
362}
363static inline u32 ram_in_sc_use_ver2_pt_format_false_v(void)
364{
365 return 0x00000000U;
366}
367static inline u32 ram_in_sc_use_ver2_pt_format_true_v(void)
368{
369 return 0x00000001U;
370}
371static inline u32 ram_in_sc_big_page_size_f(u32 v, u32 i)
372{
373 return (v & 0x1U) << (11U + i*0U);
374}
375static inline u32 ram_in_sc_big_page_size__size_1_v(void)
376{
377 return 0x00000040U;
378}
379static inline u32 ram_in_sc_big_page_size_64kb_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 ram_in_sc_page_dir_base_lo_f(u32 v, u32 i)
384{
385 return (v & 0xfffffU) << (12U + i*0U);
386}
387static inline u32 ram_in_sc_page_dir_base_lo__size_1_v(void)
388{
389 return 0x00000040U;
390}
391static inline u32 ram_in_sc_page_dir_base_hi_f(u32 v, u32 i)
392{
393 return (v & 0xffffffffU) << (0U + i*0U);
394}
395static inline u32 ram_in_sc_page_dir_base_hi__size_1_v(void)
396{
397 return 0x00000040U;
398}
399static inline u32 ram_in_sc_page_dir_base_target_0_f(u32 v)
400{
401 return (v & 0x3U) << 0U;
402}
403static inline u32 ram_in_sc_page_dir_base_target_0_w(void)
404{
405 return 168U;
406}
407static inline u32 ram_in_sc_page_dir_base_vol_0_f(u32 v)
408{
409 return (v & 0x1U) << 2U;
410}
411static inline u32 ram_in_sc_page_dir_base_vol_0_w(void)
412{
413 return 168U;
414}
415static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_0_f(u32 v)
416{
417 return (v & 0x1U) << 4U;
418}
419static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_0_w(void)
420{
421 return 168U;
422}
423static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_0_f(u32 v)
424{
425 return (v & 0x1U) << 5U;
426}
427static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_0_w(void)
428{
429 return 168U;
430}
431static inline u32 ram_in_sc_use_ver2_pt_format_0_f(u32 v)
432{
433 return (v & 0x1U) << 10U;
434}
435static inline u32 ram_in_sc_use_ver2_pt_format_0_w(void)
436{
437 return 168U;
438}
439static inline u32 ram_in_sc_big_page_size_0_f(u32 v)
440{
441 return (v & 0x1U) << 11U;
442}
443static inline u32 ram_in_sc_big_page_size_0_w(void)
444{
445 return 168U;
446}
447static inline u32 ram_in_sc_page_dir_base_lo_0_f(u32 v)
448{
449 return (v & 0xfffffU) << 12U;
450}
451static inline u32 ram_in_sc_page_dir_base_lo_0_w(void)
452{
453 return 168U;
454}
455static inline u32 ram_in_sc_page_dir_base_hi_0_f(u32 v)
456{
457 return (v & 0xffffffffU) << 0U;
458}
459static inline u32 ram_in_sc_page_dir_base_hi_0_w(void)
460{
461 return 169U;
462}
463static inline u32 ram_in_base_shift_v(void)
464{
465 return 0x0000000cU;
466}
467static inline u32 ram_in_alloc_size_v(void)
468{
469 return 0x00001000U;
470}
471static inline u32 ram_fc_size_val_v(void)
472{
473 return 0x00000200U;
474}
475static inline u32 ram_fc_gp_put_w(void)
476{
477 return 0U;
478}
479static inline u32 ram_fc_userd_w(void)
480{
481 return 2U;
482}
483static inline u32 ram_fc_userd_hi_w(void)
484{
485 return 3U;
486}
487static inline u32 ram_fc_signature_w(void)
488{
489 return 4U;
490}
491static inline u32 ram_fc_gp_get_w(void)
492{
493 return 5U;
494}
495static inline u32 ram_fc_pb_get_w(void)
496{
497 return 6U;
498}
499static inline u32 ram_fc_pb_get_hi_w(void)
500{
501 return 7U;
502}
503static inline u32 ram_fc_pb_top_level_get_w(void)
504{
505 return 8U;
506}
507static inline u32 ram_fc_pb_top_level_get_hi_w(void)
508{
509 return 9U;
510}
511static inline u32 ram_fc_acquire_w(void)
512{
513 return 12U;
514}
515static inline u32 ram_fc_sem_addr_hi_w(void)
516{
517 return 14U;
518}
519static inline u32 ram_fc_sem_addr_lo_w(void)
520{
521 return 15U;
522}
523static inline u32 ram_fc_sem_payload_lo_w(void)
524{
525 return 16U;
526}
527static inline u32 ram_fc_sem_payload_hi_w(void)
528{
529 return 39U;
530}
531static inline u32 ram_fc_sem_execute_w(void)
532{
533 return 17U;
534}
535static inline u32 ram_fc_gp_base_w(void)
536{
537 return 18U;
538}
539static inline u32 ram_fc_gp_base_hi_w(void)
540{
541 return 19U;
542}
543static inline u32 ram_fc_gp_fetch_w(void)
544{
545 return 20U;
546}
547static inline u32 ram_fc_pb_fetch_w(void)
548{
549 return 21U;
550}
551static inline u32 ram_fc_pb_fetch_hi_w(void)
552{
553 return 22U;
554}
555static inline u32 ram_fc_pb_put_w(void)
556{
557 return 23U;
558}
559static inline u32 ram_fc_pb_put_hi_w(void)
560{
561 return 24U;
562}
563static inline u32 ram_fc_pb_header_w(void)
564{
565 return 33U;
566}
567static inline u32 ram_fc_pb_count_w(void)
568{
569 return 34U;
570}
571static inline u32 ram_fc_subdevice_w(void)
572{
573 return 37U;
574}
575static inline u32 ram_fc_target_w(void)
576{
577 return 43U;
578}
579static inline u32 ram_fc_hce_ctrl_w(void)
580{
581 return 57U;
582}
583static inline u32 ram_fc_chid_w(void)
584{
585 return 58U;
586}
587static inline u32 ram_fc_chid_id_f(u32 v)
588{
589 return (v & 0xfffU) << 0U;
590}
591static inline u32 ram_fc_chid_id_w(void)
592{
593 return 0U;
594}
595static inline u32 ram_fc_config_w(void)
596{
597 return 61U;
598}
599static inline u32 ram_fc_runlist_timeslice_w(void)
600{
601 return 62U;
602}
603static inline u32 ram_fc_set_channel_info_w(void)
604{
605 return 63U;
606}
607static inline u32 ram_userd_base_shift_v(void)
608{
609 return 0x00000009U;
610}
611static inline u32 ram_userd_chan_size_v(void)
612{
613 return 0x00000200U;
614}
615static inline u32 ram_userd_put_w(void)
616{
617 return 16U;
618}
619static inline u32 ram_userd_get_w(void)
620{
621 return 17U;
622}
623static inline u32 ram_userd_ref_w(void)
624{
625 return 18U;
626}
627static inline u32 ram_userd_put_hi_w(void)
628{
629 return 19U;
630}
631static inline u32 ram_userd_ref_threshold_w(void)
632{
633 return 20U;
634}
635static inline u32 ram_userd_top_level_get_w(void)
636{
637 return 22U;
638}
639static inline u32 ram_userd_top_level_get_hi_w(void)
640{
641 return 23U;
642}
643static inline u32 ram_userd_get_hi_w(void)
644{
645 return 24U;
646}
647static inline u32 ram_userd_gp_get_w(void)
648{
649 return 34U;
650}
651static inline u32 ram_userd_gp_put_w(void)
652{
653 return 35U;
654}
655static inline u32 ram_userd_gp_top_level_get_w(void)
656{
657 return 22U;
658}
659static inline u32 ram_userd_gp_top_level_get_hi_w(void)
660{
661 return 23U;
662}
663static inline u32 ram_rl_entry_size_v(void)
664{
665 return 0x00000010U;
666}
667static inline u32 ram_rl_entry_type_f(u32 v)
668{
669 return (v & 0x1U) << 0U;
670}
671static inline u32 ram_rl_entry_type_channel_v(void)
672{
673 return 0x00000000U;
674}
675static inline u32 ram_rl_entry_type_tsg_v(void)
676{
677 return 0x00000001U;
678}
679static inline u32 ram_rl_entry_id_f(u32 v)
680{
681 return (v & 0xfffU) << 0U;
682}
683static inline u32 ram_rl_entry_chan_runqueue_selector_f(u32 v)
684{
685 return (v & 0x1U) << 1U;
686}
687static inline u32 ram_rl_entry_chan_inst_target_f(u32 v)
688{
689 return (v & 0x3U) << 4U;
690}
691static inline u32 ram_rl_entry_chan_inst_target_sys_mem_ncoh_v(void)
692{
693 return 0x00000003U;
694}
695static inline u32 ram_rl_entry_chan_inst_target_sys_mem_coh_v(void)
696{
697 return 0x00000002U;
698}
699static inline u32 ram_rl_entry_chan_inst_target_vid_mem_v(void)
700{
701 return 0x00000000U;
702}
703static inline u32 ram_rl_entry_chan_userd_target_f(u32 v)
704{
705 return (v & 0x3U) << 6U;
706}
707static inline u32 ram_rl_entry_chan_userd_target_vid_mem_v(void)
708{
709 return 0x00000000U;
710}
711static inline u32 ram_rl_entry_chan_userd_target_vid_mem_nvlink_coh_v(void)
712{
713 return 0x00000001U;
714}
715static inline u32 ram_rl_entry_chan_userd_target_sys_mem_coh_v(void)
716{
717 return 0x00000002U;
718}
719static inline u32 ram_rl_entry_chan_userd_target_sys_mem_ncoh_v(void)
720{
721 return 0x00000003U;
722}
723static inline u32 ram_rl_entry_chan_userd_ptr_lo_f(u32 v)
724{
725 return (v & 0xffffffU) << 8U;
726}
727static inline u32 ram_rl_entry_chan_userd_ptr_hi_f(u32 v)
728{
729 return (v & 0xffffffffU) << 0U;
730}
731static inline u32 ram_rl_entry_chid_f(u32 v)
732{
733 return (v & 0xfffU) << 0U;
734}
735static inline u32 ram_rl_entry_chan_inst_ptr_lo_f(u32 v)
736{
737 return (v & 0xfffffU) << 12U;
738}
739static inline u32 ram_rl_entry_chan_inst_ptr_hi_f(u32 v)
740{
741 return (v & 0xffffffffU) << 0U;
742}
743static inline u32 ram_rl_entry_tsg_timeslice_scale_f(u32 v)
744{
745 return (v & 0xfU) << 16U;
746}
747static inline u32 ram_rl_entry_tsg_timeslice_scale_3_v(void)
748{
749 return 0x00000003U;
750}
751static inline u32 ram_rl_entry_tsg_timeslice_timeout_f(u32 v)
752{
753 return (v & 0xffU) << 24U;
754}
755static inline u32 ram_rl_entry_tsg_timeslice_timeout_128_v(void)
756{
757 return 0x00000080U;
758}
759static inline u32 ram_rl_entry_tsg_length_f(u32 v)
760{
761 return (v & 0xffU) << 0U;
762}
763static inline u32 ram_rl_entry_tsg_length_init_v(void)
764{
765 return 0x00000000U;
766}
767static inline u32 ram_rl_entry_tsg_length_min_v(void)
768{
769 return 0x00000001U;
770}
771static inline u32 ram_rl_entry_tsg_length_max_v(void)
772{
773 return 0x00000080U;
774}
775static inline u32 ram_rl_entry_tsg_tsgid_f(u32 v)
776{
777 return (v & 0xfffU) << 0U;
778}
779static inline u32 ram_rl_entry_chan_userd_ptr_align_shift_v(void)
780{
781 return 0x00000008U;
782}
783static inline u32 ram_rl_entry_chan_userd_align_shift_v(void)
784{
785 return 0x00000008U;
786}
787static inline u32 ram_rl_entry_chan_inst_ptr_align_shift_v(void)
788{
789 return 0x0000000cU;
790}
791#endif
diff --git a/include/nvgpu/hw/gv100/hw_therm_gv100.h b/include/nvgpu/hw/gv100/hw_therm_gv100.h
deleted file mode 100644
index 2ea71ef..0000000
--- a/include/nvgpu/hw/gv100/hw_therm_gv100.h
+++ /dev/null
@@ -1,299 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_therm_gv100_h_
57#define _hw_therm_gv100_h_
58
59static inline u32 therm_weight_1_r(void)
60{
61 return 0x00020024U;
62}
63static inline u32 therm_config1_r(void)
64{
65 return 0x00020050U;
66}
67static inline u32 therm_config2_r(void)
68{
69 return 0x00020130U;
70}
71static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
72{
73 return (v & 0x1U) << 24U;
74}
75static inline u32 therm_config2_grad_enable_f(u32 v)
76{
77 return (v & 0x1U) << 31U;
78}
79static inline u32 therm_gate_ctrl_r(u32 i)
80{
81 return 0x00020200U + i*4U;
82}
83static inline u32 therm_gate_ctrl_eng_clk_m(void)
84{
85 return 0x3U << 0U;
86}
87static inline u32 therm_gate_ctrl_eng_clk_run_f(void)
88{
89 return 0x0U;
90}
91static inline u32 therm_gate_ctrl_eng_clk_auto_f(void)
92{
93 return 0x1U;
94}
95static inline u32 therm_gate_ctrl_eng_clk_stop_f(void)
96{
97 return 0x2U;
98}
99static inline u32 therm_gate_ctrl_blk_clk_m(void)
100{
101 return 0x3U << 2U;
102}
103static inline u32 therm_gate_ctrl_blk_clk_run_f(void)
104{
105 return 0x0U;
106}
107static inline u32 therm_gate_ctrl_blk_clk_auto_f(void)
108{
109 return 0x4U;
110}
111static inline u32 therm_gate_ctrl_idle_holdoff_m(void)
112{
113 return 0x1U << 4U;
114}
115static inline u32 therm_gate_ctrl_idle_holdoff_off_f(void)
116{
117 return 0x0U;
118}
119static inline u32 therm_gate_ctrl_idle_holdoff_on_f(void)
120{
121 return 0x10U;
122}
123static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v)
124{
125 return (v & 0x1fU) << 8U;
126}
127static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void)
128{
129 return 0x1fU << 8U;
130}
131static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v)
132{
133 return (v & 0x7U) << 13U;
134}
135static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
136{
137 return 0x7U << 13U;
138}
139static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
140{
141 return (v & 0xfU) << 16U;
142}
143static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
144{
145 return 0xfU << 16U;
146}
147static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
148{
149 return (v & 0xfU) << 20U;
150}
151static inline u32 therm_gate_ctrl_eng_delay_after_m(void)
152{
153 return 0xfU << 20U;
154}
155static inline u32 therm_fecs_idle_filter_r(void)
156{
157 return 0x00020288U;
158}
159static inline u32 therm_fecs_idle_filter_value_m(void)
160{
161 return 0xffffffffU << 0U;
162}
163static inline u32 therm_hubmmu_idle_filter_r(void)
164{
165 return 0x0002028cU;
166}
167static inline u32 therm_hubmmu_idle_filter_value_m(void)
168{
169 return 0xffffffffU << 0U;
170}
171static inline u32 therm_clk_slowdown_r(u32 i)
172{
173 return 0x00020160U + i*4U;
174}
175static inline u32 therm_clk_slowdown_idle_factor_f(u32 v)
176{
177 return (v & 0x3fU) << 16U;
178}
179static inline u32 therm_clk_slowdown_idle_factor_m(void)
180{
181 return 0x3fU << 16U;
182}
183static inline u32 therm_clk_slowdown_idle_factor_v(u32 r)
184{
185 return (r >> 16U) & 0x3fU;
186}
187static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void)
188{
189 return 0x0U;
190}
191static inline u32 therm_grad_stepping_table_r(u32 i)
192{
193 return 0x000202c8U + i*4U;
194}
195static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
196{
197 return (v & 0x3fU) << 0U;
198}
199static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
200{
201 return 0x3fU << 0U;
202}
203static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
204{
205 return 0x1U;
206}
207static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
208{
209 return 0x2U;
210}
211static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
212{
213 return 0x6U;
214}
215static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
216{
217 return 0xeU;
218}
219static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
220{
221 return (v & 0x3fU) << 6U;
222}
223static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
224{
225 return 0x3fU << 6U;
226}
227static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
228{
229 return (v & 0x3fU) << 12U;
230}
231static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
232{
233 return 0x3fU << 12U;
234}
235static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
236{
237 return (v & 0x3fU) << 18U;
238}
239static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
240{
241 return 0x3fU << 18U;
242}
243static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
244{
245 return (v & 0x3fU) << 24U;
246}
247static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
248{
249 return 0x3fU << 24U;
250}
251static inline u32 therm_grad_stepping0_r(void)
252{
253 return 0x000202c0U;
254}
255static inline u32 therm_grad_stepping0_feature_s(void)
256{
257 return 1U;
258}
259static inline u32 therm_grad_stepping0_feature_f(u32 v)
260{
261 return (v & 0x1U) << 0U;
262}
263static inline u32 therm_grad_stepping0_feature_m(void)
264{
265 return 0x1U << 0U;
266}
267static inline u32 therm_grad_stepping0_feature_v(u32 r)
268{
269 return (r >> 0U) & 0x1U;
270}
271static inline u32 therm_grad_stepping0_feature_enable_f(void)
272{
273 return 0x1U;
274}
275static inline u32 therm_grad_stepping1_r(void)
276{
277 return 0x000202c4U;
278}
279static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
280{
281 return (v & 0x1ffffU) << 0U;
282}
283static inline u32 therm_clk_timing_r(u32 i)
284{
285 return 0x000203c0U + i*4U;
286}
287static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
288{
289 return (v & 0x1U) << 16U;
290}
291static inline u32 therm_clk_timing_grad_slowdown_m(void)
292{
293 return 0x1U << 16U;
294}
295static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
296{
297 return 0x10000U;
298}
299#endif
diff --git a/include/nvgpu/hw/gv100/hw_timer_gv100.h b/include/nvgpu/hw/gv100/hw_timer_gv100.h
deleted file mode 100644
index 9d76e24..0000000
--- a/include/nvgpu/hw/gv100/hw_timer_gv100.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_timer_gv100_h_
57#define _hw_timer_gv100_h_
58
59static inline u32 timer_pri_timeout_r(void)
60{
61 return 0x00009080U;
62}
63static inline u32 timer_pri_timeout_period_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 timer_pri_timeout_period_m(void)
68{
69 return 0xffffffU << 0U;
70}
71static inline u32 timer_pri_timeout_period_v(u32 r)
72{
73 return (r >> 0U) & 0xffffffU;
74}
75static inline u32 timer_pri_timeout_en_f(u32 v)
76{
77 return (v & 0x1U) << 31U;
78}
79static inline u32 timer_pri_timeout_en_m(void)
80{
81 return 0x1U << 31U;
82}
83static inline u32 timer_pri_timeout_en_v(u32 r)
84{
85 return (r >> 31U) & 0x1U;
86}
87static inline u32 timer_pri_timeout_en_en_enabled_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 timer_pri_timeout_en_en_disabled_f(void)
92{
93 return 0x0U;
94}
95static inline u32 timer_pri_timeout_save_0_r(void)
96{
97 return 0x00009084U;
98}
99static inline u32 timer_pri_timeout_save_1_r(void)
100{
101 return 0x00009088U;
102}
103static inline u32 timer_pri_timeout_fecs_errcode_r(void)
104{
105 return 0x0000908cU;
106}
107static inline u32 timer_time_0_r(void)
108{
109 return 0x00009400U;
110}
111static inline u32 timer_time_1_r(void)
112{
113 return 0x00009410U;
114}
115#endif
diff --git a/include/nvgpu/hw/gv100/hw_top_gv100.h b/include/nvgpu/hw/gv100/hw_top_gv100.h
deleted file mode 100644
index 506a818..0000000
--- a/include/nvgpu/hw/gv100/hw_top_gv100.h
+++ /dev/null
@@ -1,343 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_top_gv100_h_
57#define _hw_top_gv100_h_
58
59static inline u32 top_num_gpcs_r(void)
60{
61 return 0x00022430U;
62}
63static inline u32 top_num_gpcs_value_v(u32 r)
64{
65 return (r >> 0U) & 0x1fU;
66}
67static inline u32 top_tpc_per_gpc_r(void)
68{
69 return 0x00022434U;
70}
71static inline u32 top_tpc_per_gpc_value_v(u32 r)
72{
73 return (r >> 0U) & 0x1fU;
74}
75static inline u32 top_num_fbps_r(void)
76{
77 return 0x00022438U;
78}
79static inline u32 top_num_fbps_value_v(u32 r)
80{
81 return (r >> 0U) & 0x1fU;
82}
83static inline u32 top_num_fbpas_r(void)
84{
85 return 0x0002243cU;
86}
87static inline u32 top_num_fbpas_value_v(u32 r)
88{
89 return (r >> 0U) & 0x1fU;
90}
91static inline u32 top_ltc_per_fbp_r(void)
92{
93 return 0x00022450U;
94}
95static inline u32 top_ltc_per_fbp_value_v(u32 r)
96{
97 return (r >> 0U) & 0x1fU;
98}
99static inline u32 top_slices_per_ltc_r(void)
100{
101 return 0x0002245cU;
102}
103static inline u32 top_slices_per_ltc_value_v(u32 r)
104{
105 return (r >> 0U) & 0x1fU;
106}
107static inline u32 top_num_ltcs_r(void)
108{
109 return 0x00022454U;
110}
111static inline u32 top_num_ces_r(void)
112{
113 return 0x00022444U;
114}
115static inline u32 top_num_ces_value_v(u32 r)
116{
117 return (r >> 0U) & 0x1fU;
118}
119static inline u32 top_device_info_r(u32 i)
120{
121 return 0x00022700U + i*4U;
122}
123static inline u32 top_device_info__size_1_v(void)
124{
125 return 0x00000040U;
126}
127static inline u32 top_device_info_chain_v(u32 r)
128{
129 return (r >> 31U) & 0x1U;
130}
131static inline u32 top_device_info_chain_enable_v(void)
132{
133 return 0x00000001U;
134}
135static inline u32 top_device_info_engine_enum_v(u32 r)
136{
137 return (r >> 26U) & 0xfU;
138}
139static inline u32 top_device_info_runlist_enum_v(u32 r)
140{
141 return (r >> 21U) & 0xfU;
142}
143static inline u32 top_device_info_intr_enum_v(u32 r)
144{
145 return (r >> 15U) & 0x1fU;
146}
147static inline u32 top_device_info_reset_enum_v(u32 r)
148{
149 return (r >> 9U) & 0x1fU;
150}
151static inline u32 top_device_info_type_enum_v(u32 r)
152{
153 return (r >> 2U) & 0x1fffffffU;
154}
155static inline u32 top_device_info_type_enum_graphics_v(void)
156{
157 return 0x00000000U;
158}
159static inline u32 top_device_info_type_enum_graphics_f(void)
160{
161 return 0x0U;
162}
163static inline u32 top_device_info_type_enum_copy2_v(void)
164{
165 return 0x00000003U;
166}
167static inline u32 top_device_info_type_enum_copy2_f(void)
168{
169 return 0xcU;
170}
171static inline u32 top_device_info_type_enum_lce_v(void)
172{
173 return 0x00000013U;
174}
175static inline u32 top_device_info_type_enum_lce_f(void)
176{
177 return 0x4cU;
178}
179static inline u32 top_device_info_type_enum_ioctrl_v(void)
180{
181 return 0x00000012U;
182}
183static inline u32 top_device_info_type_enum_ioctrl_f(void)
184{
185 return 0x48U;
186}
187static inline u32 top_device_info_engine_v(u32 r)
188{
189 return (r >> 5U) & 0x1U;
190}
191static inline u32 top_device_info_runlist_v(u32 r)
192{
193 return (r >> 4U) & 0x1U;
194}
195static inline u32 top_device_info_intr_v(u32 r)
196{
197 return (r >> 3U) & 0x1U;
198}
199static inline u32 top_device_info_reset_v(u32 r)
200{
201 return (r >> 2U) & 0x1U;
202}
203static inline u32 top_device_info_entry_v(u32 r)
204{
205 return (r >> 0U) & 0x3U;
206}
207static inline u32 top_device_info_entry_not_valid_v(void)
208{
209 return 0x00000000U;
210}
211static inline u32 top_device_info_entry_enum_v(void)
212{
213 return 0x00000002U;
214}
215static inline u32 top_device_info_entry_data_v(void)
216{
217 return 0x00000001U;
218}
219static inline u32 top_device_info_entry_engine_type_v(void)
220{
221 return 0x00000003U;
222}
223static inline u32 top_device_info_data_type_v(u32 r)
224{
225 return (r >> 30U) & 0x1U;
226}
227static inline u32 top_device_info_data_type_enum2_v(void)
228{
229 return 0x00000000U;
230}
231static inline u32 top_device_info_data_inst_id_v(u32 r)
232{
233 return (r >> 26U) & 0xfU;
234}
235static inline u32 top_device_info_data_pri_base_v(u32 r)
236{
237 return (r >> 12U) & 0xfffU;
238}
239static inline u32 top_device_info_data_pri_base_align_v(void)
240{
241 return 0x0000000cU;
242}
243static inline u32 top_device_info_data_fault_id_enum_v(u32 r)
244{
245 return (r >> 3U) & 0x7fU;
246}
247static inline u32 top_device_info_data_fault_id_v(u32 r)
248{
249 return (r >> 2U) & 0x1U;
250}
251static inline u32 top_device_info_data_fault_id_valid_v(void)
252{
253 return 0x00000001U;
254}
255static inline u32 top_nvhsclk_ctrl_r(void)
256{
257 return 0x00022424U;
258}
259static inline u32 top_nvhsclk_ctrl_e_clk_nvl_f(u32 v)
260{
261 return (v & 0x7U) << 0U;
262}
263static inline u32 top_nvhsclk_ctrl_e_clk_nvl_m(void)
264{
265 return 0x7U << 0U;
266}
267static inline u32 top_nvhsclk_ctrl_e_clk_nvl_v(u32 r)
268{
269 return (r >> 0U) & 0x7U;
270}
271static inline u32 top_nvhsclk_ctrl_e_clk_pcie_f(u32 v)
272{
273 return (v & 0x1U) << 3U;
274}
275static inline u32 top_nvhsclk_ctrl_e_clk_pcie_m(void)
276{
277 return 0x1U << 3U;
278}
279static inline u32 top_nvhsclk_ctrl_e_clk_pcie_v(u32 r)
280{
281 return (r >> 3U) & 0x1U;
282}
283static inline u32 top_nvhsclk_ctrl_e_clk_core_f(u32 v)
284{
285 return (v & 0x1U) << 4U;
286}
287static inline u32 top_nvhsclk_ctrl_e_clk_core_m(void)
288{
289 return 0x1U << 4U;
290}
291static inline u32 top_nvhsclk_ctrl_e_clk_core_v(u32 r)
292{
293 return (r >> 4U) & 0x1U;
294}
295static inline u32 top_nvhsclk_ctrl_rfu_f(u32 v)
296{
297 return (v & 0xfU) << 5U;
298}
299static inline u32 top_nvhsclk_ctrl_rfu_m(void)
300{
301 return 0xfU << 5U;
302}
303static inline u32 top_nvhsclk_ctrl_rfu_v(u32 r)
304{
305 return (r >> 5U) & 0xfU;
306}
307static inline u32 top_nvhsclk_ctrl_swap_clk_nvl_f(u32 v)
308{
309 return (v & 0x7U) << 10U;
310}
311static inline u32 top_nvhsclk_ctrl_swap_clk_nvl_m(void)
312{
313 return 0x7U << 10U;
314}
315static inline u32 top_nvhsclk_ctrl_swap_clk_nvl_v(u32 r)
316{
317 return (r >> 10U) & 0x7U;
318}
319static inline u32 top_nvhsclk_ctrl_swap_clk_pcie_f(u32 v)
320{
321 return (v & 0x1U) << 9U;
322}
323static inline u32 top_nvhsclk_ctrl_swap_clk_pcie_m(void)
324{
325 return 0x1U << 9U;
326}
327static inline u32 top_nvhsclk_ctrl_swap_clk_pcie_v(u32 r)
328{
329 return (r >> 9U) & 0x1U;
330}
331static inline u32 top_nvhsclk_ctrl_swap_clk_core_f(u32 v)
332{
333 return (v & 0x1U) << 13U;
334}
335static inline u32 top_nvhsclk_ctrl_swap_clk_core_m(void)
336{
337 return 0x1U << 13U;
338}
339static inline u32 top_nvhsclk_ctrl_swap_clk_core_v(u32 r)
340{
341 return (r >> 13U) & 0x1U;
342}
343#endif
diff --git a/include/nvgpu/hw/gv100/hw_trim_gv100.h b/include/nvgpu/hw/gv100/hw_trim_gv100.h
deleted file mode 100644
index f1b6da2..0000000
--- a/include/nvgpu/hw/gv100/hw_trim_gv100.h
+++ /dev/null
@@ -1,247 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_trim_gv100_h_
57#define _hw_trim_gv100_h_
58
59static inline u32 trim_sys_nvlink_uphy_cfg_r(void)
60{
61 return 0x00132410U;
62}
63static inline u32 trim_sys_nvlink_uphy_cfg_lockdect_wait_dly_length_f(u32 v)
64{
65 return (v & 0x3ffU) << 0U;
66}
67static inline u32 trim_sys_nvlink_uphy_cfg_lockdect_wait_dly_length_m(void)
68{
69 return 0x3ffU << 0U;
70}
71static inline u32 trim_sys_nvlink_uphy_cfg_lockdect_wait_dly_length_v(u32 r)
72{
73 return (r >> 0U) & 0x3ffU;
74}
75static inline u32 trim_sys_nvlink_uphy_cfg_phy2clks_use_lockdet_f(u32 v)
76{
77 return (v & 0x1U) << 12U;
78}
79static inline u32 trim_sys_nvlink_uphy_cfg_phy2clks_use_lockdet_m(void)
80{
81 return 0x1U << 12U;
82}
83static inline u32 trim_sys_nvlink_uphy_cfg_phy2clks_use_lockdet_v(u32 r)
84{
85 return (r >> 12U) & 0x1U;
86}
87static inline u32 trim_sys_nvlink_uphy_cfg_nvlink_wait_dly_f(u32 v)
88{
89 return (v & 0xffU) << 16U;
90}
91static inline u32 trim_sys_nvlink_uphy_cfg_nvlink_wait_dly_m(void)
92{
93 return 0xffU << 16U;
94}
95static inline u32 trim_sys_nvlink_uphy_cfg_nvlink_wait_dly_v(u32 r)
96{
97 return (r >> 16U) & 0xffU;
98}
99static inline u32 trim_sys_nvlink0_ctrl_r(void)
100{
101 return 0x00132420U;
102}
103static inline u32 trim_sys_nvlink0_ctrl_unit2clks_pll_turn_off_f(u32 v)
104{
105 return (v & 0x1U) << 0U;
106}
107static inline u32 trim_sys_nvlink0_ctrl_unit2clks_pll_turn_off_m(void)
108{
109 return 0x1U << 0U;
110}
111static inline u32 trim_sys_nvlink0_ctrl_unit2clks_pll_turn_off_v(u32 r)
112{
113 return (r >> 0U) & 0x1U;
114}
115static inline u32 trim_sys_nvlink0_status_r(void)
116{
117 return 0x00132424U;
118}
119static inline u32 trim_sys_nvlink0_status_pll_off_f(u32 v)
120{
121 return (v & 0x1U) << 5U;
122}
123static inline u32 trim_sys_nvlink0_status_pll_off_m(void)
124{
125 return 0x1U << 5U;
126}
127static inline u32 trim_sys_nvlink0_status_pll_off_v(u32 r)
128{
129 return (r >> 5U) & 0x1U;
130}
131static inline u32 trim_sys_nvl_common_clk_alt_switch_r(void)
132{
133 return 0x001371c4U;
134}
135static inline u32 trim_sys_nvl_common_clk_alt_switch_slowclk_f(u32 v)
136{
137 return (v & 0x3U) << 16U;
138}
139static inline u32 trim_sys_nvl_common_clk_alt_switch_slowclk_m(void)
140{
141 return 0x3U << 16U;
142}
143static inline u32 trim_sys_nvl_common_clk_alt_switch_slowclk_v(u32 r)
144{
145 return (r >> 16U) & 0x3U;
146}
147static inline u32 trim_sys_nvl_common_clk_alt_switch_slowclk_xtal4x_v(void)
148{
149 return 0x00000003U;
150}
151static inline u32 trim_sys_nvl_common_clk_alt_switch_slowclk_xtal4x_f(void)
152{
153 return 0x30000U;
154}
155static inline u32 trim_sys_nvl_common_clk_alt_switch_slowclk_xtal_in_v(void)
156{
157 return 0x00000000U;
158}
159static inline u32 trim_sys_nvl_common_clk_alt_switch_slowclk_xtal_in_f(void)
160{
161 return 0x0U;
162}
163static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_f(u32 v)
164{
165 return (v & 0x3U) << 0U;
166}
167static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_m(void)
168{
169 return 0x3U << 0U;
170}
171static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_v(u32 r)
172{
173 return (r >> 0U) & 0x3U;
174}
175static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_slowclk_v(void)
176{
177 return 0x00000000U;
178}
179static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_slowclk_f(void)
180{
181 return 0x0U;
182}
183static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_miscclk_v(void)
184{
185 return 0x00000002U;
186}
187static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_miscclk_f(void)
188{
189 return 0x2U;
190}
191static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_onesrcclk_v(void)
192{
193 return 0x00000003U;
194}
195static inline u32 trim_sys_nvl_common_clk_alt_switch_finalsel_onesrcclk_f(void)
196{
197 return 0x3U;
198}
199static inline u32 trim_gpc_bcast_fr_clk_cntr_ncgpcclk_cfg_r(void)
200{
201 return 0x00132a70U;
202}
203static inline u32 trim_gpc_bcast_fr_clk_cntr_ncgpcclk_cfg_source_gpcclk_f(void)
204{
205 return 0x10000000U;
206}
207static inline u32 trim_gpc_bcast_fr_clk_cntr_ncgpcclk_cnt0_r(void)
208{
209 return 0x00132a74U;
210}
211static inline u32 trim_gpc_bcast_fr_clk_cntr_ncgpcclk_cnt1_r(void)
212{
213 return 0x00132a78U;
214}
215static inline u32 trim_sys_nafll_fr_clk_cntr_xbarclk_cfg_r(void)
216{
217 return 0x00136470U;
218}
219static inline u32 trim_sys_nafll_fr_clk_cntr_xbarclk_cfg_source_xbarclk_f(void)
220{
221 return 0x10000000U;
222}
223static inline u32 trim_sys_nafll_fr_clk_cntr_xbarclk_cntr0_r(void)
224{
225 return 0x00136474U;
226}
227static inline u32 trim_sys_nafll_fr_clk_cntr_xbarclk_cntr1_r(void)
228{
229 return 0x00136478U;
230}
231static inline u32 trim_sys_fr_clk_cntr_sysclk_cfg_r(void)
232{
233 return 0x0013762cU;
234}
235static inline u32 trim_sys_fr_clk_cntr_sysclk_cfg_source_sysclk_f(void)
236{
237 return 0x20000000U;
238}
239static inline u32 trim_sys_fr_clk_cntr_sysclk_cntr0_r(void)
240{
241 return 0x00137630U;
242}
243static inline u32 trim_sys_fr_clk_cntr_sysclk_cntr1_r(void)
244{
245 return 0x00137634U;
246}
247#endif
diff --git a/include/nvgpu/hw/gv100/hw_usermode_gv100.h b/include/nvgpu/hw/gv100/hw_usermode_gv100.h
deleted file mode 100644
index 7b1d861..0000000
--- a/include/nvgpu/hw/gv100/hw_usermode_gv100.h
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_usermode_gv100_h_
57#define _hw_usermode_gv100_h_
58
59static inline u32 usermode_cfg0_r(void)
60{
61 return 0x00810000U;
62}
63static inline u32 usermode_cfg0_class_id_f(u32 v)
64{
65 return (v & 0xffffU) << 0U;
66}
67static inline u32 usermode_cfg0_class_id_value_v(void)
68{
69 return 0x0000c361U;
70}
71static inline u32 usermode_time_0_r(void)
72{
73 return 0x00810080U;
74}
75static inline u32 usermode_time_0_nsec_f(u32 v)
76{
77 return (v & 0x7ffffffU) << 5U;
78}
79static inline u32 usermode_time_1_r(void)
80{
81 return 0x00810084U;
82}
83static inline u32 usermode_time_1_nsec_f(u32 v)
84{
85 return (v & 0x1fffffffU) << 0U;
86}
87static inline u32 usermode_notify_channel_pending_r(void)
88{
89 return 0x00810090U;
90}
91static inline u32 usermode_notify_channel_pending_id_f(u32 v)
92{
93 return (v & 0xffffffffU) << 0U;
94}
95#endif
diff --git a/include/nvgpu/hw/gv100/hw_xp_gv100.h b/include/nvgpu/hw/gv100/hw_xp_gv100.h
deleted file mode 100644
index 4296e04..0000000
--- a/include/nvgpu/hw/gv100/hw_xp_gv100.h
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_xp_gv100_h_
57#define _hw_xp_gv100_h_
58
59static inline u32 xp_dl_mgr_r(u32 i)
60{
61 return 0x0008b8c0U + i*4U;
62}
63static inline u32 xp_dl_mgr_safe_timing_f(u32 v)
64{
65 return (v & 0x1U) << 2U;
66}
67static inline u32 xp_pl_link_config_r(u32 i)
68{
69 return 0x0008c040U + i*4U;
70}
71static inline u32 xp_pl_link_config_ltssm_status_f(u32 v)
72{
73 return (v & 0x1U) << 4U;
74}
75static inline u32 xp_pl_link_config_ltssm_status_idle_v(void)
76{
77 return 0x00000000U;
78}
79static inline u32 xp_pl_link_config_ltssm_directive_f(u32 v)
80{
81 return (v & 0xfU) << 0U;
82}
83static inline u32 xp_pl_link_config_ltssm_directive_m(void)
84{
85 return 0xfU << 0U;
86}
87static inline u32 xp_pl_link_config_ltssm_directive_normal_operations_v(void)
88{
89 return 0x00000000U;
90}
91static inline u32 xp_pl_link_config_ltssm_directive_change_speed_v(void)
92{
93 return 0x00000001U;
94}
95static inline u32 xp_pl_link_config_max_link_rate_f(u32 v)
96{
97 return (v & 0x3U) << 18U;
98}
99static inline u32 xp_pl_link_config_max_link_rate_m(void)
100{
101 return 0x3U << 18U;
102}
103static inline u32 xp_pl_link_config_max_link_rate_2500_mtps_v(void)
104{
105 return 0x00000002U;
106}
107static inline u32 xp_pl_link_config_max_link_rate_5000_mtps_v(void)
108{
109 return 0x00000001U;
110}
111static inline u32 xp_pl_link_config_max_link_rate_8000_mtps_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 xp_pl_link_config_target_tx_width_f(u32 v)
116{
117 return (v & 0x7U) << 20U;
118}
119static inline u32 xp_pl_link_config_target_tx_width_m(void)
120{
121 return 0x7U << 20U;
122}
123static inline u32 xp_pl_link_config_target_tx_width_x1_v(void)
124{
125 return 0x00000007U;
126}
127static inline u32 xp_pl_link_config_target_tx_width_x2_v(void)
128{
129 return 0x00000006U;
130}
131static inline u32 xp_pl_link_config_target_tx_width_x4_v(void)
132{
133 return 0x00000005U;
134}
135static inline u32 xp_pl_link_config_target_tx_width_x8_v(void)
136{
137 return 0x00000004U;
138}
139static inline u32 xp_pl_link_config_target_tx_width_x16_v(void)
140{
141 return 0x00000000U;
142}
143#endif
diff --git a/include/nvgpu/hw/gv100/hw_xve_gv100.h b/include/nvgpu/hw/gv100/hw_xve_gv100.h
deleted file mode 100644
index fc7aa72..0000000
--- a/include/nvgpu/hw/gv100/hw_xve_gv100.h
+++ /dev/null
@@ -1,207 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_xve_gv100_h_
57#define _hw_xve_gv100_h_
58
59static inline u32 xve_rom_ctrl_r(void)
60{
61 return 0x00000050U;
62}
63static inline u32 xve_rom_ctrl_rom_shadow_f(u32 v)
64{
65 return (v & 0x1U) << 0U;
66}
67static inline u32 xve_rom_ctrl_rom_shadow_disabled_f(void)
68{
69 return 0x0U;
70}
71static inline u32 xve_rom_ctrl_rom_shadow_enabled_f(void)
72{
73 return 0x1U;
74}
75static inline u32 xve_link_control_status_r(void)
76{
77 return 0x00000088U;
78}
79static inline u32 xve_link_control_status_link_speed_m(void)
80{
81 return 0xfU << 16U;
82}
83static inline u32 xve_link_control_status_link_speed_v(u32 r)
84{
85 return (r >> 16U) & 0xfU;
86}
87static inline u32 xve_link_control_status_link_speed_link_speed_2p5_v(void)
88{
89 return 0x00000001U;
90}
91static inline u32 xve_link_control_status_link_speed_link_speed_5p0_v(void)
92{
93 return 0x00000002U;
94}
95static inline u32 xve_link_control_status_link_speed_link_speed_8p0_v(void)
96{
97 return 0x00000003U;
98}
99static inline u32 xve_link_control_status_link_width_m(void)
100{
101 return 0x3fU << 20U;
102}
103static inline u32 xve_link_control_status_link_width_v(u32 r)
104{
105 return (r >> 20U) & 0x3fU;
106}
107static inline u32 xve_link_control_status_link_width_x1_v(void)
108{
109 return 0x00000001U;
110}
111static inline u32 xve_link_control_status_link_width_x2_v(void)
112{
113 return 0x00000002U;
114}
115static inline u32 xve_link_control_status_link_width_x4_v(void)
116{
117 return 0x00000004U;
118}
119static inline u32 xve_link_control_status_link_width_x8_v(void)
120{
121 return 0x00000008U;
122}
123static inline u32 xve_link_control_status_link_width_x16_v(void)
124{
125 return 0x00000010U;
126}
127static inline u32 xve_priv_xv_r(void)
128{
129 return 0x00000150U;
130}
131static inline u32 xve_priv_xv_cya_l0s_enable_f(u32 v)
132{
133 return (v & 0x1U) << 7U;
134}
135static inline u32 xve_priv_xv_cya_l0s_enable_m(void)
136{
137 return 0x1U << 7U;
138}
139static inline u32 xve_priv_xv_cya_l0s_enable_v(u32 r)
140{
141 return (r >> 7U) & 0x1U;
142}
143static inline u32 xve_priv_xv_cya_l1_enable_f(u32 v)
144{
145 return (v & 0x1U) << 8U;
146}
147static inline u32 xve_priv_xv_cya_l1_enable_m(void)
148{
149 return 0x1U << 8U;
150}
151static inline u32 xve_priv_xv_cya_l1_enable_v(u32 r)
152{
153 return (r >> 8U) & 0x1U;
154}
155static inline u32 xve_cya_2_r(void)
156{
157 return 0x00000704U;
158}
159static inline u32 xve_reset_r(void)
160{
161 return 0x00000718U;
162}
163static inline u32 xve_reset_reset_m(void)
164{
165 return 0x1U << 0U;
166}
167static inline u32 xve_reset_gpu_on_sw_reset_m(void)
168{
169 return 0x1U << 1U;
170}
171static inline u32 xve_reset_counter_en_m(void)
172{
173 return 0x1U << 2U;
174}
175static inline u32 xve_reset_counter_val_f(u32 v)
176{
177 return (v & 0x7ffU) << 4U;
178}
179static inline u32 xve_reset_counter_val_m(void)
180{
181 return 0x7ffU << 4U;
182}
183static inline u32 xve_reset_counter_val_v(u32 r)
184{
185 return (r >> 4U) & 0x7ffU;
186}
187static inline u32 xve_reset_clock_on_sw_reset_m(void)
188{
189 return 0x1U << 15U;
190}
191static inline u32 xve_reset_clock_counter_en_m(void)
192{
193 return 0x1U << 16U;
194}
195static inline u32 xve_reset_clock_counter_val_f(u32 v)
196{
197 return (v & 0x7ffU) << 17U;
198}
199static inline u32 xve_reset_clock_counter_val_m(void)
200{
201 return 0x7ffU << 17U;
202}
203static inline u32 xve_reset_clock_counter_val_v(u32 r)
204{
205 return (r >> 17U) & 0x7ffU;
206}
207#endif
diff --git a/include/nvgpu/hw/gv11b/hw_bus_gv11b.h b/include/nvgpu/hw/gv11b/hw_bus_gv11b.h
deleted file mode 100644
index d1d9b34..0000000
--- a/include/nvgpu/hw/gv11b/hw_bus_gv11b.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_bus_gv11b_h_
57#define _hw_bus_gv11b_h_
58
59static inline u32 bus_bar0_window_r(void)
60{
61 return 0x00001700U;
62}
63static inline u32 bus_bar0_window_base_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 bus_bar0_window_target_vid_mem_f(void)
68{
69 return 0x0U;
70}
71static inline u32 bus_bar0_window_target_sys_mem_coherent_f(void)
72{
73 return 0x2000000U;
74}
75static inline u32 bus_bar0_window_target_sys_mem_noncoherent_f(void)
76{
77 return 0x3000000U;
78}
79static inline u32 bus_bar0_window_target_bar0_window_base_shift_v(void)
80{
81 return 0x00000010U;
82}
83static inline u32 bus_bar1_block_r(void)
84{
85 return 0x00001704U;
86}
87static inline u32 bus_bar1_block_ptr_f(u32 v)
88{
89 return (v & 0xfffffffU) << 0U;
90}
91static inline u32 bus_bar1_block_target_vid_mem_f(void)
92{
93 return 0x0U;
94}
95static inline u32 bus_bar1_block_target_sys_mem_coh_f(void)
96{
97 return 0x20000000U;
98}
99static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void)
100{
101 return 0x30000000U;
102}
103static inline u32 bus_bar1_block_mode_virtual_f(void)
104{
105 return 0x80000000U;
106}
107static inline u32 bus_bar2_block_r(void)
108{
109 return 0x00001714U;
110}
111static inline u32 bus_bar2_block_ptr_f(u32 v)
112{
113 return (v & 0xfffffffU) << 0U;
114}
115static inline u32 bus_bar2_block_target_vid_mem_f(void)
116{
117 return 0x0U;
118}
119static inline u32 bus_bar2_block_target_sys_mem_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void)
124{
125 return 0x30000000U;
126}
127static inline u32 bus_bar2_block_mode_virtual_f(void)
128{
129 return 0x80000000U;
130}
131static inline u32 bus_bar1_block_ptr_shift_v(void)
132{
133 return 0x0000000cU;
134}
135static inline u32 bus_bar2_block_ptr_shift_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 bus_bind_status_r(void)
140{
141 return 0x00001710U;
142}
143static inline u32 bus_bind_status_bar1_pending_v(u32 r)
144{
145 return (r >> 0U) & 0x1U;
146}
147static inline u32 bus_bind_status_bar1_pending_empty_f(void)
148{
149 return 0x0U;
150}
151static inline u32 bus_bind_status_bar1_pending_busy_f(void)
152{
153 return 0x1U;
154}
155static inline u32 bus_bind_status_bar1_outstanding_v(u32 r)
156{
157 return (r >> 1U) & 0x1U;
158}
159static inline u32 bus_bind_status_bar1_outstanding_false_f(void)
160{
161 return 0x0U;
162}
163static inline u32 bus_bind_status_bar1_outstanding_true_f(void)
164{
165 return 0x2U;
166}
167static inline u32 bus_bind_status_bar2_pending_v(u32 r)
168{
169 return (r >> 2U) & 0x1U;
170}
171static inline u32 bus_bind_status_bar2_pending_empty_f(void)
172{
173 return 0x0U;
174}
175static inline u32 bus_bind_status_bar2_pending_busy_f(void)
176{
177 return 0x4U;
178}
179static inline u32 bus_bind_status_bar2_outstanding_v(u32 r)
180{
181 return (r >> 3U) & 0x1U;
182}
183static inline u32 bus_bind_status_bar2_outstanding_false_f(void)
184{
185 return 0x0U;
186}
187static inline u32 bus_bind_status_bar2_outstanding_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 bus_intr_0_r(void)
192{
193 return 0x00001100U;
194}
195static inline u32 bus_intr_0_pri_squash_m(void)
196{
197 return 0x1U << 1U;
198}
199static inline u32 bus_intr_0_pri_fecserr_m(void)
200{
201 return 0x1U << 2U;
202}
203static inline u32 bus_intr_0_pri_timeout_m(void)
204{
205 return 0x1U << 3U;
206}
207static inline u32 bus_intr_en_0_r(void)
208{
209 return 0x00001140U;
210}
211static inline u32 bus_intr_en_0_pri_squash_m(void)
212{
213 return 0x1U << 1U;
214}
215static inline u32 bus_intr_en_0_pri_fecserr_m(void)
216{
217 return 0x1U << 2U;
218}
219static inline u32 bus_intr_en_0_pri_timeout_m(void)
220{
221 return 0x1U << 3U;
222}
223#endif
diff --git a/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h b/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h
deleted file mode 100644
index e21a473..0000000
--- a/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ccsr_gv11b_h_
57#define _hw_ccsr_gv11b_h_
58
59static inline u32 ccsr_channel_inst_r(u32 i)
60{
61 return 0x00800000U + i*8U;
62}
63static inline u32 ccsr_channel_inst__size_1_v(void)
64{
65 return 0x00000200U;
66}
67static inline u32 ccsr_channel_inst_ptr_f(u32 v)
68{
69 return (v & 0xfffffffU) << 0U;
70}
71static inline u32 ccsr_channel_inst_target_vid_mem_f(void)
72{
73 return 0x0U;
74}
75static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void)
76{
77 return 0x20000000U;
78}
79static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void)
80{
81 return 0x30000000U;
82}
83static inline u32 ccsr_channel_inst_bind_false_f(void)
84{
85 return 0x0U;
86}
87static inline u32 ccsr_channel_inst_bind_true_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 ccsr_channel_r(u32 i)
92{
93 return 0x00800004U + i*8U;
94}
95static inline u32 ccsr_channel__size_1_v(void)
96{
97 return 0x00000200U;
98}
99static inline u32 ccsr_channel_enable_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 ccsr_channel_enable_set_f(u32 v)
104{
105 return (v & 0x1U) << 10U;
106}
107static inline u32 ccsr_channel_enable_set_true_f(void)
108{
109 return 0x400U;
110}
111static inline u32 ccsr_channel_enable_clr_true_f(void)
112{
113 return 0x800U;
114}
115static inline u32 ccsr_channel_status_v(u32 r)
116{
117 return (r >> 24U) & 0xfU;
118}
119static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
120{
121 return 0x00000002U;
122}
123static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
124{
125 return 0x00000004U;
126}
127static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
128{
129 return 0x0000000aU;
130}
131static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
132{
133 return 0x0000000bU;
134}
135static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
136{
137 return 0x0000000cU;
138}
139static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
140{
141 return 0x0000000dU;
142}
143static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
144{
145 return 0x0000000eU;
146}
147static inline u32 ccsr_channel_next_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 ccsr_channel_next_true_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 ccsr_channel_force_ctx_reload_true_f(void)
156{
157 return 0x100U;
158}
159static inline u32 ccsr_channel_pbdma_faulted_f(u32 v)
160{
161 return (v & 0x1U) << 22U;
162}
163static inline u32 ccsr_channel_pbdma_faulted_reset_f(void)
164{
165 return 0x400000U;
166}
167static inline u32 ccsr_channel_eng_faulted_f(u32 v)
168{
169 return (v & 0x1U) << 23U;
170}
171static inline u32 ccsr_channel_eng_faulted_v(u32 r)
172{
173 return (r >> 23U) & 0x1U;
174}
175static inline u32 ccsr_channel_eng_faulted_reset_f(void)
176{
177 return 0x800000U;
178}
179static inline u32 ccsr_channel_eng_faulted_true_v(void)
180{
181 return 0x00000001U;
182}
183static inline u32 ccsr_channel_busy_v(u32 r)
184{
185 return (r >> 28U) & 0x1U;
186}
187#endif
diff --git a/include/nvgpu/hw/gv11b/hw_ce_gv11b.h b/include/nvgpu/hw/gv11b/hw_ce_gv11b.h
deleted file mode 100644
index 57a76e6..0000000
--- a/include/nvgpu/hw/gv11b/hw_ce_gv11b.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ce_gv11b_h_
57#define _hw_ce_gv11b_h_
58
59static inline u32 ce_intr_status_r(u32 i)
60{
61 return 0x00104410U + i*128U;
62}
63static inline u32 ce_intr_status_blockpipe_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 ce_intr_status_blockpipe_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 ce_intr_status_nonblockpipe_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 ce_intr_status_nonblockpipe_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 ce_intr_status_launcherr_pending_f(void)
80{
81 return 0x4U;
82}
83static inline u32 ce_intr_status_launcherr_reset_f(void)
84{
85 return 0x4U;
86}
87static inline u32 ce_intr_status_invalid_config_pending_f(void)
88{
89 return 0x8U;
90}
91static inline u32 ce_intr_status_invalid_config_reset_f(void)
92{
93 return 0x8U;
94}
95static inline u32 ce_intr_status_mthd_buffer_fault_pending_f(void)
96{
97 return 0x10U;
98}
99static inline u32 ce_intr_status_mthd_buffer_fault_reset_f(void)
100{
101 return 0x10U;
102}
103static inline u32 ce_pce_map_r(void)
104{
105 return 0x00104028U;
106}
107static inline u32 ce_lce_opt_r(u32 i)
108{
109 return 0x00104414U + i*128U;
110}
111static inline u32 ce_lce_opt_force_barriers_npl__prod_f(void)
112{
113 return 0x8U;
114}
115#endif
diff --git a/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h b/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h
deleted file mode 100644
index 8b095b1..0000000
--- a/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h
+++ /dev/null
@@ -1,463 +0,0 @@
1/*
2 * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ctxsw_prog_gv11b_h_
57#define _hw_ctxsw_prog_gv11b_h_
58
59static inline u32 ctxsw_prog_fecs_header_v(void)
60{
61 return 0x00000100U;
62}
63static inline u32 ctxsw_prog_main_image_num_gpcs_o(void)
64{
65 return 0x00000008U;
66}
67static inline u32 ctxsw_prog_main_image_ctl_o(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 ctxsw_prog_main_image_ctl_type_f(u32 v)
72{
73 return (v & 0x3fU) << 0U;
74}
75static inline u32 ctxsw_prog_main_image_ctl_type_undefined_v(void)
76{
77 return 0x00000000U;
78}
79static inline u32 ctxsw_prog_main_image_ctl_type_opengl_v(void)
80{
81 return 0x00000008U;
82}
83static inline u32 ctxsw_prog_main_image_ctl_type_dx9_v(void)
84{
85 return 0x00000010U;
86}
87static inline u32 ctxsw_prog_main_image_ctl_type_dx10_v(void)
88{
89 return 0x00000011U;
90}
91static inline u32 ctxsw_prog_main_image_ctl_type_dx11_v(void)
92{
93 return 0x00000012U;
94}
95static inline u32 ctxsw_prog_main_image_ctl_type_compute_v(void)
96{
97 return 0x00000020U;
98}
99static inline u32 ctxsw_prog_main_image_ctl_type_per_veid_header_v(void)
100{
101 return 0x00000021U;
102}
103static inline u32 ctxsw_prog_main_image_patch_count_o(void)
104{
105 return 0x00000010U;
106}
107static inline u32 ctxsw_prog_main_image_context_id_o(void)
108{
109 return 0x000000f0U;
110}
111static inline u32 ctxsw_prog_main_image_patch_adr_lo_o(void)
112{
113 return 0x00000014U;
114}
115static inline u32 ctxsw_prog_main_image_patch_adr_hi_o(void)
116{
117 return 0x00000018U;
118}
119static inline u32 ctxsw_prog_main_image_zcull_o(void)
120{
121 return 0x0000001cU;
122}
123static inline u32 ctxsw_prog_main_image_zcull_mode_no_ctxsw_v(void)
124{
125 return 0x00000001U;
126}
127static inline u32 ctxsw_prog_main_image_zcull_mode_separate_buffer_v(void)
128{
129 return 0x00000002U;
130}
131static inline u32 ctxsw_prog_main_image_zcull_ptr_o(void)
132{
133 return 0x00000020U;
134}
135static inline u32 ctxsw_prog_main_image_pm_o(void)
136{
137 return 0x00000028U;
138}
139static inline u32 ctxsw_prog_main_image_pm_mode_m(void)
140{
141 return 0x7U << 0U;
142}
143static inline u32 ctxsw_prog_main_image_pm_mode_ctxsw_f(void)
144{
145 return 0x1U;
146}
147static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void)
148{
149 return 0x0U;
150}
151static inline u32 ctxsw_prog_main_image_pm_mode_stream_out_ctxsw_f(void)
152{
153 return 0x2U;
154}
155static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void)
156{
157 return 0x7U << 3U;
158}
159static inline u32 ctxsw_prog_main_image_pm_smpc_mode_ctxsw_f(void)
160{
161 return 0x8U;
162}
163static inline u32 ctxsw_prog_main_image_pm_smpc_mode_no_ctxsw_f(void)
164{
165 return 0x0U;
166}
167static inline u32 ctxsw_prog_main_image_pm_ptr_o(void)
168{
169 return 0x0000002cU;
170}
171static inline u32 ctxsw_prog_main_image_num_save_ops_o(void)
172{
173 return 0x000000f4U;
174}
175static inline u32 ctxsw_prog_main_image_num_wfi_save_ops_o(void)
176{
177 return 0x000000d0U;
178}
179static inline u32 ctxsw_prog_main_image_num_cta_save_ops_o(void)
180{
181 return 0x000000d4U;
182}
183static inline u32 ctxsw_prog_main_image_num_gfxp_save_ops_o(void)
184{
185 return 0x000000d8U;
186}
187static inline u32 ctxsw_prog_main_image_num_cilp_save_ops_o(void)
188{
189 return 0x000000dcU;
190}
191static inline u32 ctxsw_prog_main_image_num_restore_ops_o(void)
192{
193 return 0x000000f8U;
194}
195static inline u32 ctxsw_prog_main_image_zcull_ptr_hi_o(void)
196{
197 return 0x00000060U;
198}
199static inline u32 ctxsw_prog_main_image_zcull_ptr_hi_v_f(u32 v)
200{
201 return (v & 0x1ffffU) << 0U;
202}
203static inline u32 ctxsw_prog_main_image_pm_ptr_hi_o(void)
204{
205 return 0x00000094U;
206}
207static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_o(void)
208{
209 return 0x00000064U;
210}
211static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_v_f(u32 v)
212{
213 return (v & 0x1ffffU) << 0U;
214}
215static inline u32 ctxsw_prog_main_image_full_preemption_ptr_o(void)
216{
217 return 0x00000068U;
218}
219static inline u32 ctxsw_prog_main_image_full_preemption_ptr_v_f(u32 v)
220{
221 return (v & 0xffffffffU) << 0U;
222}
223static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_hi_o(void)
224{
225 return 0x00000070U;
226}
227static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_hi_v_f(u32 v)
228{
229 return (v & 0x1ffffU) << 0U;
230}
231static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_o(void)
232{
233 return 0x00000074U;
234}
235static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_v_f(u32 v)
236{
237 return (v & 0xffffffffU) << 0U;
238}
239static inline u32 ctxsw_prog_main_image_context_buffer_ptr_hi_o(void)
240{
241 return 0x00000078U;
242}
243static inline u32 ctxsw_prog_main_image_context_buffer_ptr_hi_v_f(u32 v)
244{
245 return (v & 0x1ffffU) << 0U;
246}
247static inline u32 ctxsw_prog_main_image_context_buffer_ptr_o(void)
248{
249 return 0x0000007cU;
250}
251static inline u32 ctxsw_prog_main_image_context_buffer_ptr_v_f(u32 v)
252{
253 return (v & 0xffffffffU) << 0U;
254}
255static inline u32 ctxsw_prog_main_image_magic_value_o(void)
256{
257 return 0x000000fcU;
258}
259static inline u32 ctxsw_prog_main_image_magic_value_v_value_v(void)
260{
261 return 0x600dc0deU;
262}
263static inline u32 ctxsw_prog_local_priv_register_ctl_o(void)
264{
265 return 0x0000000cU;
266}
267static inline u32 ctxsw_prog_local_priv_register_ctl_offset_v(u32 r)
268{
269 return (r >> 0U) & 0xffffU;
270}
271static inline u32 ctxsw_prog_main_image_global_cb_ptr_o(void)
272{
273 return 0x000000b8U;
274}
275static inline u32 ctxsw_prog_main_image_global_cb_ptr_v_f(u32 v)
276{
277 return (v & 0xffffffffU) << 0U;
278}
279static inline u32 ctxsw_prog_main_image_global_cb_ptr_hi_o(void)
280{
281 return 0x000000bcU;
282}
283static inline u32 ctxsw_prog_main_image_global_cb_ptr_hi_v_f(u32 v)
284{
285 return (v & 0x1ffffU) << 0U;
286}
287static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_o(void)
288{
289 return 0x000000c0U;
290}
291static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_v_f(u32 v)
292{
293 return (v & 0xffffffffU) << 0U;
294}
295static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_hi_o(void)
296{
297 return 0x000000c4U;
298}
299static inline u32 ctxsw_prog_main_image_global_pagepool_ptr_hi_v_f(u32 v)
300{
301 return (v & 0x1ffffU) << 0U;
302}
303static inline u32 ctxsw_prog_main_image_control_block_ptr_o(void)
304{
305 return 0x000000c8U;
306}
307static inline u32 ctxsw_prog_main_image_control_block_ptr_v_f(u32 v)
308{
309 return (v & 0xffffffffU) << 0U;
310}
311static inline u32 ctxsw_prog_main_image_control_block_ptr_hi_o(void)
312{
313 return 0x000000ccU;
314}
315static inline u32 ctxsw_prog_main_image_control_block_ptr_hi_v_f(u32 v)
316{
317 return (v & 0x1ffffU) << 0U;
318}
319static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_lo_o(void)
320{
321 return 0x000000e0U;
322}
323static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_lo_v_f(u32 v)
324{
325 return (v & 0xffffffffU) << 0U;
326}
327static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_hi_o(void)
328{
329 return 0x000000e4U;
330}
331static inline u32 ctxsw_prog_main_image_context_ramchain_buffer_addr_hi_v_f(u32 v)
332{
333 return (v & 0x1ffffU) << 0U;
334}
335static inline u32 ctxsw_prog_local_image_ppc_info_o(void)
336{
337 return 0x000000f4U;
338}
339static inline u32 ctxsw_prog_local_image_ppc_info_num_ppcs_v(u32 r)
340{
341 return (r >> 0U) & 0xffffU;
342}
343static inline u32 ctxsw_prog_local_image_ppc_info_ppc_mask_v(u32 r)
344{
345 return (r >> 16U) & 0xffffU;
346}
347static inline u32 ctxsw_prog_local_image_num_tpcs_o(void)
348{
349 return 0x000000f8U;
350}
351static inline u32 ctxsw_prog_local_magic_value_o(void)
352{
353 return 0x000000fcU;
354}
355static inline u32 ctxsw_prog_local_magic_value_v_value_v(void)
356{
357 return 0xad0becabU;
358}
359static inline u32 ctxsw_prog_main_extended_buffer_ctl_o(void)
360{
361 return 0x000000ecU;
362}
363static inline u32 ctxsw_prog_main_extended_buffer_ctl_offset_v(u32 r)
364{
365 return (r >> 0U) & 0xffffU;
366}
367static inline u32 ctxsw_prog_main_extended_buffer_ctl_size_v(u32 r)
368{
369 return (r >> 16U) & 0xffU;
370}
371static inline u32 ctxsw_prog_extended_buffer_segments_size_in_bytes_v(void)
372{
373 return 0x00000100U;
374}
375static inline u32 ctxsw_prog_extended_marker_size_in_bytes_v(void)
376{
377 return 0x00000004U;
378}
379static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_register_stride_v(void)
380{
381 return 0x00000000U;
382}
383static inline u32 ctxsw_prog_extended_sm_dsm_perf_counter_control_register_stride_v(void)
384{
385 return 0x00000002U;
386}
387static inline u32 ctxsw_prog_main_image_priv_access_map_config_o(void)
388{
389 return 0x000000a0U;
390}
391static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_s(void)
392{
393 return 2U;
394}
395static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_f(u32 v)
396{
397 return (v & 0x3U) << 0U;
398}
399static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_m(void)
400{
401 return 0x3U << 0U;
402}
403static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_v(u32 r)
404{
405 return (r >> 0U) & 0x3U;
406}
407static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_allow_all_f(void)
408{
409 return 0x0U;
410}
411static inline u32 ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f(void)
412{
413 return 0x2U;
414}
415static inline u32 ctxsw_prog_main_image_priv_access_map_addr_lo_o(void)
416{
417 return 0x000000a4U;
418}
419static inline u32 ctxsw_prog_main_image_priv_access_map_addr_hi_o(void)
420{
421 return 0x000000a8U;
422}
423static inline u32 ctxsw_prog_main_image_misc_options_o(void)
424{
425 return 0x0000003cU;
426}
427static inline u32 ctxsw_prog_main_image_misc_options_verif_features_m(void)
428{
429 return 0x1U << 3U;
430}
431static inline u32 ctxsw_prog_main_image_misc_options_verif_features_disabled_f(void)
432{
433 return 0x0U;
434}
435static inline u32 ctxsw_prog_main_image_graphics_preemption_options_o(void)
436{
437 return 0x00000080U;
438}
439static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_f(u32 v)
440{
441 return (v & 0x3U) << 0U;
442}
443static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_gfxp_f(void)
444{
445 return 0x1U;
446}
447static inline u32 ctxsw_prog_main_image_compute_preemption_options_o(void)
448{
449 return 0x00000084U;
450}
451static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_f(u32 v)
452{
453 return (v & 0x3U) << 0U;
454}
455static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cta_f(void)
456{
457 return 0x1U;
458}
459static inline u32 ctxsw_prog_main_image_compute_preemption_options_control_cilp_f(void)
460{
461 return 0x2U;
462}
463#endif
diff --git a/include/nvgpu/hw/gv11b/hw_falcon_gv11b.h b/include/nvgpu/hw/gv11b/hw_falcon_gv11b.h
deleted file mode 100644
index 31e883e..0000000
--- a/include/nvgpu/hw/gv11b/hw_falcon_gv11b.h
+++ /dev/null
@@ -1,603 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_falcon_gv11b_h_
57#define _hw_falcon_gv11b_h_
58
59static inline u32 falcon_falcon_irqsset_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 falcon_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 falcon_falcon_irqsclr_r(void)
68{
69 return 0x00000004U;
70}
71static inline u32 falcon_falcon_irqstat_r(void)
72{
73 return 0x00000008U;
74}
75static inline u32 falcon_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 falcon_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 falcon_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 falcon_falcon_irqmode_r(void)
88{
89 return 0x0000000cU;
90}
91static inline u32 falcon_falcon_irqmset_r(void)
92{
93 return 0x00000010U;
94}
95static inline u32 falcon_falcon_irqmset_gptmr_f(u32 v)
96{
97 return (v & 0x1U) << 0U;
98}
99static inline u32 falcon_falcon_irqmset_wdtmr_f(u32 v)
100{
101 return (v & 0x1U) << 1U;
102}
103static inline u32 falcon_falcon_irqmset_mthd_f(u32 v)
104{
105 return (v & 0x1U) << 2U;
106}
107static inline u32 falcon_falcon_irqmset_ctxsw_f(u32 v)
108{
109 return (v & 0x1U) << 3U;
110}
111static inline u32 falcon_falcon_irqmset_halt_f(u32 v)
112{
113 return (v & 0x1U) << 4U;
114}
115static inline u32 falcon_falcon_irqmset_exterr_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 falcon_falcon_irqmset_swgen0_f(u32 v)
120{
121 return (v & 0x1U) << 6U;
122}
123static inline u32 falcon_falcon_irqmset_swgen1_f(u32 v)
124{
125 return (v & 0x1U) << 7U;
126}
127static inline u32 falcon_falcon_irqmclr_r(void)
128{
129 return 0x00000014U;
130}
131static inline u32 falcon_falcon_irqmclr_gptmr_f(u32 v)
132{
133 return (v & 0x1U) << 0U;
134}
135static inline u32 falcon_falcon_irqmclr_wdtmr_f(u32 v)
136{
137 return (v & 0x1U) << 1U;
138}
139static inline u32 falcon_falcon_irqmclr_mthd_f(u32 v)
140{
141 return (v & 0x1U) << 2U;
142}
143static inline u32 falcon_falcon_irqmclr_ctxsw_f(u32 v)
144{
145 return (v & 0x1U) << 3U;
146}
147static inline u32 falcon_falcon_irqmclr_halt_f(u32 v)
148{
149 return (v & 0x1U) << 4U;
150}
151static inline u32 falcon_falcon_irqmclr_exterr_f(u32 v)
152{
153 return (v & 0x1U) << 5U;
154}
155static inline u32 falcon_falcon_irqmclr_swgen0_f(u32 v)
156{
157 return (v & 0x1U) << 6U;
158}
159static inline u32 falcon_falcon_irqmclr_swgen1_f(u32 v)
160{
161 return (v & 0x1U) << 7U;
162}
163static inline u32 falcon_falcon_irqmclr_ext_f(u32 v)
164{
165 return (v & 0xffU) << 8U;
166}
167static inline u32 falcon_falcon_irqmask_r(void)
168{
169 return 0x00000018U;
170}
171static inline u32 falcon_falcon_irqdest_r(void)
172{
173 return 0x0000001cU;
174}
175static inline u32 falcon_falcon_irqdest_host_gptmr_f(u32 v)
176{
177 return (v & 0x1U) << 0U;
178}
179static inline u32 falcon_falcon_irqdest_host_wdtmr_f(u32 v)
180{
181 return (v & 0x1U) << 1U;
182}
183static inline u32 falcon_falcon_irqdest_host_mthd_f(u32 v)
184{
185 return (v & 0x1U) << 2U;
186}
187static inline u32 falcon_falcon_irqdest_host_ctxsw_f(u32 v)
188{
189 return (v & 0x1U) << 3U;
190}
191static inline u32 falcon_falcon_irqdest_host_halt_f(u32 v)
192{
193 return (v & 0x1U) << 4U;
194}
195static inline u32 falcon_falcon_irqdest_host_exterr_f(u32 v)
196{
197 return (v & 0x1U) << 5U;
198}
199static inline u32 falcon_falcon_irqdest_host_swgen0_f(u32 v)
200{
201 return (v & 0x1U) << 6U;
202}
203static inline u32 falcon_falcon_irqdest_host_swgen1_f(u32 v)
204{
205 return (v & 0x1U) << 7U;
206}
207static inline u32 falcon_falcon_irqdest_host_ext_f(u32 v)
208{
209 return (v & 0xffU) << 8U;
210}
211static inline u32 falcon_falcon_irqdest_target_gptmr_f(u32 v)
212{
213 return (v & 0x1U) << 16U;
214}
215static inline u32 falcon_falcon_irqdest_target_wdtmr_f(u32 v)
216{
217 return (v & 0x1U) << 17U;
218}
219static inline u32 falcon_falcon_irqdest_target_mthd_f(u32 v)
220{
221 return (v & 0x1U) << 18U;
222}
223static inline u32 falcon_falcon_irqdest_target_ctxsw_f(u32 v)
224{
225 return (v & 0x1U) << 19U;
226}
227static inline u32 falcon_falcon_irqdest_target_halt_f(u32 v)
228{
229 return (v & 0x1U) << 20U;
230}
231static inline u32 falcon_falcon_irqdest_target_exterr_f(u32 v)
232{
233 return (v & 0x1U) << 21U;
234}
235static inline u32 falcon_falcon_irqdest_target_swgen0_f(u32 v)
236{
237 return (v & 0x1U) << 22U;
238}
239static inline u32 falcon_falcon_irqdest_target_swgen1_f(u32 v)
240{
241 return (v & 0x1U) << 23U;
242}
243static inline u32 falcon_falcon_irqdest_target_ext_f(u32 v)
244{
245 return (v & 0xffU) << 24U;
246}
247static inline u32 falcon_falcon_curctx_r(void)
248{
249 return 0x00000050U;
250}
251static inline u32 falcon_falcon_nxtctx_r(void)
252{
253 return 0x00000054U;
254}
255static inline u32 falcon_falcon_mailbox0_r(void)
256{
257 return 0x00000040U;
258}
259static inline u32 falcon_falcon_mailbox1_r(void)
260{
261 return 0x00000044U;
262}
263static inline u32 falcon_falcon_itfen_r(void)
264{
265 return 0x00000048U;
266}
267static inline u32 falcon_falcon_itfen_ctxen_enable_f(void)
268{
269 return 0x1U;
270}
271static inline u32 falcon_falcon_idlestate_r(void)
272{
273 return 0x0000004cU;
274}
275static inline u32 falcon_falcon_idlestate_falcon_busy_v(u32 r)
276{
277 return (r >> 0U) & 0x1U;
278}
279static inline u32 falcon_falcon_idlestate_ext_busy_v(u32 r)
280{
281 return (r >> 1U) & 0x7fffU;
282}
283static inline u32 falcon_falcon_os_r(void)
284{
285 return 0x00000080U;
286}
287static inline u32 falcon_falcon_engctl_r(void)
288{
289 return 0x000000a4U;
290}
291static inline u32 falcon_falcon_cpuctl_r(void)
292{
293 return 0x00000100U;
294}
295static inline u32 falcon_falcon_cpuctl_startcpu_f(u32 v)
296{
297 return (v & 0x1U) << 1U;
298}
299static inline u32 falcon_falcon_cpuctl_sreset_f(u32 v)
300{
301 return (v & 0x1U) << 2U;
302}
303static inline u32 falcon_falcon_cpuctl_hreset_f(u32 v)
304{
305 return (v & 0x1U) << 3U;
306}
307static inline u32 falcon_falcon_cpuctl_halt_intr_f(u32 v)
308{
309 return (v & 0x1U) << 4U;
310}
311static inline u32 falcon_falcon_cpuctl_halt_intr_m(void)
312{
313 return 0x1U << 4U;
314}
315static inline u32 falcon_falcon_cpuctl_halt_intr_v(u32 r)
316{
317 return (r >> 4U) & 0x1U;
318}
319static inline u32 falcon_falcon_cpuctl_stopped_m(void)
320{
321 return 0x1U << 5U;
322}
323static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
324{
325 return (v & 0x1U) << 6U;
326}
327static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_m(void)
328{
329 return 0x1U << 6U;
330}
331static inline u32 falcon_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
332{
333 return (r >> 6U) & 0x1U;
334}
335static inline u32 falcon_falcon_cpuctl_alias_r(void)
336{
337 return 0x00000130U;
338}
339static inline u32 falcon_falcon_cpuctl_alias_startcpu_f(u32 v)
340{
341 return (v & 0x1U) << 1U;
342}
343static inline u32 falcon_falcon_imemc_r(u32 i)
344{
345 return 0x00000180U + i*16U;
346}
347static inline u32 falcon_falcon_imemc_offs_f(u32 v)
348{
349 return (v & 0x3fU) << 2U;
350}
351static inline u32 falcon_falcon_imemc_blk_f(u32 v)
352{
353 return (v & 0xffU) << 8U;
354}
355static inline u32 falcon_falcon_imemc_aincw_f(u32 v)
356{
357 return (v & 0x1U) << 24U;
358}
359static inline u32 falcon_falcon_imemc_secure_f(u32 v)
360{
361 return (v & 0x1U) << 28U;
362}
363static inline u32 falcon_falcon_imemd_r(u32 i)
364{
365 return 0x00000184U + i*16U;
366}
367static inline u32 falcon_falcon_imemt_r(u32 i)
368{
369 return 0x00000188U + i*16U;
370}
371static inline u32 falcon_falcon_sctl_r(void)
372{
373 return 0x00000240U;
374}
375static inline u32 falcon_falcon_mmu_phys_sec_r(void)
376{
377 return 0x00100ce4U;
378}
379static inline u32 falcon_falcon_bootvec_r(void)
380{
381 return 0x00000104U;
382}
383static inline u32 falcon_falcon_bootvec_vec_f(u32 v)
384{
385 return (v & 0xffffffffU) << 0U;
386}
387static inline u32 falcon_falcon_dmactl_r(void)
388{
389 return 0x0000010cU;
390}
391static inline u32 falcon_falcon_dmactl_dmem_scrubbing_m(void)
392{
393 return 0x1U << 1U;
394}
395static inline u32 falcon_falcon_dmactl_imem_scrubbing_m(void)
396{
397 return 0x1U << 2U;
398}
399static inline u32 falcon_falcon_dmactl_require_ctx_f(u32 v)
400{
401 return (v & 0x1U) << 0U;
402}
403static inline u32 falcon_falcon_hwcfg_r(void)
404{
405 return 0x00000108U;
406}
407static inline u32 falcon_falcon_hwcfg_imem_size_v(u32 r)
408{
409 return (r >> 0U) & 0x1ffU;
410}
411static inline u32 falcon_falcon_hwcfg_dmem_size_v(u32 r)
412{
413 return (r >> 9U) & 0x1ffU;
414}
415static inline u32 falcon_falcon_dmatrfbase_r(void)
416{
417 return 0x00000110U;
418}
419static inline u32 falcon_falcon_dmatrfbase1_r(void)
420{
421 return 0x00000128U;
422}
423static inline u32 falcon_falcon_dmatrfmoffs_r(void)
424{
425 return 0x00000114U;
426}
427static inline u32 falcon_falcon_dmatrfcmd_r(void)
428{
429 return 0x00000118U;
430}
431static inline u32 falcon_falcon_dmatrfcmd_imem_f(u32 v)
432{
433 return (v & 0x1U) << 4U;
434}
435static inline u32 falcon_falcon_dmatrfcmd_write_f(u32 v)
436{
437 return (v & 0x1U) << 5U;
438}
439static inline u32 falcon_falcon_dmatrfcmd_size_f(u32 v)
440{
441 return (v & 0x7U) << 8U;
442}
443static inline u32 falcon_falcon_dmatrfcmd_ctxdma_f(u32 v)
444{
445 return (v & 0x7U) << 12U;
446}
447static inline u32 falcon_falcon_dmatrffboffs_r(void)
448{
449 return 0x0000011cU;
450}
451static inline u32 falcon_falcon_imctl_debug_r(void)
452{
453 return 0x0000015cU;
454}
455static inline u32 falcon_falcon_imctl_debug_addr_blk_f(u32 v)
456{
457 return (v & 0xffffffU) << 0U;
458}
459static inline u32 falcon_falcon_imctl_debug_cmd_f(u32 v)
460{
461 return (v & 0x7U) << 24U;
462}
463static inline u32 falcon_falcon_imstat_r(void)
464{
465 return 0x00000144U;
466}
467static inline u32 falcon_falcon_traceidx_r(void)
468{
469 return 0x00000148U;
470}
471static inline u32 falcon_falcon_traceidx_maxidx_v(u32 r)
472{
473 return (r >> 16U) & 0xffU;
474}
475static inline u32 falcon_falcon_traceidx_idx_f(u32 v)
476{
477 return (v & 0xffU) << 0U;
478}
479static inline u32 falcon_falcon_tracepc_r(void)
480{
481 return 0x0000014cU;
482}
483static inline u32 falcon_falcon_tracepc_pc_v(u32 r)
484{
485 return (r >> 0U) & 0xffffffU;
486}
487static inline u32 falcon_falcon_exterraddr_r(void)
488{
489 return 0x00000168U;
490}
491static inline u32 falcon_falcon_exterrstat_r(void)
492{
493 return 0x0000016cU;
494}
495static inline u32 falcon_falcon_exterrstat_valid_m(void)
496{
497 return 0x1U << 31U;
498}
499static inline u32 falcon_falcon_exterrstat_valid_v(u32 r)
500{
501 return (r >> 31U) & 0x1U;
502}
503static inline u32 falcon_falcon_exterrstat_valid_true_v(void)
504{
505 return 0x00000001U;
506}
507static inline u32 falcon_falcon_icd_cmd_r(void)
508{
509 return 0x00000200U;
510}
511static inline u32 falcon_falcon_icd_cmd_opc_s(void)
512{
513 return 4U;
514}
515static inline u32 falcon_falcon_icd_cmd_opc_f(u32 v)
516{
517 return (v & 0xfU) << 0U;
518}
519static inline u32 falcon_falcon_icd_cmd_opc_m(void)
520{
521 return 0xfU << 0U;
522}
523static inline u32 falcon_falcon_icd_cmd_opc_v(u32 r)
524{
525 return (r >> 0U) & 0xfU;
526}
527static inline u32 falcon_falcon_icd_cmd_opc_rreg_f(void)
528{
529 return 0x8U;
530}
531static inline u32 falcon_falcon_icd_cmd_opc_rstat_f(void)
532{
533 return 0xeU;
534}
535static inline u32 falcon_falcon_icd_cmd_idx_f(u32 v)
536{
537 return (v & 0x1fU) << 8U;
538}
539static inline u32 falcon_falcon_icd_rdata_r(void)
540{
541 return 0x0000020cU;
542}
543static inline u32 falcon_falcon_dmemc_r(u32 i)
544{
545 return 0x000001c0U + i*8U;
546}
547static inline u32 falcon_falcon_dmemc_offs_f(u32 v)
548{
549 return (v & 0x3fU) << 2U;
550}
551static inline u32 falcon_falcon_dmemc_offs_m(void)
552{
553 return 0x3fU << 2U;
554}
555static inline u32 falcon_falcon_dmemc_blk_f(u32 v)
556{
557 return (v & 0xffU) << 8U;
558}
559static inline u32 falcon_falcon_dmemc_blk_m(void)
560{
561 return 0xffU << 8U;
562}
563static inline u32 falcon_falcon_dmemc_aincw_f(u32 v)
564{
565 return (v & 0x1U) << 24U;
566}
567static inline u32 falcon_falcon_dmemc_aincr_f(u32 v)
568{
569 return (v & 0x1U) << 25U;
570}
571static inline u32 falcon_falcon_dmemd_r(u32 i)
572{
573 return 0x000001c4U + i*8U;
574}
575static inline u32 falcon_falcon_debug1_r(void)
576{
577 return 0x00000090U;
578}
579static inline u32 falcon_falcon_debug1_ctxsw_mode_s(void)
580{
581 return 1U;
582}
583static inline u32 falcon_falcon_debug1_ctxsw_mode_f(u32 v)
584{
585 return (v & 0x1U) << 16U;
586}
587static inline u32 falcon_falcon_debug1_ctxsw_mode_m(void)
588{
589 return 0x1U << 16U;
590}
591static inline u32 falcon_falcon_debug1_ctxsw_mode_v(u32 r)
592{
593 return (r >> 16U) & 0x1U;
594}
595static inline u32 falcon_falcon_debug1_ctxsw_mode_init_f(void)
596{
597 return 0x0U;
598}
599static inline u32 falcon_falcon_debuginfo_r(void)
600{
601 return 0x00000094U;
602}
603#endif
diff --git a/include/nvgpu/hw/gv11b/hw_fb_gv11b.h b/include/nvgpu/hw/gv11b/hw_fb_gv11b.h
deleted file mode 100644
index 767fc5a..0000000
--- a/include/nvgpu/hw/gv11b/hw_fb_gv11b.h
+++ /dev/null
@@ -1,1867 +0,0 @@
1/*
2 * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fb_gv11b_h_
57#define _hw_fb_gv11b_h_
58
59static inline u32 fb_fbhub_num_active_ltcs_r(void)
60{
61 return 0x00100800U;
62}
63static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_m(void)
64{
65 return 0x1U << 25U;
66}
67static inline u32 fb_fbhub_num_active_ltcs_hub_sys_atomic_mode_use_rmw_f(void)
68{
69 return 0x2000000U;
70}
71static inline u32 fb_fbhub_num_active_ltcs_hub_sys_ncoh_atomic_mode_m(void)
72{
73 return 0x1U << 26U;
74}
75static inline u32 fb_fbhub_num_active_ltcs_hub_sys_ncoh_atomic_mode_use_read_f(void)
76{
77 return 0x0U;
78}
79static inline u32 fb_mmu_ctrl_r(void)
80{
81 return 0x00100c80U;
82}
83static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r)
84{
85 return (r >> 15U) & 0x1U;
86}
87static inline u32 fb_mmu_ctrl_pri_fifo_empty_false_f(void)
88{
89 return 0x0U;
90}
91static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r)
92{
93 return (r >> 16U) & 0xffU;
94}
95static inline u32 fb_mmu_ctrl_atomic_capability_mode_m(void)
96{
97 return 0x3U << 24U;
98}
99static inline u32 fb_mmu_ctrl_atomic_capability_mode_l2_f(void)
100{
101 return 0x0U;
102}
103static inline u32 fb_mmu_ctrl_atomic_capability_mode_rmw_f(void)
104{
105 return 0x2000000U;
106}
107static inline u32 fb_mmu_ctrl_atomic_capability_sys_ncoh_mode_m(void)
108{
109 return 0x1U << 27U;
110}
111static inline u32 fb_mmu_ctrl_atomic_capability_sys_ncoh_mode_l2_f(void)
112{
113 return 0x0U;
114}
115static inline u32 fb_hshub_num_active_ltcs_r(void)
116{
117 return 0x001fbc20U;
118}
119static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_m(void)
120{
121 return 0x1U << 25U;
122}
123static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_use_read_f(void)
124{
125 return 0x0U;
126}
127static inline u32 fb_hshub_num_active_ltcs_hub_sys_atomic_mode_use_rmw_f(void)
128{
129 return 0x2000000U;
130}
131static inline u32 fb_priv_mmu_phy_secure_r(void)
132{
133 return 0x00100ce4U;
134}
135static inline u32 fb_mmu_invalidate_pdb_r(void)
136{
137 return 0x00100cb8U;
138}
139static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void)
140{
141 return 0x0U;
142}
143static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void)
144{
145 return 0x2U;
146}
147static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v)
148{
149 return (v & 0xfffffffU) << 4U;
150}
151static inline u32 fb_mmu_invalidate_r(void)
152{
153 return 0x00100cbcU;
154}
155static inline u32 fb_mmu_invalidate_all_va_true_f(void)
156{
157 return 0x1U;
158}
159static inline u32 fb_mmu_invalidate_all_pdb_true_f(void)
160{
161 return 0x2U;
162}
163static inline u32 fb_mmu_invalidate_hubtlb_only_s(void)
164{
165 return 1U;
166}
167static inline u32 fb_mmu_invalidate_hubtlb_only_f(u32 v)
168{
169 return (v & 0x1U) << 2U;
170}
171static inline u32 fb_mmu_invalidate_hubtlb_only_m(void)
172{
173 return 0x1U << 2U;
174}
175static inline u32 fb_mmu_invalidate_hubtlb_only_v(u32 r)
176{
177 return (r >> 2U) & 0x1U;
178}
179static inline u32 fb_mmu_invalidate_hubtlb_only_true_f(void)
180{
181 return 0x4U;
182}
183static inline u32 fb_mmu_invalidate_replay_s(void)
184{
185 return 3U;
186}
187static inline u32 fb_mmu_invalidate_replay_f(u32 v)
188{
189 return (v & 0x7U) << 3U;
190}
191static inline u32 fb_mmu_invalidate_replay_m(void)
192{
193 return 0x7U << 3U;
194}
195static inline u32 fb_mmu_invalidate_replay_v(u32 r)
196{
197 return (r >> 3U) & 0x7U;
198}
199static inline u32 fb_mmu_invalidate_replay_none_f(void)
200{
201 return 0x0U;
202}
203static inline u32 fb_mmu_invalidate_replay_start_f(void)
204{
205 return 0x8U;
206}
207static inline u32 fb_mmu_invalidate_replay_start_ack_all_f(void)
208{
209 return 0x10U;
210}
211static inline u32 fb_mmu_invalidate_replay_cancel_global_f(void)
212{
213 return 0x20U;
214}
215static inline u32 fb_mmu_invalidate_sys_membar_s(void)
216{
217 return 1U;
218}
219static inline u32 fb_mmu_invalidate_sys_membar_f(u32 v)
220{
221 return (v & 0x1U) << 6U;
222}
223static inline u32 fb_mmu_invalidate_sys_membar_m(void)
224{
225 return 0x1U << 6U;
226}
227static inline u32 fb_mmu_invalidate_sys_membar_v(u32 r)
228{
229 return (r >> 6U) & 0x1U;
230}
231static inline u32 fb_mmu_invalidate_sys_membar_true_f(void)
232{
233 return 0x40U;
234}
235static inline u32 fb_mmu_invalidate_ack_s(void)
236{
237 return 2U;
238}
239static inline u32 fb_mmu_invalidate_ack_f(u32 v)
240{
241 return (v & 0x3U) << 7U;
242}
243static inline u32 fb_mmu_invalidate_ack_m(void)
244{
245 return 0x3U << 7U;
246}
247static inline u32 fb_mmu_invalidate_ack_v(u32 r)
248{
249 return (r >> 7U) & 0x3U;
250}
251static inline u32 fb_mmu_invalidate_ack_ack_none_required_f(void)
252{
253 return 0x0U;
254}
255static inline u32 fb_mmu_invalidate_ack_ack_intranode_f(void)
256{
257 return 0x100U;
258}
259static inline u32 fb_mmu_invalidate_ack_ack_globally_f(void)
260{
261 return 0x80U;
262}
263static inline u32 fb_mmu_invalidate_cancel_client_id_s(void)
264{
265 return 6U;
266}
267static inline u32 fb_mmu_invalidate_cancel_client_id_f(u32 v)
268{
269 return (v & 0x3fU) << 9U;
270}
271static inline u32 fb_mmu_invalidate_cancel_client_id_m(void)
272{
273 return 0x3fU << 9U;
274}
275static inline u32 fb_mmu_invalidate_cancel_client_id_v(u32 r)
276{
277 return (r >> 9U) & 0x3fU;
278}
279static inline u32 fb_mmu_invalidate_cancel_gpc_id_s(void)
280{
281 return 5U;
282}
283static inline u32 fb_mmu_invalidate_cancel_gpc_id_f(u32 v)
284{
285 return (v & 0x1fU) << 15U;
286}
287static inline u32 fb_mmu_invalidate_cancel_gpc_id_m(void)
288{
289 return 0x1fU << 15U;
290}
291static inline u32 fb_mmu_invalidate_cancel_gpc_id_v(u32 r)
292{
293 return (r >> 15U) & 0x1fU;
294}
295static inline u32 fb_mmu_invalidate_cancel_client_type_s(void)
296{
297 return 1U;
298}
299static inline u32 fb_mmu_invalidate_cancel_client_type_f(u32 v)
300{
301 return (v & 0x1U) << 20U;
302}
303static inline u32 fb_mmu_invalidate_cancel_client_type_m(void)
304{
305 return 0x1U << 20U;
306}
307static inline u32 fb_mmu_invalidate_cancel_client_type_v(u32 r)
308{
309 return (r >> 20U) & 0x1U;
310}
311static inline u32 fb_mmu_invalidate_cancel_client_type_gpc_f(void)
312{
313 return 0x0U;
314}
315static inline u32 fb_mmu_invalidate_cancel_client_type_hub_f(void)
316{
317 return 0x100000U;
318}
319static inline u32 fb_mmu_invalidate_cancel_cache_level_s(void)
320{
321 return 3U;
322}
323static inline u32 fb_mmu_invalidate_cancel_cache_level_f(u32 v)
324{
325 return (v & 0x7U) << 24U;
326}
327static inline u32 fb_mmu_invalidate_cancel_cache_level_m(void)
328{
329 return 0x7U << 24U;
330}
331static inline u32 fb_mmu_invalidate_cancel_cache_level_v(u32 r)
332{
333 return (r >> 24U) & 0x7U;
334}
335static inline u32 fb_mmu_invalidate_cancel_cache_level_all_f(void)
336{
337 return 0x0U;
338}
339static inline u32 fb_mmu_invalidate_cancel_cache_level_pte_only_f(void)
340{
341 return 0x1000000U;
342}
343static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde0_f(void)
344{
345 return 0x2000000U;
346}
347static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde1_f(void)
348{
349 return 0x3000000U;
350}
351static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde2_f(void)
352{
353 return 0x4000000U;
354}
355static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde3_f(void)
356{
357 return 0x5000000U;
358}
359static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde4_f(void)
360{
361 return 0x6000000U;
362}
363static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde5_f(void)
364{
365 return 0x7000000U;
366}
367static inline u32 fb_mmu_invalidate_trigger_s(void)
368{
369 return 1U;
370}
371static inline u32 fb_mmu_invalidate_trigger_f(u32 v)
372{
373 return (v & 0x1U) << 31U;
374}
375static inline u32 fb_mmu_invalidate_trigger_m(void)
376{
377 return 0x1U << 31U;
378}
379static inline u32 fb_mmu_invalidate_trigger_v(u32 r)
380{
381 return (r >> 31U) & 0x1U;
382}
383static inline u32 fb_mmu_invalidate_trigger_true_f(void)
384{
385 return 0x80000000U;
386}
387static inline u32 fb_mmu_debug_wr_r(void)
388{
389 return 0x00100cc8U;
390}
391static inline u32 fb_mmu_debug_wr_aperture_s(void)
392{
393 return 2U;
394}
395static inline u32 fb_mmu_debug_wr_aperture_f(u32 v)
396{
397 return (v & 0x3U) << 0U;
398}
399static inline u32 fb_mmu_debug_wr_aperture_m(void)
400{
401 return 0x3U << 0U;
402}
403static inline u32 fb_mmu_debug_wr_aperture_v(u32 r)
404{
405 return (r >> 0U) & 0x3U;
406}
407static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void)
408{
409 return 0x0U;
410}
411static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void)
412{
413 return 0x2U;
414}
415static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void)
416{
417 return 0x3U;
418}
419static inline u32 fb_mmu_debug_wr_vol_false_f(void)
420{
421 return 0x0U;
422}
423static inline u32 fb_mmu_debug_wr_vol_true_v(void)
424{
425 return 0x00000001U;
426}
427static inline u32 fb_mmu_debug_wr_vol_true_f(void)
428{
429 return 0x4U;
430}
431static inline u32 fb_mmu_debug_wr_addr_f(u32 v)
432{
433 return (v & 0xfffffffU) << 4U;
434}
435static inline u32 fb_mmu_debug_wr_addr_alignment_v(void)
436{
437 return 0x0000000cU;
438}
439static inline u32 fb_mmu_debug_rd_r(void)
440{
441 return 0x00100cccU;
442}
443static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void)
444{
445 return 0x0U;
446}
447static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void)
448{
449 return 0x2U;
450}
451static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void)
452{
453 return 0x3U;
454}
455static inline u32 fb_mmu_debug_rd_vol_false_f(void)
456{
457 return 0x0U;
458}
459static inline u32 fb_mmu_debug_rd_addr_f(u32 v)
460{
461 return (v & 0xfffffffU) << 4U;
462}
463static inline u32 fb_mmu_debug_rd_addr_alignment_v(void)
464{
465 return 0x0000000cU;
466}
467static inline u32 fb_mmu_debug_ctrl_r(void)
468{
469 return 0x00100cc4U;
470}
471static inline u32 fb_mmu_debug_ctrl_debug_v(u32 r)
472{
473 return (r >> 16U) & 0x1U;
474}
475static inline u32 fb_mmu_debug_ctrl_debug_m(void)
476{
477 return 0x1U << 16U;
478}
479static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void)
480{
481 return 0x00000001U;
482}
483static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void)
484{
485 return 0x00000000U;
486}
487static inline u32 fb_mmu_vpr_info_r(void)
488{
489 return 0x00100cd0U;
490}
491static inline u32 fb_mmu_vpr_info_fetch_v(u32 r)
492{
493 return (r >> 2U) & 0x1U;
494}
495static inline u32 fb_mmu_vpr_info_fetch_false_v(void)
496{
497 return 0x00000000U;
498}
499static inline u32 fb_mmu_vpr_info_fetch_true_v(void)
500{
501 return 0x00000001U;
502}
503static inline u32 fb_mmu_l2tlb_ecc_status_r(void)
504{
505 return 0x00100e70U;
506}
507static inline u32 fb_mmu_l2tlb_ecc_status_corrected_err_l2tlb_sa_data_m(void)
508{
509 return 0x1U << 0U;
510}
511static inline u32 fb_mmu_l2tlb_ecc_status_uncorrected_err_l2tlb_sa_data_m(void)
512{
513 return 0x1U << 1U;
514}
515static inline u32 fb_mmu_l2tlb_ecc_status_corrected_err_total_counter_overflow_m(void)
516{
517 return 0x1U << 16U;
518}
519static inline u32 fb_mmu_l2tlb_ecc_status_uncorrected_err_total_counter_overflow_m(void)
520{
521 return 0x1U << 18U;
522}
523static inline u32 fb_mmu_l2tlb_ecc_status_reset_f(u32 v)
524{
525 return (v & 0x1U) << 30U;
526}
527static inline u32 fb_mmu_l2tlb_ecc_status_reset_clear_f(void)
528{
529 return 0x40000000U;
530}
531static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_r(void)
532{
533 return 0x00100e74U;
534}
535static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_s(void)
536{
537 return 16U;
538}
539static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_f(u32 v)
540{
541 return (v & 0xffffU) << 0U;
542}
543static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_m(void)
544{
545 return 0xffffU << 0U;
546}
547static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_v(u32 r)
548{
549 return (r >> 0U) & 0xffffU;
550}
551static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_r(void)
552{
553 return 0x00100e78U;
554}
555static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_s(void)
556{
557 return 16U;
558}
559static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_f(u32 v)
560{
561 return (v & 0xffffU) << 0U;
562}
563static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_m(void)
564{
565 return 0xffffU << 0U;
566}
567static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_v(u32 r)
568{
569 return (r >> 0U) & 0xffffU;
570}
571static inline u32 fb_mmu_l2tlb_ecc_address_r(void)
572{
573 return 0x00100e7cU;
574}
575static inline u32 fb_mmu_l2tlb_ecc_address_index_s(void)
576{
577 return 32U;
578}
579static inline u32 fb_mmu_l2tlb_ecc_address_index_f(u32 v)
580{
581 return (v & 0xffffffffU) << 0U;
582}
583static inline u32 fb_mmu_l2tlb_ecc_address_index_m(void)
584{
585 return 0xffffffffU << 0U;
586}
587static inline u32 fb_mmu_l2tlb_ecc_address_index_v(u32 r)
588{
589 return (r >> 0U) & 0xffffffffU;
590}
591static inline u32 fb_mmu_hubtlb_ecc_status_r(void)
592{
593 return 0x00100e84U;
594}
595static inline u32 fb_mmu_hubtlb_ecc_status_corrected_err_sa_data_m(void)
596{
597 return 0x1U << 0U;
598}
599static inline u32 fb_mmu_hubtlb_ecc_status_uncorrected_err_sa_data_m(void)
600{
601 return 0x1U << 1U;
602}
603static inline u32 fb_mmu_hubtlb_ecc_status_corrected_err_total_counter_overflow_m(void)
604{
605 return 0x1U << 16U;
606}
607static inline u32 fb_mmu_hubtlb_ecc_status_uncorrected_err_total_counter_overflow_m(void)
608{
609 return 0x1U << 18U;
610}
611static inline u32 fb_mmu_hubtlb_ecc_status_reset_f(u32 v)
612{
613 return (v & 0x1U) << 30U;
614}
615static inline u32 fb_mmu_hubtlb_ecc_status_reset_clear_f(void)
616{
617 return 0x40000000U;
618}
619static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_r(void)
620{
621 return 0x00100e88U;
622}
623static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_s(void)
624{
625 return 16U;
626}
627static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_f(u32 v)
628{
629 return (v & 0xffffU) << 0U;
630}
631static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_m(void)
632{
633 return 0xffffU << 0U;
634}
635static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_v(u32 r)
636{
637 return (r >> 0U) & 0xffffU;
638}
639static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_r(void)
640{
641 return 0x00100e8cU;
642}
643static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_s(void)
644{
645 return 16U;
646}
647static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_f(u32 v)
648{
649 return (v & 0xffffU) << 0U;
650}
651static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_m(void)
652{
653 return 0xffffU << 0U;
654}
655static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_v(u32 r)
656{
657 return (r >> 0U) & 0xffffU;
658}
659static inline u32 fb_mmu_hubtlb_ecc_address_r(void)
660{
661 return 0x00100e90U;
662}
663static inline u32 fb_mmu_hubtlb_ecc_address_index_s(void)
664{
665 return 32U;
666}
667static inline u32 fb_mmu_hubtlb_ecc_address_index_f(u32 v)
668{
669 return (v & 0xffffffffU) << 0U;
670}
671static inline u32 fb_mmu_hubtlb_ecc_address_index_m(void)
672{
673 return 0xffffffffU << 0U;
674}
675static inline u32 fb_mmu_hubtlb_ecc_address_index_v(u32 r)
676{
677 return (r >> 0U) & 0xffffffffU;
678}
679static inline u32 fb_mmu_fillunit_ecc_status_r(void)
680{
681 return 0x00100e98U;
682}
683static inline u32 fb_mmu_fillunit_ecc_status_corrected_err_pte_data_m(void)
684{
685 return 0x1U << 0U;
686}
687static inline u32 fb_mmu_fillunit_ecc_status_uncorrected_err_pte_data_m(void)
688{
689 return 0x1U << 1U;
690}
691static inline u32 fb_mmu_fillunit_ecc_status_corrected_err_pde0_data_m(void)
692{
693 return 0x1U << 2U;
694}
695static inline u32 fb_mmu_fillunit_ecc_status_uncorrected_err_pde0_data_m(void)
696{
697 return 0x1U << 3U;
698}
699static inline u32 fb_mmu_fillunit_ecc_status_corrected_err_total_counter_overflow_m(void)
700{
701 return 0x1U << 16U;
702}
703static inline u32 fb_mmu_fillunit_ecc_status_uncorrected_err_total_counter_overflow_m(void)
704{
705 return 0x1U << 18U;
706}
707static inline u32 fb_mmu_fillunit_ecc_status_reset_f(u32 v)
708{
709 return (v & 0x1U) << 30U;
710}
711static inline u32 fb_mmu_fillunit_ecc_status_reset_clear_f(void)
712{
713 return 0x40000000U;
714}
715static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_r(void)
716{
717 return 0x00100e9cU;
718}
719static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_s(void)
720{
721 return 16U;
722}
723static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_f(u32 v)
724{
725 return (v & 0xffffU) << 0U;
726}
727static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_m(void)
728{
729 return 0xffffU << 0U;
730}
731static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_v(u32 r)
732{
733 return (r >> 0U) & 0xffffU;
734}
735static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_r(void)
736{
737 return 0x00100ea0U;
738}
739static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_s(void)
740{
741 return 16U;
742}
743static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_f(u32 v)
744{
745 return (v & 0xffffU) << 0U;
746}
747static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_m(void)
748{
749 return 0xffffU << 0U;
750}
751static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_v(u32 r)
752{
753 return (r >> 0U) & 0xffffU;
754}
755static inline u32 fb_mmu_fillunit_ecc_address_r(void)
756{
757 return 0x00100ea4U;
758}
759static inline u32 fb_mmu_fillunit_ecc_address_index_s(void)
760{
761 return 32U;
762}
763static inline u32 fb_mmu_fillunit_ecc_address_index_f(u32 v)
764{
765 return (v & 0xffffffffU) << 0U;
766}
767static inline u32 fb_mmu_fillunit_ecc_address_index_m(void)
768{
769 return 0xffffffffU << 0U;
770}
771static inline u32 fb_mmu_fillunit_ecc_address_index_v(u32 r)
772{
773 return (r >> 0U) & 0xffffffffU;
774}
775static inline u32 fb_niso_flush_sysmem_addr_r(void)
776{
777 return 0x00100c10U;
778}
779static inline u32 fb_niso_intr_r(void)
780{
781 return 0x00100a20U;
782}
783static inline u32 fb_niso_intr_hub_access_counter_notify_m(void)
784{
785 return 0x1U << 0U;
786}
787static inline u32 fb_niso_intr_hub_access_counter_notify_pending_f(void)
788{
789 return 0x1U;
790}
791static inline u32 fb_niso_intr_hub_access_counter_error_m(void)
792{
793 return 0x1U << 1U;
794}
795static inline u32 fb_niso_intr_hub_access_counter_error_pending_f(void)
796{
797 return 0x2U;
798}
799static inline u32 fb_niso_intr_mmu_replayable_fault_notify_m(void)
800{
801 return 0x1U << 27U;
802}
803static inline u32 fb_niso_intr_mmu_replayable_fault_notify_pending_f(void)
804{
805 return 0x8000000U;
806}
807static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_m(void)
808{
809 return 0x1U << 28U;
810}
811static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_pending_f(void)
812{
813 return 0x10000000U;
814}
815static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_m(void)
816{
817 return 0x1U << 29U;
818}
819static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_pending_f(void)
820{
821 return 0x20000000U;
822}
823static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_m(void)
824{
825 return 0x1U << 30U;
826}
827static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_pending_f(void)
828{
829 return 0x40000000U;
830}
831static inline u32 fb_niso_intr_mmu_other_fault_notify_m(void)
832{
833 return 0x1U << 31U;
834}
835static inline u32 fb_niso_intr_mmu_other_fault_notify_pending_f(void)
836{
837 return 0x80000000U;
838}
839static inline u32 fb_niso_intr_mmu_ecc_uncorrected_error_notify_m(void)
840{
841 return 0x1U << 26U;
842}
843static inline u32 fb_niso_intr_mmu_ecc_uncorrected_error_notify_pending_f(void)
844{
845 return 0x4000000U;
846}
847static inline u32 fb_niso_intr_en_r(u32 i)
848{
849 return 0x00100a24U + i*4U;
850}
851static inline u32 fb_niso_intr_en__size_1_v(void)
852{
853 return 0x00000002U;
854}
855static inline u32 fb_niso_intr_en_hub_access_counter_notify_f(u32 v)
856{
857 return (v & 0x1U) << 0U;
858}
859static inline u32 fb_niso_intr_en_hub_access_counter_notify_enabled_f(void)
860{
861 return 0x1U;
862}
863static inline u32 fb_niso_intr_en_hub_access_counter_error_f(u32 v)
864{
865 return (v & 0x1U) << 1U;
866}
867static inline u32 fb_niso_intr_en_hub_access_counter_error_enabled_f(void)
868{
869 return 0x2U;
870}
871static inline u32 fb_niso_intr_en_mmu_replayable_fault_notify_f(u32 v)
872{
873 return (v & 0x1U) << 27U;
874}
875static inline u32 fb_niso_intr_en_mmu_replayable_fault_notify_enabled_f(void)
876{
877 return 0x8000000U;
878}
879static inline u32 fb_niso_intr_en_mmu_replayable_fault_overflow_f(u32 v)
880{
881 return (v & 0x1U) << 28U;
882}
883static inline u32 fb_niso_intr_en_mmu_replayable_fault_overflow_enabled_f(void)
884{
885 return 0x10000000U;
886}
887static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_notify_f(u32 v)
888{
889 return (v & 0x1U) << 29U;
890}
891static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_notify_enabled_f(void)
892{
893 return 0x20000000U;
894}
895static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_overflow_f(u32 v)
896{
897 return (v & 0x1U) << 30U;
898}
899static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_overflow_enabled_f(void)
900{
901 return 0x40000000U;
902}
903static inline u32 fb_niso_intr_en_mmu_other_fault_notify_f(u32 v)
904{
905 return (v & 0x1U) << 31U;
906}
907static inline u32 fb_niso_intr_en_mmu_other_fault_notify_enabled_f(void)
908{
909 return 0x80000000U;
910}
911static inline u32 fb_niso_intr_en_mmu_ecc_uncorrected_error_notify_f(u32 v)
912{
913 return (v & 0x1U) << 26U;
914}
915static inline u32 fb_niso_intr_en_mmu_ecc_uncorrected_error_notify_enabled_f(void)
916{
917 return 0x4000000U;
918}
919static inline u32 fb_niso_intr_en_set_r(u32 i)
920{
921 return 0x00100a2cU + i*4U;
922}
923static inline u32 fb_niso_intr_en_set__size_1_v(void)
924{
925 return 0x00000002U;
926}
927static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_m(void)
928{
929 return 0x1U << 0U;
930}
931static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_set_f(void)
932{
933 return 0x1U;
934}
935static inline u32 fb_niso_intr_en_set_hub_access_counter_error_m(void)
936{
937 return 0x1U << 1U;
938}
939static inline u32 fb_niso_intr_en_set_hub_access_counter_error_set_f(void)
940{
941 return 0x2U;
942}
943static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_m(void)
944{
945 return 0x1U << 27U;
946}
947static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_set_f(void)
948{
949 return 0x8000000U;
950}
951static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_m(void)
952{
953 return 0x1U << 28U;
954}
955static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_set_f(void)
956{
957 return 0x10000000U;
958}
959static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_m(void)
960{
961 return 0x1U << 29U;
962}
963static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_set_f(void)
964{
965 return 0x20000000U;
966}
967static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_m(void)
968{
969 return 0x1U << 30U;
970}
971static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_set_f(void)
972{
973 return 0x40000000U;
974}
975static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_m(void)
976{
977 return 0x1U << 31U;
978}
979static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_set_f(void)
980{
981 return 0x80000000U;
982}
983static inline u32 fb_niso_intr_en_set_mmu_ecc_uncorrected_error_notify_m(void)
984{
985 return 0x1U << 26U;
986}
987static inline u32 fb_niso_intr_en_set_mmu_ecc_uncorrected_error_notify_set_f(void)
988{
989 return 0x4000000U;
990}
991static inline u32 fb_niso_intr_en_clr_r(u32 i)
992{
993 return 0x00100a34U + i*4U;
994}
995static inline u32 fb_niso_intr_en_clr__size_1_v(void)
996{
997 return 0x00000002U;
998}
999static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_m(void)
1000{
1001 return 0x1U << 0U;
1002}
1003static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_set_f(void)
1004{
1005 return 0x1U;
1006}
1007static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_m(void)
1008{
1009 return 0x1U << 1U;
1010}
1011static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_set_f(void)
1012{
1013 return 0x2U;
1014}
1015static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_m(void)
1016{
1017 return 0x1U << 27U;
1018}
1019static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_set_f(void)
1020{
1021 return 0x8000000U;
1022}
1023static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_m(void)
1024{
1025 return 0x1U << 28U;
1026}
1027static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_set_f(void)
1028{
1029 return 0x10000000U;
1030}
1031static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_m(void)
1032{
1033 return 0x1U << 29U;
1034}
1035static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_set_f(void)
1036{
1037 return 0x20000000U;
1038}
1039static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_m(void)
1040{
1041 return 0x1U << 30U;
1042}
1043static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_set_f(void)
1044{
1045 return 0x40000000U;
1046}
1047static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_m(void)
1048{
1049 return 0x1U << 31U;
1050}
1051static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_set_f(void)
1052{
1053 return 0x80000000U;
1054}
1055static inline u32 fb_niso_intr_en_clr_mmu_ecc_uncorrected_error_notify_m(void)
1056{
1057 return 0x1U << 26U;
1058}
1059static inline u32 fb_niso_intr_en_clr_mmu_ecc_uncorrected_error_notify_set_f(void)
1060{
1061 return 0x4000000U;
1062}
1063static inline u32 fb_niso_intr_en_clr_mmu_non_replay_fault_buffer_v(void)
1064{
1065 return 0x00000000U;
1066}
1067static inline u32 fb_niso_intr_en_clr_mmu_replay_fault_buffer_v(void)
1068{
1069 return 0x00000001U;
1070}
1071static inline u32 fb_mmu_fault_buffer_lo_r(u32 i)
1072{
1073 return 0x00100e24U + i*20U;
1074}
1075static inline u32 fb_mmu_fault_buffer_lo__size_1_v(void)
1076{
1077 return 0x00000002U;
1078}
1079static inline u32 fb_mmu_fault_buffer_lo_addr_mode_f(u32 v)
1080{
1081 return (v & 0x1U) << 0U;
1082}
1083static inline u32 fb_mmu_fault_buffer_lo_addr_mode_v(u32 r)
1084{
1085 return (r >> 0U) & 0x1U;
1086}
1087static inline u32 fb_mmu_fault_buffer_lo_addr_mode_virtual_v(void)
1088{
1089 return 0x00000000U;
1090}
1091static inline u32 fb_mmu_fault_buffer_lo_addr_mode_virtual_f(void)
1092{
1093 return 0x0U;
1094}
1095static inline u32 fb_mmu_fault_buffer_lo_addr_mode_physical_v(void)
1096{
1097 return 0x00000001U;
1098}
1099static inline u32 fb_mmu_fault_buffer_lo_addr_mode_physical_f(void)
1100{
1101 return 0x1U;
1102}
1103static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_f(u32 v)
1104{
1105 return (v & 0x3U) << 1U;
1106}
1107static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_v(u32 r)
1108{
1109 return (r >> 1U) & 0x3U;
1110}
1111static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_coh_v(void)
1112{
1113 return 0x00000002U;
1114}
1115static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_coh_f(void)
1116{
1117 return 0x4U;
1118}
1119static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_nocoh_v(void)
1120{
1121 return 0x00000003U;
1122}
1123static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_nocoh_f(void)
1124{
1125 return 0x6U;
1126}
1127static inline u32 fb_mmu_fault_buffer_lo_phys_vol_f(u32 v)
1128{
1129 return (v & 0x1U) << 3U;
1130}
1131static inline u32 fb_mmu_fault_buffer_lo_phys_vol_v(u32 r)
1132{
1133 return (r >> 3U) & 0x1U;
1134}
1135static inline u32 fb_mmu_fault_buffer_lo_addr_f(u32 v)
1136{
1137 return (v & 0xfffffU) << 12U;
1138}
1139static inline u32 fb_mmu_fault_buffer_lo_addr_v(u32 r)
1140{
1141 return (r >> 12U) & 0xfffffU;
1142}
1143static inline u32 fb_mmu_fault_buffer_lo_addr_b(void)
1144{
1145 return 12U;
1146}
1147static inline u32 fb_mmu_fault_buffer_hi_r(u32 i)
1148{
1149 return 0x00100e28U + i*20U;
1150}
1151static inline u32 fb_mmu_fault_buffer_hi__size_1_v(void)
1152{
1153 return 0x00000002U;
1154}
1155static inline u32 fb_mmu_fault_buffer_hi_addr_f(u32 v)
1156{
1157 return (v & 0xffffffffU) << 0U;
1158}
1159static inline u32 fb_mmu_fault_buffer_hi_addr_v(u32 r)
1160{
1161 return (r >> 0U) & 0xffffffffU;
1162}
1163static inline u32 fb_mmu_fault_buffer_get_r(u32 i)
1164{
1165 return 0x00100e2cU + i*20U;
1166}
1167static inline u32 fb_mmu_fault_buffer_get__size_1_v(void)
1168{
1169 return 0x00000002U;
1170}
1171static inline u32 fb_mmu_fault_buffer_get_ptr_f(u32 v)
1172{
1173 return (v & 0xfffffU) << 0U;
1174}
1175static inline u32 fb_mmu_fault_buffer_get_ptr_m(void)
1176{
1177 return 0xfffffU << 0U;
1178}
1179static inline u32 fb_mmu_fault_buffer_get_ptr_v(u32 r)
1180{
1181 return (r >> 0U) & 0xfffffU;
1182}
1183static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_f(u32 v)
1184{
1185 return (v & 0x1U) << 30U;
1186}
1187static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_m(void)
1188{
1189 return 0x1U << 30U;
1190}
1191static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_v(void)
1192{
1193 return 0x00000001U;
1194}
1195static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_f(void)
1196{
1197 return 0x40000000U;
1198}
1199static inline u32 fb_mmu_fault_buffer_get_overflow_f(u32 v)
1200{
1201 return (v & 0x1U) << 31U;
1202}
1203static inline u32 fb_mmu_fault_buffer_get_overflow_m(void)
1204{
1205 return 0x1U << 31U;
1206}
1207static inline u32 fb_mmu_fault_buffer_get_overflow_clear_v(void)
1208{
1209 return 0x00000001U;
1210}
1211static inline u32 fb_mmu_fault_buffer_get_overflow_clear_f(void)
1212{
1213 return 0x80000000U;
1214}
1215static inline u32 fb_mmu_fault_buffer_put_r(u32 i)
1216{
1217 return 0x00100e30U + i*20U;
1218}
1219static inline u32 fb_mmu_fault_buffer_put__size_1_v(void)
1220{
1221 return 0x00000002U;
1222}
1223static inline u32 fb_mmu_fault_buffer_put_ptr_f(u32 v)
1224{
1225 return (v & 0xfffffU) << 0U;
1226}
1227static inline u32 fb_mmu_fault_buffer_put_ptr_v(u32 r)
1228{
1229 return (r >> 0U) & 0xfffffU;
1230}
1231static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_f(u32 v)
1232{
1233 return (v & 0x1U) << 30U;
1234}
1235static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_v(u32 r)
1236{
1237 return (r >> 30U) & 0x1U;
1238}
1239static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_yes_v(void)
1240{
1241 return 0x00000001U;
1242}
1243static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_yes_f(void)
1244{
1245 return 0x40000000U;
1246}
1247static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_no_v(void)
1248{
1249 return 0x00000000U;
1250}
1251static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_no_f(void)
1252{
1253 return 0x0U;
1254}
1255static inline u32 fb_mmu_fault_buffer_put_overflow_f(u32 v)
1256{
1257 return (v & 0x1U) << 31U;
1258}
1259static inline u32 fb_mmu_fault_buffer_put_overflow_v(u32 r)
1260{
1261 return (r >> 31U) & 0x1U;
1262}
1263static inline u32 fb_mmu_fault_buffer_put_overflow_yes_v(void)
1264{
1265 return 0x00000001U;
1266}
1267static inline u32 fb_mmu_fault_buffer_put_overflow_yes_f(void)
1268{
1269 return 0x80000000U;
1270}
1271static inline u32 fb_mmu_fault_buffer_size_r(u32 i)
1272{
1273 return 0x00100e34U + i*20U;
1274}
1275static inline u32 fb_mmu_fault_buffer_size__size_1_v(void)
1276{
1277 return 0x00000002U;
1278}
1279static inline u32 fb_mmu_fault_buffer_size_val_f(u32 v)
1280{
1281 return (v & 0xfffffU) << 0U;
1282}
1283static inline u32 fb_mmu_fault_buffer_size_val_v(u32 r)
1284{
1285 return (r >> 0U) & 0xfffffU;
1286}
1287static inline u32 fb_mmu_fault_buffer_size_overflow_intr_f(u32 v)
1288{
1289 return (v & 0x1U) << 29U;
1290}
1291static inline u32 fb_mmu_fault_buffer_size_overflow_intr_v(u32 r)
1292{
1293 return (r >> 29U) & 0x1U;
1294}
1295static inline u32 fb_mmu_fault_buffer_size_overflow_intr_enable_v(void)
1296{
1297 return 0x00000001U;
1298}
1299static inline u32 fb_mmu_fault_buffer_size_overflow_intr_enable_f(void)
1300{
1301 return 0x20000000U;
1302}
1303static inline u32 fb_mmu_fault_buffer_size_set_default_f(u32 v)
1304{
1305 return (v & 0x1U) << 30U;
1306}
1307static inline u32 fb_mmu_fault_buffer_size_set_default_v(u32 r)
1308{
1309 return (r >> 30U) & 0x1U;
1310}
1311static inline u32 fb_mmu_fault_buffer_size_set_default_yes_v(void)
1312{
1313 return 0x00000001U;
1314}
1315static inline u32 fb_mmu_fault_buffer_size_set_default_yes_f(void)
1316{
1317 return 0x40000000U;
1318}
1319static inline u32 fb_mmu_fault_buffer_size_enable_f(u32 v)
1320{
1321 return (v & 0x1U) << 31U;
1322}
1323static inline u32 fb_mmu_fault_buffer_size_enable_m(void)
1324{
1325 return 0x1U << 31U;
1326}
1327static inline u32 fb_mmu_fault_buffer_size_enable_v(u32 r)
1328{
1329 return (r >> 31U) & 0x1U;
1330}
1331static inline u32 fb_mmu_fault_buffer_size_enable_true_v(void)
1332{
1333 return 0x00000001U;
1334}
1335static inline u32 fb_mmu_fault_buffer_size_enable_true_f(void)
1336{
1337 return 0x80000000U;
1338}
1339static inline u32 fb_mmu_fault_addr_lo_r(void)
1340{
1341 return 0x00100e4cU;
1342}
1343static inline u32 fb_mmu_fault_addr_lo_phys_aperture_f(u32 v)
1344{
1345 return (v & 0x3U) << 0U;
1346}
1347static inline u32 fb_mmu_fault_addr_lo_phys_aperture_v(u32 r)
1348{
1349 return (r >> 0U) & 0x3U;
1350}
1351static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_coh_v(void)
1352{
1353 return 0x00000002U;
1354}
1355static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_coh_f(void)
1356{
1357 return 0x2U;
1358}
1359static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_nocoh_v(void)
1360{
1361 return 0x00000003U;
1362}
1363static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_nocoh_f(void)
1364{
1365 return 0x3U;
1366}
1367static inline u32 fb_mmu_fault_addr_lo_addr_f(u32 v)
1368{
1369 return (v & 0xfffffU) << 12U;
1370}
1371static inline u32 fb_mmu_fault_addr_lo_addr_v(u32 r)
1372{
1373 return (r >> 12U) & 0xfffffU;
1374}
1375static inline u32 fb_mmu_fault_addr_lo_addr_b(void)
1376{
1377 return 12U;
1378}
1379static inline u32 fb_mmu_fault_addr_hi_r(void)
1380{
1381 return 0x00100e50U;
1382}
1383static inline u32 fb_mmu_fault_addr_hi_addr_f(u32 v)
1384{
1385 return (v & 0xffffffffU) << 0U;
1386}
1387static inline u32 fb_mmu_fault_addr_hi_addr_v(u32 r)
1388{
1389 return (r >> 0U) & 0xffffffffU;
1390}
1391static inline u32 fb_mmu_fault_inst_lo_r(void)
1392{
1393 return 0x00100e54U;
1394}
1395static inline u32 fb_mmu_fault_inst_lo_engine_id_v(u32 r)
1396{
1397 return (r >> 0U) & 0x1ffU;
1398}
1399static inline u32 fb_mmu_fault_inst_lo_aperture_v(u32 r)
1400{
1401 return (r >> 10U) & 0x3U;
1402}
1403static inline u32 fb_mmu_fault_inst_lo_aperture_sys_coh_v(void)
1404{
1405 return 0x00000002U;
1406}
1407static inline u32 fb_mmu_fault_inst_lo_aperture_sys_nocoh_v(void)
1408{
1409 return 0x00000003U;
1410}
1411static inline u32 fb_mmu_fault_inst_lo_addr_f(u32 v)
1412{
1413 return (v & 0xfffffU) << 12U;
1414}
1415static inline u32 fb_mmu_fault_inst_lo_addr_v(u32 r)
1416{
1417 return (r >> 12U) & 0xfffffU;
1418}
1419static inline u32 fb_mmu_fault_inst_lo_addr_b(void)
1420{
1421 return 12U;
1422}
1423static inline u32 fb_mmu_fault_inst_hi_r(void)
1424{
1425 return 0x00100e58U;
1426}
1427static inline u32 fb_mmu_fault_inst_hi_addr_v(u32 r)
1428{
1429 return (r >> 0U) & 0xffffffffU;
1430}
1431static inline u32 fb_mmu_fault_info_r(void)
1432{
1433 return 0x00100e5cU;
1434}
1435static inline u32 fb_mmu_fault_info_fault_type_v(u32 r)
1436{
1437 return (r >> 0U) & 0x1fU;
1438}
1439static inline u32 fb_mmu_fault_info_replayable_fault_v(u32 r)
1440{
1441 return (r >> 7U) & 0x1U;
1442}
1443static inline u32 fb_mmu_fault_info_client_v(u32 r)
1444{
1445 return (r >> 8U) & 0x7fU;
1446}
1447static inline u32 fb_mmu_fault_info_access_type_v(u32 r)
1448{
1449 return (r >> 16U) & 0xfU;
1450}
1451static inline u32 fb_mmu_fault_info_client_type_v(u32 r)
1452{
1453 return (r >> 20U) & 0x1U;
1454}
1455static inline u32 fb_mmu_fault_info_gpc_id_v(u32 r)
1456{
1457 return (r >> 24U) & 0x1fU;
1458}
1459static inline u32 fb_mmu_fault_info_protected_mode_v(u32 r)
1460{
1461 return (r >> 29U) & 0x1U;
1462}
1463static inline u32 fb_mmu_fault_info_replayable_fault_en_v(u32 r)
1464{
1465 return (r >> 30U) & 0x1U;
1466}
1467static inline u32 fb_mmu_fault_info_valid_v(u32 r)
1468{
1469 return (r >> 31U) & 0x1U;
1470}
1471static inline u32 fb_mmu_fault_status_r(void)
1472{
1473 return 0x00100e60U;
1474}
1475static inline u32 fb_mmu_fault_status_dropped_bar1_phys_m(void)
1476{
1477 return 0x1U << 0U;
1478}
1479static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_v(void)
1480{
1481 return 0x00000001U;
1482}
1483static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_f(void)
1484{
1485 return 0x1U;
1486}
1487static inline u32 fb_mmu_fault_status_dropped_bar1_phys_clear_v(void)
1488{
1489 return 0x00000001U;
1490}
1491static inline u32 fb_mmu_fault_status_dropped_bar1_phys_clear_f(void)
1492{
1493 return 0x1U;
1494}
1495static inline u32 fb_mmu_fault_status_dropped_bar1_virt_m(void)
1496{
1497 return 0x1U << 1U;
1498}
1499static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_v(void)
1500{
1501 return 0x00000001U;
1502}
1503static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_f(void)
1504{
1505 return 0x2U;
1506}
1507static inline u32 fb_mmu_fault_status_dropped_bar1_virt_clear_v(void)
1508{
1509 return 0x00000001U;
1510}
1511static inline u32 fb_mmu_fault_status_dropped_bar1_virt_clear_f(void)
1512{
1513 return 0x2U;
1514}
1515static inline u32 fb_mmu_fault_status_dropped_bar2_phys_m(void)
1516{
1517 return 0x1U << 2U;
1518}
1519static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_v(void)
1520{
1521 return 0x00000001U;
1522}
1523static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_f(void)
1524{
1525 return 0x4U;
1526}
1527static inline u32 fb_mmu_fault_status_dropped_bar2_phys_clear_v(void)
1528{
1529 return 0x00000001U;
1530}
1531static inline u32 fb_mmu_fault_status_dropped_bar2_phys_clear_f(void)
1532{
1533 return 0x4U;
1534}
1535static inline u32 fb_mmu_fault_status_dropped_bar2_virt_m(void)
1536{
1537 return 0x1U << 3U;
1538}
1539static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_v(void)
1540{
1541 return 0x00000001U;
1542}
1543static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_f(void)
1544{
1545 return 0x8U;
1546}
1547static inline u32 fb_mmu_fault_status_dropped_bar2_virt_clear_v(void)
1548{
1549 return 0x00000001U;
1550}
1551static inline u32 fb_mmu_fault_status_dropped_bar2_virt_clear_f(void)
1552{
1553 return 0x8U;
1554}
1555static inline u32 fb_mmu_fault_status_dropped_ifb_phys_m(void)
1556{
1557 return 0x1U << 4U;
1558}
1559static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_v(void)
1560{
1561 return 0x00000001U;
1562}
1563static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_f(void)
1564{
1565 return 0x10U;
1566}
1567static inline u32 fb_mmu_fault_status_dropped_ifb_phys_clear_v(void)
1568{
1569 return 0x00000001U;
1570}
1571static inline u32 fb_mmu_fault_status_dropped_ifb_phys_clear_f(void)
1572{
1573 return 0x10U;
1574}
1575static inline u32 fb_mmu_fault_status_dropped_ifb_virt_m(void)
1576{
1577 return 0x1U << 5U;
1578}
1579static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_v(void)
1580{
1581 return 0x00000001U;
1582}
1583static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_f(void)
1584{
1585 return 0x20U;
1586}
1587static inline u32 fb_mmu_fault_status_dropped_ifb_virt_clear_v(void)
1588{
1589 return 0x00000001U;
1590}
1591static inline u32 fb_mmu_fault_status_dropped_ifb_virt_clear_f(void)
1592{
1593 return 0x20U;
1594}
1595static inline u32 fb_mmu_fault_status_dropped_other_phys_m(void)
1596{
1597 return 0x1U << 6U;
1598}
1599static inline u32 fb_mmu_fault_status_dropped_other_phys_set_v(void)
1600{
1601 return 0x00000001U;
1602}
1603static inline u32 fb_mmu_fault_status_dropped_other_phys_set_f(void)
1604{
1605 return 0x40U;
1606}
1607static inline u32 fb_mmu_fault_status_dropped_other_phys_clear_v(void)
1608{
1609 return 0x00000001U;
1610}
1611static inline u32 fb_mmu_fault_status_dropped_other_phys_clear_f(void)
1612{
1613 return 0x40U;
1614}
1615static inline u32 fb_mmu_fault_status_dropped_other_virt_m(void)
1616{
1617 return 0x1U << 7U;
1618}
1619static inline u32 fb_mmu_fault_status_dropped_other_virt_set_v(void)
1620{
1621 return 0x00000001U;
1622}
1623static inline u32 fb_mmu_fault_status_dropped_other_virt_set_f(void)
1624{
1625 return 0x80U;
1626}
1627static inline u32 fb_mmu_fault_status_dropped_other_virt_clear_v(void)
1628{
1629 return 0x00000001U;
1630}
1631static inline u32 fb_mmu_fault_status_dropped_other_virt_clear_f(void)
1632{
1633 return 0x80U;
1634}
1635static inline u32 fb_mmu_fault_status_replayable_m(void)
1636{
1637 return 0x1U << 8U;
1638}
1639static inline u32 fb_mmu_fault_status_replayable_set_v(void)
1640{
1641 return 0x00000001U;
1642}
1643static inline u32 fb_mmu_fault_status_replayable_set_f(void)
1644{
1645 return 0x100U;
1646}
1647static inline u32 fb_mmu_fault_status_replayable_reset_f(void)
1648{
1649 return 0x0U;
1650}
1651static inline u32 fb_mmu_fault_status_non_replayable_m(void)
1652{
1653 return 0x1U << 9U;
1654}
1655static inline u32 fb_mmu_fault_status_non_replayable_set_v(void)
1656{
1657 return 0x00000001U;
1658}
1659static inline u32 fb_mmu_fault_status_non_replayable_set_f(void)
1660{
1661 return 0x200U;
1662}
1663static inline u32 fb_mmu_fault_status_non_replayable_reset_f(void)
1664{
1665 return 0x0U;
1666}
1667static inline u32 fb_mmu_fault_status_replayable_error_m(void)
1668{
1669 return 0x1U << 10U;
1670}
1671static inline u32 fb_mmu_fault_status_replayable_error_set_v(void)
1672{
1673 return 0x00000001U;
1674}
1675static inline u32 fb_mmu_fault_status_replayable_error_set_f(void)
1676{
1677 return 0x400U;
1678}
1679static inline u32 fb_mmu_fault_status_replayable_error_reset_f(void)
1680{
1681 return 0x0U;
1682}
1683static inline u32 fb_mmu_fault_status_non_replayable_error_m(void)
1684{
1685 return 0x1U << 11U;
1686}
1687static inline u32 fb_mmu_fault_status_non_replayable_error_set_v(void)
1688{
1689 return 0x00000001U;
1690}
1691static inline u32 fb_mmu_fault_status_non_replayable_error_set_f(void)
1692{
1693 return 0x800U;
1694}
1695static inline u32 fb_mmu_fault_status_non_replayable_error_reset_f(void)
1696{
1697 return 0x0U;
1698}
1699static inline u32 fb_mmu_fault_status_replayable_overflow_m(void)
1700{
1701 return 0x1U << 12U;
1702}
1703static inline u32 fb_mmu_fault_status_replayable_overflow_set_v(void)
1704{
1705 return 0x00000001U;
1706}
1707static inline u32 fb_mmu_fault_status_replayable_overflow_set_f(void)
1708{
1709 return 0x1000U;
1710}
1711static inline u32 fb_mmu_fault_status_replayable_overflow_reset_f(void)
1712{
1713 return 0x0U;
1714}
1715static inline u32 fb_mmu_fault_status_non_replayable_overflow_m(void)
1716{
1717 return 0x1U << 13U;
1718}
1719static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_v(void)
1720{
1721 return 0x00000001U;
1722}
1723static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_f(void)
1724{
1725 return 0x2000U;
1726}
1727static inline u32 fb_mmu_fault_status_non_replayable_overflow_reset_f(void)
1728{
1729 return 0x0U;
1730}
1731static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_m(void)
1732{
1733 return 0x1U << 14U;
1734}
1735static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_v(void)
1736{
1737 return 0x00000001U;
1738}
1739static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_f(void)
1740{
1741 return 0x4000U;
1742}
1743static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_m(void)
1744{
1745 return 0x1U << 15U;
1746}
1747static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_v(void)
1748{
1749 return 0x00000001U;
1750}
1751static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_f(void)
1752{
1753 return 0x8000U;
1754}
1755static inline u32 fb_mmu_fault_status_busy_m(void)
1756{
1757 return 0x1U << 30U;
1758}
1759static inline u32 fb_mmu_fault_status_busy_true_v(void)
1760{
1761 return 0x00000001U;
1762}
1763static inline u32 fb_mmu_fault_status_busy_true_f(void)
1764{
1765 return 0x40000000U;
1766}
1767static inline u32 fb_mmu_fault_status_valid_m(void)
1768{
1769 return 0x1U << 31U;
1770}
1771static inline u32 fb_mmu_fault_status_valid_set_v(void)
1772{
1773 return 0x00000001U;
1774}
1775static inline u32 fb_mmu_fault_status_valid_set_f(void)
1776{
1777 return 0x80000000U;
1778}
1779static inline u32 fb_mmu_fault_status_valid_clear_v(void)
1780{
1781 return 0x00000001U;
1782}
1783static inline u32 fb_mmu_fault_status_valid_clear_f(void)
1784{
1785 return 0x80000000U;
1786}
1787static inline u32 fb_mmu_num_active_ltcs_r(void)
1788{
1789 return 0x00100ec0U;
1790}
1791static inline u32 fb_mmu_num_active_ltcs_count_f(u32 v)
1792{
1793 return (v & 0x1fU) << 0U;
1794}
1795static inline u32 fb_mmu_num_active_ltcs_count_v(u32 r)
1796{
1797 return (r >> 0U) & 0x1fU;
1798}
1799static inline u32 fb_mmu_cbc_base_r(void)
1800{
1801 return 0x00100ec4U;
1802}
1803static inline u32 fb_mmu_cbc_base_address_f(u32 v)
1804{
1805 return (v & 0x3ffffffU) << 0U;
1806}
1807static inline u32 fb_mmu_cbc_base_address_v(u32 r)
1808{
1809 return (r >> 0U) & 0x3ffffffU;
1810}
1811static inline u32 fb_mmu_cbc_base_address_alignment_shift_v(void)
1812{
1813 return 0x0000000bU;
1814}
1815static inline u32 fb_mmu_cbc_top_r(void)
1816{
1817 return 0x00100ec8U;
1818}
1819static inline u32 fb_mmu_cbc_top_size_f(u32 v)
1820{
1821 return (v & 0x7fffU) << 0U;
1822}
1823static inline u32 fb_mmu_cbc_top_size_v(u32 r)
1824{
1825 return (r >> 0U) & 0x7fffU;
1826}
1827static inline u32 fb_mmu_cbc_top_size_alignment_shift_v(void)
1828{
1829 return 0x0000000bU;
1830}
1831static inline u32 fb_mmu_cbc_max_r(void)
1832{
1833 return 0x00100eccU;
1834}
1835static inline u32 fb_mmu_cbc_max_comptagline_f(u32 v)
1836{
1837 return (v & 0xffffffU) << 0U;
1838}
1839static inline u32 fb_mmu_cbc_max_comptagline_v(u32 r)
1840{
1841 return (r >> 0U) & 0xffffffU;
1842}
1843static inline u32 fb_mmu_cbc_max_safe_f(u32 v)
1844{
1845 return (v & 0x1U) << 30U;
1846}
1847static inline u32 fb_mmu_cbc_max_safe_true_v(void)
1848{
1849 return 0x00000001U;
1850}
1851static inline u32 fb_mmu_cbc_max_safe_false_v(void)
1852{
1853 return 0x00000000U;
1854}
1855static inline u32 fb_mmu_cbc_max_unsafe_fault_f(u32 v)
1856{
1857 return (v & 0x1U) << 31U;
1858}
1859static inline u32 fb_mmu_cbc_max_unsafe_fault_enabled_v(void)
1860{
1861 return 0x00000000U;
1862}
1863static inline u32 fb_mmu_cbc_max_unsafe_fault_disabled_v(void)
1864{
1865 return 0x00000001U;
1866}
1867#endif
diff --git a/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h b/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h
deleted file mode 100644
index 9ec30bf..0000000
--- a/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h
+++ /dev/null
@@ -1,667 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fifo_gv11b_h_
57#define _hw_fifo_gv11b_h_
58
59static inline u32 fifo_bar1_base_r(void)
60{
61 return 0x00002254U;
62}
63static inline u32 fifo_bar1_base_ptr_f(u32 v)
64{
65 return (v & 0xfffffffU) << 0U;
66}
67static inline u32 fifo_bar1_base_ptr_align_shift_v(void)
68{
69 return 0x0000000cU;
70}
71static inline u32 fifo_bar1_base_valid_false_f(void)
72{
73 return 0x0U;
74}
75static inline u32 fifo_bar1_base_valid_true_f(void)
76{
77 return 0x10000000U;
78}
79static inline u32 fifo_userd_writeback_r(void)
80{
81 return 0x0000225cU;
82}
83static inline u32 fifo_userd_writeback_timer_f(u32 v)
84{
85 return (v & 0xffU) << 0U;
86}
87static inline u32 fifo_userd_writeback_timer_disabled_v(void)
88{
89 return 0x00000000U;
90}
91static inline u32 fifo_userd_writeback_timer_shorter_v(void)
92{
93 return 0x00000003U;
94}
95static inline u32 fifo_userd_writeback_timer_100us_v(void)
96{
97 return 0x00000064U;
98}
99static inline u32 fifo_userd_writeback_timescale_f(u32 v)
100{
101 return (v & 0xfU) << 12U;
102}
103static inline u32 fifo_userd_writeback_timescale_0_v(void)
104{
105 return 0x00000000U;
106}
107static inline u32 fifo_runlist_base_r(void)
108{
109 return 0x00002270U;
110}
111static inline u32 fifo_runlist_base_ptr_f(u32 v)
112{
113 return (v & 0xfffffffU) << 0U;
114}
115static inline u32 fifo_runlist_base_target_vid_mem_f(void)
116{
117 return 0x0U;
118}
119static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void)
120{
121 return 0x20000000U;
122}
123static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void)
124{
125 return 0x30000000U;
126}
127static inline u32 fifo_runlist_r(void)
128{
129 return 0x00002274U;
130}
131static inline u32 fifo_runlist_engine_f(u32 v)
132{
133 return (v & 0xfU) << 20U;
134}
135static inline u32 fifo_eng_runlist_base_r(u32 i)
136{
137 return 0x00002280U + i*8U;
138}
139static inline u32 fifo_eng_runlist_base__size_1_v(void)
140{
141 return 0x00000002U;
142}
143static inline u32 fifo_eng_runlist_r(u32 i)
144{
145 return 0x00002284U + i*8U;
146}
147static inline u32 fifo_eng_runlist__size_1_v(void)
148{
149 return 0x00000002U;
150}
151static inline u32 fifo_eng_runlist_length_f(u32 v)
152{
153 return (v & 0xffffU) << 0U;
154}
155static inline u32 fifo_eng_runlist_length_max_v(void)
156{
157 return 0x0000ffffU;
158}
159static inline u32 fifo_eng_runlist_pending_true_f(void)
160{
161 return 0x100000U;
162}
163static inline u32 fifo_pb_timeslice_r(u32 i)
164{
165 return 0x00002350U + i*4U;
166}
167static inline u32 fifo_pb_timeslice_timeout_16_f(void)
168{
169 return 0x10U;
170}
171static inline u32 fifo_pb_timeslice_timescale_0_f(void)
172{
173 return 0x0U;
174}
175static inline u32 fifo_pb_timeslice_enable_true_f(void)
176{
177 return 0x10000000U;
178}
179static inline u32 fifo_pbdma_map_r(u32 i)
180{
181 return 0x00002390U + i*4U;
182}
183static inline u32 fifo_intr_0_r(void)
184{
185 return 0x00002100U;
186}
187static inline u32 fifo_intr_0_bind_error_pending_f(void)
188{
189 return 0x1U;
190}
191static inline u32 fifo_intr_0_bind_error_reset_f(void)
192{
193 return 0x1U;
194}
195static inline u32 fifo_intr_0_sched_error_pending_f(void)
196{
197 return 0x100U;
198}
199static inline u32 fifo_intr_0_sched_error_reset_f(void)
200{
201 return 0x100U;
202}
203static inline u32 fifo_intr_0_chsw_error_pending_f(void)
204{
205 return 0x10000U;
206}
207static inline u32 fifo_intr_0_chsw_error_reset_f(void)
208{
209 return 0x10000U;
210}
211static inline u32 fifo_intr_0_memop_timeout_pending_f(void)
212{
213 return 0x800000U;
214}
215static inline u32 fifo_intr_0_memop_timeout_reset_f(void)
216{
217 return 0x800000U;
218}
219static inline u32 fifo_intr_0_lb_error_pending_f(void)
220{
221 return 0x1000000U;
222}
223static inline u32 fifo_intr_0_lb_error_reset_f(void)
224{
225 return 0x1000000U;
226}
227static inline u32 fifo_intr_0_pbdma_intr_pending_f(void)
228{
229 return 0x20000000U;
230}
231static inline u32 fifo_intr_0_runlist_event_pending_f(void)
232{
233 return 0x40000000U;
234}
235static inline u32 fifo_intr_0_channel_intr_pending_f(void)
236{
237 return 0x80000000U;
238}
239static inline u32 fifo_intr_0_ctxsw_timeout_pending_f(void)
240{
241 return 0x2U;
242}
243static inline u32 fifo_intr_en_0_r(void)
244{
245 return 0x00002140U;
246}
247static inline u32 fifo_intr_en_0_sched_error_f(u32 v)
248{
249 return (v & 0x1U) << 8U;
250}
251static inline u32 fifo_intr_en_0_sched_error_m(void)
252{
253 return 0x1U << 8U;
254}
255static inline u32 fifo_intr_en_0_ctxsw_timeout_pending_f(void)
256{
257 return 0x2U;
258}
259static inline u32 fifo_intr_en_1_r(void)
260{
261 return 0x00002528U;
262}
263static inline u32 fifo_intr_bind_error_r(void)
264{
265 return 0x0000252cU;
266}
267static inline u32 fifo_intr_sched_error_r(void)
268{
269 return 0x0000254cU;
270}
271static inline u32 fifo_intr_sched_error_code_f(u32 v)
272{
273 return (v & 0xffU) << 0U;
274}
275static inline u32 fifo_intr_chsw_error_r(void)
276{
277 return 0x0000256cU;
278}
279static inline u32 fifo_intr_ctxsw_timeout_r(void)
280{
281 return 0x00002a30U;
282}
283static inline u32 fifo_intr_ctxsw_timeout_engine_f(u32 v, u32 i)
284{
285 return (v & 0x1U) << (0U + i*1U);
286}
287static inline u32 fifo_intr_ctxsw_timeout_engine_v(u32 r, u32 i)
288{
289 return (r >> (0U + i*1U)) & 0x1U;
290}
291static inline u32 fifo_intr_ctxsw_timeout_engine__size_1_v(void)
292{
293 return 0x00000020U;
294}
295static inline u32 fifo_intr_ctxsw_timeout_engine_pending_v(void)
296{
297 return 0x00000001U;
298}
299static inline u32 fifo_intr_ctxsw_timeout_engine_pending_f(u32 i)
300{
301 return 0x1U << (0U + i*1U);
302}
303static inline u32 fifo_intr_ctxsw_timeout_info_r(u32 i)
304{
305 return 0x00003200U + i*4U;
306}
307static inline u32 fifo_intr_ctxsw_timeout_info__size_1_v(void)
308{
309 return 0x00000004U;
310}
311static inline u32 fifo_intr_ctxsw_timeout_info_ctxsw_state_v(u32 r)
312{
313 return (r >> 14U) & 0x3U;
314}
315static inline u32 fifo_intr_ctxsw_timeout_info_ctxsw_state_load_v(void)
316{
317 return 0x00000001U;
318}
319static inline u32 fifo_intr_ctxsw_timeout_info_ctxsw_state_save_v(void)
320{
321 return 0x00000002U;
322}
323static inline u32 fifo_intr_ctxsw_timeout_info_ctxsw_state_switch_v(void)
324{
325 return 0x00000003U;
326}
327static inline u32 fifo_intr_ctxsw_timeout_info_prev_tsgid_v(u32 r)
328{
329 return (r >> 0U) & 0x3fffU;
330}
331static inline u32 fifo_intr_ctxsw_timeout_info_next_tsgid_v(u32 r)
332{
333 return (r >> 16U) & 0x3fffU;
334}
335static inline u32 fifo_intr_ctxsw_timeout_info_status_v(u32 r)
336{
337 return (r >> 30U) & 0x3U;
338}
339static inline u32 fifo_intr_ctxsw_timeout_info_status_awaiting_ack_v(void)
340{
341 return 0x00000000U;
342}
343static inline u32 fifo_intr_ctxsw_timeout_info_status_eng_was_reset_v(void)
344{
345 return 0x00000001U;
346}
347static inline u32 fifo_intr_ctxsw_timeout_info_status_ack_received_v(void)
348{
349 return 0x00000002U;
350}
351static inline u32 fifo_intr_ctxsw_timeout_info_status_dropped_timeout_v(void)
352{
353 return 0x00000003U;
354}
355static inline u32 fifo_intr_pbdma_id_r(void)
356{
357 return 0x000025a0U;
358}
359static inline u32 fifo_intr_pbdma_id_status_f(u32 v, u32 i)
360{
361 return (v & 0x1U) << (0U + i*1U);
362}
363static inline u32 fifo_intr_pbdma_id_status_v(u32 r, u32 i)
364{
365 return (r >> (0U + i*1U)) & 0x1U;
366}
367static inline u32 fifo_intr_pbdma_id_status__size_1_v(void)
368{
369 return 0x00000003U;
370}
371static inline u32 fifo_intr_runlist_r(void)
372{
373 return 0x00002a00U;
374}
375static inline u32 fifo_fb_timeout_r(void)
376{
377 return 0x00002a04U;
378}
379static inline u32 fifo_fb_timeout_period_m(void)
380{
381 return 0x3fffffffU << 0U;
382}
383static inline u32 fifo_fb_timeout_period_max_f(void)
384{
385 return 0x3fffffffU;
386}
387static inline u32 fifo_fb_timeout_period_init_f(void)
388{
389 return 0x3c00U;
390}
391static inline u32 fifo_fb_timeout_detection_m(void)
392{
393 return 0x1U << 31U;
394}
395static inline u32 fifo_fb_timeout_detection_enabled_f(void)
396{
397 return 0x80000000U;
398}
399static inline u32 fifo_fb_timeout_detection_disabled_f(void)
400{
401 return 0x0U;
402}
403static inline u32 fifo_sched_disable_r(void)
404{
405 return 0x00002630U;
406}
407static inline u32 fifo_sched_disable_runlist_f(u32 v, u32 i)
408{
409 return (v & 0x1U) << (0U + i*1U);
410}
411static inline u32 fifo_sched_disable_runlist_m(u32 i)
412{
413 return 0x1U << (0U + i*1U);
414}
415static inline u32 fifo_sched_disable_true_v(void)
416{
417 return 0x00000001U;
418}
419static inline u32 fifo_runlist_preempt_r(void)
420{
421 return 0x00002638U;
422}
423static inline u32 fifo_runlist_preempt_runlist_f(u32 v, u32 i)
424{
425 return (v & 0x1U) << (0U + i*1U);
426}
427static inline u32 fifo_runlist_preempt_runlist_m(u32 i)
428{
429 return 0x1U << (0U + i*1U);
430}
431static inline u32 fifo_runlist_preempt_runlist_pending_v(void)
432{
433 return 0x00000001U;
434}
435static inline u32 fifo_preempt_r(void)
436{
437 return 0x00002634U;
438}
439static inline u32 fifo_preempt_pending_true_f(void)
440{
441 return 0x100000U;
442}
443static inline u32 fifo_preempt_type_channel_f(void)
444{
445 return 0x0U;
446}
447static inline u32 fifo_preempt_type_tsg_f(void)
448{
449 return 0x1000000U;
450}
451static inline u32 fifo_preempt_chid_f(u32 v)
452{
453 return (v & 0xfffU) << 0U;
454}
455static inline u32 fifo_preempt_id_f(u32 v)
456{
457 return (v & 0xfffU) << 0U;
458}
459static inline u32 fifo_engine_status_r(u32 i)
460{
461 return 0x00002640U + i*8U;
462}
463static inline u32 fifo_engine_status__size_1_v(void)
464{
465 return 0x00000004U;
466}
467static inline u32 fifo_engine_status_id_v(u32 r)
468{
469 return (r >> 0U) & 0xfffU;
470}
471static inline u32 fifo_engine_status_id_type_v(u32 r)
472{
473 return (r >> 12U) & 0x1U;
474}
475static inline u32 fifo_engine_status_id_type_chid_v(void)
476{
477 return 0x00000000U;
478}
479static inline u32 fifo_engine_status_id_type_tsgid_v(void)
480{
481 return 0x00000001U;
482}
483static inline u32 fifo_engine_status_ctx_status_v(u32 r)
484{
485 return (r >> 13U) & 0x7U;
486}
487static inline u32 fifo_engine_status_ctx_status_valid_v(void)
488{
489 return 0x00000001U;
490}
491static inline u32 fifo_engine_status_ctx_status_ctxsw_load_v(void)
492{
493 return 0x00000005U;
494}
495static inline u32 fifo_engine_status_ctx_status_ctxsw_save_v(void)
496{
497 return 0x00000006U;
498}
499static inline u32 fifo_engine_status_ctx_status_ctxsw_switch_v(void)
500{
501 return 0x00000007U;
502}
503static inline u32 fifo_engine_status_next_id_v(u32 r)
504{
505 return (r >> 16U) & 0xfffU;
506}
507static inline u32 fifo_engine_status_next_id_type_v(u32 r)
508{
509 return (r >> 28U) & 0x1U;
510}
511static inline u32 fifo_engine_status_next_id_type_chid_v(void)
512{
513 return 0x00000000U;
514}
515static inline u32 fifo_engine_status_eng_reload_v(u32 r)
516{
517 return (r >> 29U) & 0x1U;
518}
519static inline u32 fifo_engine_status_faulted_v(u32 r)
520{
521 return (r >> 30U) & 0x1U;
522}
523static inline u32 fifo_engine_status_faulted_true_v(void)
524{
525 return 0x00000001U;
526}
527static inline u32 fifo_engine_status_engine_v(u32 r)
528{
529 return (r >> 31U) & 0x1U;
530}
531static inline u32 fifo_engine_status_engine_idle_v(void)
532{
533 return 0x00000000U;
534}
535static inline u32 fifo_engine_status_engine_busy_v(void)
536{
537 return 0x00000001U;
538}
539static inline u32 fifo_engine_status_ctxsw_v(u32 r)
540{
541 return (r >> 15U) & 0x1U;
542}
543static inline u32 fifo_engine_status_ctxsw_in_progress_v(void)
544{
545 return 0x00000001U;
546}
547static inline u32 fifo_engine_status_ctxsw_in_progress_f(void)
548{
549 return 0x8000U;
550}
551static inline u32 fifo_eng_ctxsw_timeout_r(void)
552{
553 return 0x00002a0cU;
554}
555static inline u32 fifo_eng_ctxsw_timeout_period_f(u32 v)
556{
557 return (v & 0x7fffffffU) << 0U;
558}
559static inline u32 fifo_eng_ctxsw_timeout_period_m(void)
560{
561 return 0x7fffffffU << 0U;
562}
563static inline u32 fifo_eng_ctxsw_timeout_period_v(u32 r)
564{
565 return (r >> 0U) & 0x7fffffffU;
566}
567static inline u32 fifo_eng_ctxsw_timeout_period_init_f(void)
568{
569 return 0x3fffffU;
570}
571static inline u32 fifo_eng_ctxsw_timeout_period_max_f(void)
572{
573 return 0x7fffffffU;
574}
575static inline u32 fifo_eng_ctxsw_timeout_detection_f(u32 v)
576{
577 return (v & 0x1U) << 31U;
578}
579static inline u32 fifo_eng_ctxsw_timeout_detection_m(void)
580{
581 return 0x1U << 31U;
582}
583static inline u32 fifo_eng_ctxsw_timeout_detection_enabled_f(void)
584{
585 return 0x80000000U;
586}
587static inline u32 fifo_eng_ctxsw_timeout_detection_disabled_f(void)
588{
589 return 0x0U;
590}
591static inline u32 fifo_pbdma_status_r(u32 i)
592{
593 return 0x00003080U + i*4U;
594}
595static inline u32 fifo_pbdma_status__size_1_v(void)
596{
597 return 0x00000003U;
598}
599static inline u32 fifo_pbdma_status_id_v(u32 r)
600{
601 return (r >> 0U) & 0xfffU;
602}
603static inline u32 fifo_pbdma_status_id_type_v(u32 r)
604{
605 return (r >> 12U) & 0x1U;
606}
607static inline u32 fifo_pbdma_status_id_type_chid_v(void)
608{
609 return 0x00000000U;
610}
611static inline u32 fifo_pbdma_status_id_type_tsgid_v(void)
612{
613 return 0x00000001U;
614}
615static inline u32 fifo_pbdma_status_chan_status_v(u32 r)
616{
617 return (r >> 13U) & 0x7U;
618}
619static inline u32 fifo_pbdma_status_chan_status_valid_v(void)
620{
621 return 0x00000001U;
622}
623static inline u32 fifo_pbdma_status_chan_status_chsw_load_v(void)
624{
625 return 0x00000005U;
626}
627static inline u32 fifo_pbdma_status_chan_status_chsw_save_v(void)
628{
629 return 0x00000006U;
630}
631static inline u32 fifo_pbdma_status_chan_status_chsw_switch_v(void)
632{
633 return 0x00000007U;
634}
635static inline u32 fifo_pbdma_status_next_id_v(u32 r)
636{
637 return (r >> 16U) & 0xfffU;
638}
639static inline u32 fifo_pbdma_status_next_id_type_v(u32 r)
640{
641 return (r >> 28U) & 0x1U;
642}
643static inline u32 fifo_pbdma_status_next_id_type_chid_v(void)
644{
645 return 0x00000000U;
646}
647static inline u32 fifo_pbdma_status_chsw_v(u32 r)
648{
649 return (r >> 15U) & 0x1U;
650}
651static inline u32 fifo_pbdma_status_chsw_in_progress_v(void)
652{
653 return 0x00000001U;
654}
655static inline u32 fifo_cfg0_r(void)
656{
657 return 0x00002004U;
658}
659static inline u32 fifo_cfg0_num_pbdma_v(u32 r)
660{
661 return (r >> 0U) & 0xffU;
662}
663static inline u32 fifo_cfg0_pbdma_fault_id_v(u32 r)
664{
665 return (r >> 16U) & 0xffU;
666}
667#endif
diff --git a/include/nvgpu/hw/gv11b/hw_flush_gv11b.h b/include/nvgpu/hw/gv11b/hw_flush_gv11b.h
deleted file mode 100644
index 45c01de..0000000
--- a/include/nvgpu/hw/gv11b/hw_flush_gv11b.h
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_flush_gv11b_h_
57#define _hw_flush_gv11b_h_
58
59static inline u32 flush_l2_system_invalidate_r(void)
60{
61 return 0x00070004U;
62}
63static inline u32 flush_l2_system_invalidate_pending_v(u32 r)
64{
65 return (r >> 0U) & 0x1U;
66}
67static inline u32 flush_l2_system_invalidate_pending_busy_v(void)
68{
69 return 0x00000001U;
70}
71static inline u32 flush_l2_system_invalidate_pending_busy_f(void)
72{
73 return 0x1U;
74}
75static inline u32 flush_l2_system_invalidate_outstanding_v(u32 r)
76{
77 return (r >> 1U) & 0x1U;
78}
79static inline u32 flush_l2_system_invalidate_outstanding_true_v(void)
80{
81 return 0x00000001U;
82}
83static inline u32 flush_l2_flush_dirty_r(void)
84{
85 return 0x00070010U;
86}
87static inline u32 flush_l2_flush_dirty_pending_v(u32 r)
88{
89 return (r >> 0U) & 0x1U;
90}
91static inline u32 flush_l2_flush_dirty_pending_empty_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 flush_l2_flush_dirty_pending_empty_f(void)
96{
97 return 0x0U;
98}
99static inline u32 flush_l2_flush_dirty_pending_busy_v(void)
100{
101 return 0x00000001U;
102}
103static inline u32 flush_l2_flush_dirty_pending_busy_f(void)
104{
105 return 0x1U;
106}
107static inline u32 flush_l2_flush_dirty_outstanding_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 flush_l2_flush_dirty_outstanding_false_v(void)
112{
113 return 0x00000000U;
114}
115static inline u32 flush_l2_flush_dirty_outstanding_false_f(void)
116{
117 return 0x0U;
118}
119static inline u32 flush_l2_flush_dirty_outstanding_true_v(void)
120{
121 return 0x00000001U;
122}
123static inline u32 flush_l2_clean_comptags_r(void)
124{
125 return 0x0007000cU;
126}
127static inline u32 flush_l2_clean_comptags_pending_v(u32 r)
128{
129 return (r >> 0U) & 0x1U;
130}
131static inline u32 flush_l2_clean_comptags_pending_empty_v(void)
132{
133 return 0x00000000U;
134}
135static inline u32 flush_l2_clean_comptags_pending_empty_f(void)
136{
137 return 0x0U;
138}
139static inline u32 flush_l2_clean_comptags_pending_busy_v(void)
140{
141 return 0x00000001U;
142}
143static inline u32 flush_l2_clean_comptags_pending_busy_f(void)
144{
145 return 0x1U;
146}
147static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r)
148{
149 return (r >> 1U) & 0x1U;
150}
151static inline u32 flush_l2_clean_comptags_outstanding_false_v(void)
152{
153 return 0x00000000U;
154}
155static inline u32 flush_l2_clean_comptags_outstanding_false_f(void)
156{
157 return 0x0U;
158}
159static inline u32 flush_l2_clean_comptags_outstanding_true_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 flush_fb_flush_r(void)
164{
165 return 0x00070000U;
166}
167static inline u32 flush_fb_flush_pending_v(u32 r)
168{
169 return (r >> 0U) & 0x1U;
170}
171static inline u32 flush_fb_flush_pending_busy_v(void)
172{
173 return 0x00000001U;
174}
175static inline u32 flush_fb_flush_pending_busy_f(void)
176{
177 return 0x1U;
178}
179static inline u32 flush_fb_flush_outstanding_v(u32 r)
180{
181 return (r >> 1U) & 0x1U;
182}
183static inline u32 flush_fb_flush_outstanding_true_v(void)
184{
185 return 0x00000001U;
186}
187#endif
diff --git a/include/nvgpu/hw/gv11b/hw_fuse_gv11b.h b/include/nvgpu/hw/gv11b/hw_fuse_gv11b.h
deleted file mode 100644
index 9395da3..0000000
--- a/include/nvgpu/hw/gv11b/hw_fuse_gv11b.h
+++ /dev/null
@@ -1,155 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_fuse_gv11b_h_
57#define _hw_fuse_gv11b_h_
58
59static inline u32 fuse_status_opt_gpc_r(void)
60{
61 return 0x00021c1cU;
62}
63static inline u32 fuse_status_opt_tpc_gpc_r(u32 i)
64{
65 return 0x00021c38U + i*4U;
66}
67static inline u32 fuse_ctrl_opt_tpc_gpc_r(u32 i)
68{
69 return 0x00021838U + i*4U;
70}
71static inline u32 fuse_ctrl_opt_ram_svop_pdp_r(void)
72{
73 return 0x00021944U;
74}
75static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_f(u32 v)
76{
77 return (v & 0xffU) << 0U;
78}
79static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_m(void)
80{
81 return 0xffU << 0U;
82}
83static inline u32 fuse_ctrl_opt_ram_svop_pdp_data_v(u32 r)
84{
85 return (r >> 0U) & 0xffU;
86}
87static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_r(void)
88{
89 return 0x00021948U;
90}
91static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_f(u32 v)
92{
93 return (v & 0x1U) << 0U;
94}
95static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_m(void)
96{
97 return 0x1U << 0U;
98}
99static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_yes_f(void)
104{
105 return 0x1U;
106}
107static inline u32 fuse_ctrl_opt_ram_svop_pdp_override_data_no_f(void)
108{
109 return 0x0U;
110}
111static inline u32 fuse_status_opt_fbio_r(void)
112{
113 return 0x00021c14U;
114}
115static inline u32 fuse_status_opt_fbio_data_f(u32 v)
116{
117 return (v & 0xffffU) << 0U;
118}
119static inline u32 fuse_status_opt_fbio_data_m(void)
120{
121 return 0xffffU << 0U;
122}
123static inline u32 fuse_status_opt_fbio_data_v(u32 r)
124{
125 return (r >> 0U) & 0xffffU;
126}
127static inline u32 fuse_status_opt_rop_l2_fbp_r(u32 i)
128{
129 return 0x00021d70U + i*4U;
130}
131static inline u32 fuse_status_opt_fbp_r(void)
132{
133 return 0x00021d38U;
134}
135static inline u32 fuse_status_opt_fbp_idx_v(u32 r, u32 i)
136{
137 return (r >> (0U + i*1U)) & 0x1U;
138}
139static inline u32 fuse_opt_ecc_en_r(void)
140{
141 return 0x00021228U;
142}
143static inline u32 fuse_opt_feature_fuses_override_disable_r(void)
144{
145 return 0x000213f0U;
146}
147static inline u32 fuse_opt_sec_debug_en_r(void)
148{
149 return 0x00021218U;
150}
151static inline u32 fuse_opt_priv_sec_en_r(void)
152{
153 return 0x00021434U;
154}
155#endif
diff --git a/include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h b/include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h
deleted file mode 100644
index 922dd68..0000000
--- a/include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h
+++ /dev/null
@@ -1,571 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gmmu_gv11b_h_
57#define _hw_gmmu_gv11b_h_
58
59static inline u32 gmmu_new_pde_is_pte_w(void)
60{
61 return 0U;
62}
63static inline u32 gmmu_new_pde_is_pte_false_f(void)
64{
65 return 0x0U;
66}
67static inline u32 gmmu_new_pde_aperture_w(void)
68{
69 return 0U;
70}
71static inline u32 gmmu_new_pde_aperture_invalid_f(void)
72{
73 return 0x0U;
74}
75static inline u32 gmmu_new_pde_aperture_video_memory_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gmmu_new_pde_aperture_sys_mem_coh_f(void)
80{
81 return 0x4U;
82}
83static inline u32 gmmu_new_pde_aperture_sys_mem_ncoh_f(void)
84{
85 return 0x6U;
86}
87static inline u32 gmmu_new_pde_address_sys_f(u32 v)
88{
89 return (v & 0xffffffU) << 8U;
90}
91static inline u32 gmmu_new_pde_address_sys_w(void)
92{
93 return 0U;
94}
95static inline u32 gmmu_new_pde_vol_w(void)
96{
97 return 0U;
98}
99static inline u32 gmmu_new_pde_vol_true_f(void)
100{
101 return 0x8U;
102}
103static inline u32 gmmu_new_pde_vol_false_f(void)
104{
105 return 0x0U;
106}
107static inline u32 gmmu_new_pde_address_shift_v(void)
108{
109 return 0x0000000cU;
110}
111static inline u32 gmmu_new_pde__size_v(void)
112{
113 return 0x00000008U;
114}
115static inline u32 gmmu_new_dual_pde_is_pte_w(void)
116{
117 return 0U;
118}
119static inline u32 gmmu_new_dual_pde_is_pte_false_f(void)
120{
121 return 0x0U;
122}
123static inline u32 gmmu_new_dual_pde_aperture_big_w(void)
124{
125 return 0U;
126}
127static inline u32 gmmu_new_dual_pde_aperture_big_invalid_f(void)
128{
129 return 0x0U;
130}
131static inline u32 gmmu_new_dual_pde_aperture_big_video_memory_f(void)
132{
133 return 0x2U;
134}
135static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_coh_f(void)
136{
137 return 0x4U;
138}
139static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f(void)
140{
141 return 0x6U;
142}
143static inline u32 gmmu_new_dual_pde_address_big_sys_f(u32 v)
144{
145 return (v & 0xfffffffU) << 4U;
146}
147static inline u32 gmmu_new_dual_pde_address_big_sys_w(void)
148{
149 return 0U;
150}
151static inline u32 gmmu_new_dual_pde_aperture_small_w(void)
152{
153 return 2U;
154}
155static inline u32 gmmu_new_dual_pde_aperture_small_invalid_f(void)
156{
157 return 0x0U;
158}
159static inline u32 gmmu_new_dual_pde_aperture_small_video_memory_f(void)
160{
161 return 0x2U;
162}
163static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_coh_f(void)
164{
165 return 0x4U;
166}
167static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f(void)
168{
169 return 0x6U;
170}
171static inline u32 gmmu_new_dual_pde_vol_small_w(void)
172{
173 return 2U;
174}
175static inline u32 gmmu_new_dual_pde_vol_small_true_f(void)
176{
177 return 0x8U;
178}
179static inline u32 gmmu_new_dual_pde_vol_small_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 gmmu_new_dual_pde_vol_big_w(void)
184{
185 return 0U;
186}
187static inline u32 gmmu_new_dual_pde_vol_big_true_f(void)
188{
189 return 0x8U;
190}
191static inline u32 gmmu_new_dual_pde_vol_big_false_f(void)
192{
193 return 0x0U;
194}
195static inline u32 gmmu_new_dual_pde_address_small_sys_f(u32 v)
196{
197 return (v & 0xffffffU) << 8U;
198}
199static inline u32 gmmu_new_dual_pde_address_small_sys_w(void)
200{
201 return 2U;
202}
203static inline u32 gmmu_new_dual_pde_address_shift_v(void)
204{
205 return 0x0000000cU;
206}
207static inline u32 gmmu_new_dual_pde_address_big_shift_v(void)
208{
209 return 0x00000008U;
210}
211static inline u32 gmmu_new_dual_pde__size_v(void)
212{
213 return 0x00000010U;
214}
215static inline u32 gmmu_new_pte__size_v(void)
216{
217 return 0x00000008U;
218}
219static inline u32 gmmu_new_pte_valid_w(void)
220{
221 return 0U;
222}
223static inline u32 gmmu_new_pte_valid_true_f(void)
224{
225 return 0x1U;
226}
227static inline u32 gmmu_new_pte_valid_false_f(void)
228{
229 return 0x0U;
230}
231static inline u32 gmmu_new_pte_privilege_w(void)
232{
233 return 0U;
234}
235static inline u32 gmmu_new_pte_privilege_true_f(void)
236{
237 return 0x20U;
238}
239static inline u32 gmmu_new_pte_privilege_false_f(void)
240{
241 return 0x0U;
242}
243static inline u32 gmmu_new_pte_address_sys_f(u32 v)
244{
245 return (v & 0xffffffU) << 8U;
246}
247static inline u32 gmmu_new_pte_address_sys_w(void)
248{
249 return 0U;
250}
251static inline u32 gmmu_new_pte_address_vid_f(u32 v)
252{
253 return (v & 0xffffffU) << 8U;
254}
255static inline u32 gmmu_new_pte_address_vid_w(void)
256{
257 return 0U;
258}
259static inline u32 gmmu_new_pte_vol_w(void)
260{
261 return 0U;
262}
263static inline u32 gmmu_new_pte_vol_true_f(void)
264{
265 return 0x8U;
266}
267static inline u32 gmmu_new_pte_vol_false_f(void)
268{
269 return 0x0U;
270}
271static inline u32 gmmu_new_pte_aperture_w(void)
272{
273 return 0U;
274}
275static inline u32 gmmu_new_pte_aperture_video_memory_f(void)
276{
277 return 0x0U;
278}
279static inline u32 gmmu_new_pte_aperture_sys_mem_coh_f(void)
280{
281 return 0x4U;
282}
283static inline u32 gmmu_new_pte_aperture_sys_mem_ncoh_f(void)
284{
285 return 0x6U;
286}
287static inline u32 gmmu_new_pte_read_only_w(void)
288{
289 return 0U;
290}
291static inline u32 gmmu_new_pte_read_only_true_f(void)
292{
293 return 0x40U;
294}
295static inline u32 gmmu_new_pte_comptagline_f(u32 v)
296{
297 return (v & 0x3ffffU) << 4U;
298}
299static inline u32 gmmu_new_pte_comptagline_w(void)
300{
301 return 1U;
302}
303static inline u32 gmmu_new_pte_kind_f(u32 v)
304{
305 return (v & 0xffU) << 24U;
306}
307static inline u32 gmmu_new_pte_kind_w(void)
308{
309 return 1U;
310}
311static inline u32 gmmu_new_pte_address_shift_v(void)
312{
313 return 0x0000000cU;
314}
315static inline u32 gmmu_pte_kind_f(u32 v)
316{
317 return (v & 0xffU) << 4U;
318}
319static inline u32 gmmu_pte_kind_w(void)
320{
321 return 1U;
322}
323static inline u32 gmmu_pte_kind_invalid_v(void)
324{
325 return 0x000000ffU;
326}
327static inline u32 gmmu_pte_kind_pitch_v(void)
328{
329 return 0x00000000U;
330}
331static inline u32 gmmu_fault_client_type_gpc_v(void)
332{
333 return 0x00000000U;
334}
335static inline u32 gmmu_fault_client_type_hub_v(void)
336{
337 return 0x00000001U;
338}
339static inline u32 gmmu_fault_type_unbound_inst_block_v(void)
340{
341 return 0x00000004U;
342}
343static inline u32 gmmu_fault_type_pte_v(void)
344{
345 return 0x00000002U;
346}
347static inline u32 gmmu_fault_mmu_eng_id_bar2_v(void)
348{
349 return 0x00000005U;
350}
351static inline u32 gmmu_fault_mmu_eng_id_physical_v(void)
352{
353 return 0x0000001fU;
354}
355static inline u32 gmmu_fault_mmu_eng_id_ce0_v(void)
356{
357 return 0x0000000fU;
358}
359static inline u32 gmmu_fault_buf_size_v(void)
360{
361 return 0x00000020U;
362}
363static inline u32 gmmu_fault_buf_entry_inst_aperture_v(u32 r)
364{
365 return (r >> 8U) & 0x3U;
366}
367static inline u32 gmmu_fault_buf_entry_inst_aperture_w(void)
368{
369 return 0U;
370}
371static inline u32 gmmu_fault_buf_entry_inst_aperture_vid_mem_v(void)
372{
373 return 0x00000000U;
374}
375static inline u32 gmmu_fault_buf_entry_inst_aperture_sys_coh_v(void)
376{
377 return 0x00000002U;
378}
379static inline u32 gmmu_fault_buf_entry_inst_aperture_sys_nocoh_v(void)
380{
381 return 0x00000003U;
382}
383static inline u32 gmmu_fault_buf_entry_inst_lo_f(u32 v)
384{
385 return (v & 0xfffffU) << 12U;
386}
387static inline u32 gmmu_fault_buf_entry_inst_lo_v(u32 r)
388{
389 return (r >> 12U) & 0xfffffU;
390}
391static inline u32 gmmu_fault_buf_entry_inst_lo_b(void)
392{
393 return 12U;
394}
395static inline u32 gmmu_fault_buf_entry_inst_lo_w(void)
396{
397 return 0U;
398}
399static inline u32 gmmu_fault_buf_entry_inst_hi_v(u32 r)
400{
401 return (r >> 0U) & 0xffffffffU;
402}
403static inline u32 gmmu_fault_buf_entry_inst_hi_w(void)
404{
405 return 1U;
406}
407static inline u32 gmmu_fault_buf_entry_addr_phys_aperture_v(u32 r)
408{
409 return (r >> 0U) & 0x3U;
410}
411static inline u32 gmmu_fault_buf_entry_addr_phys_aperture_w(void)
412{
413 return 2U;
414}
415static inline u32 gmmu_fault_buf_entry_addr_lo_f(u32 v)
416{
417 return (v & 0xfffffU) << 12U;
418}
419static inline u32 gmmu_fault_buf_entry_addr_lo_v(u32 r)
420{
421 return (r >> 12U) & 0xfffffU;
422}
423static inline u32 gmmu_fault_buf_entry_addr_lo_b(void)
424{
425 return 12U;
426}
427static inline u32 gmmu_fault_buf_entry_addr_lo_w(void)
428{
429 return 2U;
430}
431static inline u32 gmmu_fault_buf_entry_addr_hi_v(u32 r)
432{
433 return (r >> 0U) & 0xffffffffU;
434}
435static inline u32 gmmu_fault_buf_entry_addr_hi_w(void)
436{
437 return 3U;
438}
439static inline u32 gmmu_fault_buf_entry_timestamp_lo_v(u32 r)
440{
441 return (r >> 0U) & 0xffffffffU;
442}
443static inline u32 gmmu_fault_buf_entry_timestamp_lo_w(void)
444{
445 return 4U;
446}
447static inline u32 gmmu_fault_buf_entry_timestamp_hi_v(u32 r)
448{
449 return (r >> 0U) & 0xffffffffU;
450}
451static inline u32 gmmu_fault_buf_entry_timestamp_hi_w(void)
452{
453 return 5U;
454}
455static inline u32 gmmu_fault_buf_entry_engine_id_v(u32 r)
456{
457 return (r >> 0U) & 0x1ffU;
458}
459static inline u32 gmmu_fault_buf_entry_engine_id_w(void)
460{
461 return 6U;
462}
463static inline u32 gmmu_fault_buf_entry_fault_type_v(u32 r)
464{
465 return (r >> 0U) & 0x1fU;
466}
467static inline u32 gmmu_fault_buf_entry_fault_type_w(void)
468{
469 return 7U;
470}
471static inline u32 gmmu_fault_buf_entry_replayable_fault_v(u32 r)
472{
473 return (r >> 7U) & 0x1U;
474}
475static inline u32 gmmu_fault_buf_entry_replayable_fault_w(void)
476{
477 return 7U;
478}
479static inline u32 gmmu_fault_buf_entry_replayable_fault_true_v(void)
480{
481 return 0x00000001U;
482}
483static inline u32 gmmu_fault_buf_entry_replayable_fault_true_f(void)
484{
485 return 0x80U;
486}
487static inline u32 gmmu_fault_buf_entry_client_v(u32 r)
488{
489 return (r >> 8U) & 0x7fU;
490}
491static inline u32 gmmu_fault_buf_entry_client_w(void)
492{
493 return 7U;
494}
495static inline u32 gmmu_fault_buf_entry_access_type_v(u32 r)
496{
497 return (r >> 16U) & 0xfU;
498}
499static inline u32 gmmu_fault_buf_entry_access_type_w(void)
500{
501 return 7U;
502}
503static inline u32 gmmu_fault_buf_entry_mmu_client_type_v(u32 r)
504{
505 return (r >> 20U) & 0x1U;
506}
507static inline u32 gmmu_fault_buf_entry_mmu_client_type_w(void)
508{
509 return 7U;
510}
511static inline u32 gmmu_fault_buf_entry_gpc_id_v(u32 r)
512{
513 return (r >> 24U) & 0x1fU;
514}
515static inline u32 gmmu_fault_buf_entry_gpc_id_w(void)
516{
517 return 7U;
518}
519static inline u32 gmmu_fault_buf_entry_protected_mode_v(u32 r)
520{
521 return (r >> 29U) & 0x1U;
522}
523static inline u32 gmmu_fault_buf_entry_protected_mode_w(void)
524{
525 return 7U;
526}
527static inline u32 gmmu_fault_buf_entry_protected_mode_true_v(void)
528{
529 return 0x00000001U;
530}
531static inline u32 gmmu_fault_buf_entry_protected_mode_true_f(void)
532{
533 return 0x20000000U;
534}
535static inline u32 gmmu_fault_buf_entry_replayable_fault_en_v(u32 r)
536{
537 return (r >> 30U) & 0x1U;
538}
539static inline u32 gmmu_fault_buf_entry_replayable_fault_en_w(void)
540{
541 return 7U;
542}
543static inline u32 gmmu_fault_buf_entry_replayable_fault_en_true_v(void)
544{
545 return 0x00000001U;
546}
547static inline u32 gmmu_fault_buf_entry_replayable_fault_en_true_f(void)
548{
549 return 0x40000000U;
550}
551static inline u32 gmmu_fault_buf_entry_valid_m(void)
552{
553 return 0x1U << 31U;
554}
555static inline u32 gmmu_fault_buf_entry_valid_v(u32 r)
556{
557 return (r >> 31U) & 0x1U;
558}
559static inline u32 gmmu_fault_buf_entry_valid_w(void)
560{
561 return 7U;
562}
563static inline u32 gmmu_fault_buf_entry_valid_true_v(void)
564{
565 return 0x00000001U;
566}
567static inline u32 gmmu_fault_buf_entry_valid_true_f(void)
568{
569 return 0x80000000U;
570}
571#endif
diff --git a/include/nvgpu/hw/gv11b/hw_gr_gv11b.h b/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
deleted file mode 100644
index 4a3da79..0000000
--- a/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
+++ /dev/null
@@ -1,5703 +0,0 @@
1/*
2 * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_gr_gv11b_h_
57#define _hw_gr_gv11b_h_
58
59static inline u32 gr_intr_r(void)
60{
61 return 0x00400100U;
62}
63static inline u32 gr_intr_notify_pending_f(void)
64{
65 return 0x1U;
66}
67static inline u32 gr_intr_notify_reset_f(void)
68{
69 return 0x1U;
70}
71static inline u32 gr_intr_semaphore_pending_f(void)
72{
73 return 0x2U;
74}
75static inline u32 gr_intr_semaphore_reset_f(void)
76{
77 return 0x2U;
78}
79static inline u32 gr_intr_illegal_method_pending_f(void)
80{
81 return 0x10U;
82}
83static inline u32 gr_intr_illegal_method_reset_f(void)
84{
85 return 0x10U;
86}
87static inline u32 gr_intr_illegal_notify_pending_f(void)
88{
89 return 0x40U;
90}
91static inline u32 gr_intr_illegal_notify_reset_f(void)
92{
93 return 0x40U;
94}
95static inline u32 gr_intr_firmware_method_f(u32 v)
96{
97 return (v & 0x1U) << 8U;
98}
99static inline u32 gr_intr_firmware_method_pending_f(void)
100{
101 return 0x100U;
102}
103static inline u32 gr_intr_firmware_method_reset_f(void)
104{
105 return 0x100U;
106}
107static inline u32 gr_intr_illegal_class_pending_f(void)
108{
109 return 0x20U;
110}
111static inline u32 gr_intr_illegal_class_reset_f(void)
112{
113 return 0x20U;
114}
115static inline u32 gr_intr_fecs_error_pending_f(void)
116{
117 return 0x80000U;
118}
119static inline u32 gr_intr_fecs_error_reset_f(void)
120{
121 return 0x80000U;
122}
123static inline u32 gr_intr_class_error_pending_f(void)
124{
125 return 0x100000U;
126}
127static inline u32 gr_intr_class_error_reset_f(void)
128{
129 return 0x100000U;
130}
131static inline u32 gr_intr_exception_pending_f(void)
132{
133 return 0x200000U;
134}
135static inline u32 gr_intr_exception_reset_f(void)
136{
137 return 0x200000U;
138}
139static inline u32 gr_fecs_intr_r(void)
140{
141 return 0x00400144U;
142}
143static inline u32 gr_class_error_r(void)
144{
145 return 0x00400110U;
146}
147static inline u32 gr_class_error_code_v(u32 r)
148{
149 return (r >> 0U) & 0xffffU;
150}
151static inline u32 gr_intr_nonstall_r(void)
152{
153 return 0x00400120U;
154}
155static inline u32 gr_intr_nonstall_trap_pending_f(void)
156{
157 return 0x2U;
158}
159static inline u32 gr_intr_en_r(void)
160{
161 return 0x0040013cU;
162}
163static inline u32 gr_exception_r(void)
164{
165 return 0x00400108U;
166}
167static inline u32 gr_exception_fe_m(void)
168{
169 return 0x1U << 0U;
170}
171static inline u32 gr_exception_gpc_m(void)
172{
173 return 0x1U << 24U;
174}
175static inline u32 gr_exception_memfmt_m(void)
176{
177 return 0x1U << 1U;
178}
179static inline u32 gr_exception_ds_m(void)
180{
181 return 0x1U << 4U;
182}
183static inline u32 gr_exception_sked_m(void)
184{
185 return 0x1U << 8U;
186}
187static inline u32 gr_exception_pd_m(void)
188{
189 return 0x1U << 2U;
190}
191static inline u32 gr_exception_scc_m(void)
192{
193 return 0x1U << 3U;
194}
195static inline u32 gr_exception_ssync_m(void)
196{
197 return 0x1U << 5U;
198}
199static inline u32 gr_exception_mme_m(void)
200{
201 return 0x1U << 7U;
202}
203static inline u32 gr_exception1_r(void)
204{
205 return 0x00400118U;
206}
207static inline u32 gr_exception1_gpc_0_pending_f(void)
208{
209 return 0x1U;
210}
211static inline u32 gr_exception2_r(void)
212{
213 return 0x0040011cU;
214}
215static inline u32 gr_exception_en_r(void)
216{
217 return 0x00400138U;
218}
219static inline u32 gr_exception_en_fe_m(void)
220{
221 return 0x1U << 0U;
222}
223static inline u32 gr_exception_en_fe_enabled_f(void)
224{
225 return 0x1U;
226}
227static inline u32 gr_exception_en_gpc_m(void)
228{
229 return 0x1U << 24U;
230}
231static inline u32 gr_exception_en_gpc_enabled_f(void)
232{
233 return 0x1000000U;
234}
235static inline u32 gr_exception_en_memfmt_m(void)
236{
237 return 0x1U << 1U;
238}
239static inline u32 gr_exception_en_memfmt_enabled_f(void)
240{
241 return 0x2U;
242}
243static inline u32 gr_exception_en_ds_m(void)
244{
245 return 0x1U << 4U;
246}
247static inline u32 gr_exception_en_ds_enabled_f(void)
248{
249 return 0x10U;
250}
251static inline u32 gr_exception_en_pd_m(void)
252{
253 return 0x1U << 2U;
254}
255static inline u32 gr_exception_en_pd_enabled_f(void)
256{
257 return 0x4U;
258}
259static inline u32 gr_exception_en_scc_m(void)
260{
261 return 0x1U << 3U;
262}
263static inline u32 gr_exception_en_scc_enabled_f(void)
264{
265 return 0x8U;
266}
267static inline u32 gr_exception_en_ssync_m(void)
268{
269 return 0x1U << 5U;
270}
271static inline u32 gr_exception_en_ssync_enabled_f(void)
272{
273 return 0x20U;
274}
275static inline u32 gr_exception_en_mme_m(void)
276{
277 return 0x1U << 7U;
278}
279static inline u32 gr_exception_en_mme_enabled_f(void)
280{
281 return 0x80U;
282}
283static inline u32 gr_exception_en_sked_m(void)
284{
285 return 0x1U << 8U;
286}
287static inline u32 gr_exception_en_sked_enabled_f(void)
288{
289 return 0x100U;
290}
291static inline u32 gr_exception1_en_r(void)
292{
293 return 0x00400130U;
294}
295static inline u32 gr_exception2_en_r(void)
296{
297 return 0x00400134U;
298}
299static inline u32 gr_gpfifo_ctl_r(void)
300{
301 return 0x00400500U;
302}
303static inline u32 gr_gpfifo_ctl_access_f(u32 v)
304{
305 return (v & 0x1U) << 0U;
306}
307static inline u32 gr_gpfifo_ctl_access_disabled_f(void)
308{
309 return 0x0U;
310}
311static inline u32 gr_gpfifo_ctl_access_enabled_f(void)
312{
313 return 0x1U;
314}
315static inline u32 gr_gpfifo_ctl_semaphore_access_f(u32 v)
316{
317 return (v & 0x1U) << 16U;
318}
319static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_v(void)
320{
321 return 0x00000001U;
322}
323static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_f(void)
324{
325 return 0x10000U;
326}
327static inline u32 gr_gpfifo_status_r(void)
328{
329 return 0x00400504U;
330}
331static inline u32 gr_trapped_addr_r(void)
332{
333 return 0x00400704U;
334}
335static inline u32 gr_trapped_addr_mthd_v(u32 r)
336{
337 return (r >> 2U) & 0xfffU;
338}
339static inline u32 gr_trapped_addr_subch_v(u32 r)
340{
341 return (r >> 16U) & 0x7U;
342}
343static inline u32 gr_trapped_addr_mme_generated_v(u32 r)
344{
345 return (r >> 20U) & 0x1U;
346}
347static inline u32 gr_trapped_addr_datahigh_v(u32 r)
348{
349 return (r >> 24U) & 0x1U;
350}
351static inline u32 gr_trapped_addr_priv_v(u32 r)
352{
353 return (r >> 28U) & 0x1U;
354}
355static inline u32 gr_trapped_addr_status_v(u32 r)
356{
357 return (r >> 31U) & 0x1U;
358}
359static inline u32 gr_trapped_data_lo_r(void)
360{
361 return 0x00400708U;
362}
363static inline u32 gr_trapped_data_hi_r(void)
364{
365 return 0x0040070cU;
366}
367static inline u32 gr_trapped_data_mme_r(void)
368{
369 return 0x00400710U;
370}
371static inline u32 gr_trapped_data_mme_pc_v(u32 r)
372{
373 return (r >> 0U) & 0xfffU;
374}
375static inline u32 gr_status_r(void)
376{
377 return 0x00400700U;
378}
379static inline u32 gr_status_fe_method_upper_v(u32 r)
380{
381 return (r >> 1U) & 0x1U;
382}
383static inline u32 gr_status_fe_method_lower_v(u32 r)
384{
385 return (r >> 2U) & 0x1U;
386}
387static inline u32 gr_status_fe_method_lower_idle_v(void)
388{
389 return 0x00000000U;
390}
391static inline u32 gr_status_fe_gi_v(u32 r)
392{
393 return (r >> 21U) & 0x1U;
394}
395static inline u32 gr_status_mask_r(void)
396{
397 return 0x00400610U;
398}
399static inline u32 gr_status_1_r(void)
400{
401 return 0x00400604U;
402}
403static inline u32 gr_status_2_r(void)
404{
405 return 0x00400608U;
406}
407static inline u32 gr_engine_status_r(void)
408{
409 return 0x0040060cU;
410}
411static inline u32 gr_engine_status_value_busy_f(void)
412{
413 return 0x1U;
414}
415static inline u32 gr_pri_be0_becs_be_exception_r(void)
416{
417 return 0x00410204U;
418}
419static inline u32 gr_pri_be0_becs_be_exception_en_r(void)
420{
421 return 0x00410208U;
422}
423static inline u32 gr_pri_gpc0_gpccs_gpc_exception_r(void)
424{
425 return 0x00502c90U;
426}
427static inline u32 gr_pri_gpc0_gpccs_gpc_exception_en_r(void)
428{
429 return 0x00502c94U;
430}
431static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_r(void)
432{
433 return 0x00504508U;
434}
435static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
436{
437 return 0x0050450cU;
438}
439static inline u32 gr_activity_0_r(void)
440{
441 return 0x00400380U;
442}
443static inline u32 gr_activity_1_r(void)
444{
445 return 0x00400384U;
446}
447static inline u32 gr_activity_2_r(void)
448{
449 return 0x00400388U;
450}
451static inline u32 gr_activity_4_r(void)
452{
453 return 0x00400390U;
454}
455static inline u32 gr_activity_4_gpc0_s(void)
456{
457 return 3U;
458}
459static inline u32 gr_activity_4_gpc0_f(u32 v)
460{
461 return (v & 0x7U) << 0U;
462}
463static inline u32 gr_activity_4_gpc0_m(void)
464{
465 return 0x7U << 0U;
466}
467static inline u32 gr_activity_4_gpc0_v(u32 r)
468{
469 return (r >> 0U) & 0x7U;
470}
471static inline u32 gr_activity_4_gpc0_empty_v(void)
472{
473 return 0x00000000U;
474}
475static inline u32 gr_activity_4_gpc0_preempted_v(void)
476{
477 return 0x00000004U;
478}
479static inline u32 gr_pri_gpc0_gcc_dbg_r(void)
480{
481 return 0x00501000U;
482}
483static inline u32 gr_pri_gpcs_gcc_dbg_r(void)
484{
485 return 0x00419000U;
486}
487static inline u32 gr_pri_gpcs_gcc_dbg_invalidate_m(void)
488{
489 return 0x1U << 1U;
490}
491static inline u32 gr_pri_gpc0_tpc0_sm_cache_control_r(void)
492{
493 return 0x0050433cU;
494}
495static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_r(void)
496{
497 return 0x00419b3cU;
498}
499static inline u32 gr_pri_gpcs_tpcs_sm_cache_control_invalidate_cache_m(void)
500{
501 return 0x1U << 0U;
502}
503static inline u32 gr_pri_sked_activity_r(void)
504{
505 return 0x00407054U;
506}
507static inline u32 gr_pri_gpc0_gpccs_gpc_activity0_r(void)
508{
509 return 0x00502c80U;
510}
511static inline u32 gr_pri_gpc0_gpccs_gpc_activity1_r(void)
512{
513 return 0x00502c84U;
514}
515static inline u32 gr_pri_gpc0_gpccs_gpc_activity2_r(void)
516{
517 return 0x00502c88U;
518}
519static inline u32 gr_pri_gpc0_gpccs_gpc_activity3_r(void)
520{
521 return 0x00502c8cU;
522}
523static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r(void)
524{
525 return 0x00504500U;
526}
527static inline u32 gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r(void)
528{
529 return 0x00504d00U;
530}
531static inline u32 gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r(void)
532{
533 return 0x00501d00U;
534}
535static inline u32 gr_pri_gpcs_gpccs_gpc_activity_0_r(void)
536{
537 return 0x0041ac80U;
538}
539static inline u32 gr_pri_gpcs_gpccs_gpc_activity_1_r(void)
540{
541 return 0x0041ac84U;
542}
543static inline u32 gr_pri_gpcs_gpccs_gpc_activity_2_r(void)
544{
545 return 0x0041ac88U;
546}
547static inline u32 gr_pri_gpcs_gpccs_gpc_activity_3_r(void)
548{
549 return 0x0041ac8cU;
550}
551static inline u32 gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r(void)
552{
553 return 0x0041c500U;
554}
555static inline u32 gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r(void)
556{
557 return 0x0041cd00U;
558}
559static inline u32 gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r(void)
560{
561 return 0x00419d00U;
562}
563static inline u32 gr_pri_be0_becs_be_activity0_r(void)
564{
565 return 0x00410200U;
566}
567static inline u32 gr_pri_be1_becs_be_activity0_r(void)
568{
569 return 0x00410600U;
570}
571static inline u32 gr_pri_bes_becs_be_activity0_r(void)
572{
573 return 0x00408a00U;
574}
575static inline u32 gr_pri_ds_mpipe_status_r(void)
576{
577 return 0x00405858U;
578}
579static inline u32 gr_pri_fe_go_idle_info_r(void)
580{
581 return 0x00404194U;
582}
583static inline u32 gr_pri_fe_chip_def_info_r(void)
584{
585 return 0x00404030U;
586}
587static inline u32 gr_pri_fe_chip_def_info_max_veid_count_v(u32 r)
588{
589 return (r >> 0U) & 0xfffU;
590}
591static inline u32 gr_pri_fe_chip_def_info_max_veid_count_init_v(void)
592{
593 return 0x00000040U;
594}
595static inline u32 gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r(void)
596{
597 return 0x00504238U;
598}
599static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_r(void)
600{
601 return 0x00504358U;
602}
603static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp0_m(void)
604{
605 return 0x1U << 0U;
606}
607static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp1_m(void)
608{
609 return 0x1U << 1U;
610}
611static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp2_m(void)
612{
613 return 0x1U << 2U;
614}
615static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp3_m(void)
616{
617 return 0x1U << 3U;
618}
619static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp4_m(void)
620{
621 return 0x1U << 4U;
622}
623static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp5_m(void)
624{
625 return 0x1U << 5U;
626}
627static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp6_m(void)
628{
629 return 0x1U << 6U;
630}
631static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_qrfdp7_m(void)
632{
633 return 0x1U << 7U;
634}
635static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp0_m(void)
636{
637 return 0x1U << 8U;
638}
639static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp1_m(void)
640{
641 return 0x1U << 9U;
642}
643static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp2_m(void)
644{
645 return 0x1U << 10U;
646}
647static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp3_m(void)
648{
649 return 0x1U << 11U;
650}
651static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp4_m(void)
652{
653 return 0x1U << 12U;
654}
655static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp5_m(void)
656{
657 return 0x1U << 13U;
658}
659static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp6_m(void)
660{
661 return 0x1U << 14U;
662}
663static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_qrfdp7_m(void)
664{
665 return 0x1U << 15U;
666}
667static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
668{
669 return (r >> 24U) & 0x1U;
670}
671static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
672{
673 return (r >> 26U) & 0x1U;
674}
675static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_status_reset_task_f(void)
676{
677 return 0x40000000U;
678}
679static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_r(void)
680{
681 return 0x0050435cU;
682}
683static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_total_s(void)
684{
685 return 16U;
686}
687static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_total_v(u32 r)
688{
689 return (r >> 0U) & 0xffffU;
690}
691static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_r(void)
692{
693 return 0x00504360U;
694}
695static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_total_s(void)
696{
697 return 16U;
698}
699static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_total_v(u32 r)
700{
701 return (r >> 0U) & 0xffffU;
702}
703static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_r(void)
704{
705 return 0x0050436cU;
706}
707static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_corrected_err_el1_0_m(void)
708{
709 return 0x1U << 0U;
710}
711static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_corrected_err_el1_1_m(void)
712{
713 return 0x1U << 1U;
714}
715static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_uncorrected_err_el1_0_m(void)
716{
717 return 0x1U << 2U;
718}
719static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_uncorrected_err_el1_1_m(void)
720{
721 return 0x1U << 3U;
722}
723static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
724{
725 return (r >> 8U) & 0x1U;
726}
727static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
728{
729 return (r >> 10U) & 0x1U;
730}
731static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_status_reset_task_f(void)
732{
733 return 0x40000000U;
734}
735static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_r(void)
736{
737 return 0x00504370U;
738}
739static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_total_s(void)
740{
741 return 16U;
742}
743static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_total_v(u32 r)
744{
745 return (r >> 0U) & 0xffffU;
746}
747static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_r(void)
748{
749 return 0x00504374U;
750}
751static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_total_s(void)
752{
753 return 16U;
754}
755static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_total_v(u32 r)
756{
757 return (r >> 0U) & 0xffffU;
758}
759static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_r(void)
760{
761 return 0x0050464cU;
762}
763static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_corrected_err_l0_data_m(void)
764{
765 return 0x1U << 0U;
766}
767static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_corrected_err_l0_predecode_m(void)
768{
769 return 0x1U << 1U;
770}
771static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_corrected_err_l1_data_m(void)
772{
773 return 0x1U << 2U;
774}
775static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_corrected_err_l1_predecode_m(void)
776{
777 return 0x1U << 3U;
778}
779static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_uncorrected_err_l0_data_m(void)
780{
781 return 0x1U << 4U;
782}
783static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_uncorrected_err_l0_predecode_m(void)
784{
785 return 0x1U << 5U;
786}
787static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_uncorrected_err_l1_data_m(void)
788{
789 return 0x1U << 6U;
790}
791static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_uncorrected_err_l1_predecode_m(void)
792{
793 return 0x1U << 7U;
794}
795static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
796{
797 return (r >> 16U) & 0x1U;
798}
799static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
800{
801 return (r >> 18U) & 0x1U;
802}
803static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_status_reset_task_f(void)
804{
805 return 0x40000000U;
806}
807static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_corrected_err_count_r(void)
808{
809 return 0x00504650U;
810}
811static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_corrected_err_count_total_s(void)
812{
813 return 16U;
814}
815static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_corrected_err_count_total_v(u32 r)
816{
817 return (r >> 0U) & 0xffffU;
818}
819static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_uncorrected_err_count_r(void)
820{
821 return 0x00504654U;
822}
823static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_uncorrected_err_count_total_s(void)
824{
825 return 16U;
826}
827static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_uncorrected_err_count_total_v(u32 r)
828{
829 return (r >> 0U) & 0xffffU;
830}
831static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_r(void)
832{
833 return 0x00504624U;
834}
835static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_corrected_err_el1_0_m(void)
836{
837 return 0x1U << 0U;
838}
839static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_corrected_err_el1_1_m(void)
840{
841 return 0x1U << 1U;
842}
843static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_uncorrected_err_el1_0_m(void)
844{
845 return 0x1U << 2U;
846}
847static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_uncorrected_err_el1_1_m(void)
848{
849 return 0x1U << 3U;
850}
851static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_corrected_err_pixrpf_m(void)
852{
853 return 0x1U << 4U;
854}
855static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_corrected_err_miss_fifo_m(void)
856{
857 return 0x1U << 5U;
858}
859static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_uncorrected_err_pixrpf_m(void)
860{
861 return 0x1U << 6U;
862}
863static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_uncorrected_err_miss_fifo_m(void)
864{
865 return 0x1U << 7U;
866}
867static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
868{
869 return (r >> 8U) & 0x1U;
870}
871static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
872{
873 return (r >> 10U) & 0x1U;
874}
875static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_status_reset_task_f(void)
876{
877 return 0x40000000U;
878}
879static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_corrected_err_count_r(void)
880{
881 return 0x00504628U;
882}
883static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_corrected_err_count_total_s(void)
884{
885 return 16U;
886}
887static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_corrected_err_count_total_v(u32 r)
888{
889 return (r >> 0U) & 0xffffU;
890}
891static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_uncorrected_err_count_r(void)
892{
893 return 0x0050462cU;
894}
895static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_uncorrected_err_count_total_s(void)
896{
897 return 16U;
898}
899static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_uncorrected_err_count_total_v(u32 r)
900{
901 return (r >> 0U) & 0xffffU;
902}
903static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_r(void)
904{
905 return 0x00504638U;
906}
907static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_warp_sm0_m(void)
908{
909 return 0x1U << 0U;
910}
911static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_warp_sm1_m(void)
912{
913 return 0x1U << 1U;
914}
915static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_barrier_sm0_m(void)
916{
917 return 0x1U << 2U;
918}
919static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_barrier_sm1_m(void)
920{
921 return 0x1U << 3U;
922}
923static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_warp_sm0_m(void)
924{
925 return 0x1U << 4U;
926}
927static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_warp_sm1_m(void)
928{
929 return 0x1U << 5U;
930}
931static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_barrier_sm0_m(void)
932{
933 return 0x1U << 6U;
934}
935static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_barrier_sm1_m(void)
936{
937 return 0x1U << 7U;
938}
939static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
940{
941 return (r >> 16U) & 0x1U;
942}
943static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
944{
945 return (r >> 18U) & 0x1U;
946}
947static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_status_reset_task_f(void)
948{
949 return 0x40000000U;
950}
951static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_r(void)
952{
953 return 0x0050463cU;
954}
955static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_total_s(void)
956{
957 return 16U;
958}
959static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_total_v(u32 r)
960{
961 return (r >> 0U) & 0xffffU;
962}
963static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_r(void)
964{
965 return 0x00504640U;
966}
967static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_total_s(void)
968{
969 return 16U;
970}
971static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_total_v(u32 r)
972{
973 return (r >> 0U) & 0xffffU;
974}
975static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_r(void)
976{
977 return 0x00419b54U;
978}
979static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp0_f(u32 v)
980{
981 return (v & 0x1U) << 0U;
982}
983static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp0_task_f(void)
984{
985 return 0x1U;
986}
987static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp1_f(u32 v)
988{
989 return (v & 0x1U) << 1U;
990}
991static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp1_task_f(void)
992{
993 return 0x2U;
994}
995static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp2_f(u32 v)
996{
997 return (v & 0x1U) << 2U;
998}
999static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp2_task_f(void)
1000{
1001 return 0x4U;
1002}
1003static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp3_f(u32 v)
1004{
1005 return (v & 0x1U) << 3U;
1006}
1007static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp3_task_f(void)
1008{
1009 return 0x8U;
1010}
1011static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp4_f(u32 v)
1012{
1013 return (v & 0x1U) << 4U;
1014}
1015static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp4_task_f(void)
1016{
1017 return 0x10U;
1018}
1019static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp5_f(u32 v)
1020{
1021 return (v & 0x1U) << 5U;
1022}
1023static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp5_task_f(void)
1024{
1025 return 0x20U;
1026}
1027static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp6_f(u32 v)
1028{
1029 return (v & 0x1U) << 6U;
1030}
1031static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp6_task_f(void)
1032{
1033 return 0x40U;
1034}
1035static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp7_f(u32 v)
1036{
1037 return (v & 0x1U) << 7U;
1038}
1039static inline u32 gr_pri_gpcs_tpcs_sm_lrf_ecc_control_scrub_qrfdp7_task_f(void)
1040{
1041 return 0x80U;
1042}
1043static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_r(void)
1044{
1045 return 0x00504354U;
1046}
1047static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp0_f(u32 v)
1048{
1049 return (v & 0x1U) << 0U;
1050}
1051static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp0_init_f(void)
1052{
1053 return 0x0U;
1054}
1055static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp1_f(u32 v)
1056{
1057 return (v & 0x1U) << 1U;
1058}
1059static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp1_init_f(void)
1060{
1061 return 0x0U;
1062}
1063static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp2_f(u32 v)
1064{
1065 return (v & 0x1U) << 2U;
1066}
1067static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp2_init_f(void)
1068{
1069 return 0x0U;
1070}
1071static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp3_f(u32 v)
1072{
1073 return (v & 0x1U) << 3U;
1074}
1075static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp3_init_f(void)
1076{
1077 return 0x0U;
1078}
1079static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp4_f(u32 v)
1080{
1081 return (v & 0x1U) << 4U;
1082}
1083static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp4_init_f(void)
1084{
1085 return 0x0U;
1086}
1087static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp5_f(u32 v)
1088{
1089 return (v & 0x1U) << 5U;
1090}
1091static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp5_init_f(void)
1092{
1093 return 0x0U;
1094}
1095static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp6_f(u32 v)
1096{
1097 return (v & 0x1U) << 6U;
1098}
1099static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp6_init_f(void)
1100{
1101 return 0x0U;
1102}
1103static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp7_f(u32 v)
1104{
1105 return (v & 0x1U) << 7U;
1106}
1107static inline u32 gr_pri_gpc0_tpc0_sm_lrf_ecc_control_scrub_qrfdp7_init_f(void)
1108{
1109 return 0x0U;
1110}
1111static inline u32 gr_pri_gpcs_tpcs_sm_l1_data_ecc_control_r(void)
1112{
1113 return 0x00419b68U;
1114}
1115static inline u32 gr_pri_gpcs_tpcs_sm_l1_data_ecc_control_scrub_el1_0_f(u32 v)
1116{
1117 return (v & 0x1U) << 0U;
1118}
1119static inline u32 gr_pri_gpcs_tpcs_sm_l1_data_ecc_control_scrub_el1_0_task_f(void)
1120{
1121 return 0x1U;
1122}
1123static inline u32 gr_pri_gpcs_tpcs_sm_l1_data_ecc_control_scrub_el1_1_f(u32 v)
1124{
1125 return (v & 0x1U) << 1U;
1126}
1127static inline u32 gr_pri_gpcs_tpcs_sm_l1_data_ecc_control_scrub_el1_1_task_f(void)
1128{
1129 return 0x2U;
1130}
1131static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_control_r(void)
1132{
1133 return 0x00504368U;
1134}
1135static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_control_scrub_el1_0_f(u32 v)
1136{
1137 return (v & 0x1U) << 0U;
1138}
1139static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_control_scrub_el1_0_init_f(void)
1140{
1141 return 0x0U;
1142}
1143static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_control_scrub_el1_1_f(u32 v)
1144{
1145 return (v & 0x1U) << 1U;
1146}
1147static inline u32 gr_pri_gpc0_tpc0_sm_l1_data_ecc_control_scrub_el1_1_init_f(void)
1148{
1149 return 0x0U;
1150}
1151static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_r(void)
1152{
1153 return 0x00419e20U;
1154}
1155static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_el1_0_f(u32 v)
1156{
1157 return (v & 0x1U) << 0U;
1158}
1159static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_el1_0_task_f(void)
1160{
1161 return 0x1U;
1162}
1163static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_el1_1_f(u32 v)
1164{
1165 return (v & 0x1U) << 1U;
1166}
1167static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_el1_1_task_f(void)
1168{
1169 return 0x2U;
1170}
1171static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_pixprf_f(u32 v)
1172{
1173 return (v & 0x1U) << 4U;
1174}
1175static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_pixprf_task_f(void)
1176{
1177 return 0x10U;
1178}
1179static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_miss_fifo_f(u32 v)
1180{
1181 return (v & 0x1U) << 5U;
1182}
1183static inline u32 gr_pri_gpcs_tpcs_sm_l1_tag_ecc_control_scrub_miss_fifo_task_f(void)
1184{
1185 return 0x20U;
1186}
1187static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_r(void)
1188{
1189 return 0x00504620U;
1190}
1191static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_el1_0_f(u32 v)
1192{
1193 return (v & 0x1U) << 0U;
1194}
1195static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_el1_0_init_f(void)
1196{
1197 return 0x0U;
1198}
1199static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_el1_1_f(u32 v)
1200{
1201 return (v & 0x1U) << 1U;
1202}
1203static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_el1_1_init_f(void)
1204{
1205 return 0x0U;
1206}
1207static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_pixprf_f(u32 v)
1208{
1209 return (v & 0x1U) << 4U;
1210}
1211static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_pixprf_init_f(void)
1212{
1213 return 0x0U;
1214}
1215static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_miss_fifo_f(u32 v)
1216{
1217 return (v & 0x1U) << 5U;
1218}
1219static inline u32 gr_pri_gpc0_tpc0_sm_l1_tag_ecc_control_scrub_miss_fifo_init_f(void)
1220{
1221 return 0x0U;
1222}
1223static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_r(void)
1224{
1225 return 0x00419e34U;
1226}
1227static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_warp_sm0_f(u32 v)
1228{
1229 return (v & 0x1U) << 0U;
1230}
1231static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_warp_sm0_task_f(void)
1232{
1233 return 0x1U;
1234}
1235static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_warp_sm1_f(u32 v)
1236{
1237 return (v & 0x1U) << 1U;
1238}
1239static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_warp_sm1_task_f(void)
1240{
1241 return 0x2U;
1242}
1243static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_barrier_sm0_f(u32 v)
1244{
1245 return (v & 0x1U) << 2U;
1246}
1247static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_barrier_sm0_task_f(void)
1248{
1249 return 0x4U;
1250}
1251static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_barrier_sm1_f(u32 v)
1252{
1253 return (v & 0x1U) << 3U;
1254}
1255static inline u32 gr_pri_gpcs_tpcs_sm_cbu_ecc_control_scrub_barrier_sm1_task_f(void)
1256{
1257 return 0x8U;
1258}
1259static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_r(void)
1260{
1261 return 0x00504634U;
1262}
1263static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_warp_sm0_f(u32 v)
1264{
1265 return (v & 0x1U) << 0U;
1266}
1267static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_warp_sm0_init_f(void)
1268{
1269 return 0x0U;
1270}
1271static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_warp_sm1_f(u32 v)
1272{
1273 return (v & 0x1U) << 1U;
1274}
1275static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_warp_sm1_init_f(void)
1276{
1277 return 0x0U;
1278}
1279static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_barrier_sm0_f(u32 v)
1280{
1281 return (v & 0x1U) << 2U;
1282}
1283static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_barrier_sm0_init_f(void)
1284{
1285 return 0x0U;
1286}
1287static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_barrier_sm1_f(u32 v)
1288{
1289 return (v & 0x1U) << 3U;
1290}
1291static inline u32 gr_pri_gpc0_tpc0_sm_cbu_ecc_control_scrub_barrier_sm1_init_f(void)
1292{
1293 return 0x0U;
1294}
1295static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_r(void)
1296{
1297 return 0x00419e48U;
1298}
1299static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l0_data_f(u32 v)
1300{
1301 return (v & 0x1U) << 0U;
1302}
1303static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l0_data_task_f(void)
1304{
1305 return 0x1U;
1306}
1307static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l0_predecode_f(u32 v)
1308{
1309 return (v & 0x1U) << 1U;
1310}
1311static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l0_predecode_task_f(void)
1312{
1313 return 0x2U;
1314}
1315static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l1_data_f(u32 v)
1316{
1317 return (v & 0x1U) << 2U;
1318}
1319static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l1_data_task_f(void)
1320{
1321 return 0x4U;
1322}
1323static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l1_predecode_f(u32 v)
1324{
1325 return (v & 0x1U) << 3U;
1326}
1327static inline u32 gr_pri_gpcs_tpcs_sm_icache_ecc_control_scrub_l1_predecode_task_f(void)
1328{
1329 return 0x8U;
1330}
1331static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_r(void)
1332{
1333 return 0x00504648U;
1334}
1335static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l0_data_f(u32 v)
1336{
1337 return (v & 0x1U) << 0U;
1338}
1339static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l0_data_init_f(void)
1340{
1341 return 0x0U;
1342}
1343static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l0_predecode_f(u32 v)
1344{
1345 return (v & 0x1U) << 1U;
1346}
1347static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l0_predecode_init_f(void)
1348{
1349 return 0x0U;
1350}
1351static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l1_data_f(u32 v)
1352{
1353 return (v & 0x1U) << 2U;
1354}
1355static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l1_data_init_f(void)
1356{
1357 return 0x0U;
1358}
1359static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l1_predecode_f(u32 v)
1360{
1361 return (v & 0x1U) << 3U;
1362}
1363static inline u32 gr_pri_gpc0_tpc0_sm_icache_ecc_control_scrub_l1_predecode_init_f(void)
1364{
1365 return 0x0U;
1366}
1367static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_r(void)
1368{
1369 return 0x005042c4U;
1370}
1371static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_default_f(void)
1372{
1373 return 0x0U;
1374}
1375static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe0_f(void)
1376{
1377 return 0x1U;
1378}
1379static inline u32 gr_pri_gpc0_tpc0_tex_m_routing_sel_pipe1_f(void)
1380{
1381 return 0x2U;
1382}
1383static inline u32 gr_gpc0_tpc0_mpc_hww_esr_r(void)
1384{
1385 return 0x00504430U;
1386}
1387static inline u32 gr_gpc0_tpc0_mpc_hww_esr_reset_trigger_f(void)
1388{
1389 return 0x40000000U;
1390}
1391static inline u32 gr_gpc0_tpc0_mpc_hww_esr_info_r(void)
1392{
1393 return 0x00504434U;
1394}
1395static inline u32 gr_gpc0_tpc0_mpc_hww_esr_info_veid_v(u32 r)
1396{
1397 return (r >> 0U) & 0x3fU;
1398}
1399static inline u32 gr_pri_be0_crop_status1_r(void)
1400{
1401 return 0x00410134U;
1402}
1403static inline u32 gr_pri_bes_crop_status1_r(void)
1404{
1405 return 0x00408934U;
1406}
1407static inline u32 gr_pri_be0_zrop_status_r(void)
1408{
1409 return 0x00410048U;
1410}
1411static inline u32 gr_pri_be0_zrop_status2_r(void)
1412{
1413 return 0x0041004cU;
1414}
1415static inline u32 gr_pri_bes_zrop_status_r(void)
1416{
1417 return 0x00408848U;
1418}
1419static inline u32 gr_pri_bes_zrop_status2_r(void)
1420{
1421 return 0x0040884cU;
1422}
1423static inline u32 gr_pipe_bundle_address_r(void)
1424{
1425 return 0x00400200U;
1426}
1427static inline u32 gr_pipe_bundle_address_value_v(u32 r)
1428{
1429 return (r >> 0U) & 0xffffU;
1430}
1431static inline u32 gr_pipe_bundle_address_veid_f(u32 v)
1432{
1433 return (v & 0x3fU) << 20U;
1434}
1435static inline u32 gr_pipe_bundle_address_veid_w(void)
1436{
1437 return 0U;
1438}
1439static inline u32 gr_pipe_bundle_data_r(void)
1440{
1441 return 0x00400204U;
1442}
1443static inline u32 gr_pipe_bundle_config_r(void)
1444{
1445 return 0x00400208U;
1446}
1447static inline u32 gr_pipe_bundle_config_override_pipe_mode_disabled_f(void)
1448{
1449 return 0x0U;
1450}
1451static inline u32 gr_pipe_bundle_config_override_pipe_mode_enabled_f(void)
1452{
1453 return 0x80000000U;
1454}
1455static inline u32 gr_fe_hww_esr_r(void)
1456{
1457 return 0x00404000U;
1458}
1459static inline u32 gr_fe_hww_esr_reset_active_f(void)
1460{
1461 return 0x40000000U;
1462}
1463static inline u32 gr_fe_hww_esr_en_enable_f(void)
1464{
1465 return 0x80000000U;
1466}
1467static inline u32 gr_fe_hww_esr_info_r(void)
1468{
1469 return 0x004041b0U;
1470}
1471static inline u32 gr_gpcs_tpcs_sms_hww_global_esr_report_mask_r(void)
1472{
1473 return 0x00419eacU;
1474}
1475static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_r(void)
1476{
1477 return 0x0050472cU;
1478}
1479static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_multiple_warp_errors_report_f(void)
1480{
1481 return 0x4U;
1482}
1483static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_bpt_int_report_f(void)
1484{
1485 return 0x10U;
1486}
1487static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_bpt_pause_report_f(void)
1488{
1489 return 0x20U;
1490}
1491static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_single_step_complete_report_f(void)
1492{
1493 return 0x40U;
1494}
1495static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_report_mask_error_in_trap_report_f(void)
1496{
1497 return 0x100U;
1498}
1499static inline u32 gr_gpcs_tpcs_sms_hww_global_esr_r(void)
1500{
1501 return 0x00419eb4U;
1502}
1503static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_r(void)
1504{
1505 return 0x00504734U;
1506}
1507static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_int_m(void)
1508{
1509 return 0x1U << 4U;
1510}
1511static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_int_pending_f(void)
1512{
1513 return 0x10U;
1514}
1515static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_pause_m(void)
1516{
1517 return 0x1U << 5U;
1518}
1519static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_bpt_pause_pending_f(void)
1520{
1521 return 0x20U;
1522}
1523static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_single_step_complete_m(void)
1524{
1525 return 0x1U << 6U;
1526}
1527static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_single_step_complete_pending_f(void)
1528{
1529 return 0x40U;
1530}
1531static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_multiple_warp_errors_m(void)
1532{
1533 return 0x1U << 2U;
1534}
1535static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_multiple_warp_errors_pending_f(void)
1536{
1537 return 0x4U;
1538}
1539static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_error_in_trap_m(void)
1540{
1541 return 0x1U << 8U;
1542}
1543static inline u32 gr_gpc0_tpc0_sm0_hww_global_esr_error_in_trap_pending_f(void)
1544{
1545 return 0x100U;
1546}
1547static inline u32 gr_fe_go_idle_timeout_r(void)
1548{
1549 return 0x00404154U;
1550}
1551static inline u32 gr_fe_go_idle_timeout_count_f(u32 v)
1552{
1553 return (v & 0xffffffffU) << 0U;
1554}
1555static inline u32 gr_fe_go_idle_timeout_count_disabled_f(void)
1556{
1557 return 0x0U;
1558}
1559static inline u32 gr_fe_go_idle_timeout_count_prod_f(void)
1560{
1561 return 0x1800U;
1562}
1563static inline u32 gr_fe_object_table_r(u32 i)
1564{
1565 return 0x00404200U + i*4U;
1566}
1567static inline u32 gr_fe_object_table_nvclass_v(u32 r)
1568{
1569 return (r >> 0U) & 0xffffU;
1570}
1571static inline u32 gr_fe_tpc_fs_r(u32 i)
1572{
1573 return 0x0040a200U + i*4U;
1574}
1575static inline u32 gr_fe_tpc_pesmask_r(void)
1576{
1577 return 0x0040a260U;
1578}
1579static inline u32 gr_fe_tpc_pesmask_pesid_f(u32 v)
1580{
1581 return (v & 0x3fU) << 24U;
1582}
1583static inline u32 gr_fe_tpc_pesmask_gpcid_f(u32 v)
1584{
1585 return (v & 0xffU) << 16U;
1586}
1587static inline u32 gr_fe_tpc_pesmask_action_m(void)
1588{
1589 return 0x1U << 30U;
1590}
1591static inline u32 gr_fe_tpc_pesmask_action_write_f(void)
1592{
1593 return 0x40000000U;
1594}
1595static inline u32 gr_fe_tpc_pesmask_action_read_f(void)
1596{
1597 return 0x0U;
1598}
1599static inline u32 gr_fe_tpc_pesmask_req_m(void)
1600{
1601 return 0x1U << 31U;
1602}
1603static inline u32 gr_fe_tpc_pesmask_req_send_f(void)
1604{
1605 return 0x80000000U;
1606}
1607static inline u32 gr_fe_tpc_pesmask_mask_m(void)
1608{
1609 return 0xffffU << 0U;
1610}
1611static inline u32 gr_pri_mme_shadow_raw_index_r(void)
1612{
1613 return 0x00404488U;
1614}
1615static inline u32 gr_pri_mme_shadow_raw_index_write_trigger_f(void)
1616{
1617 return 0x80000000U;
1618}
1619static inline u32 gr_pri_mme_shadow_raw_data_r(void)
1620{
1621 return 0x0040448cU;
1622}
1623static inline u32 gr_mme_hww_esr_r(void)
1624{
1625 return 0x00404490U;
1626}
1627static inline u32 gr_mme_hww_esr_reset_active_f(void)
1628{
1629 return 0x40000000U;
1630}
1631static inline u32 gr_mme_hww_esr_en_enable_f(void)
1632{
1633 return 0x80000000U;
1634}
1635static inline u32 gr_mme_hww_esr_info_r(void)
1636{
1637 return 0x00404494U;
1638}
1639static inline u32 gr_memfmt_hww_esr_r(void)
1640{
1641 return 0x00404600U;
1642}
1643static inline u32 gr_memfmt_hww_esr_reset_active_f(void)
1644{
1645 return 0x40000000U;
1646}
1647static inline u32 gr_memfmt_hww_esr_en_enable_f(void)
1648{
1649 return 0x80000000U;
1650}
1651static inline u32 gr_fecs_cpuctl_r(void)
1652{
1653 return 0x00409100U;
1654}
1655static inline u32 gr_fecs_cpuctl_startcpu_f(u32 v)
1656{
1657 return (v & 0x1U) << 1U;
1658}
1659static inline u32 gr_fecs_cpuctl_alias_r(void)
1660{
1661 return 0x00409130U;
1662}
1663static inline u32 gr_fecs_cpuctl_alias_startcpu_f(u32 v)
1664{
1665 return (v & 0x1U) << 1U;
1666}
1667static inline u32 gr_fecs_dmactl_r(void)
1668{
1669 return 0x0040910cU;
1670}
1671static inline u32 gr_fecs_dmactl_require_ctx_f(u32 v)
1672{
1673 return (v & 0x1U) << 0U;
1674}
1675static inline u32 gr_fecs_dmactl_dmem_scrubbing_m(void)
1676{
1677 return 0x1U << 1U;
1678}
1679static inline u32 gr_fecs_dmactl_imem_scrubbing_m(void)
1680{
1681 return 0x1U << 2U;
1682}
1683static inline u32 gr_fecs_os_r(void)
1684{
1685 return 0x00409080U;
1686}
1687static inline u32 gr_fecs_idlestate_r(void)
1688{
1689 return 0x0040904cU;
1690}
1691static inline u32 gr_fecs_mailbox0_r(void)
1692{
1693 return 0x00409040U;
1694}
1695static inline u32 gr_fecs_mailbox1_r(void)
1696{
1697 return 0x00409044U;
1698}
1699static inline u32 gr_fecs_irqstat_r(void)
1700{
1701 return 0x00409008U;
1702}
1703static inline u32 gr_fecs_irqmode_r(void)
1704{
1705 return 0x0040900cU;
1706}
1707static inline u32 gr_fecs_irqmask_r(void)
1708{
1709 return 0x00409018U;
1710}
1711static inline u32 gr_fecs_irqdest_r(void)
1712{
1713 return 0x0040901cU;
1714}
1715static inline u32 gr_fecs_curctx_r(void)
1716{
1717 return 0x00409050U;
1718}
1719static inline u32 gr_fecs_nxtctx_r(void)
1720{
1721 return 0x00409054U;
1722}
1723static inline u32 gr_fecs_engctl_r(void)
1724{
1725 return 0x004090a4U;
1726}
1727static inline u32 gr_fecs_debug1_r(void)
1728{
1729 return 0x00409090U;
1730}
1731static inline u32 gr_fecs_debuginfo_r(void)
1732{
1733 return 0x00409094U;
1734}
1735static inline u32 gr_fecs_icd_cmd_r(void)
1736{
1737 return 0x00409200U;
1738}
1739static inline u32 gr_fecs_icd_cmd_opc_s(void)
1740{
1741 return 4U;
1742}
1743static inline u32 gr_fecs_icd_cmd_opc_f(u32 v)
1744{
1745 return (v & 0xfU) << 0U;
1746}
1747static inline u32 gr_fecs_icd_cmd_opc_m(void)
1748{
1749 return 0xfU << 0U;
1750}
1751static inline u32 gr_fecs_icd_cmd_opc_v(u32 r)
1752{
1753 return (r >> 0U) & 0xfU;
1754}
1755static inline u32 gr_fecs_icd_cmd_opc_rreg_f(void)
1756{
1757 return 0x8U;
1758}
1759static inline u32 gr_fecs_icd_cmd_opc_rstat_f(void)
1760{
1761 return 0xeU;
1762}
1763static inline u32 gr_fecs_icd_cmd_idx_f(u32 v)
1764{
1765 return (v & 0x1fU) << 8U;
1766}
1767static inline u32 gr_fecs_icd_rdata_r(void)
1768{
1769 return 0x0040920cU;
1770}
1771static inline u32 gr_fecs_imemc_r(u32 i)
1772{
1773 return 0x00409180U + i*16U;
1774}
1775static inline u32 gr_fecs_imemc_offs_f(u32 v)
1776{
1777 return (v & 0x3fU) << 2U;
1778}
1779static inline u32 gr_fecs_imemc_blk_f(u32 v)
1780{
1781 return (v & 0xffU) << 8U;
1782}
1783static inline u32 gr_fecs_imemc_aincw_f(u32 v)
1784{
1785 return (v & 0x1U) << 24U;
1786}
1787static inline u32 gr_fecs_imemd_r(u32 i)
1788{
1789 return 0x00409184U + i*16U;
1790}
1791static inline u32 gr_fecs_imemt_r(u32 i)
1792{
1793 return 0x00409188U + i*16U;
1794}
1795static inline u32 gr_fecs_imemt_tag_f(u32 v)
1796{
1797 return (v & 0xffffU) << 0U;
1798}
1799static inline u32 gr_fecs_dmemc_r(u32 i)
1800{
1801 return 0x004091c0U + i*8U;
1802}
1803static inline u32 gr_fecs_dmemc_offs_s(void)
1804{
1805 return 6U;
1806}
1807static inline u32 gr_fecs_dmemc_offs_f(u32 v)
1808{
1809 return (v & 0x3fU) << 2U;
1810}
1811static inline u32 gr_fecs_dmemc_offs_m(void)
1812{
1813 return 0x3fU << 2U;
1814}
1815static inline u32 gr_fecs_dmemc_offs_v(u32 r)
1816{
1817 return (r >> 2U) & 0x3fU;
1818}
1819static inline u32 gr_fecs_dmemc_blk_f(u32 v)
1820{
1821 return (v & 0xffU) << 8U;
1822}
1823static inline u32 gr_fecs_dmemc_aincw_f(u32 v)
1824{
1825 return (v & 0x1U) << 24U;
1826}
1827static inline u32 gr_fecs_dmemd_r(u32 i)
1828{
1829 return 0x004091c4U + i*8U;
1830}
1831static inline u32 gr_fecs_dmatrfbase_r(void)
1832{
1833 return 0x00409110U;
1834}
1835static inline u32 gr_fecs_dmatrfmoffs_r(void)
1836{
1837 return 0x00409114U;
1838}
1839static inline u32 gr_fecs_dmatrffboffs_r(void)
1840{
1841 return 0x0040911cU;
1842}
1843static inline u32 gr_fecs_dmatrfcmd_r(void)
1844{
1845 return 0x00409118U;
1846}
1847static inline u32 gr_fecs_dmatrfcmd_imem_f(u32 v)
1848{
1849 return (v & 0x1U) << 4U;
1850}
1851static inline u32 gr_fecs_dmatrfcmd_write_f(u32 v)
1852{
1853 return (v & 0x1U) << 5U;
1854}
1855static inline u32 gr_fecs_dmatrfcmd_size_f(u32 v)
1856{
1857 return (v & 0x7U) << 8U;
1858}
1859static inline u32 gr_fecs_dmatrfcmd_ctxdma_f(u32 v)
1860{
1861 return (v & 0x7U) << 12U;
1862}
1863static inline u32 gr_fecs_bootvec_r(void)
1864{
1865 return 0x00409104U;
1866}
1867static inline u32 gr_fecs_bootvec_vec_f(u32 v)
1868{
1869 return (v & 0xffffffffU) << 0U;
1870}
1871static inline u32 gr_fecs_falcon_hwcfg_r(void)
1872{
1873 return 0x00409108U;
1874}
1875static inline u32 gr_gpcs_gpccs_falcon_hwcfg_r(void)
1876{
1877 return 0x0041a108U;
1878}
1879static inline u32 gr_fecs_falcon_rm_r(void)
1880{
1881 return 0x00409084U;
1882}
1883static inline u32 gr_fecs_current_ctx_r(void)
1884{
1885 return 0x00409b00U;
1886}
1887static inline u32 gr_fecs_current_ctx_ptr_f(u32 v)
1888{
1889 return (v & 0xfffffffU) << 0U;
1890}
1891static inline u32 gr_fecs_current_ctx_ptr_v(u32 r)
1892{
1893 return (r >> 0U) & 0xfffffffU;
1894}
1895static inline u32 gr_fecs_current_ctx_target_s(void)
1896{
1897 return 2U;
1898}
1899static inline u32 gr_fecs_current_ctx_target_f(u32 v)
1900{
1901 return (v & 0x3U) << 28U;
1902}
1903static inline u32 gr_fecs_current_ctx_target_m(void)
1904{
1905 return 0x3U << 28U;
1906}
1907static inline u32 gr_fecs_current_ctx_target_v(u32 r)
1908{
1909 return (r >> 28U) & 0x3U;
1910}
1911static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void)
1912{
1913 return 0x0U;
1914}
1915static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void)
1916{
1917 return 0x20000000U;
1918}
1919static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void)
1920{
1921 return 0x30000000U;
1922}
1923static inline u32 gr_fecs_current_ctx_valid_s(void)
1924{
1925 return 1U;
1926}
1927static inline u32 gr_fecs_current_ctx_valid_f(u32 v)
1928{
1929 return (v & 0x1U) << 31U;
1930}
1931static inline u32 gr_fecs_current_ctx_valid_m(void)
1932{
1933 return 0x1U << 31U;
1934}
1935static inline u32 gr_fecs_current_ctx_valid_v(u32 r)
1936{
1937 return (r >> 31U) & 0x1U;
1938}
1939static inline u32 gr_fecs_current_ctx_valid_false_f(void)
1940{
1941 return 0x0U;
1942}
1943static inline u32 gr_fecs_method_data_r(void)
1944{
1945 return 0x00409500U;
1946}
1947static inline u32 gr_fecs_method_push_r(void)
1948{
1949 return 0x00409504U;
1950}
1951static inline u32 gr_fecs_method_push_adr_f(u32 v)
1952{
1953 return (v & 0xfffU) << 0U;
1954}
1955static inline u32 gr_fecs_method_push_adr_bind_pointer_v(void)
1956{
1957 return 0x00000003U;
1958}
1959static inline u32 gr_fecs_method_push_adr_bind_pointer_f(void)
1960{
1961 return 0x3U;
1962}
1963static inline u32 gr_fecs_method_push_adr_discover_image_size_v(void)
1964{
1965 return 0x00000010U;
1966}
1967static inline u32 gr_fecs_method_push_adr_wfi_golden_save_v(void)
1968{
1969 return 0x00000009U;
1970}
1971static inline u32 gr_fecs_method_push_adr_restore_golden_v(void)
1972{
1973 return 0x00000015U;
1974}
1975static inline u32 gr_fecs_method_push_adr_discover_zcull_image_size_v(void)
1976{
1977 return 0x00000016U;
1978}
1979static inline u32 gr_fecs_method_push_adr_discover_pm_image_size_v(void)
1980{
1981 return 0x00000025U;
1982}
1983static inline u32 gr_fecs_method_push_adr_discover_reglist_image_size_v(void)
1984{
1985 return 0x00000030U;
1986}
1987static inline u32 gr_fecs_method_push_adr_set_reglist_bind_instance_v(void)
1988{
1989 return 0x00000031U;
1990}
1991static inline u32 gr_fecs_method_push_adr_set_reglist_virtual_address_v(void)
1992{
1993 return 0x00000032U;
1994}
1995static inline u32 gr_fecs_method_push_adr_stop_ctxsw_v(void)
1996{
1997 return 0x00000038U;
1998}
1999static inline u32 gr_fecs_method_push_adr_start_ctxsw_v(void)
2000{
2001 return 0x00000039U;
2002}
2003static inline u32 gr_fecs_method_push_adr_set_watchdog_timeout_f(void)
2004{
2005 return 0x21U;
2006}
2007static inline u32 gr_fecs_method_push_adr_discover_preemption_image_size_v(void)
2008{
2009 return 0x0000001aU;
2010}
2011static inline u32 gr_fecs_method_push_adr_halt_pipeline_v(void)
2012{
2013 return 0x00000004U;
2014}
2015static inline u32 gr_fecs_method_push_adr_configure_interrupt_completion_option_v(void)
2016{
2017 return 0x0000003aU;
2018}
2019static inline u32 gr_fecs_host_int_status_r(void)
2020{
2021 return 0x00409c18U;
2022}
2023static inline u32 gr_fecs_host_int_status_fault_during_ctxsw_f(u32 v)
2024{
2025 return (v & 0x1U) << 16U;
2026}
2027static inline u32 gr_fecs_host_int_status_umimp_firmware_method_f(u32 v)
2028{
2029 return (v & 0x1U) << 17U;
2030}
2031static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v)
2032{
2033 return (v & 0x1U) << 18U;
2034}
2035static inline u32 gr_fecs_host_int_status_watchdog_active_f(void)
2036{
2037 return 0x80000U;
2038}
2039static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v)
2040{
2041 return (v & 0xffffU) << 0U;
2042}
2043static inline u32 gr_fecs_host_int_status_ecc_corrected_f(u32 v)
2044{
2045 return (v & 0x1U) << 21U;
2046}
2047static inline u32 gr_fecs_host_int_status_ecc_corrected_m(void)
2048{
2049 return 0x1U << 21U;
2050}
2051static inline u32 gr_fecs_host_int_status_ecc_uncorrected_f(u32 v)
2052{
2053 return (v & 0x1U) << 22U;
2054}
2055static inline u32 gr_fecs_host_int_status_ecc_uncorrected_m(void)
2056{
2057 return 0x1U << 22U;
2058}
2059static inline u32 gr_fecs_host_int_clear_r(void)
2060{
2061 return 0x00409c20U;
2062}
2063static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_f(u32 v)
2064{
2065 return (v & 0x1U) << 1U;
2066}
2067static inline u32 gr_fecs_host_int_clear_ctxsw_intr1_clear_f(void)
2068{
2069 return 0x2U;
2070}
2071static inline u32 gr_fecs_host_int_enable_r(void)
2072{
2073 return 0x00409c24U;
2074}
2075static inline u32 gr_fecs_host_int_enable_ctxsw_intr1_enable_f(void)
2076{
2077 return 0x2U;
2078}
2079static inline u32 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f(void)
2080{
2081 return 0x10000U;
2082}
2083static inline u32 gr_fecs_host_int_enable_umimp_firmware_method_enable_f(void)
2084{
2085 return 0x20000U;
2086}
2087static inline u32 gr_fecs_host_int_enable_umimp_illegal_method_enable_f(void)
2088{
2089 return 0x40000U;
2090}
2091static inline u32 gr_fecs_host_int_enable_watchdog_enable_f(void)
2092{
2093 return 0x80000U;
2094}
2095static inline u32 gr_fecs_host_int_enable_flush_when_busy_enable_f(void)
2096{
2097 return 0x100000U;
2098}
2099static inline u32 gr_fecs_host_int_enable_ecc_corrected_enable_f(void)
2100{
2101 return 0x200000U;
2102}
2103static inline u32 gr_fecs_host_int_enable_ecc_uncorrected_enable_f(void)
2104{
2105 return 0x400000U;
2106}
2107static inline u32 gr_fecs_ctxsw_reset_ctl_r(void)
2108{
2109 return 0x00409614U;
2110}
2111static inline u32 gr_fecs_ctxsw_reset_ctl_sys_halt_disabled_f(void)
2112{
2113 return 0x0U;
2114}
2115static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_halt_disabled_f(void)
2116{
2117 return 0x0U;
2118}
2119static inline u32 gr_fecs_ctxsw_reset_ctl_be_halt_disabled_f(void)
2120{
2121 return 0x0U;
2122}
2123static inline u32 gr_fecs_ctxsw_reset_ctl_sys_engine_reset_disabled_f(void)
2124{
2125 return 0x10U;
2126}
2127static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_engine_reset_disabled_f(void)
2128{
2129 return 0x20U;
2130}
2131static inline u32 gr_fecs_ctxsw_reset_ctl_be_engine_reset_disabled_f(void)
2132{
2133 return 0x40U;
2134}
2135static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_enabled_f(void)
2136{
2137 return 0x0U;
2138}
2139static inline u32 gr_fecs_ctxsw_reset_ctl_sys_context_reset_disabled_f(void)
2140{
2141 return 0x100U;
2142}
2143static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_enabled_f(void)
2144{
2145 return 0x0U;
2146}
2147static inline u32 gr_fecs_ctxsw_reset_ctl_gpc_context_reset_disabled_f(void)
2148{
2149 return 0x200U;
2150}
2151static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_s(void)
2152{
2153 return 1U;
2154}
2155static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_f(u32 v)
2156{
2157 return (v & 0x1U) << 10U;
2158}
2159static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_m(void)
2160{
2161 return 0x1U << 10U;
2162}
2163static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_v(u32 r)
2164{
2165 return (r >> 10U) & 0x1U;
2166}
2167static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_enabled_f(void)
2168{
2169 return 0x0U;
2170}
2171static inline u32 gr_fecs_ctxsw_reset_ctl_be_context_reset_disabled_f(void)
2172{
2173 return 0x400U;
2174}
2175static inline u32 gr_fecs_ctx_state_store_major_rev_id_r(void)
2176{
2177 return 0x0040960cU;
2178}
2179static inline u32 gr_fecs_ctxsw_mailbox_r(u32 i)
2180{
2181 return 0x00409800U + i*4U;
2182}
2183static inline u32 gr_fecs_ctxsw_mailbox__size_1_v(void)
2184{
2185 return 0x00000010U;
2186}
2187static inline u32 gr_fecs_ctxsw_mailbox_value_f(u32 v)
2188{
2189 return (v & 0xffffffffU) << 0U;
2190}
2191static inline u32 gr_fecs_ctxsw_mailbox_value_pass_v(void)
2192{
2193 return 0x00000001U;
2194}
2195static inline u32 gr_fecs_ctxsw_mailbox_value_fail_v(void)
2196{
2197 return 0x00000002U;
2198}
2199static inline u32 gr_fecs_ctxsw_mailbox_set_r(u32 i)
2200{
2201 return 0x004098c0U + i*4U;
2202}
2203static inline u32 gr_fecs_ctxsw_mailbox_set_value_f(u32 v)
2204{
2205 return (v & 0xffffffffU) << 0U;
2206}
2207static inline u32 gr_fecs_ctxsw_mailbox_clear_r(u32 i)
2208{
2209 return 0x00409840U + i*4U;
2210}
2211static inline u32 gr_fecs_ctxsw_mailbox_clear_value_f(u32 v)
2212{
2213 return (v & 0xffffffffU) << 0U;
2214}
2215static inline u32 gr_fecs_fs_r(void)
2216{
2217 return 0x00409604U;
2218}
2219static inline u32 gr_fecs_fs_num_available_gpcs_s(void)
2220{
2221 return 5U;
2222}
2223static inline u32 gr_fecs_fs_num_available_gpcs_f(u32 v)
2224{
2225 return (v & 0x1fU) << 0U;
2226}
2227static inline u32 gr_fecs_fs_num_available_gpcs_m(void)
2228{
2229 return 0x1fU << 0U;
2230}
2231static inline u32 gr_fecs_fs_num_available_gpcs_v(u32 r)
2232{
2233 return (r >> 0U) & 0x1fU;
2234}
2235static inline u32 gr_fecs_fs_num_available_fbps_s(void)
2236{
2237 return 5U;
2238}
2239static inline u32 gr_fecs_fs_num_available_fbps_f(u32 v)
2240{
2241 return (v & 0x1fU) << 16U;
2242}
2243static inline u32 gr_fecs_fs_num_available_fbps_m(void)
2244{
2245 return 0x1fU << 16U;
2246}
2247static inline u32 gr_fecs_fs_num_available_fbps_v(u32 r)
2248{
2249 return (r >> 16U) & 0x1fU;
2250}
2251static inline u32 gr_fecs_cfg_r(void)
2252{
2253 return 0x00409620U;
2254}
2255static inline u32 gr_fecs_cfg_imem_sz_v(u32 r)
2256{
2257 return (r >> 0U) & 0xffU;
2258}
2259static inline u32 gr_fecs_rc_lanes_r(void)
2260{
2261 return 0x00409880U;
2262}
2263static inline u32 gr_fecs_rc_lanes_num_chains_s(void)
2264{
2265 return 6U;
2266}
2267static inline u32 gr_fecs_rc_lanes_num_chains_f(u32 v)
2268{
2269 return (v & 0x3fU) << 0U;
2270}
2271static inline u32 gr_fecs_rc_lanes_num_chains_m(void)
2272{
2273 return 0x3fU << 0U;
2274}
2275static inline u32 gr_fecs_rc_lanes_num_chains_v(u32 r)
2276{
2277 return (r >> 0U) & 0x3fU;
2278}
2279static inline u32 gr_fecs_ctxsw_status_1_r(void)
2280{
2281 return 0x00409400U;
2282}
2283static inline u32 gr_fecs_ctxsw_status_1_arb_busy_s(void)
2284{
2285 return 1U;
2286}
2287static inline u32 gr_fecs_ctxsw_status_1_arb_busy_f(u32 v)
2288{
2289 return (v & 0x1U) << 12U;
2290}
2291static inline u32 gr_fecs_ctxsw_status_1_arb_busy_m(void)
2292{
2293 return 0x1U << 12U;
2294}
2295static inline u32 gr_fecs_ctxsw_status_1_arb_busy_v(u32 r)
2296{
2297 return (r >> 12U) & 0x1U;
2298}
2299static inline u32 gr_fecs_arb_ctx_adr_r(void)
2300{
2301 return 0x00409a24U;
2302}
2303static inline u32 gr_fecs_new_ctx_r(void)
2304{
2305 return 0x00409b04U;
2306}
2307static inline u32 gr_fecs_new_ctx_ptr_s(void)
2308{
2309 return 28U;
2310}
2311static inline u32 gr_fecs_new_ctx_ptr_f(u32 v)
2312{
2313 return (v & 0xfffffffU) << 0U;
2314}
2315static inline u32 gr_fecs_new_ctx_ptr_m(void)
2316{
2317 return 0xfffffffU << 0U;
2318}
2319static inline u32 gr_fecs_new_ctx_ptr_v(u32 r)
2320{
2321 return (r >> 0U) & 0xfffffffU;
2322}
2323static inline u32 gr_fecs_new_ctx_target_s(void)
2324{
2325 return 2U;
2326}
2327static inline u32 gr_fecs_new_ctx_target_f(u32 v)
2328{
2329 return (v & 0x3U) << 28U;
2330}
2331static inline u32 gr_fecs_new_ctx_target_m(void)
2332{
2333 return 0x3U << 28U;
2334}
2335static inline u32 gr_fecs_new_ctx_target_v(u32 r)
2336{
2337 return (r >> 28U) & 0x3U;
2338}
2339static inline u32 gr_fecs_new_ctx_valid_s(void)
2340{
2341 return 1U;
2342}
2343static inline u32 gr_fecs_new_ctx_valid_f(u32 v)
2344{
2345 return (v & 0x1U) << 31U;
2346}
2347static inline u32 gr_fecs_new_ctx_valid_m(void)
2348{
2349 return 0x1U << 31U;
2350}
2351static inline u32 gr_fecs_new_ctx_valid_v(u32 r)
2352{
2353 return (r >> 31U) & 0x1U;
2354}
2355static inline u32 gr_fecs_arb_ctx_ptr_r(void)
2356{
2357 return 0x00409a0cU;
2358}
2359static inline u32 gr_fecs_arb_ctx_ptr_ptr_s(void)
2360{
2361 return 28U;
2362}
2363static inline u32 gr_fecs_arb_ctx_ptr_ptr_f(u32 v)
2364{
2365 return (v & 0xfffffffU) << 0U;
2366}
2367static inline u32 gr_fecs_arb_ctx_ptr_ptr_m(void)
2368{
2369 return 0xfffffffU << 0U;
2370}
2371static inline u32 gr_fecs_arb_ctx_ptr_ptr_v(u32 r)
2372{
2373 return (r >> 0U) & 0xfffffffU;
2374}
2375static inline u32 gr_fecs_arb_ctx_ptr_target_s(void)
2376{
2377 return 2U;
2378}
2379static inline u32 gr_fecs_arb_ctx_ptr_target_f(u32 v)
2380{
2381 return (v & 0x3U) << 28U;
2382}
2383static inline u32 gr_fecs_arb_ctx_ptr_target_m(void)
2384{
2385 return 0x3U << 28U;
2386}
2387static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r)
2388{
2389 return (r >> 28U) & 0x3U;
2390}
2391static inline u32 gr_fecs_arb_ctx_cmd_r(void)
2392{
2393 return 0x00409a10U;
2394}
2395static inline u32 gr_fecs_arb_ctx_cmd_cmd_s(void)
2396{
2397 return 5U;
2398}
2399static inline u32 gr_fecs_arb_ctx_cmd_cmd_f(u32 v)
2400{
2401 return (v & 0x1fU) << 0U;
2402}
2403static inline u32 gr_fecs_arb_ctx_cmd_cmd_m(void)
2404{
2405 return 0x1fU << 0U;
2406}
2407static inline u32 gr_fecs_arb_ctx_cmd_cmd_v(u32 r)
2408{
2409 return (r >> 0U) & 0x1fU;
2410}
2411static inline u32 gr_fecs_ctxsw_status_fe_0_r(void)
2412{
2413 return 0x00409c00U;
2414}
2415static inline u32 gr_gpc0_gpccs_ctxsw_status_gpc_0_r(void)
2416{
2417 return 0x00502c04U;
2418}
2419static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void)
2420{
2421 return 0x00502400U;
2422}
2423static inline u32 gr_gpc0_gpccs_ctxsw_mailbox__size_1_v(void)
2424{
2425 return 0x00000010U;
2426}
2427static inline u32 gr_fecs_ctxsw_idlestate_r(void)
2428{
2429 return 0x00409420U;
2430}
2431static inline u32 gr_fecs_feature_override_ecc_r(void)
2432{
2433 return 0x00409658U;
2434}
2435static inline u32 gr_fecs_feature_override_ecc_sm_lrf_v(u32 r)
2436{
2437 return (r >> 0U) & 0x1U;
2438}
2439static inline u32 gr_fecs_feature_override_ecc_sm_lrf_override_v(u32 r)
2440{
2441 return (r >> 3U) & 0x1U;
2442}
2443static inline u32 gr_fecs_feature_override_ecc_sm_l1_data_v(u32 r)
2444{
2445 return (r >> 4U) & 0x1U;
2446}
2447static inline u32 gr_fecs_feature_override_ecc_sm_l1_data_override_v(u32 r)
2448{
2449 return (r >> 7U) & 0x1U;
2450}
2451static inline u32 gr_fecs_feature_override_ecc_sm_l1_tag_v(u32 r)
2452{
2453 return (r >> 8U) & 0x1U;
2454}
2455static inline u32 gr_fecs_feature_override_ecc_sm_l1_tag_override_v(u32 r)
2456{
2457 return (r >> 11U) & 0x1U;
2458}
2459static inline u32 gr_fecs_feature_override_ecc_ltc_v(u32 r)
2460{
2461 return (r >> 12U) & 0x1U;
2462}
2463static inline u32 gr_fecs_feature_override_ecc_ltc_override_v(u32 r)
2464{
2465 return (r >> 15U) & 0x1U;
2466}
2467static inline u32 gr_fecs_feature_override_ecc_sm_cbu_v(u32 r)
2468{
2469 return (r >> 20U) & 0x1U;
2470}
2471static inline u32 gr_fecs_feature_override_ecc_sm_cbu_override_v(u32 r)
2472{
2473 return (r >> 23U) & 0x1U;
2474}
2475static inline u32 gr_fecs_feature_override_ecc_1_r(void)
2476{
2477 return 0x0040965cU;
2478}
2479static inline u32 gr_fecs_feature_override_ecc_1_sm_l0_icache_v(u32 r)
2480{
2481 return (r >> 0U) & 0x1U;
2482}
2483static inline u32 gr_fecs_feature_override_ecc_1_sm_l0_icache_override_v(u32 r)
2484{
2485 return (r >> 1U) & 0x1U;
2486}
2487static inline u32 gr_fecs_feature_override_ecc_1_sm_l1_icache_v(u32 r)
2488{
2489 return (r >> 2U) & 0x1U;
2490}
2491static inline u32 gr_fecs_feature_override_ecc_1_sm_l1_icache_override_v(u32 r)
2492{
2493 return (r >> 3U) & 0x1U;
2494}
2495static inline u32 gr_gpc0_gpccs_ctxsw_idlestate_r(void)
2496{
2497 return 0x00502420U;
2498}
2499static inline u32 gr_rstr2d_gpc_map_r(u32 i)
2500{
2501 return 0x0040780cU + i*4U;
2502}
2503static inline u32 gr_rstr2d_map_table_cfg_r(void)
2504{
2505 return 0x004078bcU;
2506}
2507static inline u32 gr_rstr2d_map_table_cfg_row_offset_f(u32 v)
2508{
2509 return (v & 0xffU) << 0U;
2510}
2511static inline u32 gr_rstr2d_map_table_cfg_num_entries_f(u32 v)
2512{
2513 return (v & 0xffU) << 8U;
2514}
2515static inline u32 gr_pd_hww_esr_r(void)
2516{
2517 return 0x00406018U;
2518}
2519static inline u32 gr_pd_hww_esr_reset_active_f(void)
2520{
2521 return 0x40000000U;
2522}
2523static inline u32 gr_pd_hww_esr_en_enable_f(void)
2524{
2525 return 0x80000000U;
2526}
2527static inline u32 gr_pd_num_tpc_per_gpc_r(u32 i)
2528{
2529 return 0x00406028U + i*4U;
2530}
2531static inline u32 gr_pd_num_tpc_per_gpc__size_1_v(void)
2532{
2533 return 0x00000004U;
2534}
2535static inline u32 gr_pd_num_tpc_per_gpc_count0_f(u32 v)
2536{
2537 return (v & 0xfU) << 0U;
2538}
2539static inline u32 gr_pd_num_tpc_per_gpc_count1_f(u32 v)
2540{
2541 return (v & 0xfU) << 4U;
2542}
2543static inline u32 gr_pd_num_tpc_per_gpc_count2_f(u32 v)
2544{
2545 return (v & 0xfU) << 8U;
2546}
2547static inline u32 gr_pd_num_tpc_per_gpc_count3_f(u32 v)
2548{
2549 return (v & 0xfU) << 12U;
2550}
2551static inline u32 gr_pd_num_tpc_per_gpc_count4_f(u32 v)
2552{
2553 return (v & 0xfU) << 16U;
2554}
2555static inline u32 gr_pd_num_tpc_per_gpc_count5_f(u32 v)
2556{
2557 return (v & 0xfU) << 20U;
2558}
2559static inline u32 gr_pd_num_tpc_per_gpc_count6_f(u32 v)
2560{
2561 return (v & 0xfU) << 24U;
2562}
2563static inline u32 gr_pd_num_tpc_per_gpc_count7_f(u32 v)
2564{
2565 return (v & 0xfU) << 28U;
2566}
2567static inline u32 gr_pd_ab_dist_cfg0_r(void)
2568{
2569 return 0x004064c0U;
2570}
2571static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_en_f(void)
2572{
2573 return 0x80000000U;
2574}
2575static inline u32 gr_pd_ab_dist_cfg0_timeslice_enable_dis_f(void)
2576{
2577 return 0x0U;
2578}
2579static inline u32 gr_pd_ab_dist_cfg1_r(void)
2580{
2581 return 0x004064c4U;
2582}
2583static inline u32 gr_pd_ab_dist_cfg1_max_batches_init_f(void)
2584{
2585 return 0xffffU;
2586}
2587static inline u32 gr_pd_ab_dist_cfg1_max_output_f(u32 v)
2588{
2589 return (v & 0xffffU) << 16U;
2590}
2591static inline u32 gr_pd_ab_dist_cfg1_max_output_granularity_v(void)
2592{
2593 return 0x00000080U;
2594}
2595static inline u32 gr_pd_ab_dist_cfg2_r(void)
2596{
2597 return 0x004064c8U;
2598}
2599static inline u32 gr_pd_ab_dist_cfg2_token_limit_f(u32 v)
2600{
2601 return (v & 0x1fffU) << 0U;
2602}
2603static inline u32 gr_pd_ab_dist_cfg2_token_limit_init_v(void)
2604{
2605 return 0x00000380U;
2606}
2607static inline u32 gr_pd_ab_dist_cfg2_state_limit_f(u32 v)
2608{
2609 return (v & 0x1fffU) << 16U;
2610}
2611static inline u32 gr_pd_ab_dist_cfg2_state_limit_scc_bundle_granularity_v(void)
2612{
2613 return 0x00000020U;
2614}
2615static inline u32 gr_pd_ab_dist_cfg2_state_limit_min_gpm_fifo_depths_v(void)
2616{
2617 return 0x00000302U;
2618}
2619static inline u32 gr_pd_dist_skip_table_r(u32 i)
2620{
2621 return 0x004064d0U + i*4U;
2622}
2623static inline u32 gr_pd_dist_skip_table__size_1_v(void)
2624{
2625 return 0x00000008U;
2626}
2627static inline u32 gr_pd_dist_skip_table_gpc_4n0_mask_f(u32 v)
2628{
2629 return (v & 0xffU) << 0U;
2630}
2631static inline u32 gr_pd_dist_skip_table_gpc_4n1_mask_f(u32 v)
2632{
2633 return (v & 0xffU) << 8U;
2634}
2635static inline u32 gr_pd_dist_skip_table_gpc_4n2_mask_f(u32 v)
2636{
2637 return (v & 0xffU) << 16U;
2638}
2639static inline u32 gr_pd_dist_skip_table_gpc_4n3_mask_f(u32 v)
2640{
2641 return (v & 0xffU) << 24U;
2642}
2643static inline u32 gr_ds_debug_r(void)
2644{
2645 return 0x00405800U;
2646}
2647static inline u32 gr_ds_debug_timeslice_mode_disable_f(void)
2648{
2649 return 0x0U;
2650}
2651static inline u32 gr_ds_debug_timeslice_mode_enable_f(void)
2652{
2653 return 0x8000000U;
2654}
2655static inline u32 gr_ds_zbc_color_r_r(void)
2656{
2657 return 0x00405804U;
2658}
2659static inline u32 gr_ds_zbc_color_r_val_f(u32 v)
2660{
2661 return (v & 0xffffffffU) << 0U;
2662}
2663static inline u32 gr_ds_zbc_color_g_r(void)
2664{
2665 return 0x00405808U;
2666}
2667static inline u32 gr_ds_zbc_color_g_val_f(u32 v)
2668{
2669 return (v & 0xffffffffU) << 0U;
2670}
2671static inline u32 gr_ds_zbc_color_b_r(void)
2672{
2673 return 0x0040580cU;
2674}
2675static inline u32 gr_ds_zbc_color_b_val_f(u32 v)
2676{
2677 return (v & 0xffffffffU) << 0U;
2678}
2679static inline u32 gr_ds_zbc_color_a_r(void)
2680{
2681 return 0x00405810U;
2682}
2683static inline u32 gr_ds_zbc_color_a_val_f(u32 v)
2684{
2685 return (v & 0xffffffffU) << 0U;
2686}
2687static inline u32 gr_ds_zbc_color_fmt_r(void)
2688{
2689 return 0x00405814U;
2690}
2691static inline u32 gr_ds_zbc_color_fmt_val_f(u32 v)
2692{
2693 return (v & 0x7fU) << 0U;
2694}
2695static inline u32 gr_ds_zbc_color_fmt_val_invalid_f(void)
2696{
2697 return 0x0U;
2698}
2699static inline u32 gr_ds_zbc_color_fmt_val_zero_v(void)
2700{
2701 return 0x00000001U;
2702}
2703static inline u32 gr_ds_zbc_color_fmt_val_unorm_one_v(void)
2704{
2705 return 0x00000002U;
2706}
2707static inline u32 gr_ds_zbc_color_fmt_val_rf32_gf32_bf32_af32_v(void)
2708{
2709 return 0x00000004U;
2710}
2711static inline u32 gr_ds_zbc_color_fmt_val_a8_b8_g8_r8_v(void)
2712{
2713 return 0x00000028U;
2714}
2715static inline u32 gr_ds_zbc_z_r(void)
2716{
2717 return 0x00405818U;
2718}
2719static inline u32 gr_ds_zbc_z_val_s(void)
2720{
2721 return 32U;
2722}
2723static inline u32 gr_ds_zbc_z_val_f(u32 v)
2724{
2725 return (v & 0xffffffffU) << 0U;
2726}
2727static inline u32 gr_ds_zbc_z_val_m(void)
2728{
2729 return 0xffffffffU << 0U;
2730}
2731static inline u32 gr_ds_zbc_z_val_v(u32 r)
2732{
2733 return (r >> 0U) & 0xffffffffU;
2734}
2735static inline u32 gr_ds_zbc_z_val__init_v(void)
2736{
2737 return 0x00000000U;
2738}
2739static inline u32 gr_ds_zbc_z_val__init_f(void)
2740{
2741 return 0x0U;
2742}
2743static inline u32 gr_ds_zbc_z_fmt_r(void)
2744{
2745 return 0x0040581cU;
2746}
2747static inline u32 gr_ds_zbc_z_fmt_val_f(u32 v)
2748{
2749 return (v & 0x1U) << 0U;
2750}
2751static inline u32 gr_ds_zbc_z_fmt_val_invalid_f(void)
2752{
2753 return 0x0U;
2754}
2755static inline u32 gr_ds_zbc_z_fmt_val_fp32_v(void)
2756{
2757 return 0x00000001U;
2758}
2759static inline u32 gr_ds_zbc_tbl_index_r(void)
2760{
2761 return 0x00405820U;
2762}
2763static inline u32 gr_ds_zbc_tbl_index_val_f(u32 v)
2764{
2765 return (v & 0xfU) << 0U;
2766}
2767static inline u32 gr_ds_zbc_tbl_ld_r(void)
2768{
2769 return 0x00405824U;
2770}
2771static inline u32 gr_ds_zbc_tbl_ld_select_c_f(void)
2772{
2773 return 0x0U;
2774}
2775static inline u32 gr_ds_zbc_tbl_ld_select_z_f(void)
2776{
2777 return 0x1U;
2778}
2779static inline u32 gr_ds_zbc_tbl_ld_action_write_f(void)
2780{
2781 return 0x0U;
2782}
2783static inline u32 gr_ds_zbc_tbl_ld_trigger_active_f(void)
2784{
2785 return 0x4U;
2786}
2787static inline u32 gr_ds_tga_constraintlogic_beta_r(void)
2788{
2789 return 0x00405830U;
2790}
2791static inline u32 gr_ds_tga_constraintlogic_beta_cbsize_f(u32 v)
2792{
2793 return (v & 0x3fffffU) << 0U;
2794}
2795static inline u32 gr_ds_tga_constraintlogic_alpha_r(void)
2796{
2797 return 0x0040585cU;
2798}
2799static inline u32 gr_ds_tga_constraintlogic_alpha_cbsize_f(u32 v)
2800{
2801 return (v & 0xffffU) << 0U;
2802}
2803static inline u32 gr_ds_hww_esr_r(void)
2804{
2805 return 0x00405840U;
2806}
2807static inline u32 gr_ds_hww_esr_reset_s(void)
2808{
2809 return 1U;
2810}
2811static inline u32 gr_ds_hww_esr_reset_f(u32 v)
2812{
2813 return (v & 0x1U) << 30U;
2814}
2815static inline u32 gr_ds_hww_esr_reset_m(void)
2816{
2817 return 0x1U << 30U;
2818}
2819static inline u32 gr_ds_hww_esr_reset_v(u32 r)
2820{
2821 return (r >> 30U) & 0x1U;
2822}
2823static inline u32 gr_ds_hww_esr_reset_task_v(void)
2824{
2825 return 0x00000001U;
2826}
2827static inline u32 gr_ds_hww_esr_reset_task_f(void)
2828{
2829 return 0x40000000U;
2830}
2831static inline u32 gr_ds_hww_esr_en_enabled_f(void)
2832{
2833 return 0x80000000U;
2834}
2835static inline u32 gr_ds_hww_esr_2_r(void)
2836{
2837 return 0x00405848U;
2838}
2839static inline u32 gr_ds_hww_esr_2_reset_s(void)
2840{
2841 return 1U;
2842}
2843static inline u32 gr_ds_hww_esr_2_reset_f(u32 v)
2844{
2845 return (v & 0x1U) << 30U;
2846}
2847static inline u32 gr_ds_hww_esr_2_reset_m(void)
2848{
2849 return 0x1U << 30U;
2850}
2851static inline u32 gr_ds_hww_esr_2_reset_v(u32 r)
2852{
2853 return (r >> 30U) & 0x1U;
2854}
2855static inline u32 gr_ds_hww_esr_2_reset_task_v(void)
2856{
2857 return 0x00000001U;
2858}
2859static inline u32 gr_ds_hww_esr_2_reset_task_f(void)
2860{
2861 return 0x40000000U;
2862}
2863static inline u32 gr_ds_hww_esr_2_en_enabled_f(void)
2864{
2865 return 0x80000000U;
2866}
2867static inline u32 gr_ds_hww_report_mask_r(void)
2868{
2869 return 0x00405844U;
2870}
2871static inline u32 gr_ds_hww_report_mask_sph0_err_report_f(void)
2872{
2873 return 0x1U;
2874}
2875static inline u32 gr_ds_hww_report_mask_sph1_err_report_f(void)
2876{
2877 return 0x2U;
2878}
2879static inline u32 gr_ds_hww_report_mask_sph2_err_report_f(void)
2880{
2881 return 0x4U;
2882}
2883static inline u32 gr_ds_hww_report_mask_sph3_err_report_f(void)
2884{
2885 return 0x8U;
2886}
2887static inline u32 gr_ds_hww_report_mask_sph4_err_report_f(void)
2888{
2889 return 0x10U;
2890}
2891static inline u32 gr_ds_hww_report_mask_sph5_err_report_f(void)
2892{
2893 return 0x20U;
2894}
2895static inline u32 gr_ds_hww_report_mask_sph6_err_report_f(void)
2896{
2897 return 0x40U;
2898}
2899static inline u32 gr_ds_hww_report_mask_sph7_err_report_f(void)
2900{
2901 return 0x80U;
2902}
2903static inline u32 gr_ds_hww_report_mask_sph8_err_report_f(void)
2904{
2905 return 0x100U;
2906}
2907static inline u32 gr_ds_hww_report_mask_sph9_err_report_f(void)
2908{
2909 return 0x200U;
2910}
2911static inline u32 gr_ds_hww_report_mask_sph10_err_report_f(void)
2912{
2913 return 0x400U;
2914}
2915static inline u32 gr_ds_hww_report_mask_sph11_err_report_f(void)
2916{
2917 return 0x800U;
2918}
2919static inline u32 gr_ds_hww_report_mask_sph12_err_report_f(void)
2920{
2921 return 0x1000U;
2922}
2923static inline u32 gr_ds_hww_report_mask_sph13_err_report_f(void)
2924{
2925 return 0x2000U;
2926}
2927static inline u32 gr_ds_hww_report_mask_sph14_err_report_f(void)
2928{
2929 return 0x4000U;
2930}
2931static inline u32 gr_ds_hww_report_mask_sph15_err_report_f(void)
2932{
2933 return 0x8000U;
2934}
2935static inline u32 gr_ds_hww_report_mask_sph16_err_report_f(void)
2936{
2937 return 0x10000U;
2938}
2939static inline u32 gr_ds_hww_report_mask_sph17_err_report_f(void)
2940{
2941 return 0x20000U;
2942}
2943static inline u32 gr_ds_hww_report_mask_sph18_err_report_f(void)
2944{
2945 return 0x40000U;
2946}
2947static inline u32 gr_ds_hww_report_mask_sph19_err_report_f(void)
2948{
2949 return 0x80000U;
2950}
2951static inline u32 gr_ds_hww_report_mask_sph20_err_report_f(void)
2952{
2953 return 0x100000U;
2954}
2955static inline u32 gr_ds_hww_report_mask_sph21_err_report_f(void)
2956{
2957 return 0x200000U;
2958}
2959static inline u32 gr_ds_hww_report_mask_sph22_err_report_f(void)
2960{
2961 return 0x400000U;
2962}
2963static inline u32 gr_ds_hww_report_mask_sph23_err_report_f(void)
2964{
2965 return 0x800000U;
2966}
2967static inline u32 gr_ds_hww_report_mask_2_r(void)
2968{
2969 return 0x0040584cU;
2970}
2971static inline u32 gr_ds_hww_report_mask_2_sph24_err_report_f(void)
2972{
2973 return 0x1U;
2974}
2975static inline u32 gr_ds_num_tpc_per_gpc_r(u32 i)
2976{
2977 return 0x00405870U + i*4U;
2978}
2979static inline u32 gr_scc_debug_r(void)
2980{
2981 return 0x00408000U;
2982}
2983static inline u32 gr_scc_debug_pagepool_invalidates_m(void)
2984{
2985 return 0x1U << 9U;
2986}
2987static inline u32 gr_scc_debug_pagepool_invalidates_disable_f(void)
2988{
2989 return 0x200U;
2990}
2991static inline u32 gr_scc_debug_pagepool_invalidates_enable_f(void)
2992{
2993 return 0x0U;
2994}
2995static inline u32 gr_scc_bundle_cb_base_r(void)
2996{
2997 return 0x00408004U;
2998}
2999static inline u32 gr_scc_bundle_cb_base_addr_39_8_f(u32 v)
3000{
3001 return (v & 0xffffffffU) << 0U;
3002}
3003static inline u32 gr_scc_bundle_cb_base_addr_39_8_align_bits_v(void)
3004{
3005 return 0x00000008U;
3006}
3007static inline u32 gr_scc_bundle_cb_size_r(void)
3008{
3009 return 0x00408008U;
3010}
3011static inline u32 gr_scc_bundle_cb_size_div_256b_f(u32 v)
3012{
3013 return (v & 0x7ffU) << 0U;
3014}
3015static inline u32 gr_scc_bundle_cb_size_div_256b__prod_v(void)
3016{
3017 return 0x00000030U;
3018}
3019static inline u32 gr_scc_bundle_cb_size_div_256b_byte_granularity_v(void)
3020{
3021 return 0x00000100U;
3022}
3023static inline u32 gr_scc_bundle_cb_size_valid_false_v(void)
3024{
3025 return 0x00000000U;
3026}
3027static inline u32 gr_scc_bundle_cb_size_valid_false_f(void)
3028{
3029 return 0x0U;
3030}
3031static inline u32 gr_scc_bundle_cb_size_valid_true_f(void)
3032{
3033 return 0x80000000U;
3034}
3035static inline u32 gr_scc_pagepool_base_r(void)
3036{
3037 return 0x0040800cU;
3038}
3039static inline u32 gr_scc_pagepool_base_addr_39_8_f(u32 v)
3040{
3041 return (v & 0xffffffffU) << 0U;
3042}
3043static inline u32 gr_scc_pagepool_base_addr_39_8_align_bits_v(void)
3044{
3045 return 0x00000008U;
3046}
3047static inline u32 gr_scc_pagepool_r(void)
3048{
3049 return 0x00408010U;
3050}
3051static inline u32 gr_scc_pagepool_total_pages_f(u32 v)
3052{
3053 return (v & 0x3ffU) << 0U;
3054}
3055static inline u32 gr_scc_pagepool_total_pages_hwmax_v(void)
3056{
3057 return 0x00000000U;
3058}
3059static inline u32 gr_scc_pagepool_total_pages_hwmax_value_v(void)
3060{
3061 return 0x00000200U;
3062}
3063static inline u32 gr_scc_pagepool_total_pages_byte_granularity_v(void)
3064{
3065 return 0x00000100U;
3066}
3067static inline u32 gr_scc_pagepool_max_valid_pages_s(void)
3068{
3069 return 10U;
3070}
3071static inline u32 gr_scc_pagepool_max_valid_pages_f(u32 v)
3072{
3073 return (v & 0x3ffU) << 10U;
3074}
3075static inline u32 gr_scc_pagepool_max_valid_pages_m(void)
3076{
3077 return 0x3ffU << 10U;
3078}
3079static inline u32 gr_scc_pagepool_max_valid_pages_v(u32 r)
3080{
3081 return (r >> 10U) & 0x3ffU;
3082}
3083static inline u32 gr_scc_pagepool_valid_true_f(void)
3084{
3085 return 0x80000000U;
3086}
3087static inline u32 gr_scc_init_r(void)
3088{
3089 return 0x0040802cU;
3090}
3091static inline u32 gr_scc_init_ram_trigger_f(void)
3092{
3093 return 0x1U;
3094}
3095static inline u32 gr_scc_hww_esr_r(void)
3096{
3097 return 0x00408030U;
3098}
3099static inline u32 gr_scc_hww_esr_reset_active_f(void)
3100{
3101 return 0x40000000U;
3102}
3103static inline u32 gr_scc_hww_esr_en_enable_f(void)
3104{
3105 return 0x80000000U;
3106}
3107static inline u32 gr_ssync_hww_esr_r(void)
3108{
3109 return 0x00405a14U;
3110}
3111static inline u32 gr_ssync_hww_esr_reset_active_f(void)
3112{
3113 return 0x40000000U;
3114}
3115static inline u32 gr_ssync_hww_esr_en_enable_f(void)
3116{
3117 return 0x80000000U;
3118}
3119static inline u32 gr_sked_hww_esr_r(void)
3120{
3121 return 0x00407020U;
3122}
3123static inline u32 gr_sked_hww_esr_reset_active_f(void)
3124{
3125 return 0x40000000U;
3126}
3127static inline u32 gr_sked_hww_esr_en_r(void)
3128{
3129 return 0x00407024U;
3130}
3131static inline u32 gr_sked_hww_esr_en_skedcheck18_l1_config_too_small_m(void)
3132{
3133 return 0x1U << 25U;
3134}
3135static inline u32 gr_sked_hww_esr_en_skedcheck18_l1_config_too_small_disabled_f(void)
3136{
3137 return 0x0U;
3138}
3139static inline u32 gr_sked_hww_esr_en_skedcheck18_l1_config_too_small_enabled_f(void)
3140{
3141 return 0x2000000U;
3142}
3143static inline u32 gr_cwd_fs_r(void)
3144{
3145 return 0x00405b00U;
3146}
3147static inline u32 gr_cwd_fs_num_gpcs_f(u32 v)
3148{
3149 return (v & 0xffU) << 0U;
3150}
3151static inline u32 gr_cwd_fs_num_tpcs_f(u32 v)
3152{
3153 return (v & 0xffU) << 8U;
3154}
3155static inline u32 gr_cwd_gpc_tpc_id_r(u32 i)
3156{
3157 return 0x00405b60U + i*4U;
3158}
3159static inline u32 gr_cwd_gpc_tpc_id_tpc0_s(void)
3160{
3161 return 4U;
3162}
3163static inline u32 gr_cwd_gpc_tpc_id_tpc0_f(u32 v)
3164{
3165 return (v & 0xfU) << 0U;
3166}
3167static inline u32 gr_cwd_gpc_tpc_id_gpc0_s(void)
3168{
3169 return 4U;
3170}
3171static inline u32 gr_cwd_gpc_tpc_id_gpc0_f(u32 v)
3172{
3173 return (v & 0xfU) << 4U;
3174}
3175static inline u32 gr_cwd_gpc_tpc_id_tpc1_f(u32 v)
3176{
3177 return (v & 0xfU) << 8U;
3178}
3179static inline u32 gr_cwd_sm_id_r(u32 i)
3180{
3181 return 0x00405ba0U + i*4U;
3182}
3183static inline u32 gr_cwd_sm_id__size_1_v(void)
3184{
3185 return 0x00000010U;
3186}
3187static inline u32 gr_cwd_sm_id_tpc0_f(u32 v)
3188{
3189 return (v & 0xffU) << 0U;
3190}
3191static inline u32 gr_cwd_sm_id_tpc1_f(u32 v)
3192{
3193 return (v & 0xffU) << 8U;
3194}
3195static inline u32 gr_gpc0_fs_gpc_r(void)
3196{
3197 return 0x00502608U;
3198}
3199static inline u32 gr_gpc0_fs_gpc_num_available_tpcs_v(u32 r)
3200{
3201 return (r >> 0U) & 0x1fU;
3202}
3203static inline u32 gr_gpc0_fs_gpc_num_available_zculls_v(u32 r)
3204{
3205 return (r >> 16U) & 0x1fU;
3206}
3207static inline u32 gr_gpc0_cfg_r(void)
3208{
3209 return 0x00502620U;
3210}
3211static inline u32 gr_gpc0_cfg_imem_sz_v(u32 r)
3212{
3213 return (r >> 0U) & 0xffU;
3214}
3215static inline u32 gr_gpccs_rc_lanes_r(void)
3216{
3217 return 0x00502880U;
3218}
3219static inline u32 gr_gpccs_rc_lanes_num_chains_s(void)
3220{
3221 return 6U;
3222}
3223static inline u32 gr_gpccs_rc_lanes_num_chains_f(u32 v)
3224{
3225 return (v & 0x3fU) << 0U;
3226}
3227static inline u32 gr_gpccs_rc_lanes_num_chains_m(void)
3228{
3229 return 0x3fU << 0U;
3230}
3231static inline u32 gr_gpccs_rc_lanes_num_chains_v(u32 r)
3232{
3233 return (r >> 0U) & 0x3fU;
3234}
3235static inline u32 gr_gpccs_rc_lane_size_r(void)
3236{
3237 return 0x00502910U;
3238}
3239static inline u32 gr_gpccs_rc_lane_size_v_s(void)
3240{
3241 return 24U;
3242}
3243static inline u32 gr_gpccs_rc_lane_size_v_f(u32 v)
3244{
3245 return (v & 0xffffffU) << 0U;
3246}
3247static inline u32 gr_gpccs_rc_lane_size_v_m(void)
3248{
3249 return 0xffffffU << 0U;
3250}
3251static inline u32 gr_gpccs_rc_lane_size_v_v(u32 r)
3252{
3253 return (r >> 0U) & 0xffffffU;
3254}
3255static inline u32 gr_gpccs_rc_lane_size_v_0_v(void)
3256{
3257 return 0x00000000U;
3258}
3259static inline u32 gr_gpccs_rc_lane_size_v_0_f(void)
3260{
3261 return 0x0U;
3262}
3263static inline u32 gr_gpc0_zcull_fs_r(void)
3264{
3265 return 0x00500910U;
3266}
3267static inline u32 gr_gpc0_zcull_fs_num_sms_f(u32 v)
3268{
3269 return (v & 0x1ffU) << 0U;
3270}
3271static inline u32 gr_gpc0_zcull_fs_num_active_banks_f(u32 v)
3272{
3273 return (v & 0xfU) << 16U;
3274}
3275static inline u32 gr_gpc0_zcull_ram_addr_r(void)
3276{
3277 return 0x00500914U;
3278}
3279static inline u32 gr_gpc0_zcull_ram_addr_tiles_per_hypertile_row_per_gpc_f(u32 v)
3280{
3281 return (v & 0xfU) << 0U;
3282}
3283static inline u32 gr_gpc0_zcull_ram_addr_row_offset_f(u32 v)
3284{
3285 return (v & 0xfU) << 8U;
3286}
3287static inline u32 gr_gpc0_zcull_sm_num_rcp_r(void)
3288{
3289 return 0x00500918U;
3290}
3291static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative_f(u32 v)
3292{
3293 return (v & 0xffffffU) << 0U;
3294}
3295static inline u32 gr_gpc0_zcull_sm_num_rcp_conservative__max_v(void)
3296{
3297 return 0x00800000U;
3298}
3299static inline u32 gr_gpc0_zcull_total_ram_size_r(void)
3300{
3301 return 0x00500920U;
3302}
3303static inline u32 gr_gpc0_zcull_total_ram_size_num_aliquots_f(u32 v)
3304{
3305 return (v & 0xffffU) << 0U;
3306}
3307static inline u32 gr_gpc0_zcull_zcsize_r(u32 i)
3308{
3309 return 0x00500a04U + i*32U;
3310}
3311static inline u32 gr_gpc0_zcull_zcsize_height_subregion__multiple_v(void)
3312{
3313 return 0x00000040U;
3314}
3315static inline u32 gr_gpc0_zcull_zcsize_width_subregion__multiple_v(void)
3316{
3317 return 0x00000010U;
3318}
3319static inline u32 gr_gpc0_gpm_pd_sm_id_r(u32 i)
3320{
3321 return 0x00500c10U + i*4U;
3322}
3323static inline u32 gr_gpc0_gpm_pd_sm_id_id_f(u32 v)
3324{
3325 return (v & 0xffU) << 0U;
3326}
3327static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_r(u32 i)
3328{
3329 return 0x00500c30U + i*4U;
3330}
3331static inline u32 gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(u32 r)
3332{
3333 return (r >> 0U) & 0xffU;
3334}
3335static inline u32 gr_gpc0_tpc0_pe_cfg_smid_r(void)
3336{
3337 return 0x00504088U;
3338}
3339static inline u32 gr_gpc0_tpc0_pe_cfg_smid_value_f(u32 v)
3340{
3341 return (v & 0xffffU) << 0U;
3342}
3343static inline u32 gr_gpc0_tpc0_sm_cfg_r(void)
3344{
3345 return 0x00504608U;
3346}
3347static inline u32 gr_gpc0_tpc0_sm_cfg_tpc_id_f(u32 v)
3348{
3349 return (v & 0xffffU) << 0U;
3350}
3351static inline u32 gr_gpc0_tpc0_sm_cfg_tpc_id_v(u32 r)
3352{
3353 return (r >> 0U) & 0xffffU;
3354}
3355static inline u32 gr_gpc0_tpc0_sm_arch_r(void)
3356{
3357 return 0x00504330U;
3358}
3359static inline u32 gr_gpc0_tpc0_sm_arch_warp_count_v(u32 r)
3360{
3361 return (r >> 0U) & 0xffU;
3362}
3363static inline u32 gr_gpc0_tpc0_sm_arch_spa_version_v(u32 r)
3364{
3365 return (r >> 8U) & 0xfffU;
3366}
3367static inline u32 gr_gpc0_tpc0_sm_arch_sm_version_v(u32 r)
3368{
3369 return (r >> 20U) & 0xfffU;
3370}
3371static inline u32 gr_gpc0_ppc0_pes_vsc_strem_r(void)
3372{
3373 return 0x00503018U;
3374}
3375static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_m(void)
3376{
3377 return 0x1U << 0U;
3378}
3379static inline u32 gr_gpc0_ppc0_pes_vsc_strem_master_pe_true_f(void)
3380{
3381 return 0x1U;
3382}
3383static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_r(void)
3384{
3385 return 0x005030c0U;
3386}
3387static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_f(u32 v)
3388{
3389 return (v & 0x3fffffU) << 0U;
3390}
3391static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_m(void)
3392{
3393 return 0x3fffffU << 0U;
3394}
3395static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_default_v(void)
3396{
3397 return 0x00000800U;
3398}
3399static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_gfxp_v(void)
3400{
3401 return 0x00001100U;
3402}
3403static inline u32 gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v(void)
3404{
3405 return 0x00000020U;
3406}
3407static inline u32 gr_gpc0_ppc0_cbm_beta_cb_offset_r(void)
3408{
3409 return 0x005030f4U;
3410}
3411static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_r(void)
3412{
3413 return 0x005030e4U;
3414}
3415static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(u32 v)
3416{
3417 return (v & 0xffffU) << 0U;
3418}
3419static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_m(void)
3420{
3421 return 0xffffU << 0U;
3422}
3423static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_default_v(void)
3424{
3425 return 0x00000800U;
3426}
3427static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_size_v_granularity_v(void)
3428{
3429 return 0x00000020U;
3430}
3431static inline u32 gr_gpc0_ppc0_cbm_alpha_cb_offset_r(void)
3432{
3433 return 0x005030f8U;
3434}
3435static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_r(void)
3436{
3437 return 0x005030f0U;
3438}
3439static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_f(u32 v)
3440{
3441 return (v & 0x3fffffU) << 0U;
3442}
3443static inline u32 gr_gpc0_ppc0_cbm_beta_steady_state_cb_size_v_default_v(void)
3444{
3445 return 0x00000800U;
3446}
3447static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_r(void)
3448{
3449 return 0x00419e00U;
3450}
3451static inline u32 gr_gpcs_tpcs_tex_rm_cb_0_base_addr_43_12_f(u32 v)
3452{
3453 return (v & 0xffffffffU) << 0U;
3454}
3455static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_r(void)
3456{
3457 return 0x00419e04U;
3458}
3459static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_s(void)
3460{
3461 return 21U;
3462}
3463static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_f(u32 v)
3464{
3465 return (v & 0x1fffffU) << 0U;
3466}
3467static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_m(void)
3468{
3469 return 0x1fffffU << 0U;
3470}
3471static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_v(u32 r)
3472{
3473 return (r >> 0U) & 0x1fffffU;
3474}
3475static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_size_div_128b_granularity_f(void)
3476{
3477 return 0x80U;
3478}
3479static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_s(void)
3480{
3481 return 1U;
3482}
3483static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_f(u32 v)
3484{
3485 return (v & 0x1U) << 31U;
3486}
3487static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_m(void)
3488{
3489 return 0x1U << 31U;
3490}
3491static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_v(u32 r)
3492{
3493 return (r >> 31U) & 0x1U;
3494}
3495static inline u32 gr_gpcs_tpcs_tex_rm_cb_1_valid_true_f(void)
3496{
3497 return 0x80000000U;
3498}
3499static inline u32 gr_gpccs_falcon_addr_r(void)
3500{
3501 return 0x0041a0acU;
3502}
3503static inline u32 gr_gpccs_falcon_addr_lsb_s(void)
3504{
3505 return 6U;
3506}
3507static inline u32 gr_gpccs_falcon_addr_lsb_f(u32 v)
3508{
3509 return (v & 0x3fU) << 0U;
3510}
3511static inline u32 gr_gpccs_falcon_addr_lsb_m(void)
3512{
3513 return 0x3fU << 0U;
3514}
3515static inline u32 gr_gpccs_falcon_addr_lsb_v(u32 r)
3516{
3517 return (r >> 0U) & 0x3fU;
3518}
3519static inline u32 gr_gpccs_falcon_addr_lsb_init_v(void)
3520{
3521 return 0x00000000U;
3522}
3523static inline u32 gr_gpccs_falcon_addr_lsb_init_f(void)
3524{
3525 return 0x0U;
3526}
3527static inline u32 gr_gpccs_falcon_addr_msb_s(void)
3528{
3529 return 6U;
3530}
3531static inline u32 gr_gpccs_falcon_addr_msb_f(u32 v)
3532{
3533 return (v & 0x3fU) << 6U;
3534}
3535static inline u32 gr_gpccs_falcon_addr_msb_m(void)
3536{
3537 return 0x3fU << 6U;
3538}
3539static inline u32 gr_gpccs_falcon_addr_msb_v(u32 r)
3540{
3541 return (r >> 6U) & 0x3fU;
3542}
3543static inline u32 gr_gpccs_falcon_addr_msb_init_v(void)
3544{
3545 return 0x00000000U;
3546}
3547static inline u32 gr_gpccs_falcon_addr_msb_init_f(void)
3548{
3549 return 0x0U;
3550}
3551static inline u32 gr_gpccs_falcon_addr_ext_s(void)
3552{
3553 return 12U;
3554}
3555static inline u32 gr_gpccs_falcon_addr_ext_f(u32 v)
3556{
3557 return (v & 0xfffU) << 0U;
3558}
3559static inline u32 gr_gpccs_falcon_addr_ext_m(void)
3560{
3561 return 0xfffU << 0U;
3562}
3563static inline u32 gr_gpccs_falcon_addr_ext_v(u32 r)
3564{
3565 return (r >> 0U) & 0xfffU;
3566}
3567static inline u32 gr_gpccs_cpuctl_r(void)
3568{
3569 return 0x0041a100U;
3570}
3571static inline u32 gr_gpccs_cpuctl_startcpu_f(u32 v)
3572{
3573 return (v & 0x1U) << 1U;
3574}
3575static inline u32 gr_gpccs_dmactl_r(void)
3576{
3577 return 0x0041a10cU;
3578}
3579static inline u32 gr_gpccs_dmactl_require_ctx_f(u32 v)
3580{
3581 return (v & 0x1U) << 0U;
3582}
3583static inline u32 gr_gpccs_dmactl_dmem_scrubbing_m(void)
3584{
3585 return 0x1U << 1U;
3586}
3587static inline u32 gr_gpccs_dmactl_imem_scrubbing_m(void)
3588{
3589 return 0x1U << 2U;
3590}
3591static inline u32 gr_gpccs_imemc_r(u32 i)
3592{
3593 return 0x0041a180U + i*16U;
3594}
3595static inline u32 gr_gpccs_imemc_offs_f(u32 v)
3596{
3597 return (v & 0x3fU) << 2U;
3598}
3599static inline u32 gr_gpccs_imemc_blk_f(u32 v)
3600{
3601 return (v & 0xffU) << 8U;
3602}
3603static inline u32 gr_gpccs_imemc_aincw_f(u32 v)
3604{
3605 return (v & 0x1U) << 24U;
3606}
3607static inline u32 gr_gpccs_imemd_r(u32 i)
3608{
3609 return 0x0041a184U + i*16U;
3610}
3611static inline u32 gr_gpccs_imemt_r(u32 i)
3612{
3613 return 0x0041a188U + i*16U;
3614}
3615static inline u32 gr_gpccs_imemt__size_1_v(void)
3616{
3617 return 0x00000004U;
3618}
3619static inline u32 gr_gpccs_imemt_tag_f(u32 v)
3620{
3621 return (v & 0xffffU) << 0U;
3622}
3623static inline u32 gr_gpccs_dmemc_r(u32 i)
3624{
3625 return 0x0041a1c0U + i*8U;
3626}
3627static inline u32 gr_gpccs_dmemc_offs_f(u32 v)
3628{
3629 return (v & 0x3fU) << 2U;
3630}
3631static inline u32 gr_gpccs_dmemc_blk_f(u32 v)
3632{
3633 return (v & 0xffU) << 8U;
3634}
3635static inline u32 gr_gpccs_dmemc_aincw_f(u32 v)
3636{
3637 return (v & 0x1U) << 24U;
3638}
3639static inline u32 gr_gpccs_dmemd_r(u32 i)
3640{
3641 return 0x0041a1c4U + i*8U;
3642}
3643static inline u32 gr_gpccs_ctxsw_mailbox_r(u32 i)
3644{
3645 return 0x0041a800U + i*4U;
3646}
3647static inline u32 gr_gpccs_ctxsw_mailbox_value_f(u32 v)
3648{
3649 return (v & 0xffffffffU) << 0U;
3650}
3651static inline u32 gr_gpcs_swdx_bundle_cb_base_r(void)
3652{
3653 return 0x00418e24U;
3654}
3655static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_s(void)
3656{
3657 return 32U;
3658}
3659static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_f(u32 v)
3660{
3661 return (v & 0xffffffffU) << 0U;
3662}
3663static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_m(void)
3664{
3665 return 0xffffffffU << 0U;
3666}
3667static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_v(u32 r)
3668{
3669 return (r >> 0U) & 0xffffffffU;
3670}
3671static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_v(void)
3672{
3673 return 0x00000000U;
3674}
3675static inline u32 gr_gpcs_swdx_bundle_cb_base_addr_39_8_init_f(void)
3676{
3677 return 0x0U;
3678}
3679static inline u32 gr_gpcs_swdx_bundle_cb_size_r(void)
3680{
3681 return 0x00418e28U;
3682}
3683static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_s(void)
3684{
3685 return 11U;
3686}
3687static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_f(u32 v)
3688{
3689 return (v & 0x7ffU) << 0U;
3690}
3691static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_m(void)
3692{
3693 return 0x7ffU << 0U;
3694}
3695static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_v(u32 r)
3696{
3697 return (r >> 0U) & 0x7ffU;
3698}
3699static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_v(void)
3700{
3701 return 0x00000030U;
3702}
3703static inline u32 gr_gpcs_swdx_bundle_cb_size_div_256b_init_f(void)
3704{
3705 return 0x30U;
3706}
3707static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_s(void)
3708{
3709 return 1U;
3710}
3711static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_f(u32 v)
3712{
3713 return (v & 0x1U) << 31U;
3714}
3715static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_m(void)
3716{
3717 return 0x1U << 31U;
3718}
3719static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_v(u32 r)
3720{
3721 return (r >> 31U) & 0x1U;
3722}
3723static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_v(void)
3724{
3725 return 0x00000000U;
3726}
3727static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_false_f(void)
3728{
3729 return 0x0U;
3730}
3731static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_v(void)
3732{
3733 return 0x00000001U;
3734}
3735static inline u32 gr_gpcs_swdx_bundle_cb_size_valid_true_f(void)
3736{
3737 return 0x80000000U;
3738}
3739static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_r(void)
3740{
3741 return 0x005001dcU;
3742}
3743static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_f(u32 v)
3744{
3745 return (v & 0xffffU) << 0U;
3746}
3747static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_default_v(void)
3748{
3749 return 0x00000170U;
3750}
3751static inline u32 gr_gpc0_swdx_rm_spill_buffer_size_256b_byte_granularity_v(void)
3752{
3753 return 0x00000100U;
3754}
3755static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_r(void)
3756{
3757 return 0x005001d8U;
3758}
3759static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_f(u32 v)
3760{
3761 return (v & 0xffffffffU) << 0U;
3762}
3763static inline u32 gr_gpc0_swdx_rm_spill_buffer_addr_39_8_align_bits_v(void)
3764{
3765 return 0x00000008U;
3766}
3767static inline u32 gr_gpcs_swdx_beta_cb_ctrl_r(void)
3768{
3769 return 0x004181e4U;
3770}
3771static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_f(u32 v)
3772{
3773 return (v & 0xfffU) << 0U;
3774}
3775static inline u32 gr_gpcs_swdx_beta_cb_ctrl_cbes_reserve_gfxp_v(void)
3776{
3777 return 0x00000100U;
3778}
3779static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_r(void)
3780{
3781 return 0x0041befcU;
3782}
3783static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_cbes_reserve_f(u32 v)
3784{
3785 return (v & 0xfffU) << 0U;
3786}
3787static inline u32 gr_gpcs_ppcs_cbm_debug_r(void)
3788{
3789 return 0x0041bec4U;
3790}
3791static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_alpha_m(void)
3792{
3793 return 0x1U << 0U;
3794}
3795static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_alpha_disable_f(void)
3796{
3797 return 0x0U;
3798}
3799static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_alpha_enable_f(void)
3800{
3801 return 0x1U;
3802}
3803static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_beta_m(void)
3804{
3805 return 0x1U << 1U;
3806}
3807static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_beta_disable_f(void)
3808{
3809 return 0x0U;
3810}
3811static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_beta_enable_f(void)
3812{
3813 return 0x2U;
3814}
3815static inline u32 gr_gpcs_swdx_tc_beta_cb_size_r(u32 i)
3816{
3817 return 0x00418ea0U + i*4U;
3818}
3819static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_f(u32 v)
3820{
3821 return (v & 0x3fffffU) << 0U;
3822}
3823static inline u32 gr_gpcs_swdx_tc_beta_cb_size_v_m(void)
3824{
3825 return 0x3fffffU << 0U;
3826}
3827static inline u32 gr_gpcs_swdx_dss_zbc_color_r_r(u32 i)
3828{
3829 return 0x00418010U + i*4U;
3830}
3831static inline u32 gr_gpcs_swdx_dss_zbc_color_r_val_f(u32 v)
3832{
3833 return (v & 0xffffffffU) << 0U;
3834}
3835static inline u32 gr_gpcs_swdx_dss_zbc_color_g_r(u32 i)
3836{
3837 return 0x0041804cU + i*4U;
3838}
3839static inline u32 gr_gpcs_swdx_dss_zbc_color_g_val_f(u32 v)
3840{
3841 return (v & 0xffffffffU) << 0U;
3842}
3843static inline u32 gr_gpcs_swdx_dss_zbc_color_b_r(u32 i)
3844{
3845 return 0x00418088U + i*4U;
3846}
3847static inline u32 gr_gpcs_swdx_dss_zbc_color_b_val_f(u32 v)
3848{
3849 return (v & 0xffffffffU) << 0U;
3850}
3851static inline u32 gr_gpcs_swdx_dss_zbc_color_a_r(u32 i)
3852{
3853 return 0x004180c4U + i*4U;
3854}
3855static inline u32 gr_gpcs_swdx_dss_zbc_color_a_val_f(u32 v)
3856{
3857 return (v & 0xffffffffU) << 0U;
3858}
3859static inline u32 gr_gpcs_swdx_dss_zbc_c_01_to_04_format_r(void)
3860{
3861 return 0x00418100U;
3862}
3863static inline u32 gr_gpcs_swdx_dss_zbc_z_r(u32 i)
3864{
3865 return 0x00418110U + i*4U;
3866}
3867static inline u32 gr_gpcs_swdx_dss_zbc_z_val_f(u32 v)
3868{
3869 return (v & 0xffffffffU) << 0U;
3870}
3871static inline u32 gr_gpcs_swdx_dss_zbc_z_01_to_04_format_r(void)
3872{
3873 return 0x0041814cU;
3874}
3875static inline u32 gr_gpcs_swdx_dss_zbc_s_r(u32 i)
3876{
3877 return 0x0041815cU + i*4U;
3878}
3879static inline u32 gr_gpcs_swdx_dss_zbc_s_val_f(u32 v)
3880{
3881 return (v & 0xffU) << 0U;
3882}
3883static inline u32 gr_gpcs_swdx_dss_zbc_s_01_to_04_format_r(void)
3884{
3885 return 0x00418198U;
3886}
3887static inline u32 gr_gpcs_swdx_spill_unit_r(void)
3888{
3889 return 0x00418e9cU;
3890}
3891static inline u32 gr_gpcs_swdx_spill_unit_spill_buffer_cache_mgmt_mode_m(void)
3892{
3893 return 0x1U << 16U;
3894}
3895static inline u32 gr_gpcs_swdx_spill_unit_spill_buffer_cache_mgmt_mode_disabled_f(void)
3896{
3897 return 0x0U;
3898}
3899static inline u32 gr_gpcs_swdx_spill_unit_spill_buffer_cache_mgmt_mode_enabled_f(void)
3900{
3901 return 0x10000U;
3902}
3903static inline u32 gr_gpcs_setup_attrib_cb_base_r(void)
3904{
3905 return 0x00418810U;
3906}
3907static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_f(u32 v)
3908{
3909 return (v & 0xfffffffU) << 0U;
3910}
3911static inline u32 gr_gpcs_setup_attrib_cb_base_addr_39_12_align_bits_v(void)
3912{
3913 return 0x0000000cU;
3914}
3915static inline u32 gr_gpcs_setup_attrib_cb_base_valid_true_f(void)
3916{
3917 return 0x80000000U;
3918}
3919static inline u32 gr_crstr_gpc_map_r(u32 i)
3920{
3921 return 0x00418b08U + i*4U;
3922}
3923static inline u32 gr_crstr_gpc_map_tile0_f(u32 v)
3924{
3925 return (v & 0x1fU) << 0U;
3926}
3927static inline u32 gr_crstr_gpc_map_tile1_f(u32 v)
3928{
3929 return (v & 0x1fU) << 5U;
3930}
3931static inline u32 gr_crstr_gpc_map_tile2_f(u32 v)
3932{
3933 return (v & 0x1fU) << 10U;
3934}
3935static inline u32 gr_crstr_gpc_map_tile3_f(u32 v)
3936{
3937 return (v & 0x1fU) << 15U;
3938}
3939static inline u32 gr_crstr_gpc_map_tile4_f(u32 v)
3940{
3941 return (v & 0x1fU) << 20U;
3942}
3943static inline u32 gr_crstr_gpc_map_tile5_f(u32 v)
3944{
3945 return (v & 0x1fU) << 25U;
3946}
3947static inline u32 gr_crstr_map_table_cfg_r(void)
3948{
3949 return 0x00418bb8U;
3950}
3951static inline u32 gr_crstr_map_table_cfg_row_offset_f(u32 v)
3952{
3953 return (v & 0xffU) << 0U;
3954}
3955static inline u32 gr_crstr_map_table_cfg_num_entries_f(u32 v)
3956{
3957 return (v & 0xffU) << 8U;
3958}
3959static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_r(u32 i)
3960{
3961 return 0x00418980U + i*4U;
3962}
3963static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_0_f(u32 v)
3964{
3965 return (v & 0x7U) << 0U;
3966}
3967static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_1_f(u32 v)
3968{
3969 return (v & 0x7U) << 4U;
3970}
3971static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_2_f(u32 v)
3972{
3973 return (v & 0x7U) << 8U;
3974}
3975static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_3_f(u32 v)
3976{
3977 return (v & 0x7U) << 12U;
3978}
3979static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_4_f(u32 v)
3980{
3981 return (v & 0x7U) << 16U;
3982}
3983static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_5_f(u32 v)
3984{
3985 return (v & 0x7U) << 20U;
3986}
3987static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_6_f(u32 v)
3988{
3989 return (v & 0x7U) << 24U;
3990}
3991static inline u32 gr_gpcs_zcull_sm_in_gpc_number_map_tile_7_f(u32 v)
3992{
3993 return (v & 0x7U) << 28U;
3994}
3995static inline u32 gr_gpcs_gpm_pd_cfg_r(void)
3996{
3997 return 0x00418c6cU;
3998}
3999static inline u32 gr_gpcs_gcc_pagepool_base_r(void)
4000{
4001 return 0x00419004U;
4002}
4003static inline u32 gr_gpcs_gcc_pagepool_base_addr_39_8_f(u32 v)
4004{
4005 return (v & 0xffffffffU) << 0U;
4006}
4007static inline u32 gr_gpcs_gcc_pagepool_r(void)
4008{
4009 return 0x00419008U;
4010}
4011static inline u32 gr_gpcs_gcc_pagepool_total_pages_f(u32 v)
4012{
4013 return (v & 0x3ffU) << 0U;
4014}
4015static inline u32 gr_gpcs_tpcs_pe_vaf_r(void)
4016{
4017 return 0x0041980cU;
4018}
4019static inline u32 gr_gpcs_tpcs_pe_vaf_fast_mode_switch_true_f(void)
4020{
4021 return 0x10U;
4022}
4023static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_r(void)
4024{
4025 return 0x00419848U;
4026}
4027static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_v_f(u32 v)
4028{
4029 return (v & 0xfffffffU) << 0U;
4030}
4031static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_f(u32 v)
4032{
4033 return (v & 0x1U) << 28U;
4034}
4035static inline u32 gr_gpcs_tpcs_pe_pin_cb_global_base_addr_valid_true_f(void)
4036{
4037 return 0x10000000U;
4038}
4039static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_r(void)
4040{
4041 return 0x00419c00U;
4042}
4043static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_disabled_f(void)
4044{
4045 return 0x0U;
4046}
4047static inline u32 gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_enabled_f(void)
4048{
4049 return 0x8U;
4050}
4051static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_r(void)
4052{
4053 return 0x00419c2cU;
4054}
4055static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_v_f(u32 v)
4056{
4057 return (v & 0xfffffffU) << 0U;
4058}
4059static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_f(u32 v)
4060{
4061 return (v & 0x1U) << 28U;
4062}
4063static inline u32 gr_gpcs_tpcs_mpc_vtg_cb_global_base_addr_valid_true_f(void)
4064{
4065 return 0x10000000U;
4066}
4067static inline u32 gr_gpcs_tpcs_sms_hww_warp_esr_report_mask_r(void)
4068{
4069 return 0x00419ea8U;
4070}
4071static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_r(void)
4072{
4073 return 0x00504728U;
4074}
4075static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_stack_error_report_f(void)
4076{
4077 return 0x2U;
4078}
4079static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_api_stack_error_report_f(void)
4080{
4081 return 0x4U;
4082}
4083static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_pc_wrap_report_f(void)
4084{
4085 return 0x10U;
4086}
4087static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_misaligned_pc_report_f(void)
4088{
4089 return 0x20U;
4090}
4091static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_pc_overflow_report_f(void)
4092{
4093 return 0x40U;
4094}
4095static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_misaligned_reg_report_f(void)
4096{
4097 return 0x100U;
4098}
4099static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_illegal_instr_encoding_report_f(void)
4100{
4101 return 0x200U;
4102}
4103static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_illegal_instr_param_report_f(void)
4104{
4105 return 0x800U;
4106}
4107static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_oor_reg_report_f(void)
4108{
4109 return 0x2000U;
4110}
4111static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_oor_addr_report_f(void)
4112{
4113 return 0x4000U;
4114}
4115static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_misaligned_addr_report_f(void)
4116{
4117 return 0x8000U;
4118}
4119static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_invalid_addr_space_report_f(void)
4120{
4121 return 0x10000U;
4122}
4123static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_invalid_const_addr_ldc_report_f(void)
4124{
4125 return 0x40000U;
4126}
4127static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_mmu_fault_report_f(void)
4128{
4129 return 0x800000U;
4130}
4131static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_stack_overflow_report_f(void)
4132{
4133 return 0x400000U;
4134}
4135static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_report_mask_mmu_nack_report_f(void)
4136{
4137 return 0x4000000U;
4138}
4139static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_r(void)
4140{
4141 return 0x00419d0cU;
4142}
4143static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f(void)
4144{
4145 return 0x2U;
4146}
4147static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_tex_enabled_f(void)
4148{
4149 return 0x1U;
4150}
4151static inline u32 gr_gpcs_tpcs_tpccs_tpc_exception_en_mpc_enabled_f(void)
4152{
4153 return 0x10U;
4154}
4155static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_r(void)
4156{
4157 return 0x0050450cU;
4158}
4159static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_v(u32 r)
4160{
4161 return (r >> 1U) & 0x1U;
4162}
4163static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_sm_enabled_f(void)
4164{
4165 return 0x2U;
4166}
4167static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_en_mpc_enabled_f(void)
4168{
4169 return 0x10U;
4170}
4171static inline u32 gr_gpcs_gpccs_gpc_exception_en_r(void)
4172{
4173 return 0x0041ac94U;
4174}
4175static inline u32 gr_gpcs_gpccs_gpc_exception_en_gcc_f(u32 v)
4176{
4177 return (v & 0x1U) << 2U;
4178}
4179static inline u32 gr_gpcs_gpccs_gpc_exception_en_tpc_f(u32 v)
4180{
4181 return (v & 0xffU) << 16U;
4182}
4183static inline u32 gr_gpcs_gpccs_gpc_exception_en_gpccs_f(u32 v)
4184{
4185 return (v & 0x1U) << 14U;
4186}
4187static inline u32 gr_gpcs_gpccs_gpc_exception_en_gpcmmu_f(u32 v)
4188{
4189 return (v & 0x1U) << 15U;
4190}
4191static inline u32 gr_gpc0_gpccs_gpc_exception_r(void)
4192{
4193 return 0x00502c90U;
4194}
4195static inline u32 gr_gpc0_gpccs_gpc_exception_gcc_v(u32 r)
4196{
4197 return (r >> 2U) & 0x1U;
4198}
4199static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_v(u32 r)
4200{
4201 return (r >> 16U) & 0xffU;
4202}
4203static inline u32 gr_gpc0_gpccs_gpc_exception_tpc_0_pending_v(void)
4204{
4205 return 0x00000001U;
4206}
4207static inline u32 gr_gpc0_gpccs_gpc_exception_gpccs_f(u32 v)
4208{
4209 return (v & 0x1U) << 14U;
4210}
4211static inline u32 gr_gpc0_gpccs_gpc_exception_gpccs_m(void)
4212{
4213 return 0x1U << 14U;
4214}
4215static inline u32 gr_gpc0_gpccs_gpc_exception_gpccs_pending_f(void)
4216{
4217 return 0x4000U;
4218}
4219static inline u32 gr_gpc0_gpccs_gpc_exception_gpcmmu_f(u32 v)
4220{
4221 return (v & 0x1U) << 15U;
4222}
4223static inline u32 gr_gpc0_gpccs_gpc_exception_gpcmmu_m(void)
4224{
4225 return 0x1U << 15U;
4226}
4227static inline u32 gr_gpc0_gpccs_gpc_exception_gpcmmu_pending_f(void)
4228{
4229 return 0x8000U;
4230}
4231static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_r(void)
4232{
4233 return 0x00501048U;
4234}
4235static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_corrected_err_bank0_m(void)
4236{
4237 return 0x1U << 0U;
4238}
4239static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_corrected_err_bank1_m(void)
4240{
4241 return 0x1U << 1U;
4242}
4243static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_uncorrected_err_bank0_m(void)
4244{
4245 return 0x1U << 4U;
4246}
4247static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_uncorrected_err_bank1_m(void)
4248{
4249 return 0x1U << 5U;
4250}
4251static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_corrected_err_total_counter_overflow_v(u32 r)
4252{
4253 return (r >> 8U) & 0x1U;
4254}
4255static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_uncorrected_err_total_counter_overflow_v(u32 r)
4256{
4257 return (r >> 10U) & 0x1U;
4258}
4259static inline u32 gr_pri_gpc0_gcc_l15_ecc_status_reset_task_f(void)
4260{
4261 return 0x40000000U;
4262}
4263static inline u32 gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_r(void)
4264{
4265 return 0x0050104cU;
4266}
4267static inline u32 gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_total_s(void)
4268{
4269 return 16U;
4270}
4271static inline u32 gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_total_v(u32 r)
4272{
4273 return (r >> 0U) & 0xffffU;
4274}
4275static inline u32 gr_pri_gpc0_gcc_l15_ecc_uncorrected_err_count_r(void)
4276{
4277 return 0x00501054U;
4278}
4279static inline u32 gr_pri_gpc0_gcc_l15_ecc_uncorrected_err_count_total_s(void)
4280{
4281 return 16U;
4282}
4283static inline u32 gr_pri_gpc0_gcc_l15_ecc_uncorrected_err_count_total_v(u32 r)
4284{
4285 return (r >> 0U) & 0xffffU;
4286}
4287static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_r(void)
4288{
4289 return 0x00504508U;
4290}
4291static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_v(u32 r)
4292{
4293 return (r >> 0U) & 0x1U;
4294}
4295static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_tex_pending_v(void)
4296{
4297 return 0x00000001U;
4298}
4299static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_v(u32 r)
4300{
4301 return (r >> 1U) & 0x1U;
4302}
4303static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_sm_pending_v(void)
4304{
4305 return 0x00000001U;
4306}
4307static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_mpc_m(void)
4308{
4309 return 0x1U << 4U;
4310}
4311static inline u32 gr_gpc0_tpc0_tpccs_tpc_exception_mpc_pending_f(void)
4312{
4313 return 0x10U;
4314}
4315static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_r(void)
4316{
4317 return 0x00504704U;
4318}
4319static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_m(void)
4320{
4321 return 0x1U << 0U;
4322}
4323static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_v(u32 r)
4324{
4325 return (r >> 0U) & 0x1U;
4326}
4327static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_on_v(void)
4328{
4329 return 0x00000001U;
4330}
4331static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_on_f(void)
4332{
4333 return 0x1U;
4334}
4335static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_off_v(void)
4336{
4337 return 0x00000000U;
4338}
4339static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_debugger_mode_off_f(void)
4340{
4341 return 0x0U;
4342}
4343static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_stop_trigger_m(void)
4344{
4345 return 0x1U << 31U;
4346}
4347static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_stop_trigger_enable_f(void)
4348{
4349 return 0x80000000U;
4350}
4351static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_stop_trigger_disable_f(void)
4352{
4353 return 0x0U;
4354}
4355static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_single_step_mode_m(void)
4356{
4357 return 0x1U << 3U;
4358}
4359static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_single_step_mode_enable_f(void)
4360{
4361 return 0x8U;
4362}
4363static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_single_step_mode_disable_f(void)
4364{
4365 return 0x0U;
4366}
4367static inline u32 gr_gpc0_tpc0_sm0_dbgr_control0_run_trigger_task_f(void)
4368{
4369 return 0x40000000U;
4370}
4371static inline u32 gr_gpc0_tpc0_sm0_warp_valid_mask_0_r(void)
4372{
4373 return 0x00504708U;
4374}
4375static inline u32 gr_gpc0_tpc0_sm0_warp_valid_mask_1_r(void)
4376{
4377 return 0x0050470cU;
4378}
4379static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_pause_mask_0_r(void)
4380{
4381 return 0x00504710U;
4382}
4383static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_pause_mask_1_r(void)
4384{
4385 return 0x00504714U;
4386}
4387static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_trap_mask_0_r(void)
4388{
4389 return 0x00504718U;
4390}
4391static inline u32 gr_gpc0_tpc0_sm0_dbgr_bpt_trap_mask_1_r(void)
4392{
4393 return 0x0050471cU;
4394}
4395static inline u32 gr_gpcs_tpcs_sms_dbgr_bpt_pause_mask_0_r(void)
4396{
4397 return 0x00419e90U;
4398}
4399static inline u32 gr_gpcs_tpcs_sms_dbgr_bpt_pause_mask_1_r(void)
4400{
4401 return 0x00419e94U;
4402}
4403static inline u32 gr_gpcs_tpcs_sms_dbgr_status0_r(void)
4404{
4405 return 0x00419e80U;
4406}
4407static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_r(void)
4408{
4409 return 0x00504700U;
4410}
4411static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_sm_in_trap_mode_v(u32 r)
4412{
4413 return (r >> 0U) & 0x1U;
4414}
4415static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_locked_down_v(u32 r)
4416{
4417 return (r >> 4U) & 0x1U;
4418}
4419static inline u32 gr_gpc0_tpc0_sm0_dbgr_status0_locked_down_true_v(void)
4420{
4421 return 0x00000001U;
4422}
4423static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_r(void)
4424{
4425 return 0x00504730U;
4426}
4427static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_v(u32 r)
4428{
4429 return (r >> 0U) & 0xffffU;
4430}
4431static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_none_v(void)
4432{
4433 return 0x00000000U;
4434}
4435static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_none_f(void)
4436{
4437 return 0x0U;
4438}
4439static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_stack_error_f(void)
4440{
4441 return 0x1U;
4442}
4443static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_api_stack_error_f(void)
4444{
4445 return 0x2U;
4446}
4447static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_pc_wrap_f(void)
4448{
4449 return 0x4U;
4450}
4451static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_misaligned_pc_f(void)
4452{
4453 return 0x5U;
4454}
4455static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_pc_overflow_f(void)
4456{
4457 return 0x6U;
4458}
4459static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_misaligned_reg_f(void)
4460{
4461 return 0x8U;
4462}
4463static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_illegal_instr_encoding_f(void)
4464{
4465 return 0x9U;
4466}
4467static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_illegal_instr_param_f(void)
4468{
4469 return 0xbU;
4470}
4471static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_oor_reg_f(void)
4472{
4473 return 0xdU;
4474}
4475static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_oor_addr_f(void)
4476{
4477 return 0xeU;
4478}
4479static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_misaligned_addr_f(void)
4480{
4481 return 0xfU;
4482}
4483static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_invalid_addr_space_f(void)
4484{
4485 return 0x10U;
4486}
4487static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_invalid_const_addr_ldc_f(void)
4488{
4489 return 0x12U;
4490}
4491static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_stack_overflow_f(void)
4492{
4493 return 0x16U;
4494}
4495static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_mmu_fault_f(void)
4496{
4497 return 0x17U;
4498}
4499static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_tex_format_f(void)
4500{
4501 return 0x18U;
4502}
4503static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_tex_layout_f(void)
4504{
4505 return 0x19U;
4506}
4507static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_error_mmu_nack_f(void)
4508{
4509 return 0x20U;
4510}
4511static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_wrap_id_m(void)
4512{
4513 return 0xffU << 16U;
4514}
4515static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_addr_error_type_m(void)
4516{
4517 return 0xfU << 24U;
4518}
4519static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_addr_error_type_none_f(void)
4520{
4521 return 0x0U;
4522}
4523static inline u32 gr_gpc0_tpc0_sm_tpc_esr_sm_sel_r(void)
4524{
4525 return 0x0050460cU;
4526}
4527static inline u32 gr_gpc0_tpc0_sm_tpc_esr_sm_sel_sm0_error_v(u32 r)
4528{
4529 return (r >> 0U) & 0x1U;
4530}
4531static inline u32 gr_gpc0_tpc0_sm_tpc_esr_sm_sel_sm1_error_v(u32 r)
4532{
4533 return (r >> 1U) & 0x1U;
4534}
4535static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_pc_r(void)
4536{
4537 return 0x00504738U;
4538}
4539static inline u32 gr_gpc0_tpc0_sm0_hww_warp_esr_pc_hi_r(void)
4540{
4541 return 0x0050473cU;
4542}
4543static inline u32 gr_gpc0_tpc0_sm_halfctl_ctrl_r(void)
4544{
4545 return 0x005043a0U;
4546}
4547static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_r(void)
4548{
4549 return 0x00419ba0U;
4550}
4551static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_m(void)
4552{
4553 return 0x1U << 4U;
4554}
4555static inline u32 gr_gpcs_tpcs_sm_halfctl_ctrl_sctl_read_quad_ctl_f(u32 v)
4556{
4557 return (v & 0x1U) << 4U;
4558}
4559static inline u32 gr_gpc0_tpc0_sm_debug_sfe_control_r(void)
4560{
4561 return 0x005043b0U;
4562}
4563static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_r(void)
4564{
4565 return 0x00419bb0U;
4566}
4567static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_m(void)
4568{
4569 return 0x1U << 0U;
4570}
4571static inline u32 gr_gpcs_tpcs_sm_debug_sfe_control_read_half_ctl_f(u32 v)
4572{
4573 return (v & 0x1U) << 0U;
4574}
4575static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_r(void)
4576{
4577 return 0x0041be08U;
4578}
4579static inline u32 gr_gpcs_tpcs_pes_vsc_vpc_fast_mode_switch_true_f(void)
4580{
4581 return 0x4U;
4582}
4583static inline u32 gr_ppcs_wwdx_map_gpc_map_r(u32 i)
4584{
4585 return 0x0041bf00U + i*4U;
4586}
4587static inline u32 gr_ppcs_wwdx_map_table_cfg_r(void)
4588{
4589 return 0x0041bfd0U;
4590}
4591static inline u32 gr_ppcs_wwdx_map_table_cfg_row_offset_f(u32 v)
4592{
4593 return (v & 0xffU) << 0U;
4594}
4595static inline u32 gr_ppcs_wwdx_map_table_cfg_num_entries_f(u32 v)
4596{
4597 return (v & 0xffU) << 8U;
4598}
4599static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_num_entries_f(u32 v)
4600{
4601 return (v & 0x1fU) << 16U;
4602}
4603static inline u32 gr_ppcs_wwdx_map_table_cfg_normalized_shift_value_f(u32 v)
4604{
4605 return (v & 0x7U) << 21U;
4606}
4607static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_r(void)
4608{
4609 return 0x0041bfd4U;
4610}
4611static inline u32 gr_gpcs_ppcs_wwdx_sm_num_rcp_conservative_f(u32 v)
4612{
4613 return (v & 0xffffffU) << 0U;
4614}
4615static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_r(u32 i)
4616{
4617 return 0x0041bfb0U + i*4U;
4618}
4619static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff__size_1_v(void)
4620{
4621 return 0x00000005U;
4622}
4623static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_0_mod_value_f(u32 v)
4624{
4625 return (v & 0xffU) << 0U;
4626}
4627static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_1_mod_value_f(u32 v)
4628{
4629 return (v & 0xffU) << 8U;
4630}
4631static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_2_mod_value_f(u32 v)
4632{
4633 return (v & 0xffU) << 16U;
4634}
4635static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_3_mod_value_f(u32 v)
4636{
4637 return (v & 0xffU) << 24U;
4638}
4639static inline u32 gr_bes_zrop_settings_r(void)
4640{
4641 return 0x00408850U;
4642}
4643static inline u32 gr_bes_zrop_settings_num_active_ltcs_f(u32 v)
4644{
4645 return (v & 0xfU) << 0U;
4646}
4647static inline u32 gr_be0_crop_debug3_r(void)
4648{
4649 return 0x00410108U;
4650}
4651static inline u32 gr_bes_crop_debug3_r(void)
4652{
4653 return 0x00408908U;
4654}
4655static inline u32 gr_bes_crop_debug3_comp_vdc_4to2_disable_m(void)
4656{
4657 return 0x1U << 31U;
4658}
4659static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_m(void)
4660{
4661 return 0x1U << 1U;
4662}
4663static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_disabled_f(void)
4664{
4665 return 0x0U;
4666}
4667static inline u32 gr_bes_crop_debug3_blendopt_read_suppress_enabled_f(void)
4668{
4669 return 0x2U;
4670}
4671static inline u32 gr_bes_crop_debug3_blendopt_fill_override_m(void)
4672{
4673 return 0x1U << 2U;
4674}
4675static inline u32 gr_bes_crop_debug3_blendopt_fill_override_disabled_f(void)
4676{
4677 return 0x0U;
4678}
4679static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
4680{
4681 return 0x4U;
4682}
4683static inline u32 gr_bes_crop_debug4_r(void)
4684{
4685 return 0x0040894cU;
4686}
4687static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
4688{
4689 return 0x1U << 18U;
4690}
4691static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
4692{
4693 return 0x0U;
4694}
4695static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
4696{
4697 return 0x40000U;
4698}
4699static inline u32 gr_bes_crop_settings_r(void)
4700{
4701 return 0x00408958U;
4702}
4703static inline u32 gr_bes_crop_settings_num_active_ltcs_f(u32 v)
4704{
4705 return (v & 0xfU) << 0U;
4706}
4707static inline u32 gr_zcull_bytes_per_aliquot_per_gpu_v(void)
4708{
4709 return 0x00000020U;
4710}
4711static inline u32 gr_zcull_save_restore_header_bytes_per_gpc_v(void)
4712{
4713 return 0x00000020U;
4714}
4715static inline u32 gr_zcull_save_restore_subregion_header_bytes_per_gpc_v(void)
4716{
4717 return 0x000000c0U;
4718}
4719static inline u32 gr_zcull_subregion_qty_v(void)
4720{
4721 return 0x00000010U;
4722}
4723static inline u32 gr_gpcs_tpcs_tex_in_dbg_r(void)
4724{
4725 return 0x00419a00U;
4726}
4727static inline u32 gr_gpcs_tpcs_tex_in_dbg_tsl1_rvch_invalidate_f(u32 v)
4728{
4729 return (v & 0x1U) << 19U;
4730}
4731static inline u32 gr_gpcs_tpcs_tex_in_dbg_tsl1_rvch_invalidate_m(void)
4732{
4733 return 0x1U << 19U;
4734}
4735static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_r(void)
4736{
4737 return 0x00419bf0U;
4738}
4739static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_ld_f(u32 v)
4740{
4741 return (v & 0x1U) << 5U;
4742}
4743static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_ld_m(void)
4744{
4745 return 0x1U << 5U;
4746}
4747static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_st_f(u32 v)
4748{
4749 return (v & 0x1U) << 10U;
4750}
4751static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_cache_surface_st_m(void)
4752{
4753 return 0x1U << 10U;
4754}
4755static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_m(void)
4756{
4757 return 0x1U << 28U;
4758}
4759static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_disable_f(void)
4760{
4761 return 0x0U;
4762}
4763static inline u32 gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_enable_f(void)
4764{
4765 return 0x10000000U;
4766}
4767static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control_sel0_r(void)
4768{
4769 return 0x00584200U;
4770}
4771static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control_sel1_r(void)
4772{
4773 return 0x00584204U;
4774}
4775static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control0_r(void)
4776{
4777 return 0x00584208U;
4778}
4779static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control1_r(void)
4780{
4781 return 0x00584210U;
4782}
4783static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control2_r(void)
4784{
4785 return 0x00584214U;
4786}
4787static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control3_r(void)
4788{
4789 return 0x00584218U;
4790}
4791static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control4_r(void)
4792{
4793 return 0x0058421cU;
4794}
4795static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter_control5_r(void)
4796{
4797 return 0x0058420cU;
4798}
4799static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter0_control_r(void)
4800{
4801 return 0x00584220U;
4802}
4803static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter1_control_r(void)
4804{
4805 return 0x00584224U;
4806}
4807static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter2_control_r(void)
4808{
4809 return 0x00584228U;
4810}
4811static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter3_control_r(void)
4812{
4813 return 0x0058422cU;
4814}
4815static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter4_control_r(void)
4816{
4817 return 0x00584230U;
4818}
4819static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter5_control_r(void)
4820{
4821 return 0x00584234U;
4822}
4823static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter6_control_r(void)
4824{
4825 return 0x00584238U;
4826}
4827static inline u32 gr_egpc0_etpc0_sm_dsm_perf_counter7_control_r(void)
4828{
4829 return 0x0058423cU;
4830}
4831static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter_status_s0_r(void)
4832{
4833 return 0x00584600U;
4834}
4835static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter_status_s1_r(void)
4836{
4837 return 0x00584604U;
4838}
4839static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter0_s0_r(void)
4840{
4841 return 0x00584624U;
4842}
4843static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter1_s0_r(void)
4844{
4845 return 0x00584628U;
4846}
4847static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter2_s0_r(void)
4848{
4849 return 0x0058462cU;
4850}
4851static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter3_s0_r(void)
4852{
4853 return 0x00584630U;
4854}
4855static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter0_s1_r(void)
4856{
4857 return 0x00584634U;
4858}
4859static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter1_s1_r(void)
4860{
4861 return 0x00584638U;
4862}
4863static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter2_s1_r(void)
4864{
4865 return 0x0058463cU;
4866}
4867static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter3_s1_r(void)
4868{
4869 return 0x00584640U;
4870}
4871static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter0_s2_r(void)
4872{
4873 return 0x00584644U;
4874}
4875static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter1_s2_r(void)
4876{
4877 return 0x00584648U;
4878}
4879static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter2_s2_r(void)
4880{
4881 return 0x0058464cU;
4882}
4883static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter3_s2_r(void)
4884{
4885 return 0x00584650U;
4886}
4887static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter0_s3_r(void)
4888{
4889 return 0x00584654U;
4890}
4891static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter1_s3_r(void)
4892{
4893 return 0x00584658U;
4894}
4895static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter2_s3_r(void)
4896{
4897 return 0x0058465cU;
4898}
4899static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter3_s3_r(void)
4900{
4901 return 0x00584660U;
4902}
4903static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter4_r(void)
4904{
4905 return 0x00584614U;
4906}
4907static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter5_r(void)
4908{
4909 return 0x00584618U;
4910}
4911static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter6_r(void)
4912{
4913 return 0x0058461cU;
4914}
4915static inline u32 gr_egpc0_etpc0_sm0_dsm_perf_counter7_r(void)
4916{
4917 return 0x00584620U;
4918}
4919static inline u32 gr_fe_pwr_mode_r(void)
4920{
4921 return 0x00404170U;
4922}
4923static inline u32 gr_fe_pwr_mode_mode_auto_f(void)
4924{
4925 return 0x0U;
4926}
4927static inline u32 gr_fe_pwr_mode_mode_force_on_f(void)
4928{
4929 return 0x2U;
4930}
4931static inline u32 gr_fe_pwr_mode_req_v(u32 r)
4932{
4933 return (r >> 4U) & 0x1U;
4934}
4935static inline u32 gr_fe_pwr_mode_req_send_f(void)
4936{
4937 return 0x10U;
4938}
4939static inline u32 gr_fe_pwr_mode_req_done_v(void)
4940{
4941 return 0x00000000U;
4942}
4943static inline u32 gr_gpcs_pri_mmu_ctrl_r(void)
4944{
4945 return 0x00418880U;
4946}
4947static inline u32 gr_gpcs_pri_mmu_ctrl_vm_pg_size_m(void)
4948{
4949 return 0x1U << 0U;
4950}
4951static inline u32 gr_gpcs_pri_mmu_ctrl_use_pdb_big_page_size_m(void)
4952{
4953 return 0x1U << 11U;
4954}
4955static inline u32 gr_gpcs_pri_mmu_ctrl_vol_fault_m(void)
4956{
4957 return 0x1U << 1U;
4958}
4959static inline u32 gr_gpcs_pri_mmu_ctrl_comp_fault_m(void)
4960{
4961 return 0x1U << 2U;
4962}
4963static inline u32 gr_gpcs_pri_mmu_ctrl_miss_gran_m(void)
4964{
4965 return 0x3U << 3U;
4966}
4967static inline u32 gr_gpcs_pri_mmu_ctrl_cache_mode_m(void)
4968{
4969 return 0x3U << 5U;
4970}
4971static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_aperture_m(void)
4972{
4973 return 0x3U << 28U;
4974}
4975static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_vol_m(void)
4976{
4977 return 0x1U << 30U;
4978}
4979static inline u32 gr_gpcs_pri_mmu_ctrl_mmu_disable_m(void)
4980{
4981 return 0x1U << 31U;
4982}
4983static inline u32 gr_gpcs_pri_mmu_ctrl_atomic_capability_mode_m(void)
4984{
4985 return 0x3U << 24U;
4986}
4987static inline u32 gr_gpcs_pri_mmu_ctrl_atomic_capability_sys_ncoh_mode_m(void)
4988{
4989 return 0x1U << 27U;
4990}
4991static inline u32 gr_gpcs_pri_mmu_pm_unit_mask_r(void)
4992{
4993 return 0x00418890U;
4994}
4995static inline u32 gr_gpcs_pri_mmu_pm_req_mask_r(void)
4996{
4997 return 0x00418894U;
4998}
4999static inline u32 gr_gpcs_pri_mmu_debug_ctrl_r(void)
5000{
5001 return 0x004188b0U;
5002}
5003static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_v(u32 r)
5004{
5005 return (r >> 16U) & 0x1U;
5006}
5007static inline u32 gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(void)
5008{
5009 return 0x00000001U;
5010}
5011static inline u32 gr_gpcs_pri_mmu_debug_wr_r(void)
5012{
5013 return 0x004188b4U;
5014}
5015static inline u32 gr_gpcs_pri_mmu_debug_rd_r(void)
5016{
5017 return 0x004188b8U;
5018}
5019static inline u32 gr_gpcs_mmu_num_active_ltcs_r(void)
5020{
5021 return 0x004188acU;
5022}
5023static inline u32 gr_gpcs_tpcs_sms_dbgr_control0_r(void)
5024{
5025 return 0x00419e84U;
5026}
5027static inline u32 gr_fe_gfxp_wfi_timeout_r(void)
5028{
5029 return 0x004041c0U;
5030}
5031static inline u32 gr_fe_gfxp_wfi_timeout_count_f(u32 v)
5032{
5033 return (v & 0xffffffffU) << 0U;
5034}
5035static inline u32 gr_fe_gfxp_wfi_timeout_count_disabled_f(void)
5036{
5037 return 0x0U;
5038}
5039static inline u32 gr_fe_gfxp_wfi_timeout_count_init_f(void)
5040{
5041 return 0x800U;
5042}
5043static inline u32 gr_gpcs_tpcs_sm_texio_control_r(void)
5044{
5045 return 0x00419bd8U;
5046}
5047static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_f(u32 v)
5048{
5049 return (v & 0x7U) << 8U;
5050}
5051static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_m(void)
5052{
5053 return 0x7U << 8U;
5054}
5055static inline u32 gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_arm_63_48_match_f(void)
5056{
5057 return 0x100U;
5058}
5059static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_r(void)
5060{
5061 return 0x00419ba4U;
5062}
5063static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_m(void)
5064{
5065 return 0x3U << 11U;
5066}
5067static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_disable_f(void)
5068{
5069 return 0x1000U;
5070}
5071static inline u32 gr_gpcs_tc_debug0_r(void)
5072{
5073 return 0x00418708U;
5074}
5075static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_f(u32 v)
5076{
5077 return (v & 0x1ffU) << 0U;
5078}
5079static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_m(void)
5080{
5081 return 0x1ffU << 0U;
5082}
5083static inline u32 gr_gpc0_mmu_gpcmmu_global_esr_r(void)
5084{
5085 return 0x00500324U;
5086}
5087static inline u32 gr_gpc0_mmu_gpcmmu_global_esr_ecc_corrected_f(u32 v)
5088{
5089 return (v & 0x1U) << 0U;
5090}
5091static inline u32 gr_gpc0_mmu_gpcmmu_global_esr_ecc_corrected_m(void)
5092{
5093 return 0x1U << 0U;
5094}
5095static inline u32 gr_gpc0_mmu_gpcmmu_global_esr_ecc_uncorrected_f(u32 v)
5096{
5097 return (v & 0x1U) << 1U;
5098}
5099static inline u32 gr_gpc0_mmu_gpcmmu_global_esr_ecc_uncorrected_m(void)
5100{
5101 return 0x1U << 1U;
5102}
5103static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_r(void)
5104{
5105 return 0x00500314U;
5106}
5107static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_sa_data_f(u32 v)
5108{
5109 return (v & 0x1U) << 0U;
5110}
5111static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_sa_data_m(void)
5112{
5113 return 0x1U << 0U;
5114}
5115static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_fa_data_f(u32 v)
5116{
5117 return (v & 0x1U) << 2U;
5118}
5119static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_fa_data_m(void)
5120{
5121 return 0x1U << 2U;
5122}
5123static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_l1tlb_sa_data_f(u32 v)
5124{
5125 return (v & 0x1U) << 1U;
5126}
5127static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_l1tlb_sa_data_m(void)
5128{
5129 return 0x1U << 1U;
5130}
5131static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_l1tlb_fa_data_f(u32 v)
5132{
5133 return (v & 0x1U) << 3U;
5134}
5135static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_l1tlb_fa_data_m(void)
5136{
5137 return 0x1U << 3U;
5138}
5139static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_total_counter_overflow_f(u32 v)
5140{
5141 return (v & 0x1U) << 18U;
5142}
5143static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_total_counter_overflow_m(void)
5144{
5145 return 0x1U << 18U;
5146}
5147static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_total_counter_overflow_f(u32 v)
5148{
5149 return (v & 0x1U) << 16U;
5150}
5151static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_total_counter_overflow_m(void)
5152{
5153 return 0x1U << 16U;
5154}
5155static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_unique_counter_overflow_f(u32 v)
5156{
5157 return (v & 0x1U) << 19U;
5158}
5159static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_uncorrected_err_unique_counter_overflow_m(void)
5160{
5161 return 0x1U << 19U;
5162}
5163static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_unique_counter_overflow_f(u32 v)
5164{
5165 return (v & 0x1U) << 17U;
5166}
5167static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_unique_counter_overflow_m(void)
5168{
5169 return 0x1U << 17U;
5170}
5171static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_reset_f(u32 v)
5172{
5173 return (v & 0x1U) << 30U;
5174}
5175static inline u32 gr_gpc0_mmu_l1tlb_ecc_status_reset_task_f(void)
5176{
5177 return 0x40000000U;
5178}
5179static inline u32 gr_gpc0_mmu_l1tlb_ecc_address_r(void)
5180{
5181 return 0x00500320U;
5182}
5183static inline u32 gr_gpc0_mmu_l1tlb_ecc_address_index_f(u32 v)
5184{
5185 return (v & 0xffffffffU) << 0U;
5186}
5187static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_r(void)
5188{
5189 return 0x00500318U;
5190}
5191static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_total_s(void)
5192{
5193 return 16U;
5194}
5195static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_total_f(u32 v)
5196{
5197 return (v & 0xffffU) << 0U;
5198}
5199static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_total_m(void)
5200{
5201 return 0xffffU << 0U;
5202}
5203static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_total_v(u32 r)
5204{
5205 return (r >> 0U) & 0xffffU;
5206}
5207static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_unique_total_s(void)
5208{
5209 return 16U;
5210}
5211static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_unique_total_f(u32 v)
5212{
5213 return (v & 0xffffU) << 16U;
5214}
5215static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_unique_total_m(void)
5216{
5217 return 0xffffU << 16U;
5218}
5219static inline u32 gr_gpc0_mmu_l1tlb_ecc_corrected_err_count_unique_total_v(u32 r)
5220{
5221 return (r >> 16U) & 0xffffU;
5222}
5223static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_r(void)
5224{
5225 return 0x0050031cU;
5226}
5227static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_total_s(void)
5228{
5229 return 16U;
5230}
5231static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_total_f(u32 v)
5232{
5233 return (v & 0xffffU) << 0U;
5234}
5235static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_total_m(void)
5236{
5237 return 0xffffU << 0U;
5238}
5239static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_total_v(u32 r)
5240{
5241 return (r >> 0U) & 0xffffU;
5242}
5243static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_unique_total_s(void)
5244{
5245 return 16U;
5246}
5247static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_unique_total_f(u32 v)
5248{
5249 return (v & 0xffffU) << 16U;
5250}
5251static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_unique_total_m(void)
5252{
5253 return 0xffffU << 16U;
5254}
5255static inline u32 gr_gpc0_mmu_l1tlb_ecc_uncorrected_err_count_unique_total_v(u32 r)
5256{
5257 return (r >> 16U) & 0xffffU;
5258}
5259static inline u32 gr_gpc0_gpccs_hww_esr_r(void)
5260{
5261 return 0x00502c98U;
5262}
5263static inline u32 gr_gpc0_gpccs_hww_esr_ecc_corrected_f(u32 v)
5264{
5265 return (v & 0x1U) << 0U;
5266}
5267static inline u32 gr_gpc0_gpccs_hww_esr_ecc_corrected_m(void)
5268{
5269 return 0x1U << 0U;
5270}
5271static inline u32 gr_gpc0_gpccs_hww_esr_ecc_corrected_pending_f(void)
5272{
5273 return 0x1U;
5274}
5275static inline u32 gr_gpc0_gpccs_hww_esr_ecc_uncorrected_f(u32 v)
5276{
5277 return (v & 0x1U) << 1U;
5278}
5279static inline u32 gr_gpc0_gpccs_hww_esr_ecc_uncorrected_m(void)
5280{
5281 return 0x1U << 1U;
5282}
5283static inline u32 gr_gpc0_gpccs_hww_esr_ecc_uncorrected_pending_f(void)
5284{
5285 return 0x2U;
5286}
5287static inline u32 gr_gpc0_gpccs_falcon_ecc_status_r(void)
5288{
5289 return 0x00502678U;
5290}
5291static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_imem_f(u32 v)
5292{
5293 return (v & 0x1U) << 0U;
5294}
5295static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_imem_m(void)
5296{
5297 return 0x1U << 0U;
5298}
5299static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_imem_pending_f(void)
5300{
5301 return 0x1U;
5302}
5303static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_dmem_f(u32 v)
5304{
5305 return (v & 0x1U) << 1U;
5306}
5307static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_dmem_m(void)
5308{
5309 return 0x1U << 1U;
5310}
5311static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_dmem_pending_f(void)
5312{
5313 return 0x2U;
5314}
5315static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_imem_f(u32 v)
5316{
5317 return (v & 0x1U) << 4U;
5318}
5319static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_imem_m(void)
5320{
5321 return 0x1U << 4U;
5322}
5323static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_imem_pending_f(void)
5324{
5325 return 0x10U;
5326}
5327static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_dmem_f(u32 v)
5328{
5329 return (v & 0x1U) << 5U;
5330}
5331static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_dmem_m(void)
5332{
5333 return 0x1U << 5U;
5334}
5335static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_dmem_pending_f(void)
5336{
5337 return 0x20U;
5338}
5339static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_total_counter_overflow_f(u32 v)
5340{
5341 return (v & 0x1U) << 10U;
5342}
5343static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_total_counter_overflow_m(void)
5344{
5345 return 0x1U << 10U;
5346}
5347static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_total_counter_overflow_pending_f(void)
5348{
5349 return 0x400U;
5350}
5351static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_total_counter_overflow_f(u32 v)
5352{
5353 return (v & 0x1U) << 8U;
5354}
5355static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_total_counter_overflow_m(void)
5356{
5357 return 0x1U << 8U;
5358}
5359static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_total_counter_overflow_pending_f(void)
5360{
5361 return 0x100U;
5362}
5363static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_unique_counter_overflow_f(u32 v)
5364{
5365 return (v & 0x1U) << 11U;
5366}
5367static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_unique_counter_overflow_m(void)
5368{
5369 return 0x1U << 11U;
5370}
5371static inline u32 gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_unique_counter_overflow_pending_f(void)
5372{
5373 return 0x800U;
5374}
5375static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_unique_counter_overflow_f(u32 v)
5376{
5377 return (v & 0x1U) << 9U;
5378}
5379static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_unique_counter_overflow_m(void)
5380{
5381 return 0x1U << 9U;
5382}
5383static inline u32 gr_gpc0_gpccs_falcon_ecc_status_corrected_err_unique_counter_overflow_pending_f(void)
5384{
5385 return 0x200U;
5386}
5387static inline u32 gr_gpc0_gpccs_falcon_ecc_status_reset_f(u32 v)
5388{
5389 return (v & 0x1U) << 31U;
5390}
5391static inline u32 gr_gpc0_gpccs_falcon_ecc_status_reset_task_f(void)
5392{
5393 return 0x80000000U;
5394}
5395static inline u32 gr_gpc0_gpccs_falcon_ecc_address_r(void)
5396{
5397 return 0x00502684U;
5398}
5399static inline u32 gr_gpc0_gpccs_falcon_ecc_address_index_f(u32 v)
5400{
5401 return (v & 0x7fffffU) << 0U;
5402}
5403static inline u32 gr_gpc0_gpccs_falcon_ecc_address_row_address_s(void)
5404{
5405 return 20U;
5406}
5407static inline u32 gr_gpc0_gpccs_falcon_ecc_address_row_address_f(u32 v)
5408{
5409 return (v & 0xfffffU) << 0U;
5410}
5411static inline u32 gr_gpc0_gpccs_falcon_ecc_address_row_address_m(void)
5412{
5413 return 0xfffffU << 0U;
5414}
5415static inline u32 gr_gpc0_gpccs_falcon_ecc_address_row_address_v(u32 r)
5416{
5417 return (r >> 0U) & 0xfffffU;
5418}
5419static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_r(void)
5420{
5421 return 0x0050267cU;
5422}
5423static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_total_s(void)
5424{
5425 return 16U;
5426}
5427static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_total_f(u32 v)
5428{
5429 return (v & 0xffffU) << 0U;
5430}
5431static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_total_m(void)
5432{
5433 return 0xffffU << 0U;
5434}
5435static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_total_v(u32 r)
5436{
5437 return (r >> 0U) & 0xffffU;
5438}
5439static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_unique_total_s(void)
5440{
5441 return 16U;
5442}
5443static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_unique_total_f(u32 v)
5444{
5445 return (v & 0xffffU) << 16U;
5446}
5447static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_unique_total_m(void)
5448{
5449 return 0xffffU << 16U;
5450}
5451static inline u32 gr_gpc0_gpccs_falcon_ecc_corrected_err_count_unique_total_v(u32 r)
5452{
5453 return (r >> 16U) & 0xffffU;
5454}
5455static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_r(void)
5456{
5457 return 0x00502680U;
5458}
5459static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_total_f(u32 v)
5460{
5461 return (v & 0xffffU) << 0U;
5462}
5463static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_total_m(void)
5464{
5465 return 0xffffU << 0U;
5466}
5467static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_total_v(u32 r)
5468{
5469 return (r >> 0U) & 0xffffU;
5470}
5471static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_unique_total_s(void)
5472{
5473 return 16U;
5474}
5475static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_unique_total_f(u32 v)
5476{
5477 return (v & 0xffffU) << 16U;
5478}
5479static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_unique_total_m(void)
5480{
5481 return 0xffffU << 16U;
5482}
5483static inline u32 gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_unique_total_v(u32 r)
5484{
5485 return (r >> 16U) & 0xffffU;
5486}
5487static inline u32 gr_fecs_falcon_ecc_status_r(void)
5488{
5489 return 0x00409678U;
5490}
5491static inline u32 gr_fecs_falcon_ecc_status_corrected_err_imem_f(u32 v)
5492{
5493 return (v & 0x1U) << 0U;
5494}
5495static inline u32 gr_fecs_falcon_ecc_status_corrected_err_imem_m(void)
5496{
5497 return 0x1U << 0U;
5498}
5499static inline u32 gr_fecs_falcon_ecc_status_corrected_err_imem_pending_f(void)
5500{
5501 return 0x1U;
5502}
5503static inline u32 gr_fecs_falcon_ecc_status_corrected_err_dmem_f(u32 v)
5504{
5505 return (v & 0x1U) << 1U;
5506}
5507static inline u32 gr_fecs_falcon_ecc_status_corrected_err_dmem_m(void)
5508{
5509 return 0x1U << 1U;
5510}
5511static inline u32 gr_fecs_falcon_ecc_status_corrected_err_dmem_pending_f(void)
5512{
5513 return 0x2U;
5514}
5515static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_imem_f(u32 v)
5516{
5517 return (v & 0x1U) << 4U;
5518}
5519static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_imem_m(void)
5520{
5521 return 0x1U << 4U;
5522}
5523static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_imem_pending_f(void)
5524{
5525 return 0x10U;
5526}
5527static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_dmem_f(u32 v)
5528{
5529 return (v & 0x1U) << 5U;
5530}
5531static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_dmem_m(void)
5532{
5533 return 0x1U << 5U;
5534}
5535static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_dmem_pending_f(void)
5536{
5537 return 0x20U;
5538}
5539static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_total_counter_overflow_f(u32 v)
5540{
5541 return (v & 0x1U) << 10U;
5542}
5543static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_total_counter_overflow_m(void)
5544{
5545 return 0x1U << 10U;
5546}
5547static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_total_counter_overflow_pending_f(void)
5548{
5549 return 0x400U;
5550}
5551static inline u32 gr_fecs_falcon_ecc_status_corrected_err_total_counter_overflow_f(u32 v)
5552{
5553 return (v & 0x1U) << 8U;
5554}
5555static inline u32 gr_fecs_falcon_ecc_status_corrected_err_total_counter_overflow_m(void)
5556{
5557 return 0x1U << 8U;
5558}
5559static inline u32 gr_fecs_falcon_ecc_status_corrected_err_total_counter_overflow_pending_f(void)
5560{
5561 return 0x100U;
5562}
5563static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_unique_counter_overflow_f(u32 v)
5564{
5565 return (v & 0x1U) << 11U;
5566}
5567static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_unique_counter_overflow_m(void)
5568{
5569 return 0x1U << 11U;
5570}
5571static inline u32 gr_fecs_falcon_ecc_status_uncorrected_err_unique_counter_overflow_pending_f(void)
5572{
5573 return 0x800U;
5574}
5575static inline u32 gr_fecs_falcon_ecc_status_corrected_err_unique_counter_overflow_f(u32 v)
5576{
5577 return (v & 0x1U) << 9U;
5578}
5579static inline u32 gr_fecs_falcon_ecc_status_corrected_err_unique_counter_overflow_m(void)
5580{
5581 return 0x1U << 9U;
5582}
5583static inline u32 gr_fecs_falcon_ecc_status_corrected_err_unique_counter_overflow_pending_f(void)
5584{
5585 return 0x200U;
5586}
5587static inline u32 gr_fecs_falcon_ecc_status_reset_f(u32 v)
5588{
5589 return (v & 0x1U) << 31U;
5590}
5591static inline u32 gr_fecs_falcon_ecc_status_reset_task_f(void)
5592{
5593 return 0x80000000U;
5594}
5595static inline u32 gr_fecs_falcon_ecc_address_r(void)
5596{
5597 return 0x00409684U;
5598}
5599static inline u32 gr_fecs_falcon_ecc_address_index_f(u32 v)
5600{
5601 return (v & 0x7fffffU) << 0U;
5602}
5603static inline u32 gr_fecs_falcon_ecc_address_row_address_s(void)
5604{
5605 return 20U;
5606}
5607static inline u32 gr_fecs_falcon_ecc_address_row_address_f(u32 v)
5608{
5609 return (v & 0xfffffU) << 0U;
5610}
5611static inline u32 gr_fecs_falcon_ecc_address_row_address_m(void)
5612{
5613 return 0xfffffU << 0U;
5614}
5615static inline u32 gr_fecs_falcon_ecc_address_row_address_v(u32 r)
5616{
5617 return (r >> 0U) & 0xfffffU;
5618}
5619static inline u32 gr_fecs_falcon_ecc_corrected_err_count_r(void)
5620{
5621 return 0x0040967cU;
5622}
5623static inline u32 gr_fecs_falcon_ecc_corrected_err_count_total_s(void)
5624{
5625 return 16U;
5626}
5627static inline u32 gr_fecs_falcon_ecc_corrected_err_count_total_f(u32 v)
5628{
5629 return (v & 0xffffU) << 0U;
5630}
5631static inline u32 gr_fecs_falcon_ecc_corrected_err_count_total_m(void)
5632{
5633 return 0xffffU << 0U;
5634}
5635static inline u32 gr_fecs_falcon_ecc_corrected_err_count_total_v(u32 r)
5636{
5637 return (r >> 0U) & 0xffffU;
5638}
5639static inline u32 gr_fecs_falcon_ecc_corrected_err_count_unique_total_s(void)
5640{
5641 return 16U;
5642}
5643static inline u32 gr_fecs_falcon_ecc_corrected_err_count_unique_total_f(u32 v)
5644{
5645 return (v & 0xffffU) << 16U;
5646}
5647static inline u32 gr_fecs_falcon_ecc_corrected_err_count_unique_total_m(void)
5648{
5649 return 0xffffU << 16U;
5650}
5651static inline u32 gr_fecs_falcon_ecc_corrected_err_count_unique_total_v(u32 r)
5652{
5653 return (r >> 16U) & 0xffffU;
5654}
5655static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_r(void)
5656{
5657 return 0x00409680U;
5658}
5659static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_total_f(u32 v)
5660{
5661 return (v & 0xffffU) << 0U;
5662}
5663static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_total_m(void)
5664{
5665 return 0xffffU << 0U;
5666}
5667static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_total_v(u32 r)
5668{
5669 return (r >> 0U) & 0xffffU;
5670}
5671static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_unique_total_s(void)
5672{
5673 return 16U;
5674}
5675static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_unique_total_f(u32 v)
5676{
5677 return (v & 0xffffU) << 16U;
5678}
5679static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_unique_total_m(void)
5680{
5681 return 0xffffU << 16U;
5682}
5683static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_unique_total_v(u32 r)
5684{
5685 return (r >> 16U) & 0xffffU;
5686}
5687static inline u32 gr_debug_2_r(void)
5688{
5689 return 0x00400088U;
5690}
5691static inline u32 gr_debug_2_gfxp_wfi_timeout_unit_m(void)
5692{
5693 return 0x1U << 27U;
5694}
5695static inline u32 gr_debug_2_gfxp_wfi_timeout_unit_usec_f(void)
5696{
5697 return 0x0U;
5698}
5699static inline u32 gr_debug_2_gfxp_wfi_timeout_unit_sysclk_f(void)
5700{
5701 return 0x8000000U;
5702}
5703#endif
diff --git a/include/nvgpu/hw/gv11b/hw_ltc_gv11b.h b/include/nvgpu/hw/gv11b/hw_ltc_gv11b.h
deleted file mode 100644
index 342f90d..0000000
--- a/include/nvgpu/hw/gv11b/hw_ltc_gv11b.h
+++ /dev/null
@@ -1,815 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ltc_gv11b_h_
57#define _hw_ltc_gv11b_h_
58
59static inline u32 ltc_pltcg_base_v(void)
60{
61 return 0x00140000U;
62}
63static inline u32 ltc_pltcg_extent_v(void)
64{
65 return 0x0017ffffU;
66}
67static inline u32 ltc_ltc0_ltss_v(void)
68{
69 return 0x00140200U;
70}
71static inline u32 ltc_ltc0_lts0_v(void)
72{
73 return 0x00140400U;
74}
75static inline u32 ltc_ltcs_ltss_v(void)
76{
77 return 0x0017e200U;
78}
79static inline u32 ltc_ltcs_lts0_cbc_ctrl1_r(void)
80{
81 return 0x0014046cU;
82}
83static inline u32 ltc_ltc0_lts0_dstg_cfg0_r(void)
84{
85 return 0x00140518U;
86}
87static inline u32 ltc_ltcs_ltss_dstg_cfg0_r(void)
88{
89 return 0x0017e318U;
90}
91static inline u32 ltc_ltcs_ltss_dstg_cfg0_vdc_4to2_disable_m(void)
92{
93 return 0x1U << 15U;
94}
95static inline u32 ltc_ltc0_lts0_tstg_cfg1_r(void)
96{
97 return 0x00140494U;
98}
99static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_ways_v(u32 r)
100{
101 return (r >> 0U) & 0xffffU;
102}
103static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_v(u32 r)
104{
105 return (r >> 16U) & 0x3U;
106}
107static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_all_v(void)
108{
109 return 0x00000000U;
110}
111static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_half_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v(void)
116{
117 return 0x00000002U;
118}
119static inline u32 ltc_ltcs_ltss_cbc_ctrl1_r(void)
120{
121 return 0x0017e26cU;
122}
123static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clean_active_f(void)
124{
125 return 0x1U;
126}
127static inline u32 ltc_ltcs_ltss_cbc_ctrl1_invalidate_active_f(void)
128{
129 return 0x2U;
130}
131static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_v(u32 r)
132{
133 return (r >> 2U) & 0x1U;
134}
135static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_v(void)
136{
137 return 0x00000001U;
138}
139static inline u32 ltc_ltcs_ltss_cbc_ctrl1_clear_active_f(void)
140{
141 return 0x4U;
142}
143static inline u32 ltc_ltc0_lts0_cbc_ctrl1_r(void)
144{
145 return 0x0014046cU;
146}
147static inline u32 ltc_ltcs_ltss_cbc_ctrl2_r(void)
148{
149 return 0x0017e270U;
150}
151static inline u32 ltc_ltcs_ltss_cbc_ctrl2_clear_lower_bound_f(u32 v)
152{
153 return (v & 0x3ffffU) << 0U;
154}
155static inline u32 ltc_ltcs_ltss_cbc_ctrl3_r(void)
156{
157 return 0x0017e274U;
158}
159static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_f(u32 v)
160{
161 return (v & 0x3ffffU) << 0U;
162}
163static inline u32 ltc_ltcs_ltss_cbc_ctrl3_clear_upper_bound_init_v(void)
164{
165 return 0x0003ffffU;
166}
167static inline u32 ltc_ltcs_ltss_cbc_base_r(void)
168{
169 return 0x0017e278U;
170}
171static inline u32 ltc_ltcs_ltss_cbc_base_alignment_shift_v(void)
172{
173 return 0x0000000bU;
174}
175static inline u32 ltc_ltcs_ltss_cbc_base_address_v(u32 r)
176{
177 return (r >> 0U) & 0x3ffffffU;
178}
179static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_r(void)
180{
181 return 0x0017e27cU;
182}
183static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs__v(u32 r)
184{
185 return (r >> 0U) & 0x1fU;
186}
187static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_nvlink_peer_through_l2_f(u32 v)
188{
189 return (v & 0x1U) << 24U;
190}
191static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_nvlink_peer_through_l2_v(u32 r)
192{
193 return (r >> 24U) & 0x1U;
194}
195static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_serialize_f(u32 v)
196{
197 return (v & 0x1U) << 25U;
198}
199static inline u32 ltc_ltcs_ltss_cbc_num_active_ltcs_serialize_v(u32 r)
200{
201 return (r >> 25U) & 0x1U;
202}
203static inline u32 ltc_ltcs_misc_ltc_num_active_ltcs_r(void)
204{
205 return 0x0017e000U;
206}
207static inline u32 ltc_ltcs_ltss_cbc_param_r(void)
208{
209 return 0x0017e280U;
210}
211static inline u32 ltc_ltcs_ltss_cbc_param_comptags_per_cache_line_v(u32 r)
212{
213 return (r >> 0U) & 0xffffU;
214}
215static inline u32 ltc_ltcs_ltss_cbc_param_cache_line_size_v(u32 r)
216{
217 return (r >> 24U) & 0xfU;
218}
219static inline u32 ltc_ltcs_ltss_cbc_param_slices_per_ltc_v(u32 r)
220{
221 return (r >> 28U) & 0xfU;
222}
223static inline u32 ltc_ltcs_ltss_cbc_param2_r(void)
224{
225 return 0x0017e3f4U;
226}
227static inline u32 ltc_ltcs_ltss_cbc_param2_gobs_per_comptagline_per_slice_v(u32 r)
228{
229 return (r >> 0U) & 0xffffU;
230}
231static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_r(void)
232{
233 return 0x0017e2acU;
234}
235static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(u32 v)
236{
237 return (v & 0x1fU) << 16U;
238}
239static inline u32 ltc_ltcs_ltss_dstg_zbc_index_r(void)
240{
241 return 0x0017e338U;
242}
243static inline u32 ltc_ltcs_ltss_dstg_zbc_index_address_f(u32 v)
244{
245 return (v & 0xfU) << 0U;
246}
247static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value_r(u32 i)
248{
249 return 0x0017e33cU + i*4U;
250}
251static inline u32 ltc_ltcs_ltss_dstg_zbc_color_clear_value__size_1_v(void)
252{
253 return 0x00000004U;
254}
255static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_r(void)
256{
257 return 0x0017e34cU;
258}
259static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_s(void)
260{
261 return 32U;
262}
263static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_f(u32 v)
264{
265 return (v & 0xffffffffU) << 0U;
266}
267static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_m(void)
268{
269 return 0xffffffffU << 0U;
270}
271static inline u32 ltc_ltcs_ltss_dstg_zbc_depth_clear_value_field_v(u32 r)
272{
273 return (r >> 0U) & 0xffffffffU;
274}
275static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_r(void)
276{
277 return 0x0017e204U;
278}
279static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_s(void)
280{
281 return 8U;
282}
283static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_f(u32 v)
284{
285 return (v & 0xffU) << 0U;
286}
287static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_m(void)
288{
289 return 0xffU << 0U;
290}
291static inline u32 ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_field_v(u32 r)
292{
293 return (r >> 0U) & 0xffU;
294}
295static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_r(void)
296{
297 return 0x0017e2b0U;
298}
299static inline u32 ltc_ltcs_ltss_tstg_set_mgmt_2_l2_bypass_mode_enabled_f(void)
300{
301 return 0x10000000U;
302}
303static inline u32 ltc_ltcs_ltss_g_elpg_r(void)
304{
305 return 0x0017e214U;
306}
307static inline u32 ltc_ltcs_ltss_g_elpg_flush_v(u32 r)
308{
309 return (r >> 0U) & 0x1U;
310}
311static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_v(void)
312{
313 return 0x00000001U;
314}
315static inline u32 ltc_ltcs_ltss_g_elpg_flush_pending_f(void)
316{
317 return 0x1U;
318}
319static inline u32 ltc_ltc0_ltss_g_elpg_r(void)
320{
321 return 0x00140214U;
322}
323static inline u32 ltc_ltc0_ltss_g_elpg_flush_v(u32 r)
324{
325 return (r >> 0U) & 0x1U;
326}
327static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_v(void)
328{
329 return 0x00000001U;
330}
331static inline u32 ltc_ltc0_ltss_g_elpg_flush_pending_f(void)
332{
333 return 0x1U;
334}
335static inline u32 ltc_ltc1_ltss_g_elpg_r(void)
336{
337 return 0x00142214U;
338}
339static inline u32 ltc_ltc1_ltss_g_elpg_flush_v(u32 r)
340{
341 return (r >> 0U) & 0x1U;
342}
343static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_v(void)
344{
345 return 0x00000001U;
346}
347static inline u32 ltc_ltc1_ltss_g_elpg_flush_pending_f(void)
348{
349 return 0x1U;
350}
351static inline u32 ltc_ltcs_ltss_intr_r(void)
352{
353 return 0x0017e20cU;
354}
355static inline u32 ltc_ltcs_ltss_intr_ecc_sec_error_pending_f(void)
356{
357 return 0x100U;
358}
359static inline u32 ltc_ltcs_ltss_intr_ecc_ded_error_pending_f(void)
360{
361 return 0x200U;
362}
363static inline u32 ltc_ltcs_ltss_intr_en_evicted_cb_m(void)
364{
365 return 0x1U << 20U;
366}
367static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_m(void)
368{
369 return 0x1U << 21U;
370}
371static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_enabled_f(void)
372{
373 return 0x200000U;
374}
375static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_disabled_f(void)
376{
377 return 0x0U;
378}
379static inline u32 ltc_ltcs_ltss_intr_en_illegal_compstat_access_m(void)
380{
381 return 0x1U << 30U;
382}
383static inline u32 ltc_ltcs_ltss_intr_en_ecc_sec_error_enabled_f(void)
384{
385 return 0x1000000U;
386}
387static inline u32 ltc_ltcs_ltss_intr_en_ecc_ded_error_enabled_f(void)
388{
389 return 0x2000000U;
390}
391static inline u32 ltc_ltc0_lts0_intr_r(void)
392{
393 return 0x0014040cU;
394}
395static inline u32 ltc_ltcs_ltss_intr3_r(void)
396{
397 return 0x0017e388U;
398}
399static inline u32 ltc_ltcs_ltss_intr3_ecc_corrected_m(void)
400{
401 return 0x1U << 7U;
402}
403static inline u32 ltc_ltcs_ltss_intr3_ecc_uncorrected_m(void)
404{
405 return 0x1U << 8U;
406}
407static inline u32 ltc_ltc0_lts0_intr3_r(void)
408{
409 return 0x00140588U;
410}
411static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_r(void)
412{
413 return 0x001404f0U;
414}
415static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_rstg_f(u32 v)
416{
417 return (v & 0x1U) << 1U;
418}
419static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_rstg_m(void)
420{
421 return 0x1U << 1U;
422}
423static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_tstg_f(u32 v)
424{
425 return (v & 0x1U) << 3U;
426}
427static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_tstg_m(void)
428{
429 return 0x1U << 3U;
430}
431static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_dstg_f(u32 v)
432{
433 return (v & 0x1U) << 5U;
434}
435static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_dstg_m(void)
436{
437 return 0x1U << 5U;
438}
439static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_rstg_f(u32 v)
440{
441 return (v & 0x1U) << 0U;
442}
443static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_rstg_m(void)
444{
445 return 0x1U << 0U;
446}
447static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_tstg_f(u32 v)
448{
449 return (v & 0x1U) << 2U;
450}
451static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_tstg_m(void)
452{
453 return 0x1U << 2U;
454}
455static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_dstg_f(u32 v)
456{
457 return (v & 0x1U) << 4U;
458}
459static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_dstg_m(void)
460{
461 return 0x1U << 4U;
462}
463static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_total_counter_overflow_f(u32 v)
464{
465 return (v & 0x1U) << 18U;
466}
467static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_total_counter_overflow_m(void)
468{
469 return 0x1U << 18U;
470}
471static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_total_counter_overflow_f(u32 v)
472{
473 return (v & 0x1U) << 16U;
474}
475static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_total_counter_overflow_m(void)
476{
477 return 0x1U << 16U;
478}
479static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_unique_counter_overflow_f(u32 v)
480{
481 return (v & 0x1U) << 19U;
482}
483static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_uncorrected_err_unique_counter_overflow_m(void)
484{
485 return 0x1U << 19U;
486}
487static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_unique_counter_overflow_f(u32 v)
488{
489 return (v & 0x1U) << 17U;
490}
491static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_corrected_err_unique_counter_overflow_m(void)
492{
493 return 0x1U << 17U;
494}
495static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_reset_f(u32 v)
496{
497 return (v & 0x1U) << 30U;
498}
499static inline u32 ltc_ltc0_lts0_l2_cache_ecc_status_reset_task_f(void)
500{
501 return 0x40000000U;
502}
503static inline u32 ltc_ltc0_lts0_l2_cache_ecc_address_r(void)
504{
505 return 0x001404fcU;
506}
507static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_r(void)
508{
509 return 0x001404f4U;
510}
511static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_total_s(void)
512{
513 return 16U;
514}
515static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_total_f(u32 v)
516{
517 return (v & 0xffffU) << 0U;
518}
519static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_total_m(void)
520{
521 return 0xffffU << 0U;
522}
523static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_total_v(u32 r)
524{
525 return (r >> 0U) & 0xffffU;
526}
527static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_unique_total_s(void)
528{
529 return 16U;
530}
531static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_unique_total_f(u32 v)
532{
533 return (v & 0xffffU) << 16U;
534}
535static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_unique_total_m(void)
536{
537 return 0xffffU << 16U;
538}
539static inline u32 ltc_ltc0_lts0_l2_cache_ecc_corrected_err_count_unique_total_v(u32 r)
540{
541 return (r >> 16U) & 0xffffU;
542}
543static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_r(void)
544{
545 return 0x001404f8U;
546}
547static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_total_s(void)
548{
549 return 16U;
550}
551static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_total_f(u32 v)
552{
553 return (v & 0xffffU) << 0U;
554}
555static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_total_m(void)
556{
557 return 0xffffU << 0U;
558}
559static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_total_v(u32 r)
560{
561 return (r >> 0U) & 0xffffU;
562}
563static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_unique_total_s(void)
564{
565 return 16U;
566}
567static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_unique_total_f(u32 v)
568{
569 return (v & 0xffffU) << 16U;
570}
571static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_unique_total_m(void)
572{
573 return 0xffffU << 16U;
574}
575static inline u32 ltc_ltc0_lts0_l2_cache_ecc_uncorrected_err_count_unique_total_v(u32 r)
576{
577 return (r >> 16U) & 0xffffU;
578}
579static inline u32 ltc_ltc0_lts0_dstg_ecc_report_r(void)
580{
581 return 0x0014051cU;
582}
583static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_m(void)
584{
585 return 0xffU << 0U;
586}
587static inline u32 ltc_ltc0_lts0_dstg_ecc_report_sec_count_v(u32 r)
588{
589 return (r >> 0U) & 0xffU;
590}
591static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_m(void)
592{
593 return 0xffU << 16U;
594}
595static inline u32 ltc_ltc0_lts0_dstg_ecc_report_ded_count_v(u32 r)
596{
597 return (r >> 16U) & 0xffU;
598}
599static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_r(void)
600{
601 return 0x0017e2a0U;
602}
603static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_v(u32 r)
604{
605 return (r >> 0U) & 0x1U;
606}
607static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_v(void)
608{
609 return 0x00000001U;
610}
611static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_pending_f(void)
612{
613 return 0x1U;
614}
615static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_v(u32 r)
616{
617 return (r >> 8U) & 0xfU;
618}
619static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_v(void)
620{
621 return 0x00000003U;
622}
623static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_max_cycles_between_invalidates_3_f(void)
624{
625 return 0x300U;
626}
627static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_v(u32 r)
628{
629 return (r >> 28U) & 0x1U;
630}
631static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_v(void)
632{
633 return 0x00000001U;
634}
635static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_last_class_true_f(void)
636{
637 return 0x10000000U;
638}
639static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_v(u32 r)
640{
641 return (r >> 29U) & 0x1U;
642}
643static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_v(void)
644{
645 return 0x00000001U;
646}
647static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_normal_class_true_f(void)
648{
649 return 0x20000000U;
650}
651static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_v(u32 r)
652{
653 return (r >> 30U) & 0x1U;
654}
655static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_v(void)
656{
657 return 0x00000001U;
658}
659static inline u32 ltc_ltcs_ltss_tstg_cmgmt0_invalidate_evict_first_class_true_f(void)
660{
661 return 0x40000000U;
662}
663static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_r(void)
664{
665 return 0x0017e2a4U;
666}
667static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_v(u32 r)
668{
669 return (r >> 0U) & 0x1U;
670}
671static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_v(void)
672{
673 return 0x00000001U;
674}
675static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_pending_f(void)
676{
677 return 0x1U;
678}
679static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_v(u32 r)
680{
681 return (r >> 8U) & 0xfU;
682}
683static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_v(void)
684{
685 return 0x00000003U;
686}
687static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_max_cycles_between_cleans_3_f(void)
688{
689 return 0x300U;
690}
691static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_v(u32 r)
692{
693 return (r >> 16U) & 0x1U;
694}
695static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_v(void)
696{
697 return 0x00000001U;
698}
699static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_wait_for_fb_to_pull_true_f(void)
700{
701 return 0x10000U;
702}
703static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_v(u32 r)
704{
705 return (r >> 28U) & 0x1U;
706}
707static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_v(void)
708{
709 return 0x00000001U;
710}
711static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_last_class_true_f(void)
712{
713 return 0x10000000U;
714}
715static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_v(u32 r)
716{
717 return (r >> 29U) & 0x1U;
718}
719static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_v(void)
720{
721 return 0x00000001U;
722}
723static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_normal_class_true_f(void)
724{
725 return 0x20000000U;
726}
727static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_v(u32 r)
728{
729 return (r >> 30U) & 0x1U;
730}
731static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_v(void)
732{
733 return 0x00000001U;
734}
735static inline u32 ltc_ltcs_ltss_tstg_cmgmt1_clean_evict_first_class_true_f(void)
736{
737 return 0x40000000U;
738}
739static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_r(void)
740{
741 return 0x001402a0U;
742}
743static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_v(u32 r)
744{
745 return (r >> 0U) & 0x1U;
746}
747static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_v(void)
748{
749 return 0x00000001U;
750}
751static inline u32 ltc_ltc0_ltss_tstg_cmgmt0_invalidate_pending_f(void)
752{
753 return 0x1U;
754}
755static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_r(void)
756{
757 return 0x001402a4U;
758}
759static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_v(u32 r)
760{
761 return (r >> 0U) & 0x1U;
762}
763static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_v(void)
764{
765 return 0x00000001U;
766}
767static inline u32 ltc_ltc0_ltss_tstg_cmgmt1_clean_pending_f(void)
768{
769 return 0x1U;
770}
771static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_r(void)
772{
773 return 0x001422a0U;
774}
775static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_v(u32 r)
776{
777 return (r >> 0U) & 0x1U;
778}
779static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_v(void)
780{
781 return 0x00000001U;
782}
783static inline u32 ltc_ltc1_ltss_tstg_cmgmt0_invalidate_pending_f(void)
784{
785 return 0x1U;
786}
787static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_r(void)
788{
789 return 0x001422a4U;
790}
791static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_v(u32 r)
792{
793 return (r >> 0U) & 0x1U;
794}
795static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_v(void)
796{
797 return 0x00000001U;
798}
799static inline u32 ltc_ltc1_ltss_tstg_cmgmt1_clean_pending_f(void)
800{
801 return 0x1U;
802}
803static inline u32 ltc_ltc0_lts0_tstg_info_1_r(void)
804{
805 return 0x0014058cU;
806}
807static inline u32 ltc_ltc0_lts0_tstg_info_1_slice_size_in_kb_v(u32 r)
808{
809 return (r >> 0U) & 0xffffU;
810}
811static inline u32 ltc_ltc0_lts0_tstg_info_1_slices_per_l2_v(u32 r)
812{
813 return (r >> 16U) & 0x1fU;
814}
815#endif
diff --git a/include/nvgpu/hw/gv11b/hw_mc_gv11b.h b/include/nvgpu/hw/gv11b/hw_mc_gv11b.h
deleted file mode 100644
index a1bf15b..0000000
--- a/include/nvgpu/hw/gv11b/hw_mc_gv11b.h
+++ /dev/null
@@ -1,231 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_mc_gv11b_h_
57#define _hw_mc_gv11b_h_
58
59static inline u32 mc_boot_0_r(void)
60{
61 return 0x00000000U;
62}
63static inline u32 mc_boot_0_architecture_v(u32 r)
64{
65 return (r >> 24U) & 0x1fU;
66}
67static inline u32 mc_boot_0_implementation_v(u32 r)
68{
69 return (r >> 20U) & 0xfU;
70}
71static inline u32 mc_boot_0_major_revision_v(u32 r)
72{
73 return (r >> 4U) & 0xfU;
74}
75static inline u32 mc_boot_0_minor_revision_v(u32 r)
76{
77 return (r >> 0U) & 0xfU;
78}
79static inline u32 mc_intr_r(u32 i)
80{
81 return 0x00000100U + i*4U;
82}
83static inline u32 mc_intr_pfifo_pending_f(void)
84{
85 return 0x100U;
86}
87static inline u32 mc_intr_hub_pending_f(void)
88{
89 return 0x200U;
90}
91static inline u32 mc_intr_pgraph_pending_f(void)
92{
93 return 0x1000U;
94}
95static inline u32 mc_intr_pmu_pending_f(void)
96{
97 return 0x1000000U;
98}
99static inline u32 mc_intr_ltc_pending_f(void)
100{
101 return 0x2000000U;
102}
103static inline u32 mc_intr_priv_ring_pending_f(void)
104{
105 return 0x40000000U;
106}
107static inline u32 mc_intr_pbus_pending_f(void)
108{
109 return 0x10000000U;
110}
111static inline u32 mc_intr_en_r(u32 i)
112{
113 return 0x00000140U + i*4U;
114}
115static inline u32 mc_intr_en_set_r(u32 i)
116{
117 return 0x00000160U + i*4U;
118}
119static inline u32 mc_intr_en_clear_r(u32 i)
120{
121 return 0x00000180U + i*4U;
122}
123static inline u32 mc_enable_r(void)
124{
125 return 0x00000200U;
126}
127static inline u32 mc_enable_xbar_enabled_f(void)
128{
129 return 0x4U;
130}
131static inline u32 mc_enable_l2_enabled_f(void)
132{
133 return 0x8U;
134}
135static inline u32 mc_enable_pmedia_s(void)
136{
137 return 1U;
138}
139static inline u32 mc_enable_pmedia_f(u32 v)
140{
141 return (v & 0x1U) << 4U;
142}
143static inline u32 mc_enable_pmedia_m(void)
144{
145 return 0x1U << 4U;
146}
147static inline u32 mc_enable_pmedia_v(u32 r)
148{
149 return (r >> 4U) & 0x1U;
150}
151static inline u32 mc_enable_ce0_m(void)
152{
153 return 0x1U << 6U;
154}
155static inline u32 mc_enable_pfifo_enabled_f(void)
156{
157 return 0x100U;
158}
159static inline u32 mc_enable_pgraph_enabled_f(void)
160{
161 return 0x1000U;
162}
163static inline u32 mc_enable_pwr_v(u32 r)
164{
165 return (r >> 13U) & 0x1U;
166}
167static inline u32 mc_enable_pwr_disabled_v(void)
168{
169 return 0x00000000U;
170}
171static inline u32 mc_enable_pwr_enabled_f(void)
172{
173 return 0x2000U;
174}
175static inline u32 mc_enable_pfb_enabled_f(void)
176{
177 return 0x100000U;
178}
179static inline u32 mc_enable_ce2_m(void)
180{
181 return 0x1U << 21U;
182}
183static inline u32 mc_enable_ce2_enabled_f(void)
184{
185 return 0x200000U;
186}
187static inline u32 mc_enable_blg_enabled_f(void)
188{
189 return 0x8000000U;
190}
191static inline u32 mc_enable_perfmon_enabled_f(void)
192{
193 return 0x10000000U;
194}
195static inline u32 mc_enable_hub_enabled_f(void)
196{
197 return 0x20000000U;
198}
199static inline u32 mc_intr_ltc_r(void)
200{
201 return 0x000001c0U;
202}
203static inline u32 mc_enable_pb_r(void)
204{
205 return 0x00000204U;
206}
207static inline u32 mc_enable_pb_0_s(void)
208{
209 return 1U;
210}
211static inline u32 mc_enable_pb_0_f(u32 v)
212{
213 return (v & 0x1U) << 0U;
214}
215static inline u32 mc_enable_pb_0_m(void)
216{
217 return 0x1U << 0U;
218}
219static inline u32 mc_enable_pb_0_v(u32 r)
220{
221 return (r >> 0U) & 0x1U;
222}
223static inline u32 mc_enable_pb_0_enabled_v(void)
224{
225 return 0x00000001U;
226}
227static inline u32 mc_enable_pb_sel_f(u32 v, u32 i)
228{
229 return (v & 0x1U) << (0U + i*1U);
230}
231#endif
diff --git a/include/nvgpu/hw/gv11b/hw_pbdma_gv11b.h b/include/nvgpu/hw/gv11b/hw_pbdma_gv11b.h
deleted file mode 100644
index c04d30a..0000000
--- a/include/nvgpu/hw/gv11b/hw_pbdma_gv11b.h
+++ /dev/null
@@ -1,651 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pbdma_gv11b_h_
57#define _hw_pbdma_gv11b_h_
58
59static inline u32 pbdma_gp_entry1_r(void)
60{
61 return 0x10000004U;
62}
63static inline u32 pbdma_gp_entry1_get_hi_v(u32 r)
64{
65 return (r >> 0U) & 0xffU;
66}
67static inline u32 pbdma_gp_entry1_length_f(u32 v)
68{
69 return (v & 0x1fffffU) << 10U;
70}
71static inline u32 pbdma_gp_entry1_length_v(u32 r)
72{
73 return (r >> 10U) & 0x1fffffU;
74}
75static inline u32 pbdma_gp_base_r(u32 i)
76{
77 return 0x00040048U + i*8192U;
78}
79static inline u32 pbdma_gp_base__size_1_v(void)
80{
81 return 0x00000003U;
82}
83static inline u32 pbdma_gp_base_offset_f(u32 v)
84{
85 return (v & 0x1fffffffU) << 3U;
86}
87static inline u32 pbdma_gp_base_rsvd_s(void)
88{
89 return 3U;
90}
91static inline u32 pbdma_gp_base_hi_r(u32 i)
92{
93 return 0x0004004cU + i*8192U;
94}
95static inline u32 pbdma_gp_base_hi_offset_f(u32 v)
96{
97 return (v & 0xffU) << 0U;
98}
99static inline u32 pbdma_gp_base_hi_limit2_f(u32 v)
100{
101 return (v & 0x1fU) << 16U;
102}
103static inline u32 pbdma_gp_fetch_r(u32 i)
104{
105 return 0x00040050U + i*8192U;
106}
107static inline u32 pbdma_gp_get_r(u32 i)
108{
109 return 0x00040014U + i*8192U;
110}
111static inline u32 pbdma_gp_put_r(u32 i)
112{
113 return 0x00040000U + i*8192U;
114}
115static inline u32 pbdma_pb_fetch_r(u32 i)
116{
117 return 0x00040054U + i*8192U;
118}
119static inline u32 pbdma_pb_fetch_hi_r(u32 i)
120{
121 return 0x00040058U + i*8192U;
122}
123static inline u32 pbdma_get_r(u32 i)
124{
125 return 0x00040018U + i*8192U;
126}
127static inline u32 pbdma_get_hi_r(u32 i)
128{
129 return 0x0004001cU + i*8192U;
130}
131static inline u32 pbdma_put_r(u32 i)
132{
133 return 0x0004005cU + i*8192U;
134}
135static inline u32 pbdma_put_hi_r(u32 i)
136{
137 return 0x00040060U + i*8192U;
138}
139static inline u32 pbdma_pb_header_r(u32 i)
140{
141 return 0x00040084U + i*8192U;
142}
143static inline u32 pbdma_pb_header_priv_user_f(void)
144{
145 return 0x0U;
146}
147static inline u32 pbdma_pb_header_method_zero_f(void)
148{
149 return 0x0U;
150}
151static inline u32 pbdma_pb_header_subchannel_zero_f(void)
152{
153 return 0x0U;
154}
155static inline u32 pbdma_pb_header_level_main_f(void)
156{
157 return 0x0U;
158}
159static inline u32 pbdma_pb_header_first_true_f(void)
160{
161 return 0x400000U;
162}
163static inline u32 pbdma_pb_header_type_inc_f(void)
164{
165 return 0x20000000U;
166}
167static inline u32 pbdma_pb_header_type_non_inc_f(void)
168{
169 return 0x60000000U;
170}
171static inline u32 pbdma_hdr_shadow_r(u32 i)
172{
173 return 0x00040118U + i*8192U;
174}
175static inline u32 pbdma_gp_shadow_0_r(u32 i)
176{
177 return 0x00040110U + i*8192U;
178}
179static inline u32 pbdma_gp_shadow_1_r(u32 i)
180{
181 return 0x00040114U + i*8192U;
182}
183static inline u32 pbdma_subdevice_r(u32 i)
184{
185 return 0x00040094U + i*8192U;
186}
187static inline u32 pbdma_subdevice_id_f(u32 v)
188{
189 return (v & 0xfffU) << 0U;
190}
191static inline u32 pbdma_subdevice_status_active_f(void)
192{
193 return 0x10000000U;
194}
195static inline u32 pbdma_subdevice_channel_dma_enable_f(void)
196{
197 return 0x20000000U;
198}
199static inline u32 pbdma_method0_r(u32 i)
200{
201 return 0x000400c0U + i*8192U;
202}
203static inline u32 pbdma_method0_fifo_size_v(void)
204{
205 return 0x00000004U;
206}
207static inline u32 pbdma_method0_addr_f(u32 v)
208{
209 return (v & 0xfffU) << 2U;
210}
211static inline u32 pbdma_method0_addr_v(u32 r)
212{
213 return (r >> 2U) & 0xfffU;
214}
215static inline u32 pbdma_method0_subch_v(u32 r)
216{
217 return (r >> 16U) & 0x7U;
218}
219static inline u32 pbdma_method0_first_true_f(void)
220{
221 return 0x400000U;
222}
223static inline u32 pbdma_method0_valid_true_f(void)
224{
225 return 0x80000000U;
226}
227static inline u32 pbdma_method1_r(u32 i)
228{
229 return 0x000400c8U + i*8192U;
230}
231static inline u32 pbdma_method2_r(u32 i)
232{
233 return 0x000400d0U + i*8192U;
234}
235static inline u32 pbdma_method3_r(u32 i)
236{
237 return 0x000400d8U + i*8192U;
238}
239static inline u32 pbdma_data0_r(u32 i)
240{
241 return 0x000400c4U + i*8192U;
242}
243static inline u32 pbdma_acquire_r(u32 i)
244{
245 return 0x00040030U + i*8192U;
246}
247static inline u32 pbdma_acquire_retry_man_2_f(void)
248{
249 return 0x2U;
250}
251static inline u32 pbdma_acquire_retry_exp_2_f(void)
252{
253 return 0x100U;
254}
255static inline u32 pbdma_acquire_timeout_exp_f(u32 v)
256{
257 return (v & 0xfU) << 11U;
258}
259static inline u32 pbdma_acquire_timeout_exp_max_v(void)
260{
261 return 0x0000000fU;
262}
263static inline u32 pbdma_acquire_timeout_exp_max_f(void)
264{
265 return 0x7800U;
266}
267static inline u32 pbdma_acquire_timeout_man_f(u32 v)
268{
269 return (v & 0xffffU) << 15U;
270}
271static inline u32 pbdma_acquire_timeout_man_max_v(void)
272{
273 return 0x0000ffffU;
274}
275static inline u32 pbdma_acquire_timeout_man_max_f(void)
276{
277 return 0x7fff8000U;
278}
279static inline u32 pbdma_acquire_timeout_en_enable_f(void)
280{
281 return 0x80000000U;
282}
283static inline u32 pbdma_acquire_timeout_en_disable_f(void)
284{
285 return 0x0U;
286}
287static inline u32 pbdma_status_r(u32 i)
288{
289 return 0x00040100U + i*8192U;
290}
291static inline u32 pbdma_channel_r(u32 i)
292{
293 return 0x00040120U + i*8192U;
294}
295static inline u32 pbdma_signature_r(u32 i)
296{
297 return 0x00040010U + i*8192U;
298}
299static inline u32 pbdma_signature_hw_valid_f(void)
300{
301 return 0xfaceU;
302}
303static inline u32 pbdma_signature_sw_zero_f(void)
304{
305 return 0x0U;
306}
307static inline u32 pbdma_userd_r(u32 i)
308{
309 return 0x00040008U + i*8192U;
310}
311static inline u32 pbdma_userd_target_vid_mem_f(void)
312{
313 return 0x0U;
314}
315static inline u32 pbdma_userd_target_sys_mem_coh_f(void)
316{
317 return 0x2U;
318}
319static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void)
320{
321 return 0x3U;
322}
323static inline u32 pbdma_userd_addr_f(u32 v)
324{
325 return (v & 0x7fffffU) << 9U;
326}
327static inline u32 pbdma_config_r(u32 i)
328{
329 return 0x000400f4U + i*8192U;
330}
331static inline u32 pbdma_config_l2_evict_first_f(void)
332{
333 return 0x0U;
334}
335static inline u32 pbdma_config_l2_evict_normal_f(void)
336{
337 return 0x1U;
338}
339static inline u32 pbdma_config_ce_split_enable_f(void)
340{
341 return 0x0U;
342}
343static inline u32 pbdma_config_ce_split_disable_f(void)
344{
345 return 0x10U;
346}
347static inline u32 pbdma_config_auth_level_non_privileged_f(void)
348{
349 return 0x0U;
350}
351static inline u32 pbdma_config_auth_level_privileged_f(void)
352{
353 return 0x100U;
354}
355static inline u32 pbdma_config_userd_writeback_disable_f(void)
356{
357 return 0x0U;
358}
359static inline u32 pbdma_config_userd_writeback_enable_f(void)
360{
361 return 0x1000U;
362}
363static inline u32 pbdma_userd_hi_r(u32 i)
364{
365 return 0x0004000cU + i*8192U;
366}
367static inline u32 pbdma_userd_hi_addr_f(u32 v)
368{
369 return (v & 0xffU) << 0U;
370}
371static inline u32 pbdma_hce_ctrl_r(u32 i)
372{
373 return 0x000400e4U + i*8192U;
374}
375static inline u32 pbdma_hce_ctrl_hce_priv_mode_yes_f(void)
376{
377 return 0x20U;
378}
379static inline u32 pbdma_intr_0_r(u32 i)
380{
381 return 0x00040108U + i*8192U;
382}
383static inline u32 pbdma_intr_0_memreq_v(u32 r)
384{
385 return (r >> 0U) & 0x1U;
386}
387static inline u32 pbdma_intr_0_memreq_pending_f(void)
388{
389 return 0x1U;
390}
391static inline u32 pbdma_intr_0_memack_timeout_pending_f(void)
392{
393 return 0x2U;
394}
395static inline u32 pbdma_intr_0_memack_extra_pending_f(void)
396{
397 return 0x4U;
398}
399static inline u32 pbdma_intr_0_memdat_timeout_pending_f(void)
400{
401 return 0x8U;
402}
403static inline u32 pbdma_intr_0_memdat_extra_pending_f(void)
404{
405 return 0x10U;
406}
407static inline u32 pbdma_intr_0_memflush_pending_f(void)
408{
409 return 0x20U;
410}
411static inline u32 pbdma_intr_0_memop_pending_f(void)
412{
413 return 0x40U;
414}
415static inline u32 pbdma_intr_0_lbconnect_pending_f(void)
416{
417 return 0x80U;
418}
419static inline u32 pbdma_intr_0_lbreq_pending_f(void)
420{
421 return 0x100U;
422}
423static inline u32 pbdma_intr_0_lback_timeout_pending_f(void)
424{
425 return 0x200U;
426}
427static inline u32 pbdma_intr_0_lback_extra_pending_f(void)
428{
429 return 0x400U;
430}
431static inline u32 pbdma_intr_0_lbdat_timeout_pending_f(void)
432{
433 return 0x800U;
434}
435static inline u32 pbdma_intr_0_lbdat_extra_pending_f(void)
436{
437 return 0x1000U;
438}
439static inline u32 pbdma_intr_0_gpfifo_pending_f(void)
440{
441 return 0x2000U;
442}
443static inline u32 pbdma_intr_0_gpptr_pending_f(void)
444{
445 return 0x4000U;
446}
447static inline u32 pbdma_intr_0_gpentry_pending_f(void)
448{
449 return 0x8000U;
450}
451static inline u32 pbdma_intr_0_gpcrc_pending_f(void)
452{
453 return 0x10000U;
454}
455static inline u32 pbdma_intr_0_pbptr_pending_f(void)
456{
457 return 0x20000U;
458}
459static inline u32 pbdma_intr_0_pbentry_pending_f(void)
460{
461 return 0x40000U;
462}
463static inline u32 pbdma_intr_0_pbcrc_pending_f(void)
464{
465 return 0x80000U;
466}
467static inline u32 pbdma_intr_0_clear_faulted_error_pending_f(void)
468{
469 return 0x100000U;
470}
471static inline u32 pbdma_intr_0_method_pending_f(void)
472{
473 return 0x200000U;
474}
475static inline u32 pbdma_intr_0_methodcrc_pending_f(void)
476{
477 return 0x400000U;
478}
479static inline u32 pbdma_intr_0_device_pending_f(void)
480{
481 return 0x800000U;
482}
483static inline u32 pbdma_intr_0_eng_reset_pending_f(void)
484{
485 return 0x1000000U;
486}
487static inline u32 pbdma_intr_0_semaphore_pending_f(void)
488{
489 return 0x2000000U;
490}
491static inline u32 pbdma_intr_0_acquire_pending_f(void)
492{
493 return 0x4000000U;
494}
495static inline u32 pbdma_intr_0_pri_pending_f(void)
496{
497 return 0x8000000U;
498}
499static inline u32 pbdma_intr_0_no_ctxsw_seg_pending_f(void)
500{
501 return 0x20000000U;
502}
503static inline u32 pbdma_intr_0_pbseg_pending_f(void)
504{
505 return 0x40000000U;
506}
507static inline u32 pbdma_intr_0_signature_pending_f(void)
508{
509 return 0x80000000U;
510}
511static inline u32 pbdma_intr_1_r(u32 i)
512{
513 return 0x00040148U + i*8192U;
514}
515static inline u32 pbdma_intr_1_ctxnotvalid_m(void)
516{
517 return 0x1U << 31U;
518}
519static inline u32 pbdma_intr_1_ctxnotvalid_pending_f(void)
520{
521 return 0x80000000U;
522}
523static inline u32 pbdma_intr_en_0_r(u32 i)
524{
525 return 0x0004010cU + i*8192U;
526}
527static inline u32 pbdma_intr_en_0_lbreq_enabled_f(void)
528{
529 return 0x100U;
530}
531static inline u32 pbdma_intr_en_1_r(u32 i)
532{
533 return 0x0004014cU + i*8192U;
534}
535static inline u32 pbdma_intr_stall_r(u32 i)
536{
537 return 0x0004013cU + i*8192U;
538}
539static inline u32 pbdma_intr_stall_lbreq_enabled_f(void)
540{
541 return 0x100U;
542}
543static inline u32 pbdma_intr_stall_1_r(u32 i)
544{
545 return 0x00040140U + i*8192U;
546}
547static inline u32 pbdma_intr_stall_1_hce_illegal_op_enabled_f(void)
548{
549 return 0x1U;
550}
551static inline u32 pbdma_udma_nop_r(void)
552{
553 return 0x00000008U;
554}
555static inline u32 pbdma_runlist_timeslice_r(u32 i)
556{
557 return 0x000400f8U + i*8192U;
558}
559static inline u32 pbdma_runlist_timeslice_timeout_128_f(void)
560{
561 return 0x80U;
562}
563static inline u32 pbdma_runlist_timeslice_timescale_3_f(void)
564{
565 return 0x3000U;
566}
567static inline u32 pbdma_runlist_timeslice_enable_true_f(void)
568{
569 return 0x10000000U;
570}
571static inline u32 pbdma_target_r(u32 i)
572{
573 return 0x000400acU + i*8192U;
574}
575static inline u32 pbdma_target_engine_sw_f(void)
576{
577 return 0x1fU;
578}
579static inline u32 pbdma_target_eng_ctx_valid_true_f(void)
580{
581 return 0x10000U;
582}
583static inline u32 pbdma_target_eng_ctx_valid_false_f(void)
584{
585 return 0x0U;
586}
587static inline u32 pbdma_target_ce_ctx_valid_true_f(void)
588{
589 return 0x20000U;
590}
591static inline u32 pbdma_target_ce_ctx_valid_false_f(void)
592{
593 return 0x0U;
594}
595static inline u32 pbdma_target_host_tsg_event_reason_pbdma_idle_f(void)
596{
597 return 0x0U;
598}
599static inline u32 pbdma_target_host_tsg_event_reason_semaphore_acquire_failure_f(void)
600{
601 return 0x1000000U;
602}
603static inline u32 pbdma_target_host_tsg_event_reason_tsg_yield_f(void)
604{
605 return 0x2000000U;
606}
607static inline u32 pbdma_target_host_tsg_event_reason_host_subchannel_switch_f(void)
608{
609 return 0x3000000U;
610}
611static inline u32 pbdma_target_should_send_tsg_event_true_f(void)
612{
613 return 0x20000000U;
614}
615static inline u32 pbdma_target_should_send_tsg_event_false_f(void)
616{
617 return 0x0U;
618}
619static inline u32 pbdma_target_needs_host_tsg_event_true_f(void)
620{
621 return 0x80000000U;
622}
623static inline u32 pbdma_target_needs_host_tsg_event_false_f(void)
624{
625 return 0x0U;
626}
627static inline u32 pbdma_set_channel_info_r(u32 i)
628{
629 return 0x000400fcU + i*8192U;
630}
631static inline u32 pbdma_set_channel_info_veid_f(u32 v)
632{
633 return (v & 0x3fU) << 8U;
634}
635static inline u32 pbdma_timeout_r(u32 i)
636{
637 return 0x0004012cU + i*8192U;
638}
639static inline u32 pbdma_timeout_period_m(void)
640{
641 return 0xffffffffU << 0U;
642}
643static inline u32 pbdma_timeout_period_max_f(void)
644{
645 return 0xffffffffU;
646}
647static inline u32 pbdma_timeout_period_init_f(void)
648{
649 return 0x10000U;
650}
651#endif
diff --git a/include/nvgpu/hw/gv11b/hw_perf_gv11b.h b/include/nvgpu/hw/gv11b/hw_perf_gv11b.h
deleted file mode 100644
index a3341df..0000000
--- a/include/nvgpu/hw/gv11b/hw_perf_gv11b.h
+++ /dev/null
@@ -1,263 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_perf_gv11b_h_
57#define _hw_perf_gv11b_h_
58
59static inline u32 perf_pmmgpc_perdomain_offset_v(void)
60{
61 return 0x00000200U;
62}
63static inline u32 perf_pmmsys_perdomain_offset_v(void)
64{
65 return 0x00000200U;
66}
67static inline u32 perf_pmmgpc_base_v(void)
68{
69 return 0x00180000U;
70}
71static inline u32 perf_pmmgpc_extent_v(void)
72{
73 return 0x00183fffU;
74}
75static inline u32 perf_pmmsys_base_v(void)
76{
77 return 0x00240000U;
78}
79static inline u32 perf_pmmsys_extent_v(void)
80{
81 return 0x00243fffU;
82}
83static inline u32 perf_pmmfbp_base_v(void)
84{
85 return 0x00200000U;
86}
87static inline u32 perf_pmasys_control_r(void)
88{
89 return 0x0024a000U;
90}
91static inline u32 perf_pmasys_control_membuf_status_v(u32 r)
92{
93 return (r >> 4U) & 0x1U;
94}
95static inline u32 perf_pmasys_control_membuf_status_overflowed_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 perf_pmasys_control_membuf_status_overflowed_f(void)
100{
101 return 0x10U;
102}
103static inline u32 perf_pmasys_control_membuf_clear_status_f(u32 v)
104{
105 return (v & 0x1U) << 5U;
106}
107static inline u32 perf_pmasys_control_membuf_clear_status_v(u32 r)
108{
109 return (r >> 5U) & 0x1U;
110}
111static inline u32 perf_pmasys_control_membuf_clear_status_doit_v(void)
112{
113 return 0x00000001U;
114}
115static inline u32 perf_pmasys_control_membuf_clear_status_doit_f(void)
116{
117 return 0x20U;
118}
119static inline u32 perf_pmasys_mem_block_r(void)
120{
121 return 0x0024a070U;
122}
123static inline u32 perf_pmasys_mem_block_base_f(u32 v)
124{
125 return (v & 0xfffffffU) << 0U;
126}
127static inline u32 perf_pmasys_mem_block_target_f(u32 v)
128{
129 return (v & 0x3U) << 28U;
130}
131static inline u32 perf_pmasys_mem_block_target_v(u32 r)
132{
133 return (r >> 28U) & 0x3U;
134}
135static inline u32 perf_pmasys_mem_block_target_lfb_v(void)
136{
137 return 0x00000000U;
138}
139static inline u32 perf_pmasys_mem_block_target_lfb_f(void)
140{
141 return 0x0U;
142}
143static inline u32 perf_pmasys_mem_block_target_sys_coh_v(void)
144{
145 return 0x00000002U;
146}
147static inline u32 perf_pmasys_mem_block_target_sys_coh_f(void)
148{
149 return 0x20000000U;
150}
151static inline u32 perf_pmasys_mem_block_target_sys_ncoh_v(void)
152{
153 return 0x00000003U;
154}
155static inline u32 perf_pmasys_mem_block_target_sys_ncoh_f(void)
156{
157 return 0x30000000U;
158}
159static inline u32 perf_pmasys_mem_block_valid_f(u32 v)
160{
161 return (v & 0x1U) << 31U;
162}
163static inline u32 perf_pmasys_mem_block_valid_v(u32 r)
164{
165 return (r >> 31U) & 0x1U;
166}
167static inline u32 perf_pmasys_mem_block_valid_true_v(void)
168{
169 return 0x00000001U;
170}
171static inline u32 perf_pmasys_mem_block_valid_true_f(void)
172{
173 return 0x80000000U;
174}
175static inline u32 perf_pmasys_mem_block_valid_false_v(void)
176{
177 return 0x00000000U;
178}
179static inline u32 perf_pmasys_mem_block_valid_false_f(void)
180{
181 return 0x0U;
182}
183static inline u32 perf_pmasys_outbase_r(void)
184{
185 return 0x0024a074U;
186}
187static inline u32 perf_pmasys_outbase_ptr_f(u32 v)
188{
189 return (v & 0x7ffffffU) << 5U;
190}
191static inline u32 perf_pmasys_outbaseupper_r(void)
192{
193 return 0x0024a078U;
194}
195static inline u32 perf_pmasys_outbaseupper_ptr_f(u32 v)
196{
197 return (v & 0xffU) << 0U;
198}
199static inline u32 perf_pmasys_outsize_r(void)
200{
201 return 0x0024a07cU;
202}
203static inline u32 perf_pmasys_outsize_numbytes_f(u32 v)
204{
205 return (v & 0x7ffffffU) << 5U;
206}
207static inline u32 perf_pmasys_mem_bytes_r(void)
208{
209 return 0x0024a084U;
210}
211static inline u32 perf_pmasys_mem_bytes_numbytes_f(u32 v)
212{
213 return (v & 0xfffffffU) << 4U;
214}
215static inline u32 perf_pmasys_mem_bump_r(void)
216{
217 return 0x0024a088U;
218}
219static inline u32 perf_pmasys_mem_bump_numbytes_f(u32 v)
220{
221 return (v & 0xfffffffU) << 4U;
222}
223static inline u32 perf_pmasys_enginestatus_r(void)
224{
225 return 0x0024a0a4U;
226}
227static inline u32 perf_pmasys_enginestatus_rbufempty_f(u32 v)
228{
229 return (v & 0x1U) << 4U;
230}
231static inline u32 perf_pmasys_enginestatus_rbufempty_empty_v(void)
232{
233 return 0x00000001U;
234}
235static inline u32 perf_pmasys_enginestatus_rbufempty_empty_f(void)
236{
237 return 0x10U;
238}
239static inline u32 perf_pmmsys_engine_sel_r(u32 i)
240{
241 return 0x0024006cU + i*512U;
242}
243static inline u32 perf_pmmsys_engine_sel__size_1_v(void)
244{
245 return 0x00000020U;
246}
247static inline u32 perf_pmmfbp_engine_sel_r(u32 i)
248{
249 return 0x0020006cU + i*512U;
250}
251static inline u32 perf_pmmfbp_engine_sel__size_1_v(void)
252{
253 return 0x00000020U;
254}
255static inline u32 perf_pmmgpc_engine_sel_r(u32 i)
256{
257 return 0x0018006cU + i*512U;
258}
259static inline u32 perf_pmmgpc_engine_sel__size_1_v(void)
260{
261 return 0x00000020U;
262}
263#endif
diff --git a/include/nvgpu/hw/gv11b/hw_pram_gv11b.h b/include/nvgpu/hw/gv11b/hw_pram_gv11b.h
deleted file mode 100644
index 456d631..0000000
--- a/include/nvgpu/hw/gv11b/hw_pram_gv11b.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pram_gv11b_h_
57#define _hw_pram_gv11b_h_
58
59static inline u32 pram_data032_r(u32 i)
60{
61 return 0x00700000U + i*4U;
62}
63#endif
diff --git a/include/nvgpu/hw/gv11b/hw_pri_ringmaster_gv11b.h b/include/nvgpu/hw/gv11b/hw_pri_ringmaster_gv11b.h
deleted file mode 100644
index a653681..0000000
--- a/include/nvgpu/hw/gv11b/hw_pri_ringmaster_gv11b.h
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringmaster_gv11b_h_
57#define _hw_pri_ringmaster_gv11b_h_
58
59static inline u32 pri_ringmaster_command_r(void)
60{
61 return 0x0012004cU;
62}
63static inline u32 pri_ringmaster_command_cmd_m(void)
64{
65 return 0x3fU << 0U;
66}
67static inline u32 pri_ringmaster_command_cmd_v(u32 r)
68{
69 return (r >> 0U) & 0x3fU;
70}
71static inline u32 pri_ringmaster_command_cmd_no_cmd_v(void)
72{
73 return 0x00000000U;
74}
75static inline u32 pri_ringmaster_command_cmd_start_ring_f(void)
76{
77 return 0x1U;
78}
79static inline u32 pri_ringmaster_command_cmd_ack_interrupt_f(void)
80{
81 return 0x2U;
82}
83static inline u32 pri_ringmaster_command_cmd_enumerate_stations_f(void)
84{
85 return 0x3U;
86}
87static inline u32 pri_ringmaster_command_cmd_enumerate_stations_bc_grp_all_f(void)
88{
89 return 0x0U;
90}
91static inline u32 pri_ringmaster_command_data_r(void)
92{
93 return 0x00120048U;
94}
95static inline u32 pri_ringmaster_start_results_r(void)
96{
97 return 0x00120050U;
98}
99static inline u32 pri_ringmaster_start_results_connectivity_v(u32 r)
100{
101 return (r >> 0U) & 0x1U;
102}
103static inline u32 pri_ringmaster_start_results_connectivity_pass_v(void)
104{
105 return 0x00000001U;
106}
107static inline u32 pri_ringmaster_intr_status0_r(void)
108{
109 return 0x00120058U;
110}
111static inline u32 pri_ringmaster_intr_status0_ring_start_conn_fault_v(u32 r)
112{
113 return (r >> 0U) & 0x1U;
114}
115static inline u32 pri_ringmaster_intr_status0_disconnect_fault_v(u32 r)
116{
117 return (r >> 1U) & 0x1U;
118}
119static inline u32 pri_ringmaster_intr_status0_overflow_fault_v(u32 r)
120{
121 return (r >> 2U) & 0x1U;
122}
123static inline u32 pri_ringmaster_intr_status0_gbl_write_error_sys_v(u32 r)
124{
125 return (r >> 8U) & 0x1U;
126}
127static inline u32 pri_ringmaster_intr_status1_r(void)
128{
129 return 0x0012005cU;
130}
131static inline u32 pri_ringmaster_global_ctl_r(void)
132{
133 return 0x00120060U;
134}
135static inline u32 pri_ringmaster_global_ctl_ring_reset_asserted_f(void)
136{
137 return 0x1U;
138}
139static inline u32 pri_ringmaster_global_ctl_ring_reset_deasserted_f(void)
140{
141 return 0x0U;
142}
143static inline u32 pri_ringmaster_enum_fbp_r(void)
144{
145 return 0x00120074U;
146}
147static inline u32 pri_ringmaster_enum_fbp_count_v(u32 r)
148{
149 return (r >> 0U) & 0x1fU;
150}
151static inline u32 pri_ringmaster_enum_gpc_r(void)
152{
153 return 0x00120078U;
154}
155static inline u32 pri_ringmaster_enum_gpc_count_v(u32 r)
156{
157 return (r >> 0U) & 0x1fU;
158}
159static inline u32 pri_ringmaster_enum_ltc_r(void)
160{
161 return 0x0012006cU;
162}
163static inline u32 pri_ringmaster_enum_ltc_count_v(u32 r)
164{
165 return (r >> 0U) & 0x1fU;
166}
167#endif
diff --git a/include/nvgpu/hw/gv11b/hw_pri_ringstation_gpc_gv11b.h b/include/nvgpu/hw/gv11b/hw_pri_ringstation_gpc_gv11b.h
deleted file mode 100644
index 47da22c..0000000
--- a/include/nvgpu/hw/gv11b/hw_pri_ringstation_gpc_gv11b.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_gpc_gv11b_h_
57#define _hw_pri_ringstation_gpc_gv11b_h_
58
59static inline u32 pri_ringstation_gpc_master_config_r(u32 i)
60{
61 return 0x00128300U + i*4U;
62}
63static inline u32 pri_ringstation_gpc_gpc0_priv_error_adr_r(void)
64{
65 return 0x00128120U;
66}
67static inline u32 pri_ringstation_gpc_gpc0_priv_error_wrdat_r(void)
68{
69 return 0x00128124U;
70}
71static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_r(void)
72{
73 return 0x00128128U;
74}
75static inline u32 pri_ringstation_gpc_gpc0_priv_error_code_r(void)
76{
77 return 0x0012812cU;
78}
79#endif
diff --git a/include/nvgpu/hw/gv11b/hw_pri_ringstation_sys_gv11b.h b/include/nvgpu/hw/gv11b/hw_pri_ringstation_sys_gv11b.h
deleted file mode 100644
index 622b6d7..0000000
--- a/include/nvgpu/hw/gv11b/hw_pri_ringstation_sys_gv11b.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pri_ringstation_sys_gv11b_h_
57#define _hw_pri_ringstation_sys_gv11b_h_
58
59static inline u32 pri_ringstation_sys_master_config_r(u32 i)
60{
61 return 0x00122300U + i*4U;
62}
63static inline u32 pri_ringstation_sys_decode_config_r(void)
64{
65 return 0x00122204U;
66}
67static inline u32 pri_ringstation_sys_decode_config_ring_m(void)
68{
69 return 0x7U << 0U;
70}
71static inline u32 pri_ringstation_sys_decode_config_ring_drop_on_ring_not_started_f(void)
72{
73 return 0x1U;
74}
75static inline u32 pri_ringstation_sys_priv_error_adr_r(void)
76{
77 return 0x00122120U;
78}
79static inline u32 pri_ringstation_sys_priv_error_wrdat_r(void)
80{
81 return 0x00122124U;
82}
83static inline u32 pri_ringstation_sys_priv_error_info_r(void)
84{
85 return 0x00122128U;
86}
87static inline u32 pri_ringstation_sys_priv_error_code_r(void)
88{
89 return 0x0012212cU;
90}
91#endif
diff --git a/include/nvgpu/hw/gv11b/hw_proj_gv11b.h b/include/nvgpu/hw/gv11b/hw_proj_gv11b.h
deleted file mode 100644
index 7283237..0000000
--- a/include/nvgpu/hw/gv11b/hw_proj_gv11b.h
+++ /dev/null
@@ -1,191 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_proj_gv11b_h_
57#define _hw_proj_gv11b_h_
58
59static inline u32 proj_gpc_base_v(void)
60{
61 return 0x00500000U;
62}
63static inline u32 proj_gpc_shared_base_v(void)
64{
65 return 0x00418000U;
66}
67static inline u32 proj_gpc_stride_v(void)
68{
69 return 0x00008000U;
70}
71static inline u32 proj_gpc_priv_stride_v(void)
72{
73 return 0x00000800U;
74}
75static inline u32 proj_ltc_stride_v(void)
76{
77 return 0x00002000U;
78}
79static inline u32 proj_lts_stride_v(void)
80{
81 return 0x00000200U;
82}
83static inline u32 proj_fbpa_stride_v(void)
84{
85 return 0x00004000U;
86}
87static inline u32 proj_ppc_in_gpc_base_v(void)
88{
89 return 0x00003000U;
90}
91static inline u32 proj_ppc_in_gpc_shared_base_v(void)
92{
93 return 0x00003e00U;
94}
95static inline u32 proj_ppc_in_gpc_stride_v(void)
96{
97 return 0x00000200U;
98}
99static inline u32 proj_rop_base_v(void)
100{
101 return 0x00410000U;
102}
103static inline u32 proj_rop_shared_base_v(void)
104{
105 return 0x00408800U;
106}
107static inline u32 proj_rop_stride_v(void)
108{
109 return 0x00000400U;
110}
111static inline u32 proj_tpc_in_gpc_base_v(void)
112{
113 return 0x00004000U;
114}
115static inline u32 proj_tpc_in_gpc_stride_v(void)
116{
117 return 0x00000800U;
118}
119static inline u32 proj_tpc_in_gpc_shared_base_v(void)
120{
121 return 0x00001800U;
122}
123static inline u32 proj_smpc_base_v(void)
124{
125 return 0x00000200U;
126}
127static inline u32 proj_smpc_shared_base_v(void)
128{
129 return 0x00000300U;
130}
131static inline u32 proj_smpc_unique_base_v(void)
132{
133 return 0x00000600U;
134}
135static inline u32 proj_smpc_stride_v(void)
136{
137 return 0x00000100U;
138}
139static inline u32 proj_host_num_engines_v(void)
140{
141 return 0x00000004U;
142}
143static inline u32 proj_host_num_pbdma_v(void)
144{
145 return 0x00000003U;
146}
147static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void)
148{
149 return 0x00000004U;
150}
151static inline u32 proj_scal_litter_num_fbps_v(void)
152{
153 return 0x00000001U;
154}
155static inline u32 proj_scal_litter_num_fbpas_v(void)
156{
157 return 0x00000001U;
158}
159static inline u32 proj_scal_litter_num_gpcs_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 proj_scal_litter_num_pes_per_gpc_v(void)
164{
165 return 0x00000002U;
166}
167static inline u32 proj_scal_litter_num_tpcs_per_pes_v(void)
168{
169 return 0x00000002U;
170}
171static inline u32 proj_scal_litter_num_zcull_banks_v(void)
172{
173 return 0x00000004U;
174}
175static inline u32 proj_scal_litter_num_sm_per_tpc_v(void)
176{
177 return 0x00000002U;
178}
179static inline u32 proj_scal_max_gpcs_v(void)
180{
181 return 0x00000020U;
182}
183static inline u32 proj_scal_max_tpc_per_gpc_v(void)
184{
185 return 0x00000008U;
186}
187static inline u32 proj_sm_stride_v(void)
188{
189 return 0x00000080U;
190}
191#endif
diff --git a/include/nvgpu/hw/gv11b/hw_pwr_gv11b.h b/include/nvgpu/hw/gv11b/hw_pwr_gv11b.h
deleted file mode 100644
index 1cda12d..0000000
--- a/include/nvgpu/hw/gv11b/hw_pwr_gv11b.h
+++ /dev/null
@@ -1,1219 +0,0 @@
1/*
2 * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_pwr_gv11b_h_
57#define _hw_pwr_gv11b_h_
58
59static inline u32 pwr_falcon_irqsset_r(void)
60{
61 return 0x0010a000U;
62}
63static inline u32 pwr_falcon_irqsset_swgen0_set_f(void)
64{
65 return 0x40U;
66}
67static inline u32 pwr_falcon_irqsclr_r(void)
68{
69 return 0x0010a004U;
70}
71static inline u32 pwr_falcon_irqstat_r(void)
72{
73 return 0x0010a008U;
74}
75static inline u32 pwr_falcon_irqstat_halt_true_f(void)
76{
77 return 0x10U;
78}
79static inline u32 pwr_falcon_irqstat_exterr_true_f(void)
80{
81 return 0x20U;
82}
83static inline u32 pwr_falcon_irqstat_swgen0_true_f(void)
84{
85 return 0x40U;
86}
87static inline u32 pwr_falcon_irqstat_ext_second_true_f(void)
88{
89 return 0x800U;
90}
91static inline u32 pwr_falcon_irqstat_ext_ecc_parity_true_f(void)
92{
93 return 0x400U;
94}
95static inline u32 pwr_pmu_ecc_intr_status_r(void)
96{
97 return 0x0010abfcU;
98}
99static inline u32 pwr_pmu_ecc_intr_status_corrected_f(u32 v)
100{
101 return (v & 0x1U) << 0U;
102}
103static inline u32 pwr_pmu_ecc_intr_status_corrected_m(void)
104{
105 return 0x1U << 0U;
106}
107static inline u32 pwr_pmu_ecc_intr_status_uncorrected_f(u32 v)
108{
109 return (v & 0x1U) << 1U;
110}
111static inline u32 pwr_pmu_ecc_intr_status_uncorrected_m(void)
112{
113 return 0x1U << 1U;
114}
115static inline u32 pwr_falcon_irqmode_r(void)
116{
117 return 0x0010a00cU;
118}
119static inline u32 pwr_falcon_irqmset_r(void)
120{
121 return 0x0010a010U;
122}
123static inline u32 pwr_falcon_irqmset_gptmr_f(u32 v)
124{
125 return (v & 0x1U) << 0U;
126}
127static inline u32 pwr_falcon_irqmset_wdtmr_f(u32 v)
128{
129 return (v & 0x1U) << 1U;
130}
131static inline u32 pwr_falcon_irqmset_mthd_f(u32 v)
132{
133 return (v & 0x1U) << 2U;
134}
135static inline u32 pwr_falcon_irqmset_ctxsw_f(u32 v)
136{
137 return (v & 0x1U) << 3U;
138}
139static inline u32 pwr_falcon_irqmset_halt_f(u32 v)
140{
141 return (v & 0x1U) << 4U;
142}
143static inline u32 pwr_falcon_irqmset_exterr_f(u32 v)
144{
145 return (v & 0x1U) << 5U;
146}
147static inline u32 pwr_falcon_irqmset_swgen0_f(u32 v)
148{
149 return (v & 0x1U) << 6U;
150}
151static inline u32 pwr_falcon_irqmset_swgen1_f(u32 v)
152{
153 return (v & 0x1U) << 7U;
154}
155static inline u32 pwr_falcon_irqmset_ext_f(u32 v)
156{
157 return (v & 0xffU) << 8U;
158}
159static inline u32 pwr_falcon_irqmset_ext_ctxe_f(u32 v)
160{
161 return (v & 0x1U) << 8U;
162}
163static inline u32 pwr_falcon_irqmset_ext_limitv_f(u32 v)
164{
165 return (v & 0x1U) << 9U;
166}
167static inline u32 pwr_falcon_irqmset_ext_second_f(u32 v)
168{
169 return (v & 0x1U) << 11U;
170}
171static inline u32 pwr_falcon_irqmset_ext_therm_f(u32 v)
172{
173 return (v & 0x1U) << 12U;
174}
175static inline u32 pwr_falcon_irqmset_ext_miscio_f(u32 v)
176{
177 return (v & 0x1U) << 13U;
178}
179static inline u32 pwr_falcon_irqmset_ext_rttimer_f(u32 v)
180{
181 return (v & 0x1U) << 14U;
182}
183static inline u32 pwr_falcon_irqmset_ext_rsvd8_f(u32 v)
184{
185 return (v & 0x1U) << 15U;
186}
187static inline u32 pwr_falcon_irqmset_ext_ecc_parity_f(u32 v)
188{
189 return (v & 0x1U) << 10U;
190}
191static inline u32 pwr_falcon_irqmclr_r(void)
192{
193 return 0x0010a014U;
194}
195static inline u32 pwr_falcon_irqmclr_gptmr_f(u32 v)
196{
197 return (v & 0x1U) << 0U;
198}
199static inline u32 pwr_falcon_irqmclr_wdtmr_f(u32 v)
200{
201 return (v & 0x1U) << 1U;
202}
203static inline u32 pwr_falcon_irqmclr_mthd_f(u32 v)
204{
205 return (v & 0x1U) << 2U;
206}
207static inline u32 pwr_falcon_irqmclr_ctxsw_f(u32 v)
208{
209 return (v & 0x1U) << 3U;
210}
211static inline u32 pwr_falcon_irqmclr_halt_f(u32 v)
212{
213 return (v & 0x1U) << 4U;
214}
215static inline u32 pwr_falcon_irqmclr_exterr_f(u32 v)
216{
217 return (v & 0x1U) << 5U;
218}
219static inline u32 pwr_falcon_irqmclr_swgen0_f(u32 v)
220{
221 return (v & 0x1U) << 6U;
222}
223static inline u32 pwr_falcon_irqmclr_swgen1_f(u32 v)
224{
225 return (v & 0x1U) << 7U;
226}
227static inline u32 pwr_falcon_irqmclr_ext_f(u32 v)
228{
229 return (v & 0xffU) << 8U;
230}
231static inline u32 pwr_falcon_irqmclr_ext_ctxe_f(u32 v)
232{
233 return (v & 0x1U) << 8U;
234}
235static inline u32 pwr_falcon_irqmclr_ext_limitv_f(u32 v)
236{
237 return (v & 0x1U) << 9U;
238}
239static inline u32 pwr_falcon_irqmclr_ext_second_f(u32 v)
240{
241 return (v & 0x1U) << 11U;
242}
243static inline u32 pwr_falcon_irqmclr_ext_therm_f(u32 v)
244{
245 return (v & 0x1U) << 12U;
246}
247static inline u32 pwr_falcon_irqmclr_ext_miscio_f(u32 v)
248{
249 return (v & 0x1U) << 13U;
250}
251static inline u32 pwr_falcon_irqmclr_ext_rttimer_f(u32 v)
252{
253 return (v & 0x1U) << 14U;
254}
255static inline u32 pwr_falcon_irqmclr_ext_rsvd8_f(u32 v)
256{
257 return (v & 0x1U) << 15U;
258}
259static inline u32 pwr_falcon_irqmclr_ext_ecc_parity_f(u32 v)
260{
261 return (v & 0x1U) << 10U;
262}
263static inline u32 pwr_falcon_irqmask_r(void)
264{
265 return 0x0010a018U;
266}
267static inline u32 pwr_falcon_irqdest_r(void)
268{
269 return 0x0010a01cU;
270}
271static inline u32 pwr_falcon_irqdest_host_gptmr_f(u32 v)
272{
273 return (v & 0x1U) << 0U;
274}
275static inline u32 pwr_falcon_irqdest_host_wdtmr_f(u32 v)
276{
277 return (v & 0x1U) << 1U;
278}
279static inline u32 pwr_falcon_irqdest_host_mthd_f(u32 v)
280{
281 return (v & 0x1U) << 2U;
282}
283static inline u32 pwr_falcon_irqdest_host_ctxsw_f(u32 v)
284{
285 return (v & 0x1U) << 3U;
286}
287static inline u32 pwr_falcon_irqdest_host_halt_f(u32 v)
288{
289 return (v & 0x1U) << 4U;
290}
291static inline u32 pwr_falcon_irqdest_host_exterr_f(u32 v)
292{
293 return (v & 0x1U) << 5U;
294}
295static inline u32 pwr_falcon_irqdest_host_swgen0_f(u32 v)
296{
297 return (v & 0x1U) << 6U;
298}
299static inline u32 pwr_falcon_irqdest_host_swgen1_f(u32 v)
300{
301 return (v & 0x1U) << 7U;
302}
303static inline u32 pwr_falcon_irqdest_host_ext_f(u32 v)
304{
305 return (v & 0xffU) << 8U;
306}
307static inline u32 pwr_falcon_irqdest_host_ext_ctxe_f(u32 v)
308{
309 return (v & 0x1U) << 8U;
310}
311static inline u32 pwr_falcon_irqdest_host_ext_limitv_f(u32 v)
312{
313 return (v & 0x1U) << 9U;
314}
315static inline u32 pwr_falcon_irqdest_host_ext_second_f(u32 v)
316{
317 return (v & 0x1U) << 11U;
318}
319static inline u32 pwr_falcon_irqdest_host_ext_therm_f(u32 v)
320{
321 return (v & 0x1U) << 12U;
322}
323static inline u32 pwr_falcon_irqdest_host_ext_miscio_f(u32 v)
324{
325 return (v & 0x1U) << 13U;
326}
327static inline u32 pwr_falcon_irqdest_host_ext_rttimer_f(u32 v)
328{
329 return (v & 0x1U) << 14U;
330}
331static inline u32 pwr_falcon_irqdest_host_ext_rsvd8_f(u32 v)
332{
333 return (v & 0x1U) << 15U;
334}
335static inline u32 pwr_falcon_irqdest_host_ext_ecc_parity_f(u32 v)
336{
337 return (v & 0x1U) << 10U;
338}
339static inline u32 pwr_falcon_irqdest_target_gptmr_f(u32 v)
340{
341 return (v & 0x1U) << 16U;
342}
343static inline u32 pwr_falcon_irqdest_target_wdtmr_f(u32 v)
344{
345 return (v & 0x1U) << 17U;
346}
347static inline u32 pwr_falcon_irqdest_target_mthd_f(u32 v)
348{
349 return (v & 0x1U) << 18U;
350}
351static inline u32 pwr_falcon_irqdest_target_ctxsw_f(u32 v)
352{
353 return (v & 0x1U) << 19U;
354}
355static inline u32 pwr_falcon_irqdest_target_halt_f(u32 v)
356{
357 return (v & 0x1U) << 20U;
358}
359static inline u32 pwr_falcon_irqdest_target_exterr_f(u32 v)
360{
361 return (v & 0x1U) << 21U;
362}
363static inline u32 pwr_falcon_irqdest_target_swgen0_f(u32 v)
364{
365 return (v & 0x1U) << 22U;
366}
367static inline u32 pwr_falcon_irqdest_target_swgen1_f(u32 v)
368{
369 return (v & 0x1U) << 23U;
370}
371static inline u32 pwr_falcon_irqdest_target_ext_f(u32 v)
372{
373 return (v & 0xffU) << 24U;
374}
375static inline u32 pwr_falcon_irqdest_target_ext_ctxe_f(u32 v)
376{
377 return (v & 0x1U) << 24U;
378}
379static inline u32 pwr_falcon_irqdest_target_ext_limitv_f(u32 v)
380{
381 return (v & 0x1U) << 25U;
382}
383static inline u32 pwr_falcon_irqdest_target_ext_second_f(u32 v)
384{
385 return (v & 0x1U) << 27U;
386}
387static inline u32 pwr_falcon_irqdest_target_ext_therm_f(u32 v)
388{
389 return (v & 0x1U) << 28U;
390}
391static inline u32 pwr_falcon_irqdest_target_ext_miscio_f(u32 v)
392{
393 return (v & 0x1U) << 29U;
394}
395static inline u32 pwr_falcon_irqdest_target_ext_rttimer_f(u32 v)
396{
397 return (v & 0x1U) << 30U;
398}
399static inline u32 pwr_falcon_irqdest_target_ext_rsvd8_f(u32 v)
400{
401 return (v & 0x1U) << 31U;
402}
403static inline u32 pwr_falcon_irqdest_target_ext_ecc_parity_f(u32 v)
404{
405 return (v & 0x1U) << 26U;
406}
407static inline u32 pwr_falcon_curctx_r(void)
408{
409 return 0x0010a050U;
410}
411static inline u32 pwr_falcon_nxtctx_r(void)
412{
413 return 0x0010a054U;
414}
415static inline u32 pwr_falcon_mailbox0_r(void)
416{
417 return 0x0010a040U;
418}
419static inline u32 pwr_falcon_mailbox1_r(void)
420{
421 return 0x0010a044U;
422}
423static inline u32 pwr_falcon_itfen_r(void)
424{
425 return 0x0010a048U;
426}
427static inline u32 pwr_falcon_itfen_ctxen_enable_f(void)
428{
429 return 0x1U;
430}
431static inline u32 pwr_falcon_idlestate_r(void)
432{
433 return 0x0010a04cU;
434}
435static inline u32 pwr_falcon_idlestate_falcon_busy_v(u32 r)
436{
437 return (r >> 0U) & 0x1U;
438}
439static inline u32 pwr_falcon_idlestate_ext_busy_v(u32 r)
440{
441 return (r >> 1U) & 0x7fffU;
442}
443static inline u32 pwr_falcon_os_r(void)
444{
445 return 0x0010a080U;
446}
447static inline u32 pwr_falcon_engctl_r(void)
448{
449 return 0x0010a0a4U;
450}
451static inline u32 pwr_falcon_cpuctl_r(void)
452{
453 return 0x0010a100U;
454}
455static inline u32 pwr_falcon_cpuctl_startcpu_f(u32 v)
456{
457 return (v & 0x1U) << 1U;
458}
459static inline u32 pwr_falcon_cpuctl_halt_intr_f(u32 v)
460{
461 return (v & 0x1U) << 4U;
462}
463static inline u32 pwr_falcon_cpuctl_halt_intr_m(void)
464{
465 return 0x1U << 4U;
466}
467static inline u32 pwr_falcon_cpuctl_halt_intr_v(u32 r)
468{
469 return (r >> 4U) & 0x1U;
470}
471static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_f(u32 v)
472{
473 return (v & 0x1U) << 6U;
474}
475static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_m(void)
476{
477 return 0x1U << 6U;
478}
479static inline u32 pwr_falcon_cpuctl_cpuctl_alias_en_v(u32 r)
480{
481 return (r >> 6U) & 0x1U;
482}
483static inline u32 pwr_falcon_cpuctl_alias_r(void)
484{
485 return 0x0010a130U;
486}
487static inline u32 pwr_falcon_cpuctl_alias_startcpu_f(u32 v)
488{
489 return (v & 0x1U) << 1U;
490}
491static inline u32 pwr_pmu_scpctl_stat_r(void)
492{
493 return 0x0010ac08U;
494}
495static inline u32 pwr_pmu_scpctl_stat_debug_mode_f(u32 v)
496{
497 return (v & 0x1U) << 20U;
498}
499static inline u32 pwr_pmu_scpctl_stat_debug_mode_m(void)
500{
501 return 0x1U << 20U;
502}
503static inline u32 pwr_pmu_scpctl_stat_debug_mode_v(u32 r)
504{
505 return (r >> 20U) & 0x1U;
506}
507static inline u32 pwr_falcon_imemc_r(u32 i)
508{
509 return 0x0010a180U + i*16U;
510}
511static inline u32 pwr_falcon_imemc_offs_f(u32 v)
512{
513 return (v & 0x3fU) << 2U;
514}
515static inline u32 pwr_falcon_imemc_blk_f(u32 v)
516{
517 return (v & 0xffU) << 8U;
518}
519static inline u32 pwr_falcon_imemc_aincw_f(u32 v)
520{
521 return (v & 0x1U) << 24U;
522}
523static inline u32 pwr_falcon_imemd_r(u32 i)
524{
525 return 0x0010a184U + i*16U;
526}
527static inline u32 pwr_falcon_imemt_r(u32 i)
528{
529 return 0x0010a188U + i*16U;
530}
531static inline u32 pwr_falcon_sctl_r(void)
532{
533 return 0x0010a240U;
534}
535static inline u32 pwr_falcon_mmu_phys_sec_r(void)
536{
537 return 0x00100ce4U;
538}
539static inline u32 pwr_falcon_bootvec_r(void)
540{
541 return 0x0010a104U;
542}
543static inline u32 pwr_falcon_bootvec_vec_f(u32 v)
544{
545 return (v & 0xffffffffU) << 0U;
546}
547static inline u32 pwr_falcon_dmactl_r(void)
548{
549 return 0x0010a10cU;
550}
551static inline u32 pwr_falcon_dmactl_dmem_scrubbing_m(void)
552{
553 return 0x1U << 1U;
554}
555static inline u32 pwr_falcon_dmactl_imem_scrubbing_m(void)
556{
557 return 0x1U << 2U;
558}
559static inline u32 pwr_falcon_hwcfg_r(void)
560{
561 return 0x0010a108U;
562}
563static inline u32 pwr_falcon_hwcfg_imem_size_v(u32 r)
564{
565 return (r >> 0U) & 0x1ffU;
566}
567static inline u32 pwr_falcon_hwcfg_dmem_size_v(u32 r)
568{
569 return (r >> 9U) & 0x1ffU;
570}
571static inline u32 pwr_falcon_dmatrfbase_r(void)
572{
573 return 0x0010a110U;
574}
575static inline u32 pwr_falcon_dmatrfbase1_r(void)
576{
577 return 0x0010a128U;
578}
579static inline u32 pwr_falcon_dmatrfmoffs_r(void)
580{
581 return 0x0010a114U;
582}
583static inline u32 pwr_falcon_dmatrfcmd_r(void)
584{
585 return 0x0010a118U;
586}
587static inline u32 pwr_falcon_dmatrfcmd_imem_f(u32 v)
588{
589 return (v & 0x1U) << 4U;
590}
591static inline u32 pwr_falcon_dmatrfcmd_write_f(u32 v)
592{
593 return (v & 0x1U) << 5U;
594}
595static inline u32 pwr_falcon_dmatrfcmd_size_f(u32 v)
596{
597 return (v & 0x7U) << 8U;
598}
599static inline u32 pwr_falcon_dmatrfcmd_ctxdma_f(u32 v)
600{
601 return (v & 0x7U) << 12U;
602}
603static inline u32 pwr_falcon_dmatrffboffs_r(void)
604{
605 return 0x0010a11cU;
606}
607static inline u32 pwr_falcon_exterraddr_r(void)
608{
609 return 0x0010a168U;
610}
611static inline u32 pwr_falcon_exterrstat_r(void)
612{
613 return 0x0010a16cU;
614}
615static inline u32 pwr_falcon_exterrstat_valid_m(void)
616{
617 return 0x1U << 31U;
618}
619static inline u32 pwr_falcon_exterrstat_valid_v(u32 r)
620{
621 return (r >> 31U) & 0x1U;
622}
623static inline u32 pwr_falcon_exterrstat_valid_true_v(void)
624{
625 return 0x00000001U;
626}
627static inline u32 pwr_pmu_falcon_icd_cmd_r(void)
628{
629 return 0x0010a200U;
630}
631static inline u32 pwr_pmu_falcon_icd_cmd_opc_s(void)
632{
633 return 4U;
634}
635static inline u32 pwr_pmu_falcon_icd_cmd_opc_f(u32 v)
636{
637 return (v & 0xfU) << 0U;
638}
639static inline u32 pwr_pmu_falcon_icd_cmd_opc_m(void)
640{
641 return 0xfU << 0U;
642}
643static inline u32 pwr_pmu_falcon_icd_cmd_opc_v(u32 r)
644{
645 return (r >> 0U) & 0xfU;
646}
647static inline u32 pwr_pmu_falcon_icd_cmd_opc_rreg_f(void)
648{
649 return 0x8U;
650}
651static inline u32 pwr_pmu_falcon_icd_cmd_opc_rstat_f(void)
652{
653 return 0xeU;
654}
655static inline u32 pwr_pmu_falcon_icd_cmd_idx_f(u32 v)
656{
657 return (v & 0x1fU) << 8U;
658}
659static inline u32 pwr_pmu_falcon_icd_rdata_r(void)
660{
661 return 0x0010a20cU;
662}
663static inline u32 pwr_falcon_dmemc_r(u32 i)
664{
665 return 0x0010a1c0U + i*8U;
666}
667static inline u32 pwr_falcon_dmemc_offs_f(u32 v)
668{
669 return (v & 0x3fU) << 2U;
670}
671static inline u32 pwr_falcon_dmemc_offs_m(void)
672{
673 return 0x3fU << 2U;
674}
675static inline u32 pwr_falcon_dmemc_blk_f(u32 v)
676{
677 return (v & 0xffU) << 8U;
678}
679static inline u32 pwr_falcon_dmemc_blk_m(void)
680{
681 return 0xffU << 8U;
682}
683static inline u32 pwr_falcon_dmemc_aincw_f(u32 v)
684{
685 return (v & 0x1U) << 24U;
686}
687static inline u32 pwr_falcon_dmemc_aincr_f(u32 v)
688{
689 return (v & 0x1U) << 25U;
690}
691static inline u32 pwr_falcon_dmemd_r(u32 i)
692{
693 return 0x0010a1c4U + i*8U;
694}
695static inline u32 pwr_pmu_new_instblk_r(void)
696{
697 return 0x0010a480U;
698}
699static inline u32 pwr_pmu_new_instblk_ptr_f(u32 v)
700{
701 return (v & 0xfffffffU) << 0U;
702}
703static inline u32 pwr_pmu_new_instblk_target_fb_f(void)
704{
705 return 0x0U;
706}
707static inline u32 pwr_pmu_new_instblk_target_sys_coh_f(void)
708{
709 return 0x20000000U;
710}
711static inline u32 pwr_pmu_new_instblk_target_sys_ncoh_f(void)
712{
713 return 0x30000000U;
714}
715static inline u32 pwr_pmu_new_instblk_valid_f(u32 v)
716{
717 return (v & 0x1U) << 30U;
718}
719static inline u32 pwr_pmu_mutex_id_r(void)
720{
721 return 0x0010a488U;
722}
723static inline u32 pwr_pmu_mutex_id_value_v(u32 r)
724{
725 return (r >> 0U) & 0xffU;
726}
727static inline u32 pwr_pmu_mutex_id_value_init_v(void)
728{
729 return 0x00000000U;
730}
731static inline u32 pwr_pmu_mutex_id_value_not_avail_v(void)
732{
733 return 0x000000ffU;
734}
735static inline u32 pwr_pmu_mutex_id_release_r(void)
736{
737 return 0x0010a48cU;
738}
739static inline u32 pwr_pmu_mutex_id_release_value_f(u32 v)
740{
741 return (v & 0xffU) << 0U;
742}
743static inline u32 pwr_pmu_mutex_id_release_value_m(void)
744{
745 return 0xffU << 0U;
746}
747static inline u32 pwr_pmu_mutex_id_release_value_init_v(void)
748{
749 return 0x00000000U;
750}
751static inline u32 pwr_pmu_mutex_id_release_value_init_f(void)
752{
753 return 0x0U;
754}
755static inline u32 pwr_pmu_mutex_r(u32 i)
756{
757 return 0x0010a580U + i*4U;
758}
759static inline u32 pwr_pmu_mutex__size_1_v(void)
760{
761 return 0x00000010U;
762}
763static inline u32 pwr_pmu_mutex_value_f(u32 v)
764{
765 return (v & 0xffU) << 0U;
766}
767static inline u32 pwr_pmu_mutex_value_v(u32 r)
768{
769 return (r >> 0U) & 0xffU;
770}
771static inline u32 pwr_pmu_mutex_value_initial_lock_f(void)
772{
773 return 0x0U;
774}
775static inline u32 pwr_pmu_queue_head_r(u32 i)
776{
777 return 0x0010a800U + i*4U;
778}
779static inline u32 pwr_pmu_queue_head__size_1_v(void)
780{
781 return 0x00000008U;
782}
783static inline u32 pwr_pmu_queue_head_address_f(u32 v)
784{
785 return (v & 0xffffffffU) << 0U;
786}
787static inline u32 pwr_pmu_queue_head_address_v(u32 r)
788{
789 return (r >> 0U) & 0xffffffffU;
790}
791static inline u32 pwr_pmu_queue_tail_r(u32 i)
792{
793 return 0x0010a820U + i*4U;
794}
795static inline u32 pwr_pmu_queue_tail__size_1_v(void)
796{
797 return 0x00000008U;
798}
799static inline u32 pwr_pmu_queue_tail_address_f(u32 v)
800{
801 return (v & 0xffffffffU) << 0U;
802}
803static inline u32 pwr_pmu_queue_tail_address_v(u32 r)
804{
805 return (r >> 0U) & 0xffffffffU;
806}
807static inline u32 pwr_pmu_msgq_head_r(void)
808{
809 return 0x0010a4c8U;
810}
811static inline u32 pwr_pmu_msgq_head_val_f(u32 v)
812{
813 return (v & 0xffffffffU) << 0U;
814}
815static inline u32 pwr_pmu_msgq_head_val_v(u32 r)
816{
817 return (r >> 0U) & 0xffffffffU;
818}
819static inline u32 pwr_pmu_msgq_tail_r(void)
820{
821 return 0x0010a4ccU;
822}
823static inline u32 pwr_pmu_msgq_tail_val_f(u32 v)
824{
825 return (v & 0xffffffffU) << 0U;
826}
827static inline u32 pwr_pmu_msgq_tail_val_v(u32 r)
828{
829 return (r >> 0U) & 0xffffffffU;
830}
831static inline u32 pwr_pmu_idle_mask_r(u32 i)
832{
833 return 0x0010a504U + i*16U;
834}
835static inline u32 pwr_pmu_idle_mask_gr_enabled_f(void)
836{
837 return 0x1U;
838}
839static inline u32 pwr_pmu_idle_mask_ce_2_enabled_f(void)
840{
841 return 0x200000U;
842}
843static inline u32 pwr_pmu_idle_mask_1_r(u32 i)
844{
845 return 0x0010aa34U + i*8U;
846}
847static inline u32 pwr_pmu_idle_mask_2_r(u32 i)
848{
849 return 0x0010a840U + i*4U;
850}
851static inline u32 pwr_pmu_idle_count_r(u32 i)
852{
853 return 0x0010a508U + i*16U;
854}
855static inline u32 pwr_pmu_idle_count_value_f(u32 v)
856{
857 return (v & 0x7fffffffU) << 0U;
858}
859static inline u32 pwr_pmu_idle_count_value_v(u32 r)
860{
861 return (r >> 0U) & 0x7fffffffU;
862}
863static inline u32 pwr_pmu_idle_count_reset_f(u32 v)
864{
865 return (v & 0x1U) << 31U;
866}
867static inline u32 pwr_pmu_idle_ctrl_r(u32 i)
868{
869 return 0x0010a50cU + i*16U;
870}
871static inline u32 pwr_pmu_idle_ctrl_value_m(void)
872{
873 return 0x3U << 0U;
874}
875static inline u32 pwr_pmu_idle_ctrl_value_busy_f(void)
876{
877 return 0x2U;
878}
879static inline u32 pwr_pmu_idle_ctrl_value_always_f(void)
880{
881 return 0x3U;
882}
883static inline u32 pwr_pmu_idle_ctrl_filter_m(void)
884{
885 return 0x1U << 2U;
886}
887static inline u32 pwr_pmu_idle_ctrl_filter_disabled_f(void)
888{
889 return 0x0U;
890}
891static inline u32 pwr_pmu_idle_threshold_r(u32 i)
892{
893 return 0x0010a8a0U + i*4U;
894}
895static inline u32 pwr_pmu_idle_threshold_value_f(u32 v)
896{
897 return (v & 0x7fffffffU) << 0U;
898}
899static inline u32 pwr_pmu_idle_intr_r(void)
900{
901 return 0x0010a9e8U;
902}
903static inline u32 pwr_pmu_idle_intr_en_f(u32 v)
904{
905 return (v & 0x1U) << 0U;
906}
907static inline u32 pwr_pmu_idle_intr_en_disabled_v(void)
908{
909 return 0x00000000U;
910}
911static inline u32 pwr_pmu_idle_intr_en_enabled_v(void)
912{
913 return 0x00000001U;
914}
915static inline u32 pwr_pmu_idle_intr_status_r(void)
916{
917 return 0x0010a9ecU;
918}
919static inline u32 pwr_pmu_idle_intr_status_intr_f(u32 v)
920{
921 return (v & 0x1U) << 0U;
922}
923static inline u32 pwr_pmu_idle_intr_status_intr_m(void)
924{
925 return 0x1U << 0U;
926}
927static inline u32 pwr_pmu_idle_intr_status_intr_v(u32 r)
928{
929 return (r >> 0U) & 0x1U;
930}
931static inline u32 pwr_pmu_idle_intr_status_intr_pending_v(void)
932{
933 return 0x00000001U;
934}
935static inline u32 pwr_pmu_idle_intr_status_intr_clear_v(void)
936{
937 return 0x00000001U;
938}
939static inline u32 pwr_pmu_idle_mask_supp_r(u32 i)
940{
941 return 0x0010a9f0U + i*8U;
942}
943static inline u32 pwr_pmu_idle_mask_1_supp_r(u32 i)
944{
945 return 0x0010a9f4U + i*8U;
946}
947static inline u32 pwr_pmu_idle_mask_2_supp_r(u32 i)
948{
949 return 0x0010a690U + i*4U;
950}
951static inline u32 pwr_pmu_idle_ctrl_supp_r(u32 i)
952{
953 return 0x0010aa30U + i*8U;
954}
955static inline u32 pwr_pmu_debug_r(u32 i)
956{
957 return 0x0010a5c0U + i*4U;
958}
959static inline u32 pwr_pmu_debug__size_1_v(void)
960{
961 return 0x00000004U;
962}
963static inline u32 pwr_pmu_mailbox_r(u32 i)
964{
965 return 0x0010a450U + i*4U;
966}
967static inline u32 pwr_pmu_mailbox__size_1_v(void)
968{
969 return 0x0000000cU;
970}
971static inline u32 pwr_pmu_bar0_addr_r(void)
972{
973 return 0x0010a7a0U;
974}
975static inline u32 pwr_pmu_bar0_data_r(void)
976{
977 return 0x0010a7a4U;
978}
979static inline u32 pwr_pmu_bar0_ctl_r(void)
980{
981 return 0x0010a7acU;
982}
983static inline u32 pwr_pmu_bar0_timeout_r(void)
984{
985 return 0x0010a7a8U;
986}
987static inline u32 pwr_pmu_bar0_fecs_error_r(void)
988{
989 return 0x0010a988U;
990}
991static inline u32 pwr_pmu_bar0_error_status_r(void)
992{
993 return 0x0010a7b0U;
994}
995static inline u32 pwr_pmu_pg_idlefilth_r(u32 i)
996{
997 return 0x0010a6c0U + i*4U;
998}
999static inline u32 pwr_pmu_pg_ppuidlefilth_r(u32 i)
1000{
1001 return 0x0010a6e8U + i*4U;
1002}
1003static inline u32 pwr_pmu_pg_idle_cnt_r(u32 i)
1004{
1005 return 0x0010a710U + i*4U;
1006}
1007static inline u32 pwr_pmu_pg_intren_r(u32 i)
1008{
1009 return 0x0010a760U + i*4U;
1010}
1011static inline u32 pwr_pmu_falcon_ecc_status_r(void)
1012{
1013 return 0x0010a6b0U;
1014}
1015static inline u32 pwr_pmu_falcon_ecc_status_corrected_err_imem_f(u32 v)
1016{
1017 return (v & 0x1U) << 0U;
1018}
1019static inline u32 pwr_pmu_falcon_ecc_status_corrected_err_imem_m(void)
1020{
1021 return 0x1U << 0U;
1022}
1023static inline u32 pwr_pmu_falcon_ecc_status_corrected_err_dmem_f(u32 v)
1024{
1025 return (v & 0x1U) << 1U;
1026}
1027static inline u32 pwr_pmu_falcon_ecc_status_corrected_err_dmem_m(void)
1028{
1029 return 0x1U << 1U;
1030}
1031static inline u32 pwr_pmu_falcon_ecc_status_uncorrected_err_imem_f(u32 v)
1032{
1033 return (v & 0x1U) << 8U;
1034}
1035static inline u32 pwr_pmu_falcon_ecc_status_uncorrected_err_imem_m(void)
1036{
1037 return 0x1U << 8U;
1038}
1039static inline u32 pwr_pmu_falcon_ecc_status_uncorrected_err_dmem_f(u32 v)
1040{
1041 return (v & 0x1U) << 9U;
1042}
1043static inline u32 pwr_pmu_falcon_ecc_status_uncorrected_err_dmem_m(void)
1044{
1045 return 0x1U << 9U;
1046}
1047static inline u32 pwr_pmu_falcon_ecc_status_corrected_err_total_counter_overflow_f(u32 v)
1048{
1049 return (v & 0x1U) << 16U;
1050}
1051static inline u32 pwr_pmu_falcon_ecc_status_corrected_err_total_counter_overflow_m(void)
1052{
1053 return 0x1U << 16U;
1054}
1055static inline u32 pwr_pmu_falcon_ecc_status_uncorrected_err_total_counter_overflow_f(u32 v)
1056{
1057 return (v & 0x1U) << 18U;
1058}
1059static inline u32 pwr_pmu_falcon_ecc_status_uncorrected_err_total_counter_overflow_m(void)
1060{
1061 return 0x1U << 18U;
1062}
1063static inline u32 pwr_pmu_falcon_ecc_status_reset_f(u32 v)
1064{
1065 return (v & 0x1U) << 31U;
1066}
1067static inline u32 pwr_pmu_falcon_ecc_status_reset_task_f(void)
1068{
1069 return 0x80000000U;
1070}
1071static inline u32 pwr_pmu_falcon_ecc_address_r(void)
1072{
1073 return 0x0010a6b4U;
1074}
1075static inline u32 pwr_pmu_falcon_ecc_address_index_f(u32 v)
1076{
1077 return (v & 0xffffffU) << 0U;
1078}
1079static inline u32 pwr_pmu_falcon_ecc_address_type_f(u32 v)
1080{
1081 return (v & 0xfU) << 20U;
1082}
1083static inline u32 pwr_pmu_falcon_ecc_address_type_imem_f(void)
1084{
1085 return 0x0U;
1086}
1087static inline u32 pwr_pmu_falcon_ecc_address_type_dmem_f(void)
1088{
1089 return 0x100000U;
1090}
1091static inline u32 pwr_pmu_falcon_ecc_address_row_address_s(void)
1092{
1093 return 16U;
1094}
1095static inline u32 pwr_pmu_falcon_ecc_address_row_address_f(u32 v)
1096{
1097 return (v & 0xffffU) << 0U;
1098}
1099static inline u32 pwr_pmu_falcon_ecc_address_row_address_m(void)
1100{
1101 return 0xffffU << 0U;
1102}
1103static inline u32 pwr_pmu_falcon_ecc_address_row_address_v(u32 r)
1104{
1105 return (r >> 0U) & 0xffffU;
1106}
1107static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_r(void)
1108{
1109 return 0x0010a6b8U;
1110}
1111static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_total_s(void)
1112{
1113 return 16U;
1114}
1115static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_total_f(u32 v)
1116{
1117 return (v & 0xffffU) << 0U;
1118}
1119static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_total_m(void)
1120{
1121 return 0xffffU << 0U;
1122}
1123static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_total_v(u32 r)
1124{
1125 return (r >> 0U) & 0xffffU;
1126}
1127static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_unique_total_s(void)
1128{
1129 return 16U;
1130}
1131static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_unique_total_f(u32 v)
1132{
1133 return (v & 0xffffU) << 16U;
1134}
1135static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_unique_total_m(void)
1136{
1137 return 0xffffU << 16U;
1138}
1139static inline u32 pwr_pmu_falcon_ecc_corrected_err_count_unique_total_v(u32 r)
1140{
1141 return (r >> 16U) & 0xffffU;
1142}
1143static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_r(void)
1144{
1145 return 0x0010a6bcU;
1146}
1147static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_total_s(void)
1148{
1149 return 16U;
1150}
1151static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_total_f(u32 v)
1152{
1153 return (v & 0xffffU) << 0U;
1154}
1155static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_total_m(void)
1156{
1157 return 0xffffU << 0U;
1158}
1159static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_total_v(u32 r)
1160{
1161 return (r >> 0U) & 0xffffU;
1162}
1163static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_unique_total_s(void)
1164{
1165 return 16U;
1166}
1167static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_unique_total_f(u32 v)
1168{
1169 return (v & 0xffffU) << 16U;
1170}
1171static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_unique_total_m(void)
1172{
1173 return 0xffffU << 16U;
1174}
1175static inline u32 pwr_pmu_falcon_ecc_uncorrected_err_count_unique_total_v(u32 r)
1176{
1177 return (r >> 16U) & 0xffffU;
1178}
1179static inline u32 pwr_fbif_transcfg_r(u32 i)
1180{
1181 return 0x0010ae00U + i*4U;
1182}
1183static inline u32 pwr_fbif_transcfg_target_local_fb_f(void)
1184{
1185 return 0x0U;
1186}
1187static inline u32 pwr_fbif_transcfg_target_coherent_sysmem_f(void)
1188{
1189 return 0x1U;
1190}
1191static inline u32 pwr_fbif_transcfg_target_noncoherent_sysmem_f(void)
1192{
1193 return 0x2U;
1194}
1195static inline u32 pwr_fbif_transcfg_mem_type_s(void)
1196{
1197 return 1U;
1198}
1199static inline u32 pwr_fbif_transcfg_mem_type_f(u32 v)
1200{
1201 return (v & 0x1U) << 2U;
1202}
1203static inline u32 pwr_fbif_transcfg_mem_type_m(void)
1204{
1205 return 0x1U << 2U;
1206}
1207static inline u32 pwr_fbif_transcfg_mem_type_v(u32 r)
1208{
1209 return (r >> 2U) & 0x1U;
1210}
1211static inline u32 pwr_fbif_transcfg_mem_type_virtual_f(void)
1212{
1213 return 0x0U;
1214}
1215static inline u32 pwr_fbif_transcfg_mem_type_physical_f(void)
1216{
1217 return 0x4U;
1218}
1219#endif
diff --git a/include/nvgpu/hw/gv11b/hw_ram_gv11b.h b/include/nvgpu/hw/gv11b/hw_ram_gv11b.h
deleted file mode 100644
index 59c6d88..0000000
--- a/include/nvgpu/hw/gv11b/hw_ram_gv11b.h
+++ /dev/null
@@ -1,791 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_ram_gv11b_h_
57#define _hw_ram_gv11b_h_
58
59static inline u32 ram_in_ramfc_s(void)
60{
61 return 4096U;
62}
63static inline u32 ram_in_ramfc_w(void)
64{
65 return 0U;
66}
67static inline u32 ram_in_page_dir_base_target_f(u32 v)
68{
69 return (v & 0x3U) << 0U;
70}
71static inline u32 ram_in_page_dir_base_target_w(void)
72{
73 return 128U;
74}
75static inline u32 ram_in_page_dir_base_target_vid_mem_f(void)
76{
77 return 0x0U;
78}
79static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void)
80{
81 return 0x2U;
82}
83static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void)
84{
85 return 0x3U;
86}
87static inline u32 ram_in_page_dir_base_vol_w(void)
88{
89 return 128U;
90}
91static inline u32 ram_in_page_dir_base_vol_true_f(void)
92{
93 return 0x4U;
94}
95static inline u32 ram_in_page_dir_base_vol_false_f(void)
96{
97 return 0x0U;
98}
99static inline u32 ram_in_page_dir_base_fault_replay_tex_f(u32 v)
100{
101 return (v & 0x1U) << 4U;
102}
103static inline u32 ram_in_page_dir_base_fault_replay_tex_m(void)
104{
105 return 0x1U << 4U;
106}
107static inline u32 ram_in_page_dir_base_fault_replay_tex_w(void)
108{
109 return 128U;
110}
111static inline u32 ram_in_page_dir_base_fault_replay_tex_true_f(void)
112{
113 return 0x10U;
114}
115static inline u32 ram_in_page_dir_base_fault_replay_gcc_f(u32 v)
116{
117 return (v & 0x1U) << 5U;
118}
119static inline u32 ram_in_page_dir_base_fault_replay_gcc_m(void)
120{
121 return 0x1U << 5U;
122}
123static inline u32 ram_in_page_dir_base_fault_replay_gcc_w(void)
124{
125 return 128U;
126}
127static inline u32 ram_in_page_dir_base_fault_replay_gcc_true_f(void)
128{
129 return 0x20U;
130}
131static inline u32 ram_in_use_ver2_pt_format_f(u32 v)
132{
133 return (v & 0x1U) << 10U;
134}
135static inline u32 ram_in_use_ver2_pt_format_m(void)
136{
137 return 0x1U << 10U;
138}
139static inline u32 ram_in_use_ver2_pt_format_w(void)
140{
141 return 128U;
142}
143static inline u32 ram_in_use_ver2_pt_format_true_f(void)
144{
145 return 0x400U;
146}
147static inline u32 ram_in_use_ver2_pt_format_false_f(void)
148{
149 return 0x0U;
150}
151static inline u32 ram_in_big_page_size_f(u32 v)
152{
153 return (v & 0x1U) << 11U;
154}
155static inline u32 ram_in_big_page_size_m(void)
156{
157 return 0x1U << 11U;
158}
159static inline u32 ram_in_big_page_size_w(void)
160{
161 return 128U;
162}
163static inline u32 ram_in_big_page_size_128kb_f(void)
164{
165 return 0x0U;
166}
167static inline u32 ram_in_big_page_size_64kb_f(void)
168{
169 return 0x800U;
170}
171static inline u32 ram_in_page_dir_base_lo_f(u32 v)
172{
173 return (v & 0xfffffU) << 12U;
174}
175static inline u32 ram_in_page_dir_base_lo_w(void)
176{
177 return 128U;
178}
179static inline u32 ram_in_page_dir_base_hi_f(u32 v)
180{
181 return (v & 0xffffffffU) << 0U;
182}
183static inline u32 ram_in_page_dir_base_hi_w(void)
184{
185 return 129U;
186}
187static inline u32 ram_in_engine_cs_w(void)
188{
189 return 132U;
190}
191static inline u32 ram_in_engine_cs_wfi_v(void)
192{
193 return 0x00000000U;
194}
195static inline u32 ram_in_engine_cs_wfi_f(void)
196{
197 return 0x0U;
198}
199static inline u32 ram_in_engine_cs_fg_v(void)
200{
201 return 0x00000001U;
202}
203static inline u32 ram_in_engine_cs_fg_f(void)
204{
205 return 0x8U;
206}
207static inline u32 ram_in_engine_wfi_mode_f(u32 v)
208{
209 return (v & 0x1U) << 2U;
210}
211static inline u32 ram_in_engine_wfi_mode_w(void)
212{
213 return 132U;
214}
215static inline u32 ram_in_engine_wfi_mode_physical_v(void)
216{
217 return 0x00000000U;
218}
219static inline u32 ram_in_engine_wfi_mode_virtual_v(void)
220{
221 return 0x00000001U;
222}
223static inline u32 ram_in_engine_wfi_target_f(u32 v)
224{
225 return (v & 0x3U) << 0U;
226}
227static inline u32 ram_in_engine_wfi_target_w(void)
228{
229 return 132U;
230}
231static inline u32 ram_in_engine_wfi_target_sys_mem_coh_v(void)
232{
233 return 0x00000002U;
234}
235static inline u32 ram_in_engine_wfi_target_sys_mem_ncoh_v(void)
236{
237 return 0x00000003U;
238}
239static inline u32 ram_in_engine_wfi_target_local_mem_v(void)
240{
241 return 0x00000000U;
242}
243static inline u32 ram_in_engine_wfi_ptr_lo_f(u32 v)
244{
245 return (v & 0xfffffU) << 12U;
246}
247static inline u32 ram_in_engine_wfi_ptr_lo_w(void)
248{
249 return 132U;
250}
251static inline u32 ram_in_engine_wfi_ptr_hi_f(u32 v)
252{
253 return (v & 0xffU) << 0U;
254}
255static inline u32 ram_in_engine_wfi_ptr_hi_w(void)
256{
257 return 133U;
258}
259static inline u32 ram_in_engine_wfi_veid_f(u32 v)
260{
261 return (v & 0x3fU) << 0U;
262}
263static inline u32 ram_in_engine_wfi_veid_w(void)
264{
265 return 134U;
266}
267static inline u32 ram_in_eng_method_buffer_addr_lo_f(u32 v)
268{
269 return (v & 0xffffffffU) << 0U;
270}
271static inline u32 ram_in_eng_method_buffer_addr_lo_w(void)
272{
273 return 136U;
274}
275static inline u32 ram_in_eng_method_buffer_addr_hi_f(u32 v)
276{
277 return (v & 0x1ffffU) << 0U;
278}
279static inline u32 ram_in_eng_method_buffer_addr_hi_w(void)
280{
281 return 137U;
282}
283static inline u32 ram_in_sc_page_dir_base_target_f(u32 v, u32 i)
284{
285 return (v & 0x3U) << (0U + i*0U);
286}
287static inline u32 ram_in_sc_page_dir_base_target__size_1_v(void)
288{
289 return 0x00000040U;
290}
291static inline u32 ram_in_sc_page_dir_base_target_vid_mem_v(void)
292{
293 return 0x00000000U;
294}
295static inline u32 ram_in_sc_page_dir_base_target_invalid_v(void)
296{
297 return 0x00000001U;
298}
299static inline u32 ram_in_sc_page_dir_base_target_sys_mem_coh_v(void)
300{
301 return 0x00000002U;
302}
303static inline u32 ram_in_sc_page_dir_base_target_sys_mem_ncoh_v(void)
304{
305 return 0x00000003U;
306}
307static inline u32 ram_in_sc_page_dir_base_vol_f(u32 v, u32 i)
308{
309 return (v & 0x1U) << (2U + i*0U);
310}
311static inline u32 ram_in_sc_page_dir_base_vol__size_1_v(void)
312{
313 return 0x00000040U;
314}
315static inline u32 ram_in_sc_page_dir_base_vol_true_v(void)
316{
317 return 0x00000001U;
318}
319static inline u32 ram_in_sc_page_dir_base_vol_false_v(void)
320{
321 return 0x00000000U;
322}
323static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_f(u32 v, u32 i)
324{
325 return (v & 0x1U) << (4U + i*0U);
326}
327static inline u32 ram_in_sc_page_dir_base_fault_replay_tex__size_1_v(void)
328{
329 return 0x00000040U;
330}
331static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_enabled_v(void)
332{
333 return 0x00000001U;
334}
335static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_disabled_v(void)
336{
337 return 0x00000000U;
338}
339static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_f(u32 v, u32 i)
340{
341 return (v & 0x1U) << (5U + i*0U);
342}
343static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc__size_1_v(void)
344{
345 return 0x00000040U;
346}
347static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_enabled_v(void)
348{
349 return 0x00000001U;
350}
351static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_disabled_v(void)
352{
353 return 0x00000000U;
354}
355static inline u32 ram_in_sc_use_ver2_pt_format_f(u32 v, u32 i)
356{
357 return (v & 0x1U) << (10U + i*0U);
358}
359static inline u32 ram_in_sc_use_ver2_pt_format__size_1_v(void)
360{
361 return 0x00000040U;
362}
363static inline u32 ram_in_sc_use_ver2_pt_format_false_v(void)
364{
365 return 0x00000000U;
366}
367static inline u32 ram_in_sc_use_ver2_pt_format_true_v(void)
368{
369 return 0x00000001U;
370}
371static inline u32 ram_in_sc_big_page_size_f(u32 v, u32 i)
372{
373 return (v & 0x1U) << (11U + i*0U);
374}
375static inline u32 ram_in_sc_big_page_size__size_1_v(void)
376{
377 return 0x00000040U;
378}
379static inline u32 ram_in_sc_big_page_size_64kb_v(void)
380{
381 return 0x00000001U;
382}
383static inline u32 ram_in_sc_page_dir_base_lo_f(u32 v, u32 i)
384{
385 return (v & 0xfffffU) << (12U + i*0U);
386}
387static inline u32 ram_in_sc_page_dir_base_lo__size_1_v(void)
388{
389 return 0x00000040U;
390}
391static inline u32 ram_in_sc_page_dir_base_hi_f(u32 v, u32 i)
392{
393 return (v & 0xffffffffU) << (0U + i*0U);
394}
395static inline u32 ram_in_sc_page_dir_base_hi__size_1_v(void)
396{
397 return 0x00000040U;
398}
399static inline u32 ram_in_sc_page_dir_base_target_0_f(u32 v)
400{
401 return (v & 0x3U) << 0U;
402}
403static inline u32 ram_in_sc_page_dir_base_target_0_w(void)
404{
405 return 168U;
406}
407static inline u32 ram_in_sc_page_dir_base_vol_0_f(u32 v)
408{
409 return (v & 0x1U) << 2U;
410}
411static inline u32 ram_in_sc_page_dir_base_vol_0_w(void)
412{
413 return 168U;
414}
415static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_0_f(u32 v)
416{
417 return (v & 0x1U) << 4U;
418}
419static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_0_w(void)
420{
421 return 168U;
422}
423static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_0_f(u32 v)
424{
425 return (v & 0x1U) << 5U;
426}
427static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_0_w(void)
428{
429 return 168U;
430}
431static inline u32 ram_in_sc_use_ver2_pt_format_0_f(u32 v)
432{
433 return (v & 0x1U) << 10U;
434}
435static inline u32 ram_in_sc_use_ver2_pt_format_0_w(void)
436{
437 return 168U;
438}
439static inline u32 ram_in_sc_big_page_size_0_f(u32 v)
440{
441 return (v & 0x1U) << 11U;
442}
443static inline u32 ram_in_sc_big_page_size_0_w(void)
444{
445 return 168U;
446}
447static inline u32 ram_in_sc_page_dir_base_lo_0_f(u32 v)
448{
449 return (v & 0xfffffU) << 12U;
450}
451static inline u32 ram_in_sc_page_dir_base_lo_0_w(void)
452{
453 return 168U;
454}
455static inline u32 ram_in_sc_page_dir_base_hi_0_f(u32 v)
456{
457 return (v & 0xffffffffU) << 0U;
458}
459static inline u32 ram_in_sc_page_dir_base_hi_0_w(void)
460{
461 return 169U;
462}
463static inline u32 ram_in_base_shift_v(void)
464{
465 return 0x0000000cU;
466}
467static inline u32 ram_in_alloc_size_v(void)
468{
469 return 0x00001000U;
470}
471static inline u32 ram_fc_size_val_v(void)
472{
473 return 0x00000200U;
474}
475static inline u32 ram_fc_gp_put_w(void)
476{
477 return 0U;
478}
479static inline u32 ram_fc_userd_w(void)
480{
481 return 2U;
482}
483static inline u32 ram_fc_userd_hi_w(void)
484{
485 return 3U;
486}
487static inline u32 ram_fc_signature_w(void)
488{
489 return 4U;
490}
491static inline u32 ram_fc_gp_get_w(void)
492{
493 return 5U;
494}
495static inline u32 ram_fc_pb_get_w(void)
496{
497 return 6U;
498}
499static inline u32 ram_fc_pb_get_hi_w(void)
500{
501 return 7U;
502}
503static inline u32 ram_fc_pb_top_level_get_w(void)
504{
505 return 8U;
506}
507static inline u32 ram_fc_pb_top_level_get_hi_w(void)
508{
509 return 9U;
510}
511static inline u32 ram_fc_acquire_w(void)
512{
513 return 12U;
514}
515static inline u32 ram_fc_sem_addr_hi_w(void)
516{
517 return 14U;
518}
519static inline u32 ram_fc_sem_addr_lo_w(void)
520{
521 return 15U;
522}
523static inline u32 ram_fc_sem_payload_lo_w(void)
524{
525 return 16U;
526}
527static inline u32 ram_fc_sem_payload_hi_w(void)
528{
529 return 39U;
530}
531static inline u32 ram_fc_sem_execute_w(void)
532{
533 return 17U;
534}
535static inline u32 ram_fc_gp_base_w(void)
536{
537 return 18U;
538}
539static inline u32 ram_fc_gp_base_hi_w(void)
540{
541 return 19U;
542}
543static inline u32 ram_fc_gp_fetch_w(void)
544{
545 return 20U;
546}
547static inline u32 ram_fc_pb_fetch_w(void)
548{
549 return 21U;
550}
551static inline u32 ram_fc_pb_fetch_hi_w(void)
552{
553 return 22U;
554}
555static inline u32 ram_fc_pb_put_w(void)
556{
557 return 23U;
558}
559static inline u32 ram_fc_pb_put_hi_w(void)
560{
561 return 24U;
562}
563static inline u32 ram_fc_pb_header_w(void)
564{
565 return 33U;
566}
567static inline u32 ram_fc_pb_count_w(void)
568{
569 return 34U;
570}
571static inline u32 ram_fc_subdevice_w(void)
572{
573 return 37U;
574}
575static inline u32 ram_fc_target_w(void)
576{
577 return 43U;
578}
579static inline u32 ram_fc_hce_ctrl_w(void)
580{
581 return 57U;
582}
583static inline u32 ram_fc_chid_w(void)
584{
585 return 58U;
586}
587static inline u32 ram_fc_chid_id_f(u32 v)
588{
589 return (v & 0xfffU) << 0U;
590}
591static inline u32 ram_fc_chid_id_w(void)
592{
593 return 0U;
594}
595static inline u32 ram_fc_config_w(void)
596{
597 return 61U;
598}
599static inline u32 ram_fc_runlist_timeslice_w(void)
600{
601 return 62U;
602}
603static inline u32 ram_fc_set_channel_info_w(void)
604{
605 return 63U;
606}
607static inline u32 ram_userd_base_shift_v(void)
608{
609 return 0x00000009U;
610}
611static inline u32 ram_userd_chan_size_v(void)
612{
613 return 0x00000200U;
614}
615static inline u32 ram_userd_put_w(void)
616{
617 return 16U;
618}
619static inline u32 ram_userd_get_w(void)
620{
621 return 17U;
622}
623static inline u32 ram_userd_ref_w(void)
624{
625 return 18U;
626}
627static inline u32 ram_userd_put_hi_w(void)
628{
629 return 19U;
630}
631static inline u32 ram_userd_ref_threshold_w(void)
632{
633 return 20U;
634}
635static inline u32 ram_userd_top_level_get_w(void)
636{
637 return 22U;
638}
639static inline u32 ram_userd_top_level_get_hi_w(void)
640{
641 return 23U;
642}
643static inline u32 ram_userd_get_hi_w(void)
644{
645 return 24U;
646}
647static inline u32 ram_userd_gp_get_w(void)
648{
649 return 34U;
650}
651static inline u32 ram_userd_gp_put_w(void)
652{
653 return 35U;
654}
655static inline u32 ram_userd_gp_top_level_get_w(void)
656{
657 return 22U;
658}
659static inline u32 ram_userd_gp_top_level_get_hi_w(void)
660{
661 return 23U;
662}
663static inline u32 ram_rl_entry_size_v(void)
664{
665 return 0x00000010U;
666}
667static inline u32 ram_rl_entry_type_f(u32 v)
668{
669 return (v & 0x1U) << 0U;
670}
671static inline u32 ram_rl_entry_type_channel_v(void)
672{
673 return 0x00000000U;
674}
675static inline u32 ram_rl_entry_type_tsg_v(void)
676{
677 return 0x00000001U;
678}
679static inline u32 ram_rl_entry_id_f(u32 v)
680{
681 return (v & 0xfffU) << 0U;
682}
683static inline u32 ram_rl_entry_chan_runqueue_selector_f(u32 v)
684{
685 return (v & 0x1U) << 1U;
686}
687static inline u32 ram_rl_entry_chan_inst_target_f(u32 v)
688{
689 return (v & 0x3U) << 4U;
690}
691static inline u32 ram_rl_entry_chan_inst_target_sys_mem_ncoh_v(void)
692{
693 return 0x00000003U;
694}
695static inline u32 ram_rl_entry_chan_inst_target_sys_mem_coh_v(void)
696{
697 return 0x00000002U;
698}
699static inline u32 ram_rl_entry_chan_inst_target_vid_mem_v(void)
700{
701 return 0x00000000U;
702}
703static inline u32 ram_rl_entry_chan_userd_target_f(u32 v)
704{
705 return (v & 0x3U) << 6U;
706}
707static inline u32 ram_rl_entry_chan_userd_target_vid_mem_v(void)
708{
709 return 0x00000000U;
710}
711static inline u32 ram_rl_entry_chan_userd_target_vid_mem_nvlink_coh_v(void)
712{
713 return 0x00000001U;
714}
715static inline u32 ram_rl_entry_chan_userd_target_sys_mem_coh_v(void)
716{
717 return 0x00000002U;
718}
719static inline u32 ram_rl_entry_chan_userd_target_sys_mem_ncoh_v(void)
720{
721 return 0x00000003U;
722}
723static inline u32 ram_rl_entry_chan_userd_ptr_lo_f(u32 v)
724{
725 return (v & 0xffffffU) << 8U;
726}
727static inline u32 ram_rl_entry_chan_userd_ptr_hi_f(u32 v)
728{
729 return (v & 0xffffffffU) << 0U;
730}
731static inline u32 ram_rl_entry_chid_f(u32 v)
732{
733 return (v & 0xfffU) << 0U;
734}
735static inline u32 ram_rl_entry_chan_inst_ptr_lo_f(u32 v)
736{
737 return (v & 0xfffffU) << 12U;
738}
739static inline u32 ram_rl_entry_chan_inst_ptr_hi_f(u32 v)
740{
741 return (v & 0xffffffffU) << 0U;
742}
743static inline u32 ram_rl_entry_tsg_timeslice_scale_f(u32 v)
744{
745 return (v & 0xfU) << 16U;
746}
747static inline u32 ram_rl_entry_tsg_timeslice_scale_3_v(void)
748{
749 return 0x00000003U;
750}
751static inline u32 ram_rl_entry_tsg_timeslice_timeout_f(u32 v)
752{
753 return (v & 0xffU) << 24U;
754}
755static inline u32 ram_rl_entry_tsg_timeslice_timeout_128_v(void)
756{
757 return 0x00000080U;
758}
759static inline u32 ram_rl_entry_tsg_length_f(u32 v)
760{
761 return (v & 0xffU) << 0U;
762}
763static inline u32 ram_rl_entry_tsg_length_init_v(void)
764{
765 return 0x00000000U;
766}
767static inline u32 ram_rl_entry_tsg_length_min_v(void)
768{
769 return 0x00000001U;
770}
771static inline u32 ram_rl_entry_tsg_length_max_v(void)
772{
773 return 0x00000080U;
774}
775static inline u32 ram_rl_entry_tsg_tsgid_f(u32 v)
776{
777 return (v & 0xfffU) << 0U;
778}
779static inline u32 ram_rl_entry_chan_userd_ptr_align_shift_v(void)
780{
781 return 0x00000008U;
782}
783static inline u32 ram_rl_entry_chan_userd_align_shift_v(void)
784{
785 return 0x00000008U;
786}
787static inline u32 ram_rl_entry_chan_inst_ptr_align_shift_v(void)
788{
789 return 0x0000000cU;
790}
791#endif
diff --git a/include/nvgpu/hw/gv11b/hw_therm_gv11b.h b/include/nvgpu/hw/gv11b/hw_therm_gv11b.h
deleted file mode 100644
index 0050083..0000000
--- a/include/nvgpu/hw/gv11b/hw_therm_gv11b.h
+++ /dev/null
@@ -1,487 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_therm_gv11b_h_
57#define _hw_therm_gv11b_h_
58
59static inline u32 therm_use_a_r(void)
60{
61 return 0x00020798U;
62}
63static inline u32 therm_use_a_ext_therm_0_enable_f(void)
64{
65 return 0x1U;
66}
67static inline u32 therm_use_a_ext_therm_1_enable_f(void)
68{
69 return 0x2U;
70}
71static inline u32 therm_use_a_ext_therm_2_enable_f(void)
72{
73 return 0x4U;
74}
75static inline u32 therm_evt_ext_therm_0_r(void)
76{
77 return 0x00020700U;
78}
79static inline u32 therm_evt_ext_therm_0_slow_factor_f(u32 v)
80{
81 return (v & 0x3fU) << 24U;
82}
83static inline u32 therm_evt_ext_therm_0_slow_factor_init_v(void)
84{
85 return 0x00000001U;
86}
87static inline u32 therm_evt_ext_therm_0_mode_f(u32 v)
88{
89 return (v & 0x3U) << 30U;
90}
91static inline u32 therm_evt_ext_therm_0_mode_normal_v(void)
92{
93 return 0x00000000U;
94}
95static inline u32 therm_evt_ext_therm_0_mode_inverted_v(void)
96{
97 return 0x00000001U;
98}
99static inline u32 therm_evt_ext_therm_0_mode_forced_v(void)
100{
101 return 0x00000002U;
102}
103static inline u32 therm_evt_ext_therm_0_mode_cleared_v(void)
104{
105 return 0x00000003U;
106}
107static inline u32 therm_evt_ext_therm_1_r(void)
108{
109 return 0x00020704U;
110}
111static inline u32 therm_evt_ext_therm_1_slow_factor_f(u32 v)
112{
113 return (v & 0x3fU) << 24U;
114}
115static inline u32 therm_evt_ext_therm_1_slow_factor_init_v(void)
116{
117 return 0x00000002U;
118}
119static inline u32 therm_evt_ext_therm_1_mode_f(u32 v)
120{
121 return (v & 0x3U) << 30U;
122}
123static inline u32 therm_evt_ext_therm_1_mode_normal_v(void)
124{
125 return 0x00000000U;
126}
127static inline u32 therm_evt_ext_therm_1_mode_inverted_v(void)
128{
129 return 0x00000001U;
130}
131static inline u32 therm_evt_ext_therm_1_mode_forced_v(void)
132{
133 return 0x00000002U;
134}
135static inline u32 therm_evt_ext_therm_1_mode_cleared_v(void)
136{
137 return 0x00000003U;
138}
139static inline u32 therm_evt_ext_therm_2_r(void)
140{
141 return 0x00020708U;
142}
143static inline u32 therm_evt_ext_therm_2_slow_factor_f(u32 v)
144{
145 return (v & 0x3fU) << 24U;
146}
147static inline u32 therm_evt_ext_therm_2_slow_factor_init_v(void)
148{
149 return 0x00000003U;
150}
151static inline u32 therm_evt_ext_therm_2_mode_f(u32 v)
152{
153 return (v & 0x3U) << 30U;
154}
155static inline u32 therm_evt_ext_therm_2_mode_normal_v(void)
156{
157 return 0x00000000U;
158}
159static inline u32 therm_evt_ext_therm_2_mode_inverted_v(void)
160{
161 return 0x00000001U;
162}
163static inline u32 therm_evt_ext_therm_2_mode_forced_v(void)
164{
165 return 0x00000002U;
166}
167static inline u32 therm_evt_ext_therm_2_mode_cleared_v(void)
168{
169 return 0x00000003U;
170}
171static inline u32 therm_weight_1_r(void)
172{
173 return 0x00020024U;
174}
175static inline u32 therm_config1_r(void)
176{
177 return 0x00020050U;
178}
179static inline u32 therm_config2_r(void)
180{
181 return 0x00020130U;
182}
183static inline u32 therm_config2_grad_step_duration_f(u32 v)
184{
185 return (v & 0xfU) << 8U;
186}
187static inline u32 therm_config2_grad_step_duration_m(void)
188{
189 return 0xfU << 8U;
190}
191static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
192{
193 return (v & 0x1U) << 24U;
194}
195static inline u32 therm_config2_grad_enable_f(u32 v)
196{
197 return (v & 0x1U) << 31U;
198}
199static inline u32 therm_gate_ctrl_r(u32 i)
200{
201 return 0x00020200U + i*4U;
202}
203static inline u32 therm_gate_ctrl_eng_clk_m(void)
204{
205 return 0x3U << 0U;
206}
207static inline u32 therm_gate_ctrl_eng_clk_run_f(void)
208{
209 return 0x0U;
210}
211static inline u32 therm_gate_ctrl_eng_clk_auto_f(void)
212{
213 return 0x1U;
214}
215static inline u32 therm_gate_ctrl_eng_clk_stop_f(void)
216{
217 return 0x2U;
218}
219static inline u32 therm_gate_ctrl_blk_clk_m(void)
220{
221 return 0x3U << 2U;
222}
223static inline u32 therm_gate_ctrl_blk_clk_run_f(void)
224{
225 return 0x0U;
226}
227static inline u32 therm_gate_ctrl_blk_clk_auto_f(void)
228{
229 return 0x4U;
230}
231static inline u32 therm_gate_ctrl_idle_holdoff_m(void)
232{
233 return 0x1U << 4U;
234}
235static inline u32 therm_gate_ctrl_idle_holdoff_off_f(void)
236{
237 return 0x0U;
238}
239static inline u32 therm_gate_ctrl_idle_holdoff_on_f(void)
240{
241 return 0x10U;
242}
243static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v)
244{
245 return (v & 0x1fU) << 8U;
246}
247static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void)
248{
249 return 0x1fU << 8U;
250}
251static inline u32 therm_gate_ctrl_eng_idle_filt_exp__prod_f(void)
252{
253 return 0x200U;
254}
255static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v)
256{
257 return (v & 0x7U) << 13U;
258}
259static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
260{
261 return 0x7U << 13U;
262}
263static inline u32 therm_gate_ctrl_eng_idle_filt_mant__prod_f(void)
264{
265 return 0x2000U;
266}
267static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
268{
269 return (v & 0xfU) << 16U;
270}
271static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
272{
273 return 0xfU << 16U;
274}
275static inline u32 therm_gate_ctrl_eng_delay_before__prod_f(void)
276{
277 return 0x40000U;
278}
279static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
280{
281 return (v & 0xfU) << 20U;
282}
283static inline u32 therm_gate_ctrl_eng_delay_after_m(void)
284{
285 return 0xfU << 20U;
286}
287static inline u32 therm_gate_ctrl_eng_delay_after__prod_f(void)
288{
289 return 0x0U;
290}
291static inline u32 therm_fecs_idle_filter_r(void)
292{
293 return 0x00020288U;
294}
295static inline u32 therm_fecs_idle_filter_value_m(void)
296{
297 return 0xffffffffU << 0U;
298}
299static inline u32 therm_fecs_idle_filter_value__prod_f(void)
300{
301 return 0x0U;
302}
303static inline u32 therm_hubmmu_idle_filter_r(void)
304{
305 return 0x0002028cU;
306}
307static inline u32 therm_hubmmu_idle_filter_value_m(void)
308{
309 return 0xffffffffU << 0U;
310}
311static inline u32 therm_hubmmu_idle_filter_value__prod_f(void)
312{
313 return 0x0U;
314}
315static inline u32 therm_clk_slowdown_r(u32 i)
316{
317 return 0x00020160U + i*4U;
318}
319static inline u32 therm_clk_slowdown_idle_factor_f(u32 v)
320{
321 return (v & 0x3fU) << 16U;
322}
323static inline u32 therm_clk_slowdown_idle_factor_m(void)
324{
325 return 0x3fU << 16U;
326}
327static inline u32 therm_clk_slowdown_idle_factor_v(u32 r)
328{
329 return (r >> 16U) & 0x3fU;
330}
331static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void)
332{
333 return 0x0U;
334}
335static inline u32 therm_clk_slowdown_2_r(u32 i)
336{
337 return 0x000201a0U + i*4U;
338}
339static inline u32 therm_clk_slowdown_2_idle_condition_a_select_f(u32 v)
340{
341 return (v & 0xfU) << 0U;
342}
343static inline u32 therm_clk_slowdown_2_idle_condition_a_type_f(u32 v)
344{
345 return (v & 0x7U) << 4U;
346}
347static inline u32 therm_clk_slowdown_2_idle_condition_a_type_v(u32 r)
348{
349 return (r >> 4U) & 0x7U;
350}
351static inline u32 therm_clk_slowdown_2_idle_condition_a_type_never_f(void)
352{
353 return 0x40U;
354}
355static inline u32 therm_clk_slowdown_2_idle_condition_b_type_f(u32 v)
356{
357 return (v & 0x7U) << 12U;
358}
359static inline u32 therm_clk_slowdown_2_idle_condition_b_type_v(u32 r)
360{
361 return (r >> 12U) & 0x7U;
362}
363static inline u32 therm_clk_slowdown_2_idle_condition_b_type_never_f(void)
364{
365 return 0x4000U;
366}
367static inline u32 therm_grad_stepping_table_r(u32 i)
368{
369 return 0x000202c8U + i*4U;
370}
371static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
372{
373 return (v & 0x3fU) << 0U;
374}
375static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
376{
377 return 0x3fU << 0U;
378}
379static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1_f(void)
380{
381 return 0x0U;
382}
383static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
384{
385 return 0x1U;
386}
387static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
388{
389 return 0x2U;
390}
391static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
392{
393 return 0x6U;
394}
395static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
396{
397 return 0xeU;
398}
399static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by16_f(void)
400{
401 return 0x1eU;
402}
403static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by32_f(void)
404{
405 return 0x3eU;
406}
407static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
408{
409 return (v & 0x3fU) << 6U;
410}
411static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
412{
413 return 0x3fU << 6U;
414}
415static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
416{
417 return (v & 0x3fU) << 12U;
418}
419static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
420{
421 return 0x3fU << 12U;
422}
423static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
424{
425 return (v & 0x3fU) << 18U;
426}
427static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
428{
429 return 0x3fU << 18U;
430}
431static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
432{
433 return (v & 0x3fU) << 24U;
434}
435static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
436{
437 return 0x3fU << 24U;
438}
439static inline u32 therm_grad_stepping0_r(void)
440{
441 return 0x000202c0U;
442}
443static inline u32 therm_grad_stepping0_feature_s(void)
444{
445 return 1U;
446}
447static inline u32 therm_grad_stepping0_feature_f(u32 v)
448{
449 return (v & 0x1U) << 0U;
450}
451static inline u32 therm_grad_stepping0_feature_m(void)
452{
453 return 0x1U << 0U;
454}
455static inline u32 therm_grad_stepping0_feature_v(u32 r)
456{
457 return (r >> 0U) & 0x1U;
458}
459static inline u32 therm_grad_stepping0_feature_enable_f(void)
460{
461 return 0x1U;
462}
463static inline u32 therm_grad_stepping1_r(void)
464{
465 return 0x000202c4U;
466}
467static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
468{
469 return (v & 0x1ffffU) << 0U;
470}
471static inline u32 therm_clk_timing_r(u32 i)
472{
473 return 0x000203c0U + i*4U;
474}
475static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
476{
477 return (v & 0x1U) << 16U;
478}
479static inline u32 therm_clk_timing_grad_slowdown_m(void)
480{
481 return 0x1U << 16U;
482}
483static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
484{
485 return 0x10000U;
486}
487#endif
diff --git a/include/nvgpu/hw/gv11b/hw_timer_gv11b.h b/include/nvgpu/hw/gv11b/hw_timer_gv11b.h
deleted file mode 100644
index 34285b3..0000000
--- a/include/nvgpu/hw/gv11b/hw_timer_gv11b.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_timer_gv11b_h_
57#define _hw_timer_gv11b_h_
58
59static inline u32 timer_pri_timeout_r(void)
60{
61 return 0x00009080U;
62}
63static inline u32 timer_pri_timeout_period_f(u32 v)
64{
65 return (v & 0xffffffU) << 0U;
66}
67static inline u32 timer_pri_timeout_period_m(void)
68{
69 return 0xffffffU << 0U;
70}
71static inline u32 timer_pri_timeout_period_v(u32 r)
72{
73 return (r >> 0U) & 0xffffffU;
74}
75static inline u32 timer_pri_timeout_en_f(u32 v)
76{
77 return (v & 0x1U) << 31U;
78}
79static inline u32 timer_pri_timeout_en_m(void)
80{
81 return 0x1U << 31U;
82}
83static inline u32 timer_pri_timeout_en_v(u32 r)
84{
85 return (r >> 31U) & 0x1U;
86}
87static inline u32 timer_pri_timeout_en_en_enabled_f(void)
88{
89 return 0x80000000U;
90}
91static inline u32 timer_pri_timeout_en_en_disabled_f(void)
92{
93 return 0x0U;
94}
95static inline u32 timer_pri_timeout_save_0_r(void)
96{
97 return 0x00009084U;
98}
99static inline u32 timer_pri_timeout_save_0_fecs_tgt_v(u32 r)
100{
101 return (r >> 31U) & 0x1U;
102}
103static inline u32 timer_pri_timeout_save_0_addr_v(u32 r)
104{
105 return (r >> 2U) & 0x3fffffU;
106}
107static inline u32 timer_pri_timeout_save_0_write_v(u32 r)
108{
109 return (r >> 1U) & 0x1U;
110}
111static inline u32 timer_pri_timeout_save_1_r(void)
112{
113 return 0x00009088U;
114}
115static inline u32 timer_pri_timeout_fecs_errcode_r(void)
116{
117 return 0x0000908cU;
118}
119static inline u32 timer_time_0_r(void)
120{
121 return 0x00009400U;
122}
123static inline u32 timer_time_1_r(void)
124{
125 return 0x00009410U;
126}
127#endif
diff --git a/include/nvgpu/hw/gv11b/hw_top_gv11b.h b/include/nvgpu/hw/gv11b/hw_top_gv11b.h
deleted file mode 100644
index 89e4aeb..0000000
--- a/include/nvgpu/hw/gv11b/hw_top_gv11b.h
+++ /dev/null
@@ -1,235 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_top_gv11b_h_
57#define _hw_top_gv11b_h_
58
59static inline u32 top_num_gpcs_r(void)
60{
61 return 0x00022430U;
62}
63static inline u32 top_num_gpcs_value_v(u32 r)
64{
65 return (r >> 0U) & 0x1fU;
66}
67static inline u32 top_tpc_per_gpc_r(void)
68{
69 return 0x00022434U;
70}
71static inline u32 top_tpc_per_gpc_value_v(u32 r)
72{
73 return (r >> 0U) & 0x1fU;
74}
75static inline u32 top_num_fbps_r(void)
76{
77 return 0x00022438U;
78}
79static inline u32 top_num_fbps_value_v(u32 r)
80{
81 return (r >> 0U) & 0x1fU;
82}
83static inline u32 top_ltc_per_fbp_r(void)
84{
85 return 0x00022450U;
86}
87static inline u32 top_ltc_per_fbp_value_v(u32 r)
88{
89 return (r >> 0U) & 0x1fU;
90}
91static inline u32 top_slices_per_ltc_r(void)
92{
93 return 0x0002245cU;
94}
95static inline u32 top_slices_per_ltc_value_v(u32 r)
96{
97 return (r >> 0U) & 0x1fU;
98}
99static inline u32 top_num_ltcs_r(void)
100{
101 return 0x00022454U;
102}
103static inline u32 top_num_ces_r(void)
104{
105 return 0x00022444U;
106}
107static inline u32 top_num_ces_value_v(u32 r)
108{
109 return (r >> 0U) & 0x1fU;
110}
111static inline u32 top_device_info_r(u32 i)
112{
113 return 0x00022700U + i*4U;
114}
115static inline u32 top_device_info__size_1_v(void)
116{
117 return 0x00000040U;
118}
119static inline u32 top_device_info_chain_v(u32 r)
120{
121 return (r >> 31U) & 0x1U;
122}
123static inline u32 top_device_info_chain_enable_v(void)
124{
125 return 0x00000001U;
126}
127static inline u32 top_device_info_engine_enum_v(u32 r)
128{
129 return (r >> 26U) & 0xfU;
130}
131static inline u32 top_device_info_runlist_enum_v(u32 r)
132{
133 return (r >> 21U) & 0xfU;
134}
135static inline u32 top_device_info_intr_enum_v(u32 r)
136{
137 return (r >> 15U) & 0x1fU;
138}
139static inline u32 top_device_info_reset_enum_v(u32 r)
140{
141 return (r >> 9U) & 0x1fU;
142}
143static inline u32 top_device_info_type_enum_v(u32 r)
144{
145 return (r >> 2U) & 0x1fffffffU;
146}
147static inline u32 top_device_info_type_enum_graphics_v(void)
148{
149 return 0x00000000U;
150}
151static inline u32 top_device_info_type_enum_graphics_f(void)
152{
153 return 0x0U;
154}
155static inline u32 top_device_info_type_enum_copy2_v(void)
156{
157 return 0x00000003U;
158}
159static inline u32 top_device_info_type_enum_copy2_f(void)
160{
161 return 0xcU;
162}
163static inline u32 top_device_info_type_enum_lce_v(void)
164{
165 return 0x00000013U;
166}
167static inline u32 top_device_info_type_enum_lce_f(void)
168{
169 return 0x4cU;
170}
171static inline u32 top_device_info_engine_v(u32 r)
172{
173 return (r >> 5U) & 0x1U;
174}
175static inline u32 top_device_info_runlist_v(u32 r)
176{
177 return (r >> 4U) & 0x1U;
178}
179static inline u32 top_device_info_intr_v(u32 r)
180{
181 return (r >> 3U) & 0x1U;
182}
183static inline u32 top_device_info_reset_v(u32 r)
184{
185 return (r >> 2U) & 0x1U;
186}
187static inline u32 top_device_info_entry_v(u32 r)
188{
189 return (r >> 0U) & 0x3U;
190}
191static inline u32 top_device_info_entry_not_valid_v(void)
192{
193 return 0x00000000U;
194}
195static inline u32 top_device_info_entry_enum_v(void)
196{
197 return 0x00000002U;
198}
199static inline u32 top_device_info_entry_data_v(void)
200{
201 return 0x00000001U;
202}
203static inline u32 top_device_info_data_type_v(u32 r)
204{
205 return (r >> 30U) & 0x1U;
206}
207static inline u32 top_device_info_data_type_enum2_v(void)
208{
209 return 0x00000000U;
210}
211static inline u32 top_device_info_data_inst_id_v(u32 r)
212{
213 return (r >> 26U) & 0xfU;
214}
215static inline u32 top_device_info_data_pri_base_v(u32 r)
216{
217 return (r >> 12U) & 0xfffU;
218}
219static inline u32 top_device_info_data_pri_base_align_v(void)
220{
221 return 0x0000000cU;
222}
223static inline u32 top_device_info_data_fault_id_enum_v(u32 r)
224{
225 return (r >> 3U) & 0x7fU;
226}
227static inline u32 top_device_info_data_fault_id_v(u32 r)
228{
229 return (r >> 2U) & 0x1U;
230}
231static inline u32 top_device_info_data_fault_id_valid_v(void)
232{
233 return 0x00000001U;
234}
235#endif
diff --git a/include/nvgpu/hw/gv11b/hw_usermode_gv11b.h b/include/nvgpu/hw/gv11b/hw_usermode_gv11b.h
deleted file mode 100644
index e374969..0000000
--- a/include/nvgpu/hw/gv11b/hw_usermode_gv11b.h
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22/*
23 * Function naming determines intended use:
24 *
25 * <x>_r(void) : Returns the offset for register <x>.
26 *
27 * <x>_o(void) : Returns the offset for element <x>.
28 *
29 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
30 *
31 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
32 *
33 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
34 * and masked to place it at field <y> of register <x>. This value
35 * can be |'d with others to produce a full register value for
36 * register <x>.
37 *
38 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
39 * value can be ~'d and then &'d to clear the value of field <y> for
40 * register <x>.
41 *
42 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
43 * to place it at field <y> of register <x>. This value can be |'d
44 * with others to produce a full register value for <x>.
45 *
46 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
47 * <x> value 'r' after being shifted to place its LSB at bit 0.
48 * This value is suitable for direct comparison with other unshifted
49 * values appropriate for use in field <y> of register <x>.
50 *
51 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
52 * field <y> of register <x>. This value is suitable for direct
53 * comparison with unshifted values appropriate for use in field <y>
54 * of register <x>.
55 */
56#ifndef _hw_usermode_gv11b_h_
57#define _hw_usermode_gv11b_h_
58
59static inline u32 usermode_cfg0_r(void)
60{
61 return 0x00810000;
62}
63static inline u32 usermode_cfg0_usermode_class_id_f(u32 v)
64{
65 return (v & 0xffff) << 0;
66}
67static inline u32 usermode_cfg0_usermode_class_id_value_v(void)
68{
69 return 0x0000c361;
70}
71static inline u32 usermode_time_0_r(void)
72{
73 return 0x00810080;
74}
75static inline u32 usermode_time_0_nsec_f(u32 v)
76{
77 return (v & 0x7ffffff) << 5;
78}
79static inline u32 usermode_time_1_r(void)
80{
81 return 0x00810084;
82}
83static inline u32 usermode_time_1_nsec_f(u32 v)
84{
85 return (v & 0x1fffffff) << 0;
86}
87static inline u32 usermode_notify_channel_pending_r(void)
88{
89 return 0x00810090;
90}
91static inline u32 usermode_notify_channel_pending_id_f(u32 v)
92{
93 return (v & 0xffffffff) << 0;
94}
95#endif
diff --git a/include/nvgpu/hw_sim.h b/include/nvgpu/hw_sim.h
deleted file mode 100644
index 89ce6da..0000000
--- a/include/nvgpu/hw_sim.h
+++ /dev/null
@@ -1,2153 +0,0 @@
1/*
2 * Copyright (c) 2012-2018, NVIDIA Corporation.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23 /*
24 * Function naming determines intended use:
25 *
26 * <x>_r(void) : Returns the offset for register <x>.
27 *
28 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
29 *
30 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
31 *
32 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
33 * and masked to place it at field <y> of register <x>. This value
34 * can be |'d with others to produce a full register value for
35 * register <x>.
36 *
37 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
38 * value can be ~'d and then &'d to clear the value of field <y> for
39 * register <x>.
40 *
41 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
42 * to place it at field <y> of register <x>. This value can be |'d
43 * with others to produce a full register value for <x>.
44 *
45 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
46 * <x> value 'r' after being shifted to place its LSB at bit 0.
47 * This value is suitable for direct comparison with other unshifted
48 * values appropriate for use in field <y> of register <x>.
49 *
50 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
51 * field <y> of register <x>. This value is suitable for direct
52 * comparison with unshifted values appropriate for use in field <y>
53 * of register <x>.
54 */
55
56#ifndef __hw_sim_h__
57#define __hw_sim_h__
58/*This file is autogenerated. Do not edit. */
59
60static inline u32 sim_send_ring_r(void)
61{
62 return 0x00000000;
63}
64static inline u32 sim_send_ring_target_s(void)
65{
66 return 2;
67}
68static inline u32 sim_send_ring_target_f(u32 v)
69{
70 return (v & 0x3) << 0;
71}
72static inline u32 sim_send_ring_target_m(void)
73{
74 return 0x3 << 0;
75}
76static inline u32 sim_send_ring_target_v(u32 r)
77{
78 return (r >> 0) & 0x3;
79}
80static inline u32 sim_send_ring_target_phys_init_v(void)
81{
82 return 0x00000001;
83}
84static inline u32 sim_send_ring_target_phys_init_f(void)
85{
86 return 0x1;
87}
88static inline u32 sim_send_ring_target_phys__init_v(void)
89{
90 return 0x00000001;
91}
92static inline u32 sim_send_ring_target_phys__init_f(void)
93{
94 return 0x1;
95}
96static inline u32 sim_send_ring_target_phys__prod_v(void)
97{
98 return 0x00000001;
99}
100static inline u32 sim_send_ring_target_phys__prod_f(void)
101{
102 return 0x1;
103}
104static inline u32 sim_send_ring_target_phys_nvm_v(void)
105{
106 return 0x00000001;
107}
108static inline u32 sim_send_ring_target_phys_nvm_f(void)
109{
110 return 0x1;
111}
112static inline u32 sim_send_ring_target_phys_pci_v(void)
113{
114 return 0x00000002;
115}
116static inline u32 sim_send_ring_target_phys_pci_f(void)
117{
118 return 0x2;
119}
120static inline u32 sim_send_ring_target_phys_pci_coherent_v(void)
121{
122 return 0x00000003;
123}
124static inline u32 sim_send_ring_target_phys_pci_coherent_f(void)
125{
126 return 0x3;
127}
128static inline u32 sim_send_ring_status_s(void)
129{
130 return 1;
131}
132static inline u32 sim_send_ring_status_f(u32 v)
133{
134 return (v & 0x1) << 3;
135}
136static inline u32 sim_send_ring_status_m(void)
137{
138 return 0x1 << 3;
139}
140static inline u32 sim_send_ring_status_v(u32 r)
141{
142 return (r >> 3) & 0x1;
143}
144static inline u32 sim_send_ring_status_init_v(void)
145{
146 return 0x00000000;
147}
148static inline u32 sim_send_ring_status_init_f(void)
149{
150 return 0x0;
151}
152static inline u32 sim_send_ring_status__init_v(void)
153{
154 return 0x00000000;
155}
156static inline u32 sim_send_ring_status__init_f(void)
157{
158 return 0x0;
159}
160static inline u32 sim_send_ring_status__prod_v(void)
161{
162 return 0x00000000;
163}
164static inline u32 sim_send_ring_status__prod_f(void)
165{
166 return 0x0;
167}
168static inline u32 sim_send_ring_status_invalid_v(void)
169{
170 return 0x00000000;
171}
172static inline u32 sim_send_ring_status_invalid_f(void)
173{
174 return 0x0;
175}
176static inline u32 sim_send_ring_status_valid_v(void)
177{
178 return 0x00000001;
179}
180static inline u32 sim_send_ring_status_valid_f(void)
181{
182 return 0x8;
183}
184static inline u32 sim_send_ring_size_s(void)
185{
186 return 2;
187}
188static inline u32 sim_send_ring_size_f(u32 v)
189{
190 return (v & 0x3) << 4;
191}
192static inline u32 sim_send_ring_size_m(void)
193{
194 return 0x3 << 4;
195}
196static inline u32 sim_send_ring_size_v(u32 r)
197{
198 return (r >> 4) & 0x3;
199}
200static inline u32 sim_send_ring_size_init_v(void)
201{
202 return 0x00000000;
203}
204static inline u32 sim_send_ring_size_init_f(void)
205{
206 return 0x0;
207}
208static inline u32 sim_send_ring_size__init_v(void)
209{
210 return 0x00000000;
211}
212static inline u32 sim_send_ring_size__init_f(void)
213{
214 return 0x0;
215}
216static inline u32 sim_send_ring_size__prod_v(void)
217{
218 return 0x00000000;
219}
220static inline u32 sim_send_ring_size__prod_f(void)
221{
222 return 0x0;
223}
224static inline u32 sim_send_ring_size_4kb_v(void)
225{
226 return 0x00000000;
227}
228static inline u32 sim_send_ring_size_4kb_f(void)
229{
230 return 0x0;
231}
232static inline u32 sim_send_ring_size_8kb_v(void)
233{
234 return 0x00000001;
235}
236static inline u32 sim_send_ring_size_8kb_f(void)
237{
238 return 0x10;
239}
240static inline u32 sim_send_ring_size_12kb_v(void)
241{
242 return 0x00000002;
243}
244static inline u32 sim_send_ring_size_12kb_f(void)
245{
246 return 0x20;
247}
248static inline u32 sim_send_ring_size_16kb_v(void)
249{
250 return 0x00000003;
251}
252static inline u32 sim_send_ring_size_16kb_f(void)
253{
254 return 0x30;
255}
256static inline u32 sim_send_ring_gp_in_ring_s(void)
257{
258 return 1;
259}
260static inline u32 sim_send_ring_gp_in_ring_f(u32 v)
261{
262 return (v & 0x1) << 11;
263}
264static inline u32 sim_send_ring_gp_in_ring_m(void)
265{
266 return 0x1 << 11;
267}
268static inline u32 sim_send_ring_gp_in_ring_v(u32 r)
269{
270 return (r >> 11) & 0x1;
271}
272static inline u32 sim_send_ring_gp_in_ring__init_v(void)
273{
274 return 0x00000000;
275}
276static inline u32 sim_send_ring_gp_in_ring__init_f(void)
277{
278 return 0x0;
279}
280static inline u32 sim_send_ring_gp_in_ring__prod_v(void)
281{
282 return 0x00000000;
283}
284static inline u32 sim_send_ring_gp_in_ring__prod_f(void)
285{
286 return 0x0;
287}
288static inline u32 sim_send_ring_gp_in_ring_no_v(void)
289{
290 return 0x00000000;
291}
292static inline u32 sim_send_ring_gp_in_ring_no_f(void)
293{
294 return 0x0;
295}
296static inline u32 sim_send_ring_gp_in_ring_yes_v(void)
297{
298 return 0x00000001;
299}
300static inline u32 sim_send_ring_gp_in_ring_yes_f(void)
301{
302 return 0x800;
303}
304static inline u32 sim_send_ring_addr_lo_s(void)
305{
306 return 20;
307}
308static inline u32 sim_send_ring_addr_lo_f(u32 v)
309{
310 return (v & 0xfffff) << 12;
311}
312static inline u32 sim_send_ring_addr_lo_m(void)
313{
314 return 0xfffff << 12;
315}
316static inline u32 sim_send_ring_addr_lo_v(u32 r)
317{
318 return (r >> 12) & 0xfffff;
319}
320static inline u32 sim_send_ring_addr_lo__init_v(void)
321{
322 return 0x00000000;
323}
324static inline u32 sim_send_ring_addr_lo__init_f(void)
325{
326 return 0x0;
327}
328static inline u32 sim_send_ring_addr_lo__prod_v(void)
329{
330 return 0x00000000;
331}
332static inline u32 sim_send_ring_addr_lo__prod_f(void)
333{
334 return 0x0;
335}
336static inline u32 sim_send_ring_hi_r(void)
337{
338 return 0x00000004;
339}
340static inline u32 sim_send_ring_hi_addr_s(void)
341{
342 return 20;
343}
344static inline u32 sim_send_ring_hi_addr_f(u32 v)
345{
346 return (v & 0xfffff) << 0;
347}
348static inline u32 sim_send_ring_hi_addr_m(void)
349{
350 return 0xfffff << 0;
351}
352static inline u32 sim_send_ring_hi_addr_v(u32 r)
353{
354 return (r >> 0) & 0xfffff;
355}
356static inline u32 sim_send_ring_hi_addr__init_v(void)
357{
358 return 0x00000000;
359}
360static inline u32 sim_send_ring_hi_addr__init_f(void)
361{
362 return 0x0;
363}
364static inline u32 sim_send_ring_hi_addr__prod_v(void)
365{
366 return 0x00000000;
367}
368static inline u32 sim_send_ring_hi_addr__prod_f(void)
369{
370 return 0x0;
371}
372static inline u32 sim_send_put_r(void)
373{
374 return 0x00000008;
375}
376static inline u32 sim_send_put_pointer_s(void)
377{
378 return 29;
379}
380static inline u32 sim_send_put_pointer_f(u32 v)
381{
382 return (v & 0x1fffffff) << 3;
383}
384static inline u32 sim_send_put_pointer_m(void)
385{
386 return 0x1fffffff << 3;
387}
388static inline u32 sim_send_put_pointer_v(u32 r)
389{
390 return (r >> 3) & 0x1fffffff;
391}
392static inline u32 sim_send_get_r(void)
393{
394 return 0x0000000c;
395}
396static inline u32 sim_send_get_pointer_s(void)
397{
398 return 29;
399}
400static inline u32 sim_send_get_pointer_f(u32 v)
401{
402 return (v & 0x1fffffff) << 3;
403}
404static inline u32 sim_send_get_pointer_m(void)
405{
406 return 0x1fffffff << 3;
407}
408static inline u32 sim_send_get_pointer_v(u32 r)
409{
410 return (r >> 3) & 0x1fffffff;
411}
412static inline u32 sim_recv_ring_r(void)
413{
414 return 0x00000010;
415}
416static inline u32 sim_recv_ring_target_s(void)
417{
418 return 2;
419}
420static inline u32 sim_recv_ring_target_f(u32 v)
421{
422 return (v & 0x3) << 0;
423}
424static inline u32 sim_recv_ring_target_m(void)
425{
426 return 0x3 << 0;
427}
428static inline u32 sim_recv_ring_target_v(u32 r)
429{
430 return (r >> 0) & 0x3;
431}
432static inline u32 sim_recv_ring_target_phys_init_v(void)
433{
434 return 0x00000001;
435}
436static inline u32 sim_recv_ring_target_phys_init_f(void)
437{
438 return 0x1;
439}
440static inline u32 sim_recv_ring_target_phys__init_v(void)
441{
442 return 0x00000001;
443}
444static inline u32 sim_recv_ring_target_phys__init_f(void)
445{
446 return 0x1;
447}
448static inline u32 sim_recv_ring_target_phys__prod_v(void)
449{
450 return 0x00000001;
451}
452static inline u32 sim_recv_ring_target_phys__prod_f(void)
453{
454 return 0x1;
455}
456static inline u32 sim_recv_ring_target_phys_nvm_v(void)
457{
458 return 0x00000001;
459}
460static inline u32 sim_recv_ring_target_phys_nvm_f(void)
461{
462 return 0x1;
463}
464static inline u32 sim_recv_ring_target_phys_pci_v(void)
465{
466 return 0x00000002;
467}
468static inline u32 sim_recv_ring_target_phys_pci_f(void)
469{
470 return 0x2;
471}
472static inline u32 sim_recv_ring_target_phys_pci_coherent_v(void)
473{
474 return 0x00000003;
475}
476static inline u32 sim_recv_ring_target_phys_pci_coherent_f(void)
477{
478 return 0x3;
479}
480static inline u32 sim_recv_ring_status_s(void)
481{
482 return 1;
483}
484static inline u32 sim_recv_ring_status_f(u32 v)
485{
486 return (v & 0x1) << 3;
487}
488static inline u32 sim_recv_ring_status_m(void)
489{
490 return 0x1 << 3;
491}
492static inline u32 sim_recv_ring_status_v(u32 r)
493{
494 return (r >> 3) & 0x1;
495}
496static inline u32 sim_recv_ring_status_init_v(void)
497{
498 return 0x00000000;
499}
500static inline u32 sim_recv_ring_status_init_f(void)
501{
502 return 0x0;
503}
504static inline u32 sim_recv_ring_status__init_v(void)
505{
506 return 0x00000000;
507}
508static inline u32 sim_recv_ring_status__init_f(void)
509{
510 return 0x0;
511}
512static inline u32 sim_recv_ring_status__prod_v(void)
513{
514 return 0x00000000;
515}
516static inline u32 sim_recv_ring_status__prod_f(void)
517{
518 return 0x0;
519}
520static inline u32 sim_recv_ring_status_invalid_v(void)
521{
522 return 0x00000000;
523}
524static inline u32 sim_recv_ring_status_invalid_f(void)
525{
526 return 0x0;
527}
528static inline u32 sim_recv_ring_status_valid_v(void)
529{
530 return 0x00000001;
531}
532static inline u32 sim_recv_ring_status_valid_f(void)
533{
534 return 0x8;
535}
536static inline u32 sim_recv_ring_size_s(void)
537{
538 return 2;
539}
540static inline u32 sim_recv_ring_size_f(u32 v)
541{
542 return (v & 0x3) << 4;
543}
544static inline u32 sim_recv_ring_size_m(void)
545{
546 return 0x3 << 4;
547}
548static inline u32 sim_recv_ring_size_v(u32 r)
549{
550 return (r >> 4) & 0x3;
551}
552static inline u32 sim_recv_ring_size_init_v(void)
553{
554 return 0x00000000;
555}
556static inline u32 sim_recv_ring_size_init_f(void)
557{
558 return 0x0;
559}
560static inline u32 sim_recv_ring_size__init_v(void)
561{
562 return 0x00000000;
563}
564static inline u32 sim_recv_ring_size__init_f(void)
565{
566 return 0x0;
567}
568static inline u32 sim_recv_ring_size__prod_v(void)
569{
570 return 0x00000000;
571}
572static inline u32 sim_recv_ring_size__prod_f(void)
573{
574 return 0x0;
575}
576static inline u32 sim_recv_ring_size_4kb_v(void)
577{
578 return 0x00000000;
579}
580static inline u32 sim_recv_ring_size_4kb_f(void)
581{
582 return 0x0;
583}
584static inline u32 sim_recv_ring_size_8kb_v(void)
585{
586 return 0x00000001;
587}
588static inline u32 sim_recv_ring_size_8kb_f(void)
589{
590 return 0x10;
591}
592static inline u32 sim_recv_ring_size_12kb_v(void)
593{
594 return 0x00000002;
595}
596static inline u32 sim_recv_ring_size_12kb_f(void)
597{
598 return 0x20;
599}
600static inline u32 sim_recv_ring_size_16kb_v(void)
601{
602 return 0x00000003;
603}
604static inline u32 sim_recv_ring_size_16kb_f(void)
605{
606 return 0x30;
607}
608static inline u32 sim_recv_ring_gp_in_ring_s(void)
609{
610 return 1;
611}
612static inline u32 sim_recv_ring_gp_in_ring_f(u32 v)
613{
614 return (v & 0x1) << 11;
615}
616static inline u32 sim_recv_ring_gp_in_ring_m(void)
617{
618 return 0x1 << 11;
619}
620static inline u32 sim_recv_ring_gp_in_ring_v(u32 r)
621{
622 return (r >> 11) & 0x1;
623}
624static inline u32 sim_recv_ring_gp_in_ring__init_v(void)
625{
626 return 0x00000000;
627}
628static inline u32 sim_recv_ring_gp_in_ring__init_f(void)
629{
630 return 0x0;
631}
632static inline u32 sim_recv_ring_gp_in_ring__prod_v(void)
633{
634 return 0x00000000;
635}
636static inline u32 sim_recv_ring_gp_in_ring__prod_f(void)
637{
638 return 0x0;
639}
640static inline u32 sim_recv_ring_gp_in_ring_no_v(void)
641{
642 return 0x00000000;
643}
644static inline u32 sim_recv_ring_gp_in_ring_no_f(void)
645{
646 return 0x0;
647}
648static inline u32 sim_recv_ring_gp_in_ring_yes_v(void)
649{
650 return 0x00000001;
651}
652static inline u32 sim_recv_ring_gp_in_ring_yes_f(void)
653{
654 return 0x800;
655}
656static inline u32 sim_recv_ring_addr_lo_s(void)
657{
658 return 20;
659}
660static inline u32 sim_recv_ring_addr_lo_f(u32 v)
661{
662 return (v & 0xfffff) << 12;
663}
664static inline u32 sim_recv_ring_addr_lo_m(void)
665{
666 return 0xfffff << 12;
667}
668static inline u32 sim_recv_ring_addr_lo_v(u32 r)
669{
670 return (r >> 12) & 0xfffff;
671}
672static inline u32 sim_recv_ring_addr_lo__init_v(void)
673{
674 return 0x00000000;
675}
676static inline u32 sim_recv_ring_addr_lo__init_f(void)
677{
678 return 0x0;
679}
680static inline u32 sim_recv_ring_addr_lo__prod_v(void)
681{
682 return 0x00000000;
683}
684static inline u32 sim_recv_ring_addr_lo__prod_f(void)
685{
686 return 0x0;
687}
688static inline u32 sim_recv_ring_hi_r(void)
689{
690 return 0x00000014;
691}
692static inline u32 sim_recv_ring_hi_addr_s(void)
693{
694 return 20;
695}
696static inline u32 sim_recv_ring_hi_addr_f(u32 v)
697{
698 return (v & 0xfffff) << 0;
699}
700static inline u32 sim_recv_ring_hi_addr_m(void)
701{
702 return 0xfffff << 0;
703}
704static inline u32 sim_recv_ring_hi_addr_v(u32 r)
705{
706 return (r >> 0) & 0xfffff;
707}
708static inline u32 sim_recv_ring_hi_addr__init_v(void)
709{
710 return 0x00000000;
711}
712static inline u32 sim_recv_ring_hi_addr__init_f(void)
713{
714 return 0x0;
715}
716static inline u32 sim_recv_ring_hi_addr__prod_v(void)
717{
718 return 0x00000000;
719}
720static inline u32 sim_recv_ring_hi_addr__prod_f(void)
721{
722 return 0x0;
723}
724static inline u32 sim_recv_put_r(void)
725{
726 return 0x00000018;
727}
728static inline u32 sim_recv_put_pointer_s(void)
729{
730 return 11;
731}
732static inline u32 sim_recv_put_pointer_f(u32 v)
733{
734 return (v & 0x7ff) << 3;
735}
736static inline u32 sim_recv_put_pointer_m(void)
737{
738 return 0x7ff << 3;
739}
740static inline u32 sim_recv_put_pointer_v(u32 r)
741{
742 return (r >> 3) & 0x7ff;
743}
744static inline u32 sim_recv_get_r(void)
745{
746 return 0x0000001c;
747}
748static inline u32 sim_recv_get_pointer_s(void)
749{
750 return 11;
751}
752static inline u32 sim_recv_get_pointer_f(u32 v)
753{
754 return (v & 0x7ff) << 3;
755}
756static inline u32 sim_recv_get_pointer_m(void)
757{
758 return 0x7ff << 3;
759}
760static inline u32 sim_recv_get_pointer_v(u32 r)
761{
762 return (r >> 3) & 0x7ff;
763}
764static inline u32 sim_config_r(void)
765{
766 return 0x00000020;
767}
768static inline u32 sim_config_mode_s(void)
769{
770 return 1;
771}
772static inline u32 sim_config_mode_f(u32 v)
773{
774 return (v & 0x1) << 0;
775}
776static inline u32 sim_config_mode_m(void)
777{
778 return 0x1 << 0;
779}
780static inline u32 sim_config_mode_v(u32 r)
781{
782 return (r >> 0) & 0x1;
783}
784static inline u32 sim_config_mode_disabled_v(void)
785{
786 return 0x00000000;
787}
788static inline u32 sim_config_mode_disabled_f(void)
789{
790 return 0x0;
791}
792static inline u32 sim_config_mode_enabled_v(void)
793{
794 return 0x00000001;
795}
796static inline u32 sim_config_mode_enabled_f(void)
797{
798 return 0x1;
799}
800static inline u32 sim_config_channels_s(void)
801{
802 return 7;
803}
804static inline u32 sim_config_channels_f(u32 v)
805{
806 return (v & 0x7f) << 1;
807}
808static inline u32 sim_config_channels_m(void)
809{
810 return 0x7f << 1;
811}
812static inline u32 sim_config_channels_v(u32 r)
813{
814 return (r >> 1) & 0x7f;
815}
816static inline u32 sim_config_channels_none_v(void)
817{
818 return 0x00000000;
819}
820static inline u32 sim_config_channels_none_f(void)
821{
822 return 0x0;
823}
824static inline u32 sim_config_cached_only_s(void)
825{
826 return 1;
827}
828static inline u32 sim_config_cached_only_f(u32 v)
829{
830 return (v & 0x1) << 8;
831}
832static inline u32 sim_config_cached_only_m(void)
833{
834 return 0x1 << 8;
835}
836static inline u32 sim_config_cached_only_v(u32 r)
837{
838 return (r >> 8) & 0x1;
839}
840static inline u32 sim_config_cached_only_disabled_v(void)
841{
842 return 0x00000000;
843}
844static inline u32 sim_config_cached_only_disabled_f(void)
845{
846 return 0x0;
847}
848static inline u32 sim_config_cached_only_enabled_v(void)
849{
850 return 0x00000001;
851}
852static inline u32 sim_config_cached_only_enabled_f(void)
853{
854 return 0x100;
855}
856static inline u32 sim_config_validity_s(void)
857{
858 return 2;
859}
860static inline u32 sim_config_validity_f(u32 v)
861{
862 return (v & 0x3) << 9;
863}
864static inline u32 sim_config_validity_m(void)
865{
866 return 0x3 << 9;
867}
868static inline u32 sim_config_validity_v(u32 r)
869{
870 return (r >> 9) & 0x3;
871}
872static inline u32 sim_config_validity__init_v(void)
873{
874 return 0x00000001;
875}
876static inline u32 sim_config_validity__init_f(void)
877{
878 return 0x200;
879}
880static inline u32 sim_config_validity_valid_v(void)
881{
882 return 0x00000001;
883}
884static inline u32 sim_config_validity_valid_f(void)
885{
886 return 0x200;
887}
888static inline u32 sim_config_simulation_s(void)
889{
890 return 2;
891}
892static inline u32 sim_config_simulation_f(u32 v)
893{
894 return (v & 0x3) << 12;
895}
896static inline u32 sim_config_simulation_m(void)
897{
898 return 0x3 << 12;
899}
900static inline u32 sim_config_simulation_v(u32 r)
901{
902 return (r >> 12) & 0x3;
903}
904static inline u32 sim_config_simulation_disabled_v(void)
905{
906 return 0x00000000;
907}
908static inline u32 sim_config_simulation_disabled_f(void)
909{
910 return 0x0;
911}
912static inline u32 sim_config_simulation_fmodel_v(void)
913{
914 return 0x00000001;
915}
916static inline u32 sim_config_simulation_fmodel_f(void)
917{
918 return 0x1000;
919}
920static inline u32 sim_config_simulation_rtlsim_v(void)
921{
922 return 0x00000002;
923}
924static inline u32 sim_config_simulation_rtlsim_f(void)
925{
926 return 0x2000;
927}
928static inline u32 sim_config_secondary_display_s(void)
929{
930 return 1;
931}
932static inline u32 sim_config_secondary_display_f(u32 v)
933{
934 return (v & 0x1) << 14;
935}
936static inline u32 sim_config_secondary_display_m(void)
937{
938 return 0x1 << 14;
939}
940static inline u32 sim_config_secondary_display_v(u32 r)
941{
942 return (r >> 14) & 0x1;
943}
944static inline u32 sim_config_secondary_display_disabled_v(void)
945{
946 return 0x00000000;
947}
948static inline u32 sim_config_secondary_display_disabled_f(void)
949{
950 return 0x0;
951}
952static inline u32 sim_config_secondary_display_enabled_v(void)
953{
954 return 0x00000001;
955}
956static inline u32 sim_config_secondary_display_enabled_f(void)
957{
958 return 0x4000;
959}
960static inline u32 sim_config_num_heads_s(void)
961{
962 return 8;
963}
964static inline u32 sim_config_num_heads_f(u32 v)
965{
966 return (v & 0xff) << 17;
967}
968static inline u32 sim_config_num_heads_m(void)
969{
970 return 0xff << 17;
971}
972static inline u32 sim_config_num_heads_v(u32 r)
973{
974 return (r >> 17) & 0xff;
975}
976static inline u32 sim_event_ring_r(void)
977{
978 return 0x00000030;
979}
980static inline u32 sim_event_ring_target_s(void)
981{
982 return 2;
983}
984static inline u32 sim_event_ring_target_f(u32 v)
985{
986 return (v & 0x3) << 0;
987}
988static inline u32 sim_event_ring_target_m(void)
989{
990 return 0x3 << 0;
991}
992static inline u32 sim_event_ring_target_v(u32 r)
993{
994 return (r >> 0) & 0x3;
995}
996static inline u32 sim_event_ring_target_phys_init_v(void)
997{
998 return 0x00000001;
999}
1000static inline u32 sim_event_ring_target_phys_init_f(void)
1001{
1002 return 0x1;
1003}
1004static inline u32 sim_event_ring_target_phys__init_v(void)
1005{
1006 return 0x00000001;
1007}
1008static inline u32 sim_event_ring_target_phys__init_f(void)
1009{
1010 return 0x1;
1011}
1012static inline u32 sim_event_ring_target_phys__prod_v(void)
1013{
1014 return 0x00000001;
1015}
1016static inline u32 sim_event_ring_target_phys__prod_f(void)
1017{
1018 return 0x1;
1019}
1020static inline u32 sim_event_ring_target_phys_nvm_v(void)
1021{
1022 return 0x00000001;
1023}
1024static inline u32 sim_event_ring_target_phys_nvm_f(void)
1025{
1026 return 0x1;
1027}
1028static inline u32 sim_event_ring_target_phys_pci_v(void)
1029{
1030 return 0x00000002;
1031}
1032static inline u32 sim_event_ring_target_phys_pci_f(void)
1033{
1034 return 0x2;
1035}
1036static inline u32 sim_event_ring_target_phys_pci_coherent_v(void)
1037{
1038 return 0x00000003;
1039}
1040static inline u32 sim_event_ring_target_phys_pci_coherent_f(void)
1041{
1042 return 0x3;
1043}
1044static inline u32 sim_event_ring_status_s(void)
1045{
1046 return 1;
1047}
1048static inline u32 sim_event_ring_status_f(u32 v)
1049{
1050 return (v & 0x1) << 3;
1051}
1052static inline u32 sim_event_ring_status_m(void)
1053{
1054 return 0x1 << 3;
1055}
1056static inline u32 sim_event_ring_status_v(u32 r)
1057{
1058 return (r >> 3) & 0x1;
1059}
1060static inline u32 sim_event_ring_status_init_v(void)
1061{
1062 return 0x00000000;
1063}
1064static inline u32 sim_event_ring_status_init_f(void)
1065{
1066 return 0x0;
1067}
1068static inline u32 sim_event_ring_status__init_v(void)
1069{
1070 return 0x00000000;
1071}
1072static inline u32 sim_event_ring_status__init_f(void)
1073{
1074 return 0x0;
1075}
1076static inline u32 sim_event_ring_status__prod_v(void)
1077{
1078 return 0x00000000;
1079}
1080static inline u32 sim_event_ring_status__prod_f(void)
1081{
1082 return 0x0;
1083}
1084static inline u32 sim_event_ring_status_invalid_v(void)
1085{
1086 return 0x00000000;
1087}
1088static inline u32 sim_event_ring_status_invalid_f(void)
1089{
1090 return 0x0;
1091}
1092static inline u32 sim_event_ring_status_valid_v(void)
1093{
1094 return 0x00000001;
1095}
1096static inline u32 sim_event_ring_status_valid_f(void)
1097{
1098 return 0x8;
1099}
1100static inline u32 sim_event_ring_size_s(void)
1101{
1102 return 2;
1103}
1104static inline u32 sim_event_ring_size_f(u32 v)
1105{
1106 return (v & 0x3) << 4;
1107}
1108static inline u32 sim_event_ring_size_m(void)
1109{
1110 return 0x3 << 4;
1111}
1112static inline u32 sim_event_ring_size_v(u32 r)
1113{
1114 return (r >> 4) & 0x3;
1115}
1116static inline u32 sim_event_ring_size_init_v(void)
1117{
1118 return 0x00000000;
1119}
1120static inline u32 sim_event_ring_size_init_f(void)
1121{
1122 return 0x0;
1123}
1124static inline u32 sim_event_ring_size__init_v(void)
1125{
1126 return 0x00000000;
1127}
1128static inline u32 sim_event_ring_size__init_f(void)
1129{
1130 return 0x0;
1131}
1132static inline u32 sim_event_ring_size__prod_v(void)
1133{
1134 return 0x00000000;
1135}
1136static inline u32 sim_event_ring_size__prod_f(void)
1137{
1138 return 0x0;
1139}
1140static inline u32 sim_event_ring_size_4kb_v(void)
1141{
1142 return 0x00000000;
1143}
1144static inline u32 sim_event_ring_size_4kb_f(void)
1145{
1146 return 0x0;
1147}
1148static inline u32 sim_event_ring_size_8kb_v(void)
1149{
1150 return 0x00000001;
1151}
1152static inline u32 sim_event_ring_size_8kb_f(void)
1153{
1154 return 0x10;
1155}
1156static inline u32 sim_event_ring_size_12kb_v(void)
1157{
1158 return 0x00000002;
1159}
1160static inline u32 sim_event_ring_size_12kb_f(void)
1161{
1162 return 0x20;
1163}
1164static inline u32 sim_event_ring_size_16kb_v(void)
1165{
1166 return 0x00000003;
1167}
1168static inline u32 sim_event_ring_size_16kb_f(void)
1169{
1170 return 0x30;
1171}
1172static inline u32 sim_event_ring_gp_in_ring_s(void)
1173{
1174 return 1;
1175}
1176static inline u32 sim_event_ring_gp_in_ring_f(u32 v)
1177{
1178 return (v & 0x1) << 11;
1179}
1180static inline u32 sim_event_ring_gp_in_ring_m(void)
1181{
1182 return 0x1 << 11;
1183}
1184static inline u32 sim_event_ring_gp_in_ring_v(u32 r)
1185{
1186 return (r >> 11) & 0x1;
1187}
1188static inline u32 sim_event_ring_gp_in_ring__init_v(void)
1189{
1190 return 0x00000000;
1191}
1192static inline u32 sim_event_ring_gp_in_ring__init_f(void)
1193{
1194 return 0x0;
1195}
1196static inline u32 sim_event_ring_gp_in_ring__prod_v(void)
1197{
1198 return 0x00000000;
1199}
1200static inline u32 sim_event_ring_gp_in_ring__prod_f(void)
1201{
1202 return 0x0;
1203}
1204static inline u32 sim_event_ring_gp_in_ring_no_v(void)
1205{
1206 return 0x00000000;
1207}
1208static inline u32 sim_event_ring_gp_in_ring_no_f(void)
1209{
1210 return 0x0;
1211}
1212static inline u32 sim_event_ring_gp_in_ring_yes_v(void)
1213{
1214 return 0x00000001;
1215}
1216static inline u32 sim_event_ring_gp_in_ring_yes_f(void)
1217{
1218 return 0x800;
1219}
1220static inline u32 sim_event_ring_addr_lo_s(void)
1221{
1222 return 20;
1223}
1224static inline u32 sim_event_ring_addr_lo_f(u32 v)
1225{
1226 return (v & 0xfffff) << 12;
1227}
1228static inline u32 sim_event_ring_addr_lo_m(void)
1229{
1230 return 0xfffff << 12;
1231}
1232static inline u32 sim_event_ring_addr_lo_v(u32 r)
1233{
1234 return (r >> 12) & 0xfffff;
1235}
1236static inline u32 sim_event_ring_addr_lo__init_v(void)
1237{
1238 return 0x00000000;
1239}
1240static inline u32 sim_event_ring_addr_lo__init_f(void)
1241{
1242 return 0x0;
1243}
1244static inline u32 sim_event_ring_addr_lo__prod_v(void)
1245{
1246 return 0x00000000;
1247}
1248static inline u32 sim_event_ring_addr_lo__prod_f(void)
1249{
1250 return 0x0;
1251}
1252static inline u32 sim_event_ring_hi_v(void)
1253{
1254 return 0x00000034;
1255}
1256static inline u32 sim_event_ring_hi_addr_s(void)
1257{
1258 return 20;
1259}
1260static inline u32 sim_event_ring_hi_addr_f(u32 v)
1261{
1262 return (v & 0xfffff) << 0;
1263}
1264static inline u32 sim_event_ring_hi_addr_m(void)
1265{
1266 return 0xfffff << 0;
1267}
1268static inline u32 sim_event_ring_hi_addr_v(u32 r)
1269{
1270 return (r >> 0) & 0xfffff;
1271}
1272static inline u32 sim_event_ring_hi_addr__init_v(void)
1273{
1274 return 0x00000000;
1275}
1276static inline u32 sim_event_ring_hi_addr__init_f(void)
1277{
1278 return 0x0;
1279}
1280static inline u32 sim_event_ring_hi_addr__prod_v(void)
1281{
1282 return 0x00000000;
1283}
1284static inline u32 sim_event_ring_hi_addr__prod_f(void)
1285{
1286 return 0x0;
1287}
1288static inline u32 sim_event_put_r(void)
1289{
1290 return 0x00000038;
1291}
1292static inline u32 sim_event_put_pointer_s(void)
1293{
1294 return 30;
1295}
1296static inline u32 sim_event_put_pointer_f(u32 v)
1297{
1298 return (v & 0x3fffffff) << 2;
1299}
1300static inline u32 sim_event_put_pointer_m(void)
1301{
1302 return 0x3fffffff << 2;
1303}
1304static inline u32 sim_event_put_pointer_v(u32 r)
1305{
1306 return (r >> 2) & 0x3fffffff;
1307}
1308static inline u32 sim_event_get_r(void)
1309{
1310 return 0x0000003c;
1311}
1312static inline u32 sim_event_get_pointer_s(void)
1313{
1314 return 30;
1315}
1316static inline u32 sim_event_get_pointer_f(u32 v)
1317{
1318 return (v & 0x3fffffff) << 2;
1319}
1320static inline u32 sim_event_get_pointer_m(void)
1321{
1322 return 0x3fffffff << 2;
1323}
1324static inline u32 sim_event_get_pointer_v(u32 r)
1325{
1326 return (r >> 2) & 0x3fffffff;
1327}
1328static inline u32 sim_status_r(void)
1329{
1330 return 0x00000028;
1331}
1332static inline u32 sim_status_send_put_s(void)
1333{
1334 return 1;
1335}
1336static inline u32 sim_status_send_put_f(u32 v)
1337{
1338 return (v & 0x1) << 0;
1339}
1340static inline u32 sim_status_send_put_m(void)
1341{
1342 return 0x1 << 0;
1343}
1344static inline u32 sim_status_send_put_v(u32 r)
1345{
1346 return (r >> 0) & 0x1;
1347}
1348static inline u32 sim_status_send_put__init_v(void)
1349{
1350 return 0x00000000;
1351}
1352static inline u32 sim_status_send_put__init_f(void)
1353{
1354 return 0x0;
1355}
1356static inline u32 sim_status_send_put_idle_v(void)
1357{
1358 return 0x00000000;
1359}
1360static inline u32 sim_status_send_put_idle_f(void)
1361{
1362 return 0x0;
1363}
1364static inline u32 sim_status_send_put_pending_v(void)
1365{
1366 return 0x00000001;
1367}
1368static inline u32 sim_status_send_put_pending_f(void)
1369{
1370 return 0x1;
1371}
1372static inline u32 sim_status_send_get_s(void)
1373{
1374 return 1;
1375}
1376static inline u32 sim_status_send_get_f(u32 v)
1377{
1378 return (v & 0x1) << 1;
1379}
1380static inline u32 sim_status_send_get_m(void)
1381{
1382 return 0x1 << 1;
1383}
1384static inline u32 sim_status_send_get_v(u32 r)
1385{
1386 return (r >> 1) & 0x1;
1387}
1388static inline u32 sim_status_send_get__init_v(void)
1389{
1390 return 0x00000000;
1391}
1392static inline u32 sim_status_send_get__init_f(void)
1393{
1394 return 0x0;
1395}
1396static inline u32 sim_status_send_get_idle_v(void)
1397{
1398 return 0x00000000;
1399}
1400static inline u32 sim_status_send_get_idle_f(void)
1401{
1402 return 0x0;
1403}
1404static inline u32 sim_status_send_get_pending_v(void)
1405{
1406 return 0x00000001;
1407}
1408static inline u32 sim_status_send_get_pending_f(void)
1409{
1410 return 0x2;
1411}
1412static inline u32 sim_status_send_get_clear_v(void)
1413{
1414 return 0x00000001;
1415}
1416static inline u32 sim_status_send_get_clear_f(void)
1417{
1418 return 0x2;
1419}
1420static inline u32 sim_status_recv_put_s(void)
1421{
1422 return 1;
1423}
1424static inline u32 sim_status_recv_put_f(u32 v)
1425{
1426 return (v & 0x1) << 2;
1427}
1428static inline u32 sim_status_recv_put_m(void)
1429{
1430 return 0x1 << 2;
1431}
1432static inline u32 sim_status_recv_put_v(u32 r)
1433{
1434 return (r >> 2) & 0x1;
1435}
1436static inline u32 sim_status_recv_put__init_v(void)
1437{
1438 return 0x00000000;
1439}
1440static inline u32 sim_status_recv_put__init_f(void)
1441{
1442 return 0x0;
1443}
1444static inline u32 sim_status_recv_put_idle_v(void)
1445{
1446 return 0x00000000;
1447}
1448static inline u32 sim_status_recv_put_idle_f(void)
1449{
1450 return 0x0;
1451}
1452static inline u32 sim_status_recv_put_pending_v(void)
1453{
1454 return 0x00000001;
1455}
1456static inline u32 sim_status_recv_put_pending_f(void)
1457{
1458 return 0x4;
1459}
1460static inline u32 sim_status_recv_put_clear_v(void)
1461{
1462 return 0x00000001;
1463}
1464static inline u32 sim_status_recv_put_clear_f(void)
1465{
1466 return 0x4;
1467}
1468static inline u32 sim_status_recv_get_s(void)
1469{
1470 return 1;
1471}
1472static inline u32 sim_status_recv_get_f(u32 v)
1473{
1474 return (v & 0x1) << 3;
1475}
1476static inline u32 sim_status_recv_get_m(void)
1477{
1478 return 0x1 << 3;
1479}
1480static inline u32 sim_status_recv_get_v(u32 r)
1481{
1482 return (r >> 3) & 0x1;
1483}
1484static inline u32 sim_status_recv_get__init_v(void)
1485{
1486 return 0x00000000;
1487}
1488static inline u32 sim_status_recv_get__init_f(void)
1489{
1490 return 0x0;
1491}
1492static inline u32 sim_status_recv_get_idle_v(void)
1493{
1494 return 0x00000000;
1495}
1496static inline u32 sim_status_recv_get_idle_f(void)
1497{
1498 return 0x0;
1499}
1500static inline u32 sim_status_recv_get_pending_v(void)
1501{
1502 return 0x00000001;
1503}
1504static inline u32 sim_status_recv_get_pending_f(void)
1505{
1506 return 0x8;
1507}
1508static inline u32 sim_status_event_put_s(void)
1509{
1510 return 1;
1511}
1512static inline u32 sim_status_event_put_f(u32 v)
1513{
1514 return (v & 0x1) << 4;
1515}
1516static inline u32 sim_status_event_put_m(void)
1517{
1518 return 0x1 << 4;
1519}
1520static inline u32 sim_status_event_put_v(u32 r)
1521{
1522 return (r >> 4) & 0x1;
1523}
1524static inline u32 sim_status_event_put__init_v(void)
1525{
1526 return 0x00000000;
1527}
1528static inline u32 sim_status_event_put__init_f(void)
1529{
1530 return 0x0;
1531}
1532static inline u32 sim_status_event_put_idle_v(void)
1533{
1534 return 0x00000000;
1535}
1536static inline u32 sim_status_event_put_idle_f(void)
1537{
1538 return 0x0;
1539}
1540static inline u32 sim_status_event_put_pending_v(void)
1541{
1542 return 0x00000001;
1543}
1544static inline u32 sim_status_event_put_pending_f(void)
1545{
1546 return 0x10;
1547}
1548static inline u32 sim_status_event_put_clear_v(void)
1549{
1550 return 0x00000001;
1551}
1552static inline u32 sim_status_event_put_clear_f(void)
1553{
1554 return 0x10;
1555}
1556static inline u32 sim_status_event_get_s(void)
1557{
1558 return 1;
1559}
1560static inline u32 sim_status_event_get_f(u32 v)
1561{
1562 return (v & 0x1) << 5;
1563}
1564static inline u32 sim_status_event_get_m(void)
1565{
1566 return 0x1 << 5;
1567}
1568static inline u32 sim_status_event_get_v(u32 r)
1569{
1570 return (r >> 5) & 0x1;
1571}
1572static inline u32 sim_status_event_get__init_v(void)
1573{
1574 return 0x00000000;
1575}
1576static inline u32 sim_status_event_get__init_f(void)
1577{
1578 return 0x0;
1579}
1580static inline u32 sim_status_event_get_idle_v(void)
1581{
1582 return 0x00000000;
1583}
1584static inline u32 sim_status_event_get_idle_f(void)
1585{
1586 return 0x0;
1587}
1588static inline u32 sim_status_event_get_pending_v(void)
1589{
1590 return 0x00000001;
1591}
1592static inline u32 sim_status_event_get_pending_f(void)
1593{
1594 return 0x20;
1595}
1596static inline u32 sim_control_r(void)
1597{
1598 return 0x0000002c;
1599}
1600static inline u32 sim_control_send_put_s(void)
1601{
1602 return 1;
1603}
1604static inline u32 sim_control_send_put_f(u32 v)
1605{
1606 return (v & 0x1) << 0;
1607}
1608static inline u32 sim_control_send_put_m(void)
1609{
1610 return 0x1 << 0;
1611}
1612static inline u32 sim_control_send_put_v(u32 r)
1613{
1614 return (r >> 0) & 0x1;
1615}
1616static inline u32 sim_control_send_put__init_v(void)
1617{
1618 return 0x00000000;
1619}
1620static inline u32 sim_control_send_put__init_f(void)
1621{
1622 return 0x0;
1623}
1624static inline u32 sim_control_send_put_disabled_v(void)
1625{
1626 return 0x00000000;
1627}
1628static inline u32 sim_control_send_put_disabled_f(void)
1629{
1630 return 0x0;
1631}
1632static inline u32 sim_control_send_put_enabled_v(void)
1633{
1634 return 0x00000001;
1635}
1636static inline u32 sim_control_send_put_enabled_f(void)
1637{
1638 return 0x1;
1639}
1640static inline u32 sim_control_send_get_s(void)
1641{
1642 return 1;
1643}
1644static inline u32 sim_control_send_get_f(u32 v)
1645{
1646 return (v & 0x1) << 1;
1647}
1648static inline u32 sim_control_send_get_m(void)
1649{
1650 return 0x1 << 1;
1651}
1652static inline u32 sim_control_send_get_v(u32 r)
1653{
1654 return (r >> 1) & 0x1;
1655}
1656static inline u32 sim_control_send_get__init_v(void)
1657{
1658 return 0x00000000;
1659}
1660static inline u32 sim_control_send_get__init_f(void)
1661{
1662 return 0x0;
1663}
1664static inline u32 sim_control_send_get_disabled_v(void)
1665{
1666 return 0x00000000;
1667}
1668static inline u32 sim_control_send_get_disabled_f(void)
1669{
1670 return 0x0;
1671}
1672static inline u32 sim_control_send_get_enabled_v(void)
1673{
1674 return 0x00000001;
1675}
1676static inline u32 sim_control_send_get_enabled_f(void)
1677{
1678 return 0x2;
1679}
1680static inline u32 sim_control_recv_put_s(void)
1681{
1682 return 1;
1683}
1684static inline u32 sim_control_recv_put_f(u32 v)
1685{
1686 return (v & 0x1) << 2;
1687}
1688static inline u32 sim_control_recv_put_m(void)
1689{
1690 return 0x1 << 2;
1691}
1692static inline u32 sim_control_recv_put_v(u32 r)
1693{
1694 return (r >> 2) & 0x1;
1695}
1696static inline u32 sim_control_recv_put__init_v(void)
1697{
1698 return 0x00000000;
1699}
1700static inline u32 sim_control_recv_put__init_f(void)
1701{
1702 return 0x0;
1703}
1704static inline u32 sim_control_recv_put_disabled_v(void)
1705{
1706 return 0x00000000;
1707}
1708static inline u32 sim_control_recv_put_disabled_f(void)
1709{
1710 return 0x0;
1711}
1712static inline u32 sim_control_recv_put_enabled_v(void)
1713{
1714 return 0x00000001;
1715}
1716static inline u32 sim_control_recv_put_enabled_f(void)
1717{
1718 return 0x4;
1719}
1720static inline u32 sim_control_recv_get_s(void)
1721{
1722 return 1;
1723}
1724static inline u32 sim_control_recv_get_f(u32 v)
1725{
1726 return (v & 0x1) << 3;
1727}
1728static inline u32 sim_control_recv_get_m(void)
1729{
1730 return 0x1 << 3;
1731}
1732static inline u32 sim_control_recv_get_v(u32 r)
1733{
1734 return (r >> 3) & 0x1;
1735}
1736static inline u32 sim_control_recv_get__init_v(void)
1737{
1738 return 0x00000000;
1739}
1740static inline u32 sim_control_recv_get__init_f(void)
1741{
1742 return 0x0;
1743}
1744static inline u32 sim_control_recv_get_disabled_v(void)
1745{
1746 return 0x00000000;
1747}
1748static inline u32 sim_control_recv_get_disabled_f(void)
1749{
1750 return 0x0;
1751}
1752static inline u32 sim_control_recv_get_enabled_v(void)
1753{
1754 return 0x00000001;
1755}
1756static inline u32 sim_control_recv_get_enabled_f(void)
1757{
1758 return 0x8;
1759}
1760static inline u32 sim_control_event_put_s(void)
1761{
1762 return 1;
1763}
1764static inline u32 sim_control_event_put_f(u32 v)
1765{
1766 return (v & 0x1) << 4;
1767}
1768static inline u32 sim_control_event_put_m(void)
1769{
1770 return 0x1 << 4;
1771}
1772static inline u32 sim_control_event_put_v(u32 r)
1773{
1774 return (r >> 4) & 0x1;
1775}
1776static inline u32 sim_control_event_put__init_v(void)
1777{
1778 return 0x00000000;
1779}
1780static inline u32 sim_control_event_put__init_f(void)
1781{
1782 return 0x0;
1783}
1784static inline u32 sim_control_event_put_disabled_v(void)
1785{
1786 return 0x00000000;
1787}
1788static inline u32 sim_control_event_put_disabled_f(void)
1789{
1790 return 0x0;
1791}
1792static inline u32 sim_control_event_put_enabled_v(void)
1793{
1794 return 0x00000001;
1795}
1796static inline u32 sim_control_event_put_enabled_f(void)
1797{
1798 return 0x10;
1799}
1800static inline u32 sim_control_event_get_s(void)
1801{
1802 return 1;
1803}
1804static inline u32 sim_control_event_get_f(u32 v)
1805{
1806 return (v & 0x1) << 5;
1807}
1808static inline u32 sim_control_event_get_m(void)
1809{
1810 return 0x1 << 5;
1811}
1812static inline u32 sim_control_event_get_v(u32 r)
1813{
1814 return (r >> 5) & 0x1;
1815}
1816static inline u32 sim_control_event_get__init_v(void)
1817{
1818 return 0x00000000;
1819}
1820static inline u32 sim_control_event_get__init_f(void)
1821{
1822 return 0x0;
1823}
1824static inline u32 sim_control_event_get_disabled_v(void)
1825{
1826 return 0x00000000;
1827}
1828static inline u32 sim_control_event_get_disabled_f(void)
1829{
1830 return 0x0;
1831}
1832static inline u32 sim_control_event_get_enabled_v(void)
1833{
1834 return 0x00000001;
1835}
1836static inline u32 sim_control_event_get_enabled_f(void)
1837{
1838 return 0x20;
1839}
1840static inline u32 sim_dma_r(void)
1841{
1842 return 0x00000000;
1843}
1844static inline u32 sim_dma_target_s(void)
1845{
1846 return 2;
1847}
1848static inline u32 sim_dma_target_f(u32 v)
1849{
1850 return (v & 0x3) << 0;
1851}
1852static inline u32 sim_dma_target_m(void)
1853{
1854 return 0x3 << 0;
1855}
1856static inline u32 sim_dma_target_v(u32 r)
1857{
1858 return (r >> 0) & 0x3;
1859}
1860static inline u32 sim_dma_target_phys_init_v(void)
1861{
1862 return 0x00000001;
1863}
1864static inline u32 sim_dma_target_phys_init_f(void)
1865{
1866 return 0x1;
1867}
1868static inline u32 sim_dma_target_phys__init_v(void)
1869{
1870 return 0x00000001;
1871}
1872static inline u32 sim_dma_target_phys__init_f(void)
1873{
1874 return 0x1;
1875}
1876static inline u32 sim_dma_target_phys__prod_v(void)
1877{
1878 return 0x00000001;
1879}
1880static inline u32 sim_dma_target_phys__prod_f(void)
1881{
1882 return 0x1;
1883}
1884static inline u32 sim_dma_target_phys_nvm_v(void)
1885{
1886 return 0x00000001;
1887}
1888static inline u32 sim_dma_target_phys_nvm_f(void)
1889{
1890 return 0x1;
1891}
1892static inline u32 sim_dma_target_phys_pci_v(void)
1893{
1894 return 0x00000002;
1895}
1896static inline u32 sim_dma_target_phys_pci_f(void)
1897{
1898 return 0x2;
1899}
1900static inline u32 sim_dma_target_phys_pci_coherent_v(void)
1901{
1902 return 0x00000003;
1903}
1904static inline u32 sim_dma_target_phys_pci_coherent_f(void)
1905{
1906 return 0x3;
1907}
1908static inline u32 sim_dma_status_s(void)
1909{
1910 return 1;
1911}
1912static inline u32 sim_dma_status_f(u32 v)
1913{
1914 return (v & 0x1) << 3;
1915}
1916static inline u32 sim_dma_status_m(void)
1917{
1918 return 0x1 << 3;
1919}
1920static inline u32 sim_dma_status_v(u32 r)
1921{
1922 return (r >> 3) & 0x1;
1923}
1924static inline u32 sim_dma_status_init_v(void)
1925{
1926 return 0x00000000;
1927}
1928static inline u32 sim_dma_status_init_f(void)
1929{
1930 return 0x0;
1931}
1932static inline u32 sim_dma_status__init_v(void)
1933{
1934 return 0x00000000;
1935}
1936static inline u32 sim_dma_status__init_f(void)
1937{
1938 return 0x0;
1939}
1940static inline u32 sim_dma_status__prod_v(void)
1941{
1942 return 0x00000000;
1943}
1944static inline u32 sim_dma_status__prod_f(void)
1945{
1946 return 0x0;
1947}
1948static inline u32 sim_dma_status_invalid_v(void)
1949{
1950 return 0x00000000;
1951}
1952static inline u32 sim_dma_status_invalid_f(void)
1953{
1954 return 0x0;
1955}
1956static inline u32 sim_dma_status_valid_v(void)
1957{
1958 return 0x00000001;
1959}
1960static inline u32 sim_dma_status_valid_f(void)
1961{
1962 return 0x8;
1963}
1964static inline u32 sim_dma_size_s(void)
1965{
1966 return 2;
1967}
1968static inline u32 sim_dma_size_f(u32 v)
1969{
1970 return (v & 0x3) << 4;
1971}
1972static inline u32 sim_dma_size_m(void)
1973{
1974 return 0x3 << 4;
1975}
1976static inline u32 sim_dma_size_v(u32 r)
1977{
1978 return (r >> 4) & 0x3;
1979}
1980static inline u32 sim_dma_size_init_v(void)
1981{
1982 return 0x00000000;
1983}
1984static inline u32 sim_dma_size_init_f(void)
1985{
1986 return 0x0;
1987}
1988static inline u32 sim_dma_size__init_v(void)
1989{
1990 return 0x00000000;
1991}
1992static inline u32 sim_dma_size__init_f(void)
1993{
1994 return 0x0;
1995}
1996static inline u32 sim_dma_size__prod_v(void)
1997{
1998 return 0x00000000;
1999}
2000static inline u32 sim_dma_size__prod_f(void)
2001{
2002 return 0x0;
2003}
2004static inline u32 sim_dma_size_4kb_v(void)
2005{
2006 return 0x00000000;
2007}
2008static inline u32 sim_dma_size_4kb_f(void)
2009{
2010 return 0x0;
2011}
2012static inline u32 sim_dma_size_8kb_v(void)
2013{
2014 return 0x00000001;
2015}
2016static inline u32 sim_dma_size_8kb_f(void)
2017{
2018 return 0x10;
2019}
2020static inline u32 sim_dma_size_12kb_v(void)
2021{
2022 return 0x00000002;
2023}
2024static inline u32 sim_dma_size_12kb_f(void)
2025{
2026 return 0x20;
2027}
2028static inline u32 sim_dma_size_16kb_v(void)
2029{
2030 return 0x00000003;
2031}
2032static inline u32 sim_dma_size_16kb_f(void)
2033{
2034 return 0x30;
2035}
2036static inline u32 sim_dma_addr_lo_s(void)
2037{
2038 return 20;
2039}
2040static inline u32 sim_dma_addr_lo_f(u32 v)
2041{
2042 return (v & 0xfffff) << 12;
2043}
2044static inline u32 sim_dma_addr_lo_m(void)
2045{
2046 return 0xfffff << 12;
2047}
2048static inline u32 sim_dma_addr_lo_v(u32 r)
2049{
2050 return (r >> 12) & 0xfffff;
2051}
2052static inline u32 sim_dma_addr_lo__init_v(void)
2053{
2054 return 0x00000000;
2055}
2056static inline u32 sim_dma_addr_lo__init_f(void)
2057{
2058 return 0x0;
2059}
2060static inline u32 sim_dma_addr_lo__prod_v(void)
2061{
2062 return 0x00000000;
2063}
2064static inline u32 sim_dma_addr_lo__prod_f(void)
2065{
2066 return 0x0;
2067}
2068static inline u32 sim_dma_hi_r(void)
2069{
2070 return 0x00000004;
2071}
2072static inline u32 sim_dma_hi_addr_s(void)
2073{
2074 return 20;
2075}
2076static inline u32 sim_dma_hi_addr_f(u32 v)
2077{
2078 return (v & 0xfffff) << 0;
2079}
2080static inline u32 sim_dma_hi_addr_m(void)
2081{
2082 return 0xfffff << 0;
2083}
2084static inline u32 sim_dma_hi_addr_v(u32 r)
2085{
2086 return (r >> 0) & 0xfffff;
2087}
2088static inline u32 sim_dma_hi_addr__init_v(void)
2089{
2090 return 0x00000000;
2091}
2092static inline u32 sim_dma_hi_addr__init_f(void)
2093{
2094 return 0x0;
2095}
2096static inline u32 sim_dma_hi_addr__prod_v(void)
2097{
2098 return 0x00000000;
2099}
2100static inline u32 sim_dma_hi_addr__prod_f(void)
2101{
2102 return 0x0;
2103}
2104static inline u32 sim_msg_signature_r(void)
2105{
2106 return 0x00000000;
2107}
2108static inline u32 sim_msg_signature_valid_v(void)
2109{
2110 return 0x43505256;
2111}
2112static inline u32 sim_msg_length_r(void)
2113{
2114 return 0x00000004;
2115}
2116static inline u32 sim_msg_function_r(void)
2117{
2118 return 0x00000008;
2119}
2120static inline u32 sim_msg_function_sim_escape_read_v(void)
2121{
2122 return 0x00000023;
2123}
2124static inline u32 sim_msg_function_sim_escape_write_v(void)
2125{
2126 return 0x00000024;
2127}
2128static inline u32 sim_msg_result_r(void)
2129{
2130 return 0x0000000c;
2131}
2132static inline u32 sim_msg_result_success_v(void)
2133{
2134 return 0x00000000;
2135}
2136static inline u32 sim_msg_result_rpc_pending_v(void)
2137{
2138 return 0xFFFFFFFF;
2139}
2140static inline u32 sim_msg_sequence_r(void)
2141{
2142 return 0x00000010;
2143}
2144static inline u32 sim_msg_spare_r(void)
2145{
2146 return 0x00000014;
2147}
2148static inline u32 sim_msg_spare__init_v(void)
2149{
2150 return 0x00000000;
2151}
2152
2153#endif /* __hw_sim__ */
diff --git a/include/nvgpu/hw_sim_pci.h b/include/nvgpu/hw_sim_pci.h
deleted file mode 100644
index 32dbeb4..0000000
--- a/include/nvgpu/hw_sim_pci.h
+++ /dev/null
@@ -1,2169 +0,0 @@
1/*
2 * Copyright (c) 2012-2018, NVIDIA Corporation.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23 /*
24 * Function naming determines intended use:
25 *
26 * <x>_r(void) : Returns the offset for register <x>.
27 *
28 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
29 *
30 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
31 *
32 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
33 * and masked to place it at field <y> of register <x>. This value
34 * can be |'d with others to produce a full register value for
35 * register <x>.
36 *
37 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
38 * value can be ~'d and then &'d to clear the value of field <y> for
39 * register <x>.
40 *
41 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
42 * to place it at field <y> of register <x>. This value can be |'d
43 * with others to produce a full register value for <x>.
44 *
45 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
46 * <x> value 'r' after being shifted to place its LSB at bit 0.
47 * This value is suitable for direct comparison with other unshifted
48 * values appropriate for use in field <y> of register <x>.
49 *
50 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
51 * field <y> of register <x>. This value is suitable for direct
52 * comparison with unshifted values appropriate for use in field <y>
53 * of register <x>.
54 */
55
56#ifndef __hw_sim_pci_h__
57#define __hw_sim_pci_h__
58/*This file is autogenerated. Do not edit. */
59
60static inline u32 sim_r(void)
61{
62 return 0x0008f000U;
63}
64static inline u32 sim_send_ring_r(void)
65{
66 return 0x00000000U;
67}
68static inline u32 sim_send_ring_target_s(void)
69{
70 return 2U;
71}
72static inline u32 sim_send_ring_target_f(u32 v)
73{
74 return (v & 0x3U) << 0U;
75}
76static inline u32 sim_send_ring_target_m(void)
77{
78 return 0x3U << 0U;
79}
80static inline u32 sim_send_ring_target_v(u32 r)
81{
82 return (r >> 0U) & 0x3U;
83}
84static inline u32 sim_send_ring_target_phys_init_v(void)
85{
86 return 0x00000001U;
87}
88static inline u32 sim_send_ring_target_phys_init_f(void)
89{
90 return 0x1U;
91}
92static inline u32 sim_send_ring_target_phys__init_v(void)
93{
94 return 0x00000001U;
95}
96static inline u32 sim_send_ring_target_phys__init_f(void)
97{
98 return 0x1U;
99}
100static inline u32 sim_send_ring_target_phys__prod_v(void)
101{
102 return 0x00000001U;
103}
104static inline u32 sim_send_ring_target_phys__prod_f(void)
105{
106 return 0x1U;
107}
108static inline u32 sim_send_ring_target_phys_nvm_v(void)
109{
110 return 0x00000001U;
111}
112static inline u32 sim_send_ring_target_phys_nvm_f(void)
113{
114 return 0x1U;
115}
116static inline u32 sim_send_ring_target_phys_pci_v(void)
117{
118 return 0x00000002U;
119}
120static inline u32 sim_send_ring_target_phys_pci_f(void)
121{
122 return 0x2U;
123}
124static inline u32 sim_send_ring_target_phys_pci_coherent_v(void)
125{
126 return 0x00000003U;
127}
128static inline u32 sim_send_ring_target_phys_pci_coherent_f(void)
129{
130 return 0x3U;
131}
132static inline u32 sim_send_ring_status_s(void)
133{
134 return 1U;
135}
136static inline u32 sim_send_ring_status_f(u32 v)
137{
138 return (v & 0x1U) << 3U;
139}
140static inline u32 sim_send_ring_status_m(void)
141{
142 return 0x1U << 3U;
143}
144static inline u32 sim_send_ring_status_v(u32 r)
145{
146 return (r >> 3U) & 0x1U;
147}
148static inline u32 sim_send_ring_status_init_v(void)
149{
150 return 0x00000000U;
151}
152static inline u32 sim_send_ring_status_init_f(void)
153{
154 return 0x0U;
155}
156static inline u32 sim_send_ring_status__init_v(void)
157{
158 return 0x00000000U;
159}
160static inline u32 sim_send_ring_status__init_f(void)
161{
162 return 0x0U;
163}
164static inline u32 sim_send_ring_status__prod_v(void)
165{
166 return 0x00000000U;
167}
168static inline u32 sim_send_ring_status__prod_f(void)
169{
170 return 0x0U;
171}
172static inline u32 sim_send_ring_status_invalid_v(void)
173{
174 return 0x00000000U;
175}
176static inline u32 sim_send_ring_status_invalid_f(void)
177{
178 return 0x0U;
179}
180static inline u32 sim_send_ring_status_valid_v(void)
181{
182 return 0x00000001U;
183}
184static inline u32 sim_send_ring_status_valid_f(void)
185{
186 return 0x8U;
187}
188static inline u32 sim_send_ring_size_s(void)
189{
190 return 2U;
191}
192static inline u32 sim_send_ring_size_f(u32 v)
193{
194 return (v & 0x3U) << 4U;
195}
196static inline u32 sim_send_ring_size_m(void)
197{
198 return 0x3U << 4U;
199}
200static inline u32 sim_send_ring_size_v(u32 r)
201{
202 return (r >> 4U) & 0x3U;
203}
204static inline u32 sim_send_ring_size_init_v(void)
205{
206 return 0x00000000U;
207}
208static inline u32 sim_send_ring_size_init_f(void)
209{
210 return 0x0U;
211}
212static inline u32 sim_send_ring_size__init_v(void)
213{
214 return 0x00000000U;
215}
216static inline u32 sim_send_ring_size__init_f(void)
217{
218 return 0x0U;
219}
220static inline u32 sim_send_ring_size__prod_v(void)
221{
222 return 0x00000000U;
223}
224static inline u32 sim_send_ring_size__prod_f(void)
225{
226 return 0x0U;
227}
228static inline u32 sim_send_ring_size_4kb_v(void)
229{
230 return 0x00000000U;
231}
232static inline u32 sim_send_ring_size_4kb_f(void)
233{
234 return 0x0U;
235}
236static inline u32 sim_send_ring_size_8kb_v(void)
237{
238 return 0x00000001U;
239}
240static inline u32 sim_send_ring_size_8kb_f(void)
241{
242 return 0x10U;
243}
244static inline u32 sim_send_ring_size_12kb_v(void)
245{
246 return 0x00000002U;
247}
248static inline u32 sim_send_ring_size_12kb_f(void)
249{
250 return 0x20U;
251}
252static inline u32 sim_send_ring_size_16kb_v(void)
253{
254 return 0x00000003U;
255}
256static inline u32 sim_send_ring_size_16kb_f(void)
257{
258 return 0x30U;
259}
260static inline u32 sim_send_ring_gp_in_ring_s(void)
261{
262 return 1U;
263}
264static inline u32 sim_send_ring_gp_in_ring_f(u32 v)
265{
266 return (v & 0x1) << 11U;
267}
268static inline u32 sim_send_ring_gp_in_ring_m(void)
269{
270 return 0x1 << 11U;
271}
272static inline u32 sim_send_ring_gp_in_ring_v(u32 r)
273{
274 return (r >> 11) & 0x1U;
275}
276static inline u32 sim_send_ring_gp_in_ring__init_v(void)
277{
278 return 0x00000000U;
279}
280static inline u32 sim_send_ring_gp_in_ring__init_f(void)
281{
282 return 0x0U;
283}
284static inline u32 sim_send_ring_gp_in_ring__prod_v(void)
285{
286 return 0x00000000U;
287}
288static inline u32 sim_send_ring_gp_in_ring__prod_f(void)
289{
290 return 0x0U;
291}
292static inline u32 sim_send_ring_gp_in_ring_no_v(void)
293{
294 return 0x00000000U;
295}
296static inline u32 sim_send_ring_gp_in_ring_no_f(void)
297{
298 return 0x0U;
299}
300static inline u32 sim_send_ring_gp_in_ring_yes_v(void)
301{
302 return 0x00000001U;
303}
304static inline u32 sim_send_ring_gp_in_ring_yes_f(void)
305{
306 return 0x800U;
307}
308static inline u32 sim_send_ring_addr_lo_s(void)
309{
310 return 20U;
311}
312static inline u32 sim_send_ring_addr_lo_f(u32 v)
313{
314 return (v & 0xfffffU) << 12U;
315}
316static inline u32 sim_send_ring_addr_lo_m(void)
317{
318 return 0xfffffU << 12U;
319}
320static inline u32 sim_send_ring_addr_lo_v(u32 r)
321{
322 return (r >> 12U) & 0xfffffU;
323}
324static inline u32 sim_send_ring_addr_lo__init_v(void)
325{
326 return 0x00000000U;
327}
328static inline u32 sim_send_ring_addr_lo__init_f(void)
329{
330 return 0x0U;
331}
332static inline u32 sim_send_ring_addr_lo__prod_v(void)
333{
334 return 0x00000000U;
335}
336static inline u32 sim_send_ring_addr_lo__prod_f(void)
337{
338 return 0x0U;
339}
340static inline u32 sim_send_ring_hi_r(void)
341{
342 return 0x00000004U;
343}
344static inline u32 sim_send_ring_hi_addr_s(void)
345{
346 return 20U;
347}
348static inline u32 sim_send_ring_hi_addr_f(u32 v)
349{
350 return (v & 0xfffffU) << 0U;
351}
352static inline u32 sim_send_ring_hi_addr_m(void)
353{
354 return 0xfffffU << 0U;
355}
356static inline u32 sim_send_ring_hi_addr_v(u32 r)
357{
358 return (r >> 0U) & 0xfffffU;
359}
360static inline u32 sim_send_ring_hi_addr__init_v(void)
361{
362 return 0x00000000U;
363}
364static inline u32 sim_send_ring_hi_addr__init_f(void)
365{
366 return 0x0U;
367}
368static inline u32 sim_send_ring_hi_addr__prod_v(void)
369{
370 return 0x00000000U;
371}
372static inline u32 sim_send_ring_hi_addr__prod_f(void)
373{
374 return 0x0U;
375}
376static inline u32 sim_send_put_r(void)
377{
378 return 0x00000008U;
379}
380static inline u32 sim_send_put_pointer_s(void)
381{
382 return 29U;
383}
384static inline u32 sim_send_put_pointer_f(u32 v)
385{
386 return (v & 0x1fffffffU) << 3U;
387}
388static inline u32 sim_send_put_pointer_m(void)
389{
390 return 0x1fffffffU << 3U;
391}
392static inline u32 sim_send_put_pointer_v(u32 r)
393{
394 return (r >> 3U) & 0x1fffffffU;
395}
396static inline u32 sim_send_get_r(void)
397{
398 return 0x0000000cU;
399}
400static inline u32 sim_send_get_pointer_s(void)
401{
402 return 29U;
403}
404static inline u32 sim_send_get_pointer_f(u32 v)
405{
406 return (v & 0x1fffffffU) << 3U;
407}
408static inline u32 sim_send_get_pointer_m(void)
409{
410 return 0x1fffffffU << 3U;
411}
412static inline u32 sim_send_get_pointer_v(u32 r)
413{
414 return (r >> 3U) & 0x1fffffffU;
415}
416static inline u32 sim_recv_ring_r(void)
417{
418 return 0x00000010U;
419}
420static inline u32 sim_recv_ring_target_s(void)
421{
422 return 2U;
423}
424static inline u32 sim_recv_ring_target_f(u32 v)
425{
426 return (v & 0x3U) << 0U;
427}
428static inline u32 sim_recv_ring_target_m(void)
429{
430 return 0x3U << 0U;
431}
432static inline u32 sim_recv_ring_target_v(u32 r)
433{
434 return (r >> 0) & 0x3U;
435}
436static inline u32 sim_recv_ring_target_phys_init_v(void)
437{
438 return 0x00000001U;
439}
440static inline u32 sim_recv_ring_target_phys_init_f(void)
441{
442 return 0x1U;
443}
444static inline u32 sim_recv_ring_target_phys__init_v(void)
445{
446 return 0x00000001U;
447}
448static inline u32 sim_recv_ring_target_phys__init_f(void)
449{
450 return 0x1U;
451}
452static inline u32 sim_recv_ring_target_phys__prod_v(void)
453{
454 return 0x00000001U;
455}
456static inline u32 sim_recv_ring_target_phys__prod_f(void)
457{
458 return 0x1U;
459}
460static inline u32 sim_recv_ring_target_phys_nvm_v(void)
461{
462 return 0x00000001U;
463}
464static inline u32 sim_recv_ring_target_phys_nvm_f(void)
465{
466 return 0x1U;
467}
468static inline u32 sim_recv_ring_target_phys_pci_v(void)
469{
470 return 0x00000002U;
471}
472static inline u32 sim_recv_ring_target_phys_pci_f(void)
473{
474 return 0x2U;
475}
476static inline u32 sim_recv_ring_target_phys_pci_coherent_v(void)
477{
478 return 0x00000003U;
479}
480static inline u32 sim_recv_ring_target_phys_pci_coherent_f(void)
481{
482 return 0x3U;
483}
484static inline u32 sim_recv_ring_status_s(void)
485{
486 return 1U;
487}
488static inline u32 sim_recv_ring_status_f(u32 v)
489{
490 return (v & 0x1U) << 3U;
491}
492static inline u32 sim_recv_ring_status_m(void)
493{
494 return 0x1U << 3U;
495}
496static inline u32 sim_recv_ring_status_v(u32 r)
497{
498 return (r >> 3U) & 0x1U;
499}
500static inline u32 sim_recv_ring_status_init_v(void)
501{
502 return 0x00000000U;
503}
504static inline u32 sim_recv_ring_status_init_f(void)
505{
506 return 0x0U;
507}
508static inline u32 sim_recv_ring_status__init_v(void)
509{
510 return 0x00000000U;
511}
512static inline u32 sim_recv_ring_status__init_f(void)
513{
514 return 0x0U;
515}
516static inline u32 sim_recv_ring_status__prod_v(void)
517{
518 return 0x00000000U;
519}
520static inline u32 sim_recv_ring_status__prod_f(void)
521{
522 return 0x0U;
523}
524static inline u32 sim_recv_ring_status_invalid_v(void)
525{
526 return 0x00000000U;
527}
528static inline u32 sim_recv_ring_status_invalid_f(void)
529{
530 return 0x0U;
531}
532static inline u32 sim_recv_ring_status_valid_v(void)
533{
534 return 0x00000001U;
535}
536static inline u32 sim_recv_ring_status_valid_f(void)
537{
538 return 0x8U;
539}
540static inline u32 sim_recv_ring_size_s(void)
541{
542 return 2U;
543}
544static inline u32 sim_recv_ring_size_f(u32 v)
545{
546 return (v & 0x3U) << 4U;
547}
548static inline u32 sim_recv_ring_size_m(void)
549{
550 return 0x3U << 4U;
551}
552static inline u32 sim_recv_ring_size_v(u32 r)
553{
554 return (r >> 4U) & 0x3U;
555}
556static inline u32 sim_recv_ring_size_init_v(void)
557{
558 return 0x00000000U;
559}
560static inline u32 sim_recv_ring_size_init_f(void)
561{
562 return 0x0U;
563}
564static inline u32 sim_recv_ring_size__init_v(void)
565{
566 return 0x00000000U;
567}
568static inline u32 sim_recv_ring_size__init_f(void)
569{
570 return 0x0U;
571}
572static inline u32 sim_recv_ring_size__prod_v(void)
573{
574 return 0x00000000U;
575}
576static inline u32 sim_recv_ring_size__prod_f(void)
577{
578 return 0x0U;
579}
580static inline u32 sim_recv_ring_size_4kb_v(void)
581{
582 return 0x00000000U;
583}
584static inline u32 sim_recv_ring_size_4kb_f(void)
585{
586 return 0x0U;
587}
588static inline u32 sim_recv_ring_size_8kb_v(void)
589{
590 return 0x00000001U;
591}
592static inline u32 sim_recv_ring_size_8kb_f(void)
593{
594 return 0x10U;
595}
596static inline u32 sim_recv_ring_size_12kb_v(void)
597{
598 return 0x00000002U;
599}
600static inline u32 sim_recv_ring_size_12kb_f(void)
601{
602 return 0x20U;
603}
604static inline u32 sim_recv_ring_size_16kb_v(void)
605{
606 return 0x00000003U;
607}
608static inline u32 sim_recv_ring_size_16kb_f(void)
609{
610 return 0x30U;
611}
612static inline u32 sim_recv_ring_gp_in_ring_s(void)
613{
614 return 1U;
615}
616static inline u32 sim_recv_ring_gp_in_ring_f(u32 v)
617{
618 return (v & 0x1U) << 11U;
619}
620static inline u32 sim_recv_ring_gp_in_ring_m(void)
621{
622 return 0x1U << 11U;
623}
624static inline u32 sim_recv_ring_gp_in_ring_v(u32 r)
625{
626 return (r >> 11U) & 0x1U;
627}
628static inline u32 sim_recv_ring_gp_in_ring__init_v(void)
629{
630 return 0x00000000U;
631}
632static inline u32 sim_recv_ring_gp_in_ring__init_f(void)
633{
634 return 0x0U;
635}
636static inline u32 sim_recv_ring_gp_in_ring__prod_v(void)
637{
638 return 0x00000000U;
639}
640static inline u32 sim_recv_ring_gp_in_ring__prod_f(void)
641{
642 return 0x0U;
643}
644static inline u32 sim_recv_ring_gp_in_ring_no_v(void)
645{
646 return 0x00000000U;
647}
648static inline u32 sim_recv_ring_gp_in_ring_no_f(void)
649{
650 return 0x0U;
651}
652static inline u32 sim_recv_ring_gp_in_ring_yes_v(void)
653{
654 return 0x00000001U;
655}
656static inline u32 sim_recv_ring_gp_in_ring_yes_f(void)
657{
658 return 0x800U;
659}
660static inline u32 sim_recv_ring_addr_lo_s(void)
661{
662 return 20U;
663}
664static inline u32 sim_recv_ring_addr_lo_f(u32 v)
665{
666 return (v & 0xfffffU) << 12U;
667}
668static inline u32 sim_recv_ring_addr_lo_m(void)
669{
670 return 0xfffffU << 12U;
671}
672static inline u32 sim_recv_ring_addr_lo_v(u32 r)
673{
674 return (r >> 12U) & 0xfffffU;
675}
676static inline u32 sim_recv_ring_addr_lo__init_v(void)
677{
678 return 0x00000000U;
679}
680static inline u32 sim_recv_ring_addr_lo__init_f(void)
681{
682 return 0x0U;
683}
684static inline u32 sim_recv_ring_addr_lo__prod_v(void)
685{
686 return 0x00000000U;
687}
688static inline u32 sim_recv_ring_addr_lo__prod_f(void)
689{
690 return 0x0U;
691}
692static inline u32 sim_recv_ring_hi_r(void)
693{
694 return 0x00000014U;
695}
696static inline u32 sim_recv_ring_hi_addr_s(void)
697{
698 return 20U;
699}
700static inline u32 sim_recv_ring_hi_addr_f(u32 v)
701{
702 return (v & 0xfffffU) << 0U;
703}
704static inline u32 sim_recv_ring_hi_addr_m(void)
705{
706 return 0xfffffU << 0U;
707}
708static inline u32 sim_recv_ring_hi_addr_v(u32 r)
709{
710 return (r >> 0U) & 0xfffffU;
711}
712static inline u32 sim_recv_ring_hi_addr__init_v(void)
713{
714 return 0x00000000U;
715}
716static inline u32 sim_recv_ring_hi_addr__init_f(void)
717{
718 return 0x0U;
719}
720static inline u32 sim_recv_ring_hi_addr__prod_v(void)
721{
722 return 0x00000000U;
723}
724static inline u32 sim_recv_ring_hi_addr__prod_f(void)
725{
726 return 0x0U;
727}
728static inline u32 sim_recv_put_r(void)
729{
730 return 0x00000018U;
731}
732static inline u32 sim_recv_put_pointer_s(void)
733{
734 return 11U;
735}
736static inline u32 sim_recv_put_pointer_f(u32 v)
737{
738 return (v & 0x7ffU) << 3U;
739}
740static inline u32 sim_recv_put_pointer_m(void)
741{
742 return 0x7ffU << 3U;
743}
744static inline u32 sim_recv_put_pointer_v(u32 r)
745{
746 return (r >> 3U) & 0x7ffU;
747}
748static inline u32 sim_recv_get_r(void)
749{
750 return 0x0000001cU;
751}
752static inline u32 sim_recv_get_pointer_s(void)
753{
754 return 11U;
755}
756static inline u32 sim_recv_get_pointer_f(u32 v)
757{
758 return (v & 0x7ffU) << 3U;
759}
760static inline u32 sim_recv_get_pointer_m(void)
761{
762 return 0x7ffU << 3U;
763}
764static inline u32 sim_recv_get_pointer_v(u32 r)
765{
766 return (r >> 3U) & 0x7ffU;
767}
768static inline u32 sim_config_r(void)
769{
770 return 0x00000020U;
771}
772static inline u32 sim_config_mode_s(void)
773{
774 return 1U;
775}
776static inline u32 sim_config_mode_f(u32 v)
777{
778 return (v & 0x1U) << 0U;
779}
780static inline u32 sim_config_mode_m(void)
781{
782 return 0x1U << 0U;
783}
784static inline u32 sim_config_mode_v(u32 r)
785{
786 return (r >> 0U) & 0x1U;
787}
788static inline u32 sim_config_mode_disabled_v(void)
789{
790 return 0x00000000U;
791}
792static inline u32 sim_config_mode_disabled_f(void)
793{
794 return 0x0U;
795}
796static inline u32 sim_config_mode_enabled_v(void)
797{
798 return 0x00000001U;
799}
800static inline u32 sim_config_mode_enabled_f(void)
801{
802 return 0x1U;
803}
804static inline u32 sim_config_channels_s(void)
805{
806 return 7U;
807}
808static inline u32 sim_config_channels_f(u32 v)
809{
810 return (v & 0x7fU) << 1U;
811}
812static inline u32 sim_config_channels_m(void)
813{
814 return 0x7fU << 1U;
815}
816static inline u32 sim_config_channels_v(u32 r)
817{
818 return (r >> 1U) & 0x7fU;
819}
820static inline u32 sim_config_channels_none_v(void)
821{
822 return 0x00000000U;
823}
824static inline u32 sim_config_channels_none_f(void)
825{
826 return 0x0U;
827}
828static inline u32 sim_config_cached_only_s(void)
829{
830 return 1U;
831}
832static inline u32 sim_config_cached_only_f(u32 v)
833{
834 return (v & 0x1U) << 8U;
835}
836static inline u32 sim_config_cached_only_m(void)
837{
838 return 0x1U << 8U;
839}
840static inline u32 sim_config_cached_only_v(u32 r)
841{
842 return (r >> 8U) & 0x1U;
843}
844static inline u32 sim_config_cached_only_disabled_v(void)
845{
846 return 0x00000000U;
847}
848static inline u32 sim_config_cached_only_disabled_f(void)
849{
850 return 0x0U;
851}
852static inline u32 sim_config_cached_only_enabled_v(void)
853{
854 return 0x00000001U;
855}
856static inline u32 sim_config_cached_only_enabled_f(void)
857{
858 return 0x100U;
859}
860static inline u32 sim_config_validity_s(void)
861{
862 return 2U;
863}
864static inline u32 sim_config_validity_f(u32 v)
865{
866 return (v & 0x3U) << 9U;
867}
868static inline u32 sim_config_validity_m(void)
869{
870 return 0x3U << 9U;
871}
872static inline u32 sim_config_validity_v(u32 r)
873{
874 return (r >> 9U) & 0x3U;
875}
876static inline u32 sim_config_validity__init_v(void)
877{
878 return 0x00000001U;
879}
880static inline u32 sim_config_validity__init_f(void)
881{
882 return 0x200U;
883}
884static inline u32 sim_config_validity_valid_v(void)
885{
886 return 0x00000001U;
887}
888static inline u32 sim_config_validity_valid_f(void)
889{
890 return 0x200U;
891}
892static inline u32 sim_config_simulation_s(void)
893{
894 return 2U;
895}
896static inline u32 sim_config_simulation_f(u32 v)
897{
898 return (v & 0x3U) << 12U;
899}
900static inline u32 sim_config_simulation_m(void)
901{
902 return 0x3U << 12U;
903}
904static inline u32 sim_config_simulation_v(u32 r)
905{
906 return (r >> 12U) & 0x3U;
907}
908static inline u32 sim_config_simulation_disabled_v(void)
909{
910 return 0x00000000U;
911}
912static inline u32 sim_config_simulation_disabled_f(void)
913{
914 return 0x0U;
915}
916static inline u32 sim_config_simulation_fmodel_v(void)
917{
918 return 0x00000001U;
919}
920static inline u32 sim_config_simulation_fmodel_f(void)
921{
922 return 0x1000U;
923}
924static inline u32 sim_config_simulation_rtlsim_v(void)
925{
926 return 0x00000002U;
927}
928static inline u32 sim_config_simulation_rtlsim_f(void)
929{
930 return 0x2000U;
931}
932static inline u32 sim_config_secondary_display_s(void)
933{
934 return 1U;
935}
936static inline u32 sim_config_secondary_display_f(u32 v)
937{
938 return (v & 0x1U) << 14U;
939}
940static inline u32 sim_config_secondary_display_m(void)
941{
942 return 0x1U << 14U;
943}
944static inline u32 sim_config_secondary_display_v(u32 r)
945{
946 return (r >> 14U) & 0x1U;
947}
948static inline u32 sim_config_secondary_display_disabled_v(void)
949{
950 return 0x00000000U;
951}
952static inline u32 sim_config_secondary_display_disabled_f(void)
953{
954 return 0x0U;
955}
956static inline u32 sim_config_secondary_display_enabled_v(void)
957{
958 return 0x00000001U;
959}
960static inline u32 sim_config_secondary_display_enabled_f(void)
961{
962 return 0x4000U;
963}
964static inline u32 sim_config_num_heads_s(void)
965{
966 return 8U;
967}
968static inline u32 sim_config_num_heads_f(u32 v)
969{
970 return (v & 0xffU) << 17U;
971}
972static inline u32 sim_config_num_heads_m(void)
973{
974 return 0xffU << 17U;
975}
976static inline u32 sim_config_num_heads_v(u32 r)
977{
978 return (r >> 17U) & 0xffU;
979}
980static inline u32 sim_event_ring_r(void)
981{
982 return 0x00000030U;
983}
984static inline u32 sim_event_ring_target_s(void)
985{
986 return 2U;
987}
988static inline u32 sim_event_ring_target_f(u32 v)
989{
990 return (v & 0x3U) << 0U;
991}
992static inline u32 sim_event_ring_target_m(void)
993{
994 return 0x3U << 0U;
995}
996static inline u32 sim_event_ring_target_v(u32 r)
997{
998 return (r >> 0U) & 0x3U;
999}
1000static inline u32 sim_event_ring_target_phys_init_v(void)
1001{
1002 return 0x00000001U;
1003}
1004static inline u32 sim_event_ring_target_phys_init_f(void)
1005{
1006 return 0x1U;
1007}
1008static inline u32 sim_event_ring_target_phys__init_v(void)
1009{
1010 return 0x00000001U;
1011}
1012static inline u32 sim_event_ring_target_phys__init_f(void)
1013{
1014 return 0x1U;
1015}
1016static inline u32 sim_event_ring_target_phys__prod_v(void)
1017{
1018 return 0x00000001U;
1019}
1020static inline u32 sim_event_ring_target_phys__prod_f(void)
1021{
1022 return 0x1U;
1023}
1024static inline u32 sim_event_ring_target_phys_nvm_v(void)
1025{
1026 return 0x00000001U;
1027}
1028static inline u32 sim_event_ring_target_phys_nvm_f(void)
1029{
1030 return 0x1U;
1031}
1032static inline u32 sim_event_ring_target_phys_pci_v(void)
1033{
1034 return 0x00000002U;
1035}
1036static inline u32 sim_event_ring_target_phys_pci_f(void)
1037{
1038 return 0x2U;
1039}
1040static inline u32 sim_event_ring_target_phys_pci_coherent_v(void)
1041{
1042 return 0x00000003U;
1043}
1044static inline u32 sim_event_ring_target_phys_pci_coherent_f(void)
1045{
1046 return 0x3U;
1047}
1048static inline u32 sim_event_ring_status_s(void)
1049{
1050 return 1U;
1051}
1052static inline u32 sim_event_ring_status_f(u32 v)
1053{
1054 return (v & 0x1U) << 3U;
1055}
1056static inline u32 sim_event_ring_status_m(void)
1057{
1058 return 0x1U << 3U;
1059}
1060static inline u32 sim_event_ring_status_v(u32 r)
1061{
1062 return (r >> 3U) & 0x1U;
1063}
1064static inline u32 sim_event_ring_status_init_v(void)
1065{
1066 return 0x00000000U;
1067}
1068static inline u32 sim_event_ring_status_init_f(void)
1069{
1070 return 0x0U;
1071}
1072static inline u32 sim_event_ring_status__init_v(void)
1073{
1074 return 0x00000000U;
1075}
1076static inline u32 sim_event_ring_status__init_f(void)
1077{
1078 return 0x0U;
1079}
1080static inline u32 sim_event_ring_status__prod_v(void)
1081{
1082 return 0x00000000U;
1083}
1084static inline u32 sim_event_ring_status__prod_f(void)
1085{
1086 return 0x0U;
1087}
1088static inline u32 sim_event_ring_status_invalid_v(void)
1089{
1090 return 0x00000000U;
1091}
1092static inline u32 sim_event_ring_status_invalid_f(void)
1093{
1094 return 0x0U;
1095}
1096static inline u32 sim_event_ring_status_valid_v(void)
1097{
1098 return 0x00000001U;
1099}
1100static inline u32 sim_event_ring_status_valid_f(void)
1101{
1102 return 0x8U;
1103}
1104static inline u32 sim_event_ring_size_s(void)
1105{
1106 return 2U;
1107}
1108static inline u32 sim_event_ring_size_f(u32 v)
1109{
1110 return (v & 0x3U) << 4U;
1111}
1112static inline u32 sim_event_ring_size_m(void)
1113{
1114 return 0x3U << 4U;
1115}
1116static inline u32 sim_event_ring_size_v(u32 r)
1117{
1118 return (r >> 4U) & 0x3U;
1119}
1120static inline u32 sim_event_ring_size_init_v(void)
1121{
1122 return 0x00000000U;
1123}
1124static inline u32 sim_event_ring_size_init_f(void)
1125{
1126 return 0x0U;
1127}
1128static inline u32 sim_event_ring_size__init_v(void)
1129{
1130 return 0x00000000U;
1131}
1132static inline u32 sim_event_ring_size__init_f(void)
1133{
1134 return 0x0U;
1135}
1136static inline u32 sim_event_ring_size__prod_v(void)
1137{
1138 return 0x00000000U;
1139}
1140static inline u32 sim_event_ring_size__prod_f(void)
1141{
1142 return 0x0U;
1143}
1144static inline u32 sim_event_ring_size_4kb_v(void)
1145{
1146 return 0x00000000U;
1147}
1148static inline u32 sim_event_ring_size_4kb_f(void)
1149{
1150 return 0x0U;
1151}
1152static inline u32 sim_event_ring_size_8kb_v(void)
1153{
1154 return 0x00000001U;
1155}
1156static inline u32 sim_event_ring_size_8kb_f(void)
1157{
1158 return 0x10U;
1159}
1160static inline u32 sim_event_ring_size_12kb_v(void)
1161{
1162 return 0x00000002U;
1163}
1164static inline u32 sim_event_ring_size_12kb_f(void)
1165{
1166 return 0x20U;
1167}
1168static inline u32 sim_event_ring_size_16kb_v(void)
1169{
1170 return 0x00000003U;
1171}
1172static inline u32 sim_event_ring_size_16kb_f(void)
1173{
1174 return 0x30U;
1175}
1176static inline u32 sim_event_ring_gp_in_ring_s(void)
1177{
1178 return 1U;
1179}
1180static inline u32 sim_event_ring_gp_in_ring_f(u32 v)
1181{
1182 return (v & 0x1U) << 11U;
1183}
1184static inline u32 sim_event_ring_gp_in_ring_m(void)
1185{
1186 return 0x1U << 11U;
1187}
1188static inline u32 sim_event_ring_gp_in_ring_v(u32 r)
1189{
1190 return (r >> 11U) & 0x1U;
1191}
1192static inline u32 sim_event_ring_gp_in_ring__init_v(void)
1193{
1194 return 0x00000000U;
1195}
1196static inline u32 sim_event_ring_gp_in_ring__init_f(void)
1197{
1198 return 0x0U;
1199}
1200static inline u32 sim_event_ring_gp_in_ring__prod_v(void)
1201{
1202 return 0x00000000U;
1203}
1204static inline u32 sim_event_ring_gp_in_ring__prod_f(void)
1205{
1206 return 0x0U;
1207}
1208static inline u32 sim_event_ring_gp_in_ring_no_v(void)
1209{
1210 return 0x00000000U;
1211}
1212static inline u32 sim_event_ring_gp_in_ring_no_f(void)
1213{
1214 return 0x0U;
1215}
1216static inline u32 sim_event_ring_gp_in_ring_yes_v(void)
1217{
1218 return 0x00000001U;
1219}
1220static inline u32 sim_event_ring_gp_in_ring_yes_f(void)
1221{
1222 return 0x800U;
1223}
1224static inline u32 sim_event_ring_addr_lo_s(void)
1225{
1226 return 20U;
1227}
1228static inline u32 sim_event_ring_addr_lo_f(u32 v)
1229{
1230 return (v & 0xfffffU) << 12U;
1231}
1232static inline u32 sim_event_ring_addr_lo_m(void)
1233{
1234 return 0xfffffU << 12U;
1235}
1236static inline u32 sim_event_ring_addr_lo_v(u32 r)
1237{
1238 return (r >> 12U) & 0xfffffU;
1239}
1240static inline u32 sim_event_ring_addr_lo__init_v(void)
1241{
1242 return 0x00000000U;
1243}
1244static inline u32 sim_event_ring_addr_lo__init_f(void)
1245{
1246 return 0x0U;
1247}
1248static inline u32 sim_event_ring_addr_lo__prod_v(void)
1249{
1250 return 0x00000000U;
1251}
1252static inline u32 sim_event_ring_addr_lo__prod_f(void)
1253{
1254 return 0x0U;
1255}
1256static inline u32 sim_event_ring_hi_v(void)
1257{
1258 return 0x00000034U;
1259}
1260static inline u32 sim_event_ring_hi_addr_s(void)
1261{
1262 return 20U;
1263}
1264static inline u32 sim_event_ring_hi_addr_f(u32 v)
1265{
1266 return (v & 0xfffffU) << 0U;
1267}
1268static inline u32 sim_event_ring_hi_addr_m(void)
1269{
1270 return 0xfffffU << 0U;
1271}
1272static inline u32 sim_event_ring_hi_addr_v(u32 r)
1273{
1274 return (r >> 0U) & 0xfffffU;
1275}
1276static inline u32 sim_event_ring_hi_addr__init_v(void)
1277{
1278 return 0x00000000U;
1279}
1280static inline u32 sim_event_ring_hi_addr__init_f(void)
1281{
1282 return 0x0U;
1283}
1284static inline u32 sim_event_ring_hi_addr__prod_v(void)
1285{
1286 return 0x00000000U;
1287}
1288static inline u32 sim_event_ring_hi_addr__prod_f(void)
1289{
1290 return 0x0U;
1291}
1292static inline u32 sim_event_put_r(void)
1293{
1294 return 0x00000038U;
1295}
1296static inline u32 sim_event_put_pointer_s(void)
1297{
1298 return 30U;
1299}
1300static inline u32 sim_event_put_pointer_f(u32 v)
1301{
1302 return (v & 0x3fffffffU) << 2U;
1303}
1304static inline u32 sim_event_put_pointer_m(void)
1305{
1306 return 0x3fffffffU << 2U;
1307}
1308static inline u32 sim_event_put_pointer_v(u32 r)
1309{
1310 return (r >> 2U) & 0x3fffffffU;
1311}
1312static inline u32 sim_event_get_r(void)
1313{
1314 return 0x0000003cU;
1315}
1316static inline u32 sim_event_get_pointer_s(void)
1317{
1318 return 30U;
1319}
1320static inline u32 sim_event_get_pointer_f(u32 v)
1321{
1322 return (v & 0x3fffffffU) << 2U;
1323}
1324static inline u32 sim_event_get_pointer_m(void)
1325{
1326 return 0x3fffffffU << 2U;
1327}
1328static inline u32 sim_event_get_pointer_v(u32 r)
1329{
1330 return (r >> 2U) & 0x3fffffffU;
1331}
1332static inline u32 sim_status_r(void)
1333{
1334 return 0x00000028U;
1335}
1336static inline u32 sim_status_send_put_s(void)
1337{
1338 return 1U;
1339}
1340static inline u32 sim_status_send_put_f(u32 v)
1341{
1342 return (v & 0x1U) << 0U;
1343}
1344static inline u32 sim_status_send_put_m(void)
1345{
1346 return 0x1 << 0U;
1347}
1348static inline u32 sim_status_send_put_v(u32 r)
1349{
1350 return (r >> 0U) & 0x1U;
1351}
1352static inline u32 sim_status_send_put__init_v(void)
1353{
1354 return 0x00000000U;
1355}
1356static inline u32 sim_status_send_put__init_f(void)
1357{
1358 return 0x0U;
1359}
1360static inline u32 sim_status_send_put_idle_v(void)
1361{
1362 return 0x00000000U;
1363}
1364static inline u32 sim_status_send_put_idle_f(void)
1365{
1366 return 0x0U;
1367}
1368static inline u32 sim_status_send_put_pending_v(void)
1369{
1370 return 0x00000001U;
1371}
1372static inline u32 sim_status_send_put_pending_f(void)
1373{
1374 return 0x1U;
1375}
1376static inline u32 sim_status_send_get_s(void)
1377{
1378 return 1U;
1379}
1380static inline u32 sim_status_send_get_f(u32 v)
1381{
1382 return (v & 0x1U) << 1U;
1383}
1384static inline u32 sim_status_send_get_m(void)
1385{
1386 return 0x1U << 1U;
1387}
1388static inline u32 sim_status_send_get_v(u32 r)
1389{
1390 return (r >> 1U) & 0x1U;
1391}
1392static inline u32 sim_status_send_get__init_v(void)
1393{
1394 return 0x00000000U;
1395}
1396static inline u32 sim_status_send_get__init_f(void)
1397{
1398 return 0x0U;
1399}
1400static inline u32 sim_status_send_get_idle_v(void)
1401{
1402 return 0x00000000U;
1403}
1404static inline u32 sim_status_send_get_idle_f(void)
1405{
1406 return 0x0U;
1407}
1408static inline u32 sim_status_send_get_pending_v(void)
1409{
1410 return 0x00000001U;
1411}
1412static inline u32 sim_status_send_get_pending_f(void)
1413{
1414 return 0x2U;
1415}
1416static inline u32 sim_status_send_get_clear_v(void)
1417{
1418 return 0x00000001U;
1419}
1420static inline u32 sim_status_send_get_clear_f(void)
1421{
1422 return 0x2U;
1423}
1424static inline u32 sim_status_recv_put_s(void)
1425{
1426 return 1U;
1427}
1428static inline u32 sim_status_recv_put_f(u32 v)
1429{
1430 return (v & 0x1U) << 2U;
1431}
1432static inline u32 sim_status_recv_put_m(void)
1433{
1434 return 0x1U << 2U;
1435}
1436static inline u32 sim_status_recv_put_v(u32 r)
1437{
1438 return (r >> 2U) & 0x1U;
1439}
1440static inline u32 sim_status_recv_put__init_v(void)
1441{
1442 return 0x00000000U;
1443}
1444static inline u32 sim_status_recv_put__init_f(void)
1445{
1446 return 0x0U;
1447}
1448static inline u32 sim_status_recv_put_idle_v(void)
1449{
1450 return 0x00000000U;
1451}
1452static inline u32 sim_status_recv_put_idle_f(void)
1453{
1454 return 0x0U;
1455}
1456static inline u32 sim_status_recv_put_pending_v(void)
1457{
1458 return 0x00000001U;
1459}
1460static inline u32 sim_status_recv_put_pending_f(void)
1461{
1462 return 0x4U;
1463}
1464static inline u32 sim_status_recv_put_clear_v(void)
1465{
1466 return 0x00000001U;
1467}
1468static inline u32 sim_status_recv_put_clear_f(void)
1469{
1470 return 0x4U;
1471}
1472static inline u32 sim_status_recv_get_s(void)
1473{
1474 return 1U;
1475}
1476static inline u32 sim_status_recv_get_f(u32 v)
1477{
1478 return (v & 0x1U) << 3U;
1479}
1480static inline u32 sim_status_recv_get_m(void)
1481{
1482 return 0x1U << 3U;
1483}
1484static inline u32 sim_status_recv_get_v(u32 r)
1485{
1486 return (r >> 3U) & 0x1U;
1487}
1488static inline u32 sim_status_recv_get__init_v(void)
1489{
1490 return 0x00000000U;
1491}
1492static inline u32 sim_status_recv_get__init_f(void)
1493{
1494 return 0x0U;
1495}
1496static inline u32 sim_status_recv_get_idle_v(void)
1497{
1498 return 0x00000000U;
1499}
1500static inline u32 sim_status_recv_get_idle_f(void)
1501{
1502 return 0x0U;
1503}
1504static inline u32 sim_status_recv_get_pending_v(void)
1505{
1506 return 0x00000001U;
1507}
1508static inline u32 sim_status_recv_get_pending_f(void)
1509{
1510 return 0x8U;
1511}
1512static inline u32 sim_status_event_put_s(void)
1513{
1514 return 1U;
1515}
1516static inline u32 sim_status_event_put_f(u32 v)
1517{
1518 return (v & 0x1U) << 4U;
1519}
1520static inline u32 sim_status_event_put_m(void)
1521{
1522 return 0x1U << 4U;
1523}
1524static inline u32 sim_status_event_put_v(u32 r)
1525{
1526 return (r >> 4U) & 0x1U;
1527}
1528static inline u32 sim_status_event_put__init_v(void)
1529{
1530 return 0x00000000U;
1531}
1532static inline u32 sim_status_event_put__init_f(void)
1533{
1534 return 0x0U;
1535}
1536static inline u32 sim_status_event_put_idle_v(void)
1537{
1538 return 0x00000000U;
1539}
1540static inline u32 sim_status_event_put_idle_f(void)
1541{
1542 return 0x0U;
1543}
1544static inline u32 sim_status_event_put_pending_v(void)
1545{
1546 return 0x00000001U;
1547}
1548static inline u32 sim_status_event_put_pending_f(void)
1549{
1550 return 0x10U;
1551}
1552static inline u32 sim_status_event_put_clear_v(void)
1553{
1554 return 0x00000001U;
1555}
1556static inline u32 sim_status_event_put_clear_f(void)
1557{
1558 return 0x10U;
1559}
1560static inline u32 sim_status_event_get_s(void)
1561{
1562 return 1U;
1563}
1564static inline u32 sim_status_event_get_f(u32 v)
1565{
1566 return (v & 0x1U) << 5U;
1567}
1568static inline u32 sim_status_event_get_m(void)
1569{
1570 return 0x1U << 5U;
1571}
1572static inline u32 sim_status_event_get_v(u32 r)
1573{
1574 return (r >> 5U) & 0x1U;
1575}
1576static inline u32 sim_status_event_get__init_v(void)
1577{
1578 return 0x00000000U;
1579}
1580static inline u32 sim_status_event_get__init_f(void)
1581{
1582 return 0x0U;
1583}
1584static inline u32 sim_status_event_get_idle_v(void)
1585{
1586 return 0x00000000U;
1587}
1588static inline u32 sim_status_event_get_idle_f(void)
1589{
1590 return 0x0U;
1591}
1592static inline u32 sim_status_event_get_pending_v(void)
1593{
1594 return 0x00000001U;
1595}
1596static inline u32 sim_status_event_get_pending_f(void)
1597{
1598 return 0x20U;
1599}
1600static inline u32 sim_control_r(void)
1601{
1602 return 0x0000002cU;
1603}
1604static inline u32 sim_control_send_put_s(void)
1605{
1606 return 1U;
1607}
1608static inline u32 sim_control_send_put_f(u32 v)
1609{
1610 return (v & 0x1U) << 0U;
1611}
1612static inline u32 sim_control_send_put_m(void)
1613{
1614 return 0x1U << 0U;
1615}
1616static inline u32 sim_control_send_put_v(u32 r)
1617{
1618 return (r >> 0U) & 0x1U;
1619}
1620static inline u32 sim_control_send_put__init_v(void)
1621{
1622 return 0x00000000U;
1623}
1624static inline u32 sim_control_send_put__init_f(void)
1625{
1626 return 0x0U;
1627}
1628static inline u32 sim_control_send_put_disabled_v(void)
1629{
1630 return 0x00000000U;
1631}
1632static inline u32 sim_control_send_put_disabled_f(void)
1633{
1634 return 0x0U;
1635}
1636static inline u32 sim_control_send_put_enabled_v(void)
1637{
1638 return 0x00000001U;
1639}
1640static inline u32 sim_control_send_put_enabled_f(void)
1641{
1642 return 0x1U;
1643}
1644static inline u32 sim_control_send_get_s(void)
1645{
1646 return 1U;
1647}
1648static inline u32 sim_control_send_get_f(u32 v)
1649{
1650 return (v & 0x1U) << 1U;
1651}
1652static inline u32 sim_control_send_get_m(void)
1653{
1654 return 0x1U << 1U;
1655}
1656static inline u32 sim_control_send_get_v(u32 r)
1657{
1658 return (r >> 1U) & 0x1U;
1659}
1660static inline u32 sim_control_send_get__init_v(void)
1661{
1662 return 0x00000000U;
1663}
1664static inline u32 sim_control_send_get__init_f(void)
1665{
1666 return 0x0U;
1667}
1668static inline u32 sim_control_send_get_disabled_v(void)
1669{
1670 return 0x00000000U;
1671}
1672static inline u32 sim_control_send_get_disabled_f(void)
1673{
1674 return 0x0U;
1675}
1676static inline u32 sim_control_send_get_enabled_v(void)
1677{
1678 return 0x00000001U;
1679}
1680static inline u32 sim_control_send_get_enabled_f(void)
1681{
1682 return 0x2U;
1683}
1684static inline u32 sim_control_recv_put_s(void)
1685{
1686 return 1U;
1687}
1688static inline u32 sim_control_recv_put_f(u32 v)
1689{
1690 return (v & 0x1U) << 2U;
1691}
1692static inline u32 sim_control_recv_put_m(void)
1693{
1694 return 0x1U << 2U;
1695}
1696static inline u32 sim_control_recv_put_v(u32 r)
1697{
1698 return (r >> 2U) & 0x1U;
1699}
1700static inline u32 sim_control_recv_put__init_v(void)
1701{
1702 return 0x00000000U;
1703}
1704static inline u32 sim_control_recv_put__init_f(void)
1705{
1706 return 0x0U;
1707}
1708static inline u32 sim_control_recv_put_disabled_v(void)
1709{
1710 return 0x00000000U;
1711}
1712static inline u32 sim_control_recv_put_disabled_f(void)
1713{
1714 return 0x0U;
1715}
1716static inline u32 sim_control_recv_put_enabled_v(void)
1717{
1718 return 0x00000001U;
1719}
1720static inline u32 sim_control_recv_put_enabled_f(void)
1721{
1722 return 0x4U;
1723}
1724static inline u32 sim_control_recv_get_s(void)
1725{
1726 return 1U;
1727}
1728static inline u32 sim_control_recv_get_f(u32 v)
1729{
1730 return (v & 0x1U) << 3U;
1731}
1732static inline u32 sim_control_recv_get_m(void)
1733{
1734 return 0x1U << 3U;
1735}
1736static inline u32 sim_control_recv_get_v(u32 r)
1737{
1738 return (r >> 3U) & 0x1U;
1739}
1740static inline u32 sim_control_recv_get__init_v(void)
1741{
1742 return 0x00000000U;
1743}
1744static inline u32 sim_control_recv_get__init_f(void)
1745{
1746 return 0x0U;
1747}
1748static inline u32 sim_control_recv_get_disabled_v(void)
1749{
1750 return 0x00000000U;
1751}
1752static inline u32 sim_control_recv_get_disabled_f(void)
1753{
1754 return 0x0U;
1755}
1756static inline u32 sim_control_recv_get_enabled_v(void)
1757{
1758 return 0x00000001U;
1759}
1760static inline u32 sim_control_recv_get_enabled_f(void)
1761{
1762 return 0x8U;
1763}
1764static inline u32 sim_control_event_put_s(void)
1765{
1766 return 1U;
1767}
1768static inline u32 sim_control_event_put_f(u32 v)
1769{
1770 return (v & 0x1U) << 4U;
1771}
1772static inline u32 sim_control_event_put_m(void)
1773{
1774 return 0x1U << 4U;
1775}
1776static inline u32 sim_control_event_put_v(u32 r)
1777{
1778 return (r >> 4U) & 0x1U;
1779}
1780static inline u32 sim_control_event_put__init_v(void)
1781{
1782 return 0x00000000U;
1783}
1784static inline u32 sim_control_event_put__init_f(void)
1785{
1786 return 0x0U;
1787}
1788static inline u32 sim_control_event_put_disabled_v(void)
1789{
1790 return 0x00000000U;
1791}
1792static inline u32 sim_control_event_put_disabled_f(void)
1793{
1794 return 0x0U;
1795}
1796static inline u32 sim_control_event_put_enabled_v(void)
1797{
1798 return 0x00000001U;
1799}
1800static inline u32 sim_control_event_put_enabled_f(void)
1801{
1802 return 0x10U;
1803}
1804static inline u32 sim_control_event_get_s(void)
1805{
1806 return 1U;
1807}
1808static inline u32 sim_control_event_get_f(u32 v)
1809{
1810 return (v & 0x1U) << 5U;
1811}
1812static inline u32 sim_control_event_get_m(void)
1813{
1814 return 0x1U << 5U;
1815}
1816static inline u32 sim_control_event_get_v(u32 r)
1817{
1818 return (r >> 5U) & 0x1U;
1819}
1820static inline u32 sim_control_event_get__init_v(void)
1821{
1822 return 0x00000000U;
1823}
1824static inline u32 sim_control_event_get__init_f(void)
1825{
1826 return 0x0U;
1827}
1828static inline u32 sim_control_event_get_disabled_v(void)
1829{
1830 return 0x00000000U;
1831}
1832static inline u32 sim_control_event_get_disabled_f(void)
1833{
1834 return 0x0U;
1835}
1836static inline u32 sim_control_event_get_enabled_v(void)
1837{
1838 return 0x00000001U;
1839}
1840static inline u32 sim_control_event_get_enabled_f(void)
1841{
1842 return 0x20U;
1843}
1844static inline u32 sim_dma_r(void)
1845{
1846 return 0x00000000U;
1847}
1848static inline u32 sim_dma_target_s(void)
1849{
1850 return 2U;
1851}
1852static inline u32 sim_dma_target_f(u32 v)
1853{
1854 return (v & 0x3U) << 0U;
1855}
1856static inline u32 sim_dma_target_m(void)
1857{
1858 return 0x3U << 0U;
1859}
1860static inline u32 sim_dma_target_v(u32 r)
1861{
1862 return (r >> 0U) & 0x3U;
1863}
1864static inline u32 sim_dma_target_phys_init_v(void)
1865{
1866 return 0x00000001U;
1867}
1868static inline u32 sim_dma_target_phys_init_f(void)
1869{
1870 return 0x1U;
1871}
1872static inline u32 sim_dma_target_phys__init_v(void)
1873{
1874 return 0x00000001U;
1875}
1876static inline u32 sim_dma_target_phys__init_f(void)
1877{
1878 return 0x1U;
1879}
1880static inline u32 sim_dma_target_phys__prod_v(void)
1881{
1882 return 0x00000001U;
1883}
1884static inline u32 sim_dma_target_phys__prod_f(void)
1885{
1886 return 0x1U;
1887}
1888static inline u32 sim_dma_target_phys_nvm_v(void)
1889{
1890 return 0x00000001U;
1891}
1892static inline u32 sim_dma_target_phys_nvm_f(void)
1893{
1894 return 0x1U;
1895}
1896static inline u32 sim_dma_target_phys_pci_v(void)
1897{
1898 return 0x00000002U;
1899}
1900static inline u32 sim_dma_target_phys_pci_f(void)
1901{
1902 return 0x2U;
1903}
1904static inline u32 sim_dma_target_phys_pci_coherent_v(void)
1905{
1906 return 0x00000003U;
1907}
1908static inline u32 sim_dma_target_phys_pci_coherent_f(void)
1909{
1910 return 0x3U;
1911}
1912static inline u32 sim_dma_status_s(void)
1913{
1914 return 1U;
1915}
1916static inline u32 sim_dma_status_f(u32 v)
1917{
1918 return (v & 0x1U) << 3U;
1919}
1920static inline u32 sim_dma_status_m(void)
1921{
1922 return 0x1U << 3U;
1923}
1924static inline u32 sim_dma_status_v(u32 r)
1925{
1926 return (r >> 3U) & 0x1U;
1927}
1928static inline u32 sim_dma_status_init_v(void)
1929{
1930 return 0x00000000U;
1931}
1932static inline u32 sim_dma_status_init_f(void)
1933{
1934 return 0x0U;
1935}
1936static inline u32 sim_dma_status__init_v(void)
1937{
1938 return 0x00000000U;
1939}
1940static inline u32 sim_dma_status__init_f(void)
1941{
1942 return 0x0U;
1943}
1944static inline u32 sim_dma_status__prod_v(void)
1945{
1946 return 0x00000000U;
1947}
1948static inline u32 sim_dma_status__prod_f(void)
1949{
1950 return 0x0U;
1951}
1952static inline u32 sim_dma_status_invalid_v(void)
1953{
1954 return 0x00000000U;
1955}
1956static inline u32 sim_dma_status_invalid_f(void)
1957{
1958 return 0x0U;
1959}
1960static inline u32 sim_dma_status_valid_v(void)
1961{
1962 return 0x00000001U;
1963}
1964static inline u32 sim_dma_status_valid_f(void)
1965{
1966 return 0x8U;
1967}
1968static inline u32 sim_dma_size_s(void)
1969{
1970 return 2U;
1971}
1972static inline u32 sim_dma_size_f(u32 v)
1973{
1974 return (v & 0x3U) << 4U;
1975}
1976static inline u32 sim_dma_size_m(void)
1977{
1978 return 0x3U << 4U;
1979}
1980static inline u32 sim_dma_size_v(u32 r)
1981{
1982 return (r >> 4U) & 0x3U;
1983}
1984static inline u32 sim_dma_size_init_v(void)
1985{
1986 return 0x00000000U;
1987}
1988static inline u32 sim_dma_size_init_f(void)
1989{
1990 return 0x0U;
1991}
1992static inline u32 sim_dma_size__init_v(void)
1993{
1994 return 0x00000000U;
1995}
1996static inline u32 sim_dma_size__init_f(void)
1997{
1998 return 0x0U;
1999}
2000static inline u32 sim_dma_size__prod_v(void)
2001{
2002 return 0x00000000U;
2003}
2004static inline u32 sim_dma_size__prod_f(void)
2005{
2006 return 0x0U;
2007}
2008static inline u32 sim_dma_size_4kb_v(void)
2009{
2010 return 0x00000000U;
2011}
2012static inline u32 sim_dma_size_4kb_f(void)
2013{
2014 return 0x0U;
2015}
2016static inline u32 sim_dma_size_8kb_v(void)
2017{
2018 return 0x00000001U;
2019}
2020static inline u32 sim_dma_size_8kb_f(void)
2021{
2022 return 0x10U;
2023}
2024static inline u32 sim_dma_size_12kb_v(void)
2025{
2026 return 0x00000002U;
2027}
2028static inline u32 sim_dma_size_12kb_f(void)
2029{
2030 return 0x20U;
2031}
2032static inline u32 sim_dma_size_16kb_v(void)
2033{
2034 return 0x00000003U;
2035}
2036static inline u32 sim_dma_size_16kb_f(void)
2037{
2038 return 0x30U;
2039}
2040static inline u32 sim_dma_addr_lo_s(void)
2041{
2042 return 20U;
2043}
2044static inline u32 sim_dma_addr_lo_f(u32 v)
2045{
2046 return (v & 0xfffffU) << 12U;
2047}
2048static inline u32 sim_dma_addr_lo_m(void)
2049{
2050 return 0xfffffU << 12U;
2051}
2052static inline u32 sim_dma_addr_lo_v(u32 r)
2053{
2054 return (r >> 12U) & 0xfffffU;
2055}
2056static inline u32 sim_dma_addr_lo__init_v(void)
2057{
2058 return 0x00000000U;
2059}
2060static inline u32 sim_dma_addr_lo__init_f(void)
2061{
2062 return 0x0U;
2063}
2064static inline u32 sim_dma_addr_lo__prod_v(void)
2065{
2066 return 0x00000000U;
2067}
2068static inline u32 sim_dma_addr_lo__prod_f(void)
2069{
2070 return 0x0U;
2071}
2072static inline u32 sim_dma_hi_r(void)
2073{
2074 return 0x00000004U;
2075}
2076static inline u32 sim_dma_hi_addr_s(void)
2077{
2078 return 20U;
2079}
2080static inline u32 sim_dma_hi_addr_f(u32 v)
2081{
2082 return (v & 0xfffffU) << 0U;
2083}
2084static inline u32 sim_dma_hi_addr_m(void)
2085{
2086 return 0xfffffU << 0U;
2087}
2088static inline u32 sim_dma_hi_addr_v(u32 r)
2089{
2090 return (r >> 0U) & 0xfffffU;
2091}
2092static inline u32 sim_dma_hi_addr__init_v(void)
2093{
2094 return 0x00000000U;
2095}
2096static inline u32 sim_dma_hi_addr__init_f(void)
2097{
2098 return 0x0U;
2099}
2100static inline u32 sim_dma_hi_addr__prod_v(void)
2101{
2102 return 0x00000000U;
2103}
2104static inline u32 sim_dma_hi_addr__prod_f(void)
2105{
2106 return 0x0U;
2107}
2108static inline u32 sim_msg_header_version_r(void)
2109{
2110 return 0x00000000U;
2111}
2112static inline u32 sim_msg_header_version_major_tot_v(void)
2113{
2114 return 0x03000000U;
2115}
2116static inline u32 sim_msg_header_version_minor_tot_v(void)
2117{
2118 return 0x00000000U;
2119}
2120static inline u32 sim_msg_signature_r(void)
2121{
2122 return 0x00000004U;
2123}
2124static inline u32 sim_msg_signature_valid_v(void)
2125{
2126 return 0x43505256U;
2127}
2128static inline u32 sim_msg_length_r(void)
2129{
2130 return 0x00000008U;
2131}
2132static inline u32 sim_msg_function_r(void)
2133{
2134 return 0x0000000cU;
2135}
2136static inline u32 sim_msg_function_sim_escape_read_v(void)
2137{
2138 return 0x00000023U;
2139}
2140static inline u32 sim_msg_function_sim_escape_write_v(void)
2141{
2142 return 0x00000024U;
2143}
2144static inline u32 sim_msg_result_r(void)
2145{
2146 return 0x00000010U;
2147}
2148static inline u32 sim_msg_result_success_v(void)
2149{
2150 return 0x00000000U;
2151}
2152static inline u32 sim_msg_result_rpc_pending_v(void)
2153{
2154 return 0xFFFFFFFFU;
2155}
2156static inline u32 sim_msg_sequence_r(void)
2157{
2158 return 0x00000018U;
2159}
2160static inline u32 sim_msg_spare_r(void)
2161{
2162 return 0x0000001cU;
2163}
2164static inline u32 sim_msg_spare__init_v(void)
2165{
2166 return 0x00000000U;
2167}
2168
2169#endif /* __hw_sim_pci_h__ */
diff --git a/include/nvgpu/io.h b/include/nvgpu/io.h
deleted file mode 100644
index d6cc16e..0000000
--- a/include/nvgpu/io.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_IO_H
23#define NVGPU_IO_H
24
25#include <nvgpu/types.h>
26
27/* Legacy defines - should be removed once everybody uses nvgpu_* */
28#define gk20a_writel nvgpu_writel
29#define gk20a_readl nvgpu_readl
30#define gk20a_writel_check nvgpu_writel_check
31#define gk20a_bar1_writel nvgpu_bar1_writel
32#define gk20a_bar1_readl nvgpu_bar1_readl
33#define gk20a_io_exists nvgpu_io_exists
34#define gk20a_io_valid_reg nvgpu_io_valid_reg
35
36struct gk20a;
37
38void nvgpu_writel(struct gk20a *g, u32 r, u32 v);
39void nvgpu_writel_relaxed(struct gk20a *g, u32 r, u32 v);
40u32 nvgpu_readl(struct gk20a *g, u32 r);
41u32 __nvgpu_readl(struct gk20a *g, u32 r);
42void nvgpu_writel_check(struct gk20a *g, u32 r, u32 v);
43void nvgpu_writel_loop(struct gk20a *g, u32 r, u32 v);
44void nvgpu_bar1_writel(struct gk20a *g, u32 b, u32 v);
45u32 nvgpu_bar1_readl(struct gk20a *g, u32 b);
46bool nvgpu_io_exists(struct gk20a *g);
47bool nvgpu_io_valid_reg(struct gk20a *g, u32 r);
48
49#endif /* NVGPU_IO_H */
diff --git a/include/nvgpu/io_usermode.h b/include/nvgpu/io_usermode.h
deleted file mode 100644
index f56062b..0000000
--- a/include/nvgpu/io_usermode.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_IO_USERMODE_H
23#define NVGPU_IO_USERMODE_H
24
25void nvgpu_usermode_writel(struct gk20a *g, u32 r, u32 v);
26
27#endif /* NVGPU_IO_USERMODE_H */
diff --git a/include/nvgpu/kmem.h b/include/nvgpu/kmem.h
deleted file mode 100644
index 61f90bf..0000000
--- a/include/nvgpu/kmem.h
+++ /dev/null
@@ -1,285 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_KMEM_H
24#define NVGPU_KMEM_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/utils.h>
28
29struct gk20a;
30
31/*
32 * When there's other implementations make sure they are included instead of
33 * Linux when not compiling on Linux!
34 */
35#ifdef __KERNEL__
36#include <nvgpu/linux/kmem.h>
37#elif defined(__NVGPU_POSIX__)
38#include <nvgpu/posix/kmem.h>
39#else
40#include <nvgpu_rmos/include/kmem.h>
41#endif
42
43/**
44 * DOC: Kmem cache support
45 *
46 * In Linux there is support for the notion of a kmem_cache. It gives better
47 * memory usage characteristics for lots of allocations of the same size. Think
48 * structs that get allocated over and over. Normal kmalloc() type routines
49 * typically round to the next power-of-2 since that's easy.
50 *
51 * But if we know the size ahead of time the packing for the allocations can be
52 * much better. This is the benefit of a slab allocator. This type hides the
53 * underlying kmem_cache (or absense thereof).
54 */
55struct nvgpu_kmem_cache;
56
57#ifdef CONFIG_NVGPU_TRACK_MEM_USAGE
58/*
59 * Uncomment this if you want to enable stack traces in the memory profiling.
60 * Since this is a fairly high overhead operation and is only necessary for
61 * debugging actual bugs it's left here for developers to enable.
62 */
63/* #define __NVGPU_SAVE_KALLOC_STACK_TRACES */
64
65/*
66 * Defined per-OS.
67 */
68struct nvgpu_mem_alloc_tracker;
69#endif
70
71
72/**
73 * nvgpu_kmem_cache_create - create an nvgpu kernel memory cache.
74 *
75 * @g The GPU driver struct using this cache.
76 * @size Size of the object allocated by the cache.
77 *
78 * This cache can be used to allocate objects of size @size. Common usage would
79 * be for a struct that gets allocated a lot. In that case @size should be
80 * sizeof(struct my_struct).
81 *
82 * A given implementation of this need not do anything special. The allocation
83 * routines can simply be passed on to nvgpu_kzalloc() if desired so packing
84 * and alignment of the structs cannot be assumed.
85 */
86struct nvgpu_kmem_cache *nvgpu_kmem_cache_create(struct gk20a *g, size_t size);
87
88/**
89 * nvgpu_kmem_cache_destroy - destroy a cache created by
90 * nvgpu_kmem_cache_create().
91 *
92 * @cache The cache to destroy.
93 */
94void nvgpu_kmem_cache_destroy(struct nvgpu_kmem_cache *cache);
95
96/**
97 * nvgpu_kmem_cache_alloc - Allocate an object from the cache
98 *
99 * @cache The cache to alloc from.
100 */
101void *nvgpu_kmem_cache_alloc(struct nvgpu_kmem_cache *cache);
102
103/**
104 * nvgpu_kmem_cache_free - Free an object back to a cache
105 *
106 * @cache The cache to return the object to.
107 * @ptr Pointer to the object to free.
108 */
109void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr);
110
111/**
112 * nvgpu_kmalloc - Allocate from the kernel's allocator.
113 *
114 * @g: Current GPU.
115 * @size: Size of the allocation.
116 *
117 * Allocate a chunk of system memory from the kernel. Allocations larger than 1
118 * page may fail even when there may appear to be enough memory.
119 *
120 * This function may sleep so cannot be used in IRQs.
121 */
122#define nvgpu_kmalloc(g, size) __nvgpu_kmalloc(g, size, _NVGPU_GET_IP_)
123
124/**
125 * nvgpu_kzalloc - Allocate from the kernel's allocator.
126 *
127 * @g: Current GPU.
128 * @size: Size of the allocation.
129 *
130 * Identical to nvgpu_kalloc() except the memory will be zeroed before being
131 * returned.
132 */
133#define nvgpu_kzalloc(g, size) __nvgpu_kzalloc(g, size, _NVGPU_GET_IP_)
134
135/**
136 * nvgpu_kcalloc - Allocate from the kernel's allocator.
137 *
138 * @g: Current GPU.
139 * @n: Number of objects.
140 * @size: Size of each object.
141 *
142 * Identical to nvgpu_kalloc() except the size of the memory chunk returned is
143 * @n * @size.
144 */
145#define nvgpu_kcalloc(g, n, size) \
146 __nvgpu_kcalloc(g, n, size, _NVGPU_GET_IP_)
147
148/**
149 * nvgpu_vmalloc - Allocate memory and return a map to it.
150 *
151 * @g: Current GPU.
152 * @size: Size of the allocation.
153 *
154 * Allocate some memory and return a pointer to a virtual memory mapping of
155 * that memory in the kernel's virtual address space. The underlying physical
156 * memory is not guaranteed to be contiguous (and indeed likely isn't). This
157 * allows for much larger allocations to be done without worrying about as much
158 * about physical memory fragmentation.
159 *
160 * This function may sleep.
161 */
162#define nvgpu_vmalloc(g, size) __nvgpu_vmalloc(g, size, _NVGPU_GET_IP_)
163
164/**
165 * nvgpu_vzalloc - Allocate memory and return a map to it.
166 *
167 * @g: Current GPU.
168 * @size: Size of the allocation.
169 *
170 * Identical to nvgpu_vmalloc() except this will return zero'ed memory.
171 */
172#define nvgpu_vzalloc(g, size) __nvgpu_vzalloc(g, size, _NVGPU_GET_IP_)
173
174/**
175 * nvgpu_kfree - Frees an alloc from nvgpu_kmalloc, nvgpu_kzalloc,
176 * nvgpu_kcalloc.
177 *
178 * @g: Current GPU.
179 * @addr: Address of object to free.
180 */
181#define nvgpu_kfree(g, addr) __nvgpu_kfree(g, addr)
182
183/**
184 * nvgpu_vfree - Frees an alloc from nvgpu_vmalloc, nvgpu_vzalloc.
185 *
186 * @g: Current GPU.
187 * @addr: Address of object to free.
188 */
189#define nvgpu_vfree(g, addr) __nvgpu_vfree(g, addr)
190
191#define kmem_dbg(g, fmt, args...) \
192 nvgpu_log(g, gpu_dbg_kmem, fmt, ##args)
193
194/**
195 * nvgpu_kmem_init - Initialize the kmem tracking stuff.
196 *
197 *@g: The driver to init.
198 *
199 * Returns non-zero on failure.
200 */
201int nvgpu_kmem_init(struct gk20a *g);
202
203/**
204 * nvgpu_kmem_fini - Finalize the kmem tracking code
205 *
206 * @g - The GPU.
207 * @flags - Flags that control operation of this finalization.
208 *
209 * Cleanup resources used by nvgpu_kmem. Available flags for cleanup are:
210 *
211 * %NVGPU_KMEM_FINI_DO_NOTHING
212 * %NVGPU_KMEM_FINI_FORCE_CLEANUP
213 * %NVGPU_KMEM_FINI_DUMP_ALLOCS
214 * %NVGPU_KMEM_FINI_WARN
215 * %NVGPU_KMEM_FINI_BUG
216 *
217 * %NVGPU_KMEM_FINI_DO_NOTHING will be overridden by anything else specified.
218 * Put another way don't just add %NVGPU_KMEM_FINI_DO_NOTHING and expect that
219 * to suppress other flags from doing anything.
220 */
221void nvgpu_kmem_fini(struct gk20a *g, int flags);
222
223/*
224 * These will simply be ignored if CONFIG_NVGPU_TRACK_MEM_USAGE is not defined.
225 */
226#define NVGPU_KMEM_FINI_DO_NOTHING 0
227#define NVGPU_KMEM_FINI_FORCE_CLEANUP (1 << 0)
228#define NVGPU_KMEM_FINI_DUMP_ALLOCS (1 << 1)
229#define NVGPU_KMEM_FINI_WARN (1 << 2)
230#define NVGPU_KMEM_FINI_BUG (1 << 3)
231
232/*
233 * Implemented by the OS interface.
234 */
235void *__nvgpu_big_alloc(struct gk20a *g, size_t size, bool clear);
236
237/**
238 * nvgpu_big_malloc - Pick virtual or physical alloc based on @size
239 *
240 * @g - The GPU.
241 * @size - Size of the allocation.
242 *
243 * On some platforms (i.e Linux) it is possible to allocate memory directly
244 * mapped into the kernel's address space (kmalloc) or allocate discontiguous
245 * pages which are then mapped into a special kernel address range. Each type
246 * of allocation has pros and cons. kmalloc() for instance lets you allocate
247 * small buffers more space efficiently but vmalloc() allows you to successfully
248 * allocate much larger buffers without worrying about fragmentation as much
249 * (but will allocate in multiples of page size).
250 *
251 * This function aims to provide the right allocation for when buffers are of
252 * variable size. In some cases the code doesn't know ahead of time if the
253 * buffer is going to be big or small so this does the check for you and
254 * provides the right type of memory allocation.
255 *
256 * Returns a pointer to a virtual address range that the kernel can access or
257 * %NULL on failure.
258 */
259static inline void *nvgpu_big_malloc(struct gk20a *g, size_t size)
260{
261 return __nvgpu_big_alloc(g, size, false);
262}
263
264/**
265 * nvgpu_big_malloc - Pick virtual or physical alloc based on @size
266 *
267 * @g - The GPU.
268 * @size - Size of the allocation.
269 *
270 * Zeroed memory version of nvgpu_big_malloc().
271 */
272static inline void *nvgpu_big_zalloc(struct gk20a *g, size_t size)
273{
274 return __nvgpu_big_alloc(g, size, true);
275}
276
277/**
278 * nvgpu_big_free - Free and alloc from nvgpu_big_zalloc() or
279 * nvgpu_big_malloc().
280 * @g - The GPU.
281 * @p - A pointer allocated by nvgpu_big_zalloc() or nvgpu_big_malloc().
282 */
283void nvgpu_big_free(struct gk20a *g, void *p);
284
285#endif /* NVGPU_KMEM_H */
diff --git a/include/nvgpu/kref.h b/include/nvgpu/kref.h
deleted file mode 100644
index 486040e..0000000
--- a/include/nvgpu/kref.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23/*
24 * The following structure is used for reference counting of objects in nvgpu.
25 */
26#ifndef NVGPU_KREF_H
27#define NVGPU_KREF_H
28
29#include <nvgpu/atomic.h>
30
31struct nvgpu_ref {
32 nvgpu_atomic_t refcount;
33};
34
35/*
36 * Initialize object.
37 * @ref: the nvgpu_ref object to initialize
38 */
39static inline void nvgpu_ref_init(struct nvgpu_ref *ref)
40{
41 nvgpu_atomic_set(&ref->refcount, 1);
42}
43
44/*
45 * Increment reference count for the object
46 * @ref: the nvgpu_ref object
47 */
48static inline void nvgpu_ref_get(struct nvgpu_ref *ref)
49{
50 nvgpu_atomic_inc(&ref->refcount);
51}
52
53/*
54 * Decrement reference count for the object and call release() if it becomes
55 * zero.
56 * @ref: the nvgpu_ref object
57 * @release: pointer to the function that would be invoked to clean up the
58 * object when the reference count becomes zero, i.e. the last
59 * reference corresponding to this object is removed.
60 * Return 1 if object was removed, otherwise return 0. The user should not
61 * make any assumptions about the status of the object in the memory when
62 * the function returns 0 and should only use it to know that there are no
63 * further references to this object.
64 */
65static inline int nvgpu_ref_put(struct nvgpu_ref *ref,
66 void (*release)(struct nvgpu_ref *r))
67{
68 if (nvgpu_atomic_sub_and_test(1, &ref->refcount)) {
69 if (release != NULL) {
70 release(ref);
71 }
72 return 1;
73 }
74 return 0;
75}
76
77/*
78 * Increment reference count for the object unless it is zero.
79 * @ref: the nvgpu_ref object
80 * Return non-zero if the increment succeeds, Otherwise return 0.
81 */
82static inline int __must_check nvgpu_ref_get_unless_zero(struct nvgpu_ref *ref)
83{
84 return nvgpu_atomic_add_unless(&ref->refcount, 1, 0);
85}
86
87#endif /* NVGPU_KREF_H */
diff --git a/include/nvgpu/linux/atomic.h b/include/nvgpu/linux/atomic.h
deleted file mode 100644
index 0734672..0000000
--- a/include/nvgpu/linux/atomic.h
+++ /dev/null
@@ -1,149 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#ifndef __NVGPU_ATOMIC_LINUX_H__
17#define __NVGPU_ATOMIC_LINUX_H__
18
19#ifdef __KERNEL__
20#include <linux/atomic.h>
21#endif
22
23typedef struct nvgpu_atomic {
24 atomic_t atomic_var;
25} nvgpu_atomic_t;
26
27typedef struct nvgpu_atomic64 {
28 atomic64_t atomic_var;
29} nvgpu_atomic64_t;
30
31#define __nvgpu_atomic_init(i) { ATOMIC_INIT(i) }
32#define __nvgpu_atomic64_init(i) { ATOMIC64_INIT(i) }
33
34static inline void __nvgpu_atomic_set(nvgpu_atomic_t *v, int i)
35{
36 atomic_set(&v->atomic_var, i);
37}
38
39static inline int __nvgpu_atomic_read(nvgpu_atomic_t *v)
40{
41 return atomic_read(&v->atomic_var);
42}
43
44static inline void __nvgpu_atomic_inc(nvgpu_atomic_t *v)
45{
46 atomic_inc(&v->atomic_var);
47}
48
49static inline int __nvgpu_atomic_inc_return(nvgpu_atomic_t *v)
50{
51 return atomic_inc_return(&v->atomic_var);
52}
53
54static inline void __nvgpu_atomic_dec(nvgpu_atomic_t *v)
55{
56 atomic_dec(&v->atomic_var);
57}
58
59static inline int __nvgpu_atomic_dec_return(nvgpu_atomic_t *v)
60{
61 return atomic_dec_return(&v->atomic_var);
62}
63
64static inline int __nvgpu_atomic_cmpxchg(nvgpu_atomic_t *v, int old, int new)
65{
66 return atomic_cmpxchg(&v->atomic_var, old, new);
67}
68
69static inline int __nvgpu_atomic_xchg(nvgpu_atomic_t *v, int new)
70{
71 return atomic_xchg(&v->atomic_var, new);
72}
73
74static inline bool __nvgpu_atomic_inc_and_test(nvgpu_atomic_t *v)
75{
76 return atomic_inc_and_test(&v->atomic_var);
77}
78
79static inline bool __nvgpu_atomic_dec_and_test(nvgpu_atomic_t *v)
80{
81 return atomic_dec_and_test(&v->atomic_var);
82}
83
84static inline bool __nvgpu_atomic_sub_and_test(int i, nvgpu_atomic_t *v)
85{
86 return atomic_sub_and_test(i, &v->atomic_var);
87}
88
89static inline int __nvgpu_atomic_add_return(int i, nvgpu_atomic_t *v)
90{
91 return atomic_add_return(i, &v->atomic_var);
92}
93
94static inline int __nvgpu_atomic_add_unless(nvgpu_atomic_t *v, int a, int u)
95{
96 return atomic_add_unless(&v->atomic_var, a, u);
97}
98
99static inline void __nvgpu_atomic64_set(nvgpu_atomic64_t *v, long i)
100{
101 atomic64_set(&v->atomic_var, i);
102}
103
104static inline long __nvgpu_atomic64_read(nvgpu_atomic64_t *v)
105{
106 return atomic64_read(&v->atomic_var);
107}
108
109static inline void __nvgpu_atomic64_add(long x, nvgpu_atomic64_t *v)
110{
111 atomic64_add(x, &v->atomic_var);
112}
113
114static inline void __nvgpu_atomic64_inc(nvgpu_atomic64_t *v)
115{
116 atomic64_inc(&v->atomic_var);
117}
118
119static inline long __nvgpu_atomic64_inc_return(nvgpu_atomic64_t *v)
120{
121 return atomic64_inc_return(&v->atomic_var);
122}
123
124static inline void __nvgpu_atomic64_dec(nvgpu_atomic64_t *v)
125{
126 atomic64_dec(&v->atomic_var);
127}
128
129static inline void __nvgpu_atomic64_dec_return(nvgpu_atomic64_t *v)
130{
131 atomic64_dec_return(&v->atomic_var);
132}
133
134static inline long __nvgpu_atomic64_cmpxchg(nvgpu_atomic64_t *v,
135 long old, long new)
136{
137 return atomic64_cmpxchg(&v->atomic_var, old, new);
138}
139
140static inline void __nvgpu_atomic64_sub(long x, nvgpu_atomic64_t *v)
141{
142 atomic64_sub(x, &v->atomic_var);
143}
144
145static inline long __nvgpu_atomic64_sub_return(long x, nvgpu_atomic64_t *v)
146{
147 return atomic64_sub_return(x, &v->atomic_var);
148}
149#endif /*__NVGPU_ATOMIC_LINUX_H__ */
diff --git a/include/nvgpu/linux/barrier.h b/include/nvgpu/linux/barrier.h
deleted file mode 100644
index ef867c4..0000000
--- a/include/nvgpu/linux/barrier.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_BARRIER_LINUX_H__
18#define __NVGPU_BARRIER_LINUX_H__
19
20#include <asm/barrier.h>
21
22#define __nvgpu_mb() mb()
23#define __nvgpu_rmb() rmb()
24#define __nvgpu_wmb() wmb()
25
26#define __nvgpu_smp_mb() smp_mb()
27#define __nvgpu_smp_rmb() smp_rmb()
28#define __nvgpu_smp_wmb() smp_wmb()
29
30#define __nvgpu_read_barrier_depends() read_barrier_depends()
31#define __nvgpu_smp_read_barrier_depends() smp_read_barrier_depends()
32
33#define __NV_ACCESS_ONCE(x) ACCESS_ONCE(x)
34
35#define __nvgpu_speculation_barrier() speculation_barrier()
36
37#endif /* __NVGPU_BARRIER_LINUX_H__ */
diff --git a/include/nvgpu/linux/cond.h b/include/nvgpu/linux/cond.h
deleted file mode 100644
index b53ada3..0000000
--- a/include/nvgpu/linux/cond.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_COND_LINUX_H__
18#define __NVGPU_COND_LINUX_H__
19
20#include <linux/wait.h>
21#include <linux/sched.h>
22
23struct nvgpu_cond {
24 bool initialized;
25 wait_queue_head_t wq;
26};
27
28/**
29 * NVGPU_COND_WAIT - Wait for a condition to be true
30 *
31 * @c - The condition variable to sleep on
32 * @condition - The condition that needs to be true
33 * @timeout_ms - Timeout in milliseconds, or 0 for infinite wait
34 *
35 * Wait for a condition to become true. Returns -ETIMEOUT if
36 * the wait timed out with condition false.
37 */
38#define NVGPU_COND_WAIT(c, condition, timeout_ms) \
39({\
40 int ret = 0; \
41 long _timeout_ms = timeout_ms;\
42 if (_timeout_ms > 0) { \
43 long _ret = wait_event_timeout((c)->wq, condition, \
44 msecs_to_jiffies(_timeout_ms)); \
45 if (_ret == 0) \
46 ret = -ETIMEDOUT; \
47 } else { \
48 wait_event((c)->wq, condition); \
49 } \
50 ret;\
51})
52
53/**
54 * NVGPU_COND_WAIT_INTERRUPTIBLE - Wait for a condition to be true
55 *
56 * @c - The condition variable to sleep on
57 * @condition - The condition that needs to be true
58 * @timeout_ms - Timeout in milliseconds, or 0 for infinite wait
59 *
60 * Wait for a condition to become true. Returns -ETIMEOUT if
61 * the wait timed out with condition false or -ERESTARTSYS on
62 * signal.
63 */
64#define NVGPU_COND_WAIT_INTERRUPTIBLE(c, condition, timeout_ms) \
65({ \
66 int ret = 0; \
67 long _timeout_ms = timeout_ms;\
68 if (_timeout_ms > 0) { \
69 long _ret = wait_event_interruptible_timeout((c)->wq, condition, \
70 msecs_to_jiffies(_timeout_ms)); \
71 if (_ret == 0) \
72 ret = -ETIMEDOUT; \
73 else if (_ret == -ERESTARTSYS) \
74 ret = -ERESTARTSYS; \
75 } else { \
76 ret = wait_event_interruptible((c)->wq, condition); \
77 } \
78 ret; \
79})
80
81#endif /* __NVGPU_LOCK_LINUX_H__ */
diff --git a/include/nvgpu/linux/dma.h b/include/nvgpu/linux/dma.h
deleted file mode 100644
index 342b278..0000000
--- a/include/nvgpu/linux/dma.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_LINUX_DMA_H__
18#define __NVGPU_LINUX_DMA_H__
19
20/**
21 * Functions used internally for building the backing SGTs for nvgpu_mems.
22 */
23
24
25int nvgpu_get_sgtable_attrs(struct gk20a *g, struct sg_table **sgt,
26 void *cpuva, u64 iova,
27 size_t size, unsigned long flags);
28
29int nvgpu_get_sgtable(struct gk20a *g, struct sg_table **sgt,
30 void *cpuva, u64 iova, size_t size);
31
32int nvgpu_get_sgtable_from_pages(struct gk20a *g, struct sg_table **sgt,
33 struct page **pages, u64 iova,
34 size_t size);
35
36void nvgpu_free_sgtable(struct gk20a *g, struct sg_table **sgt);
37
38#endif
diff --git a/include/nvgpu/linux/kmem.h b/include/nvgpu/linux/kmem.h
deleted file mode 100644
index 660aac9..0000000
--- a/include/nvgpu/linux/kmem.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_KMEM_LINUX_H__
18#define __NVGPU_KMEM_LINUX_H__
19
20struct gk20a;
21struct device;
22
23#ifdef CONFIG_NVGPU_TRACK_MEM_USAGE
24void *__nvgpu_track_vmalloc(struct gk20a *g, unsigned long size, void *ip);
25void *__nvgpu_track_vzalloc(struct gk20a *g, unsigned long size, void *ip);
26void *__nvgpu_track_kmalloc(struct gk20a *g, size_t size, void *ip);
27void *__nvgpu_track_kzalloc(struct gk20a *g, size_t size, void *ip);
28void *__nvgpu_track_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip);
29void __nvgpu_track_vfree(struct gk20a *g, void *addr);
30void __nvgpu_track_kfree(struct gk20a *g, void *addr);
31#endif
32
33/**
34 * DOC: Linux pass through kmem implementation.
35 *
36 * These are the Linux implementations of the various kmem functions defined by
37 * nvgpu. This should not be included directly - instead include <nvgpu/kmem.h>.
38 */
39void *__nvgpu_kmalloc(struct gk20a *g, size_t size, void *ip);
40void *__nvgpu_kzalloc(struct gk20a *g, size_t size, void *ip);
41void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip);
42void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, void *ip);
43void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, void *ip);
44void __nvgpu_kfree(struct gk20a *g, void *addr);
45void __nvgpu_vfree(struct gk20a *g, void *addr);
46
47#endif
diff --git a/include/nvgpu/linux/lock.h b/include/nvgpu/linux/lock.h
deleted file mode 100644
index fbf26e9..0000000
--- a/include/nvgpu/linux/lock.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef NVGPU_LOCK_LINUX_H
18#define NVGPU_LOCK_LINUX_H
19
20#include <linux/mutex.h>
21#include <linux/spinlock.h>
22
23struct nvgpu_mutex {
24 struct mutex mutex;
25};
26struct nvgpu_spinlock {
27 spinlock_t spinlock;
28};
29struct nvgpu_raw_spinlock {
30 raw_spinlock_t spinlock;
31};
32
33static inline int nvgpu_mutex_init(struct nvgpu_mutex *mutex)
34{
35 mutex_init(&mutex->mutex);
36 return 0;
37};
38static inline void nvgpu_mutex_acquire(struct nvgpu_mutex *mutex)
39{
40 mutex_lock(&mutex->mutex);
41};
42static inline void nvgpu_mutex_release(struct nvgpu_mutex *mutex)
43{
44 mutex_unlock(&mutex->mutex);
45};
46static inline int nvgpu_mutex_tryacquire(struct nvgpu_mutex *mutex)
47{
48 return mutex_trylock(&mutex->mutex);
49};
50static inline void nvgpu_mutex_destroy(struct nvgpu_mutex *mutex)
51{
52 mutex_destroy(&mutex->mutex);
53};
54
55static inline void nvgpu_spinlock_init(struct nvgpu_spinlock *spinlock)
56{
57 spin_lock_init(&spinlock->spinlock);
58};
59static inline void nvgpu_spinlock_acquire(struct nvgpu_spinlock *spinlock)
60{
61 spin_lock(&spinlock->spinlock);
62};
63static inline void nvgpu_spinlock_release(struct nvgpu_spinlock *spinlock)
64{
65 spin_unlock(&spinlock->spinlock);
66};
67
68static inline void nvgpu_raw_spinlock_init(struct nvgpu_raw_spinlock *spinlock)
69{
70 raw_spin_lock_init(&spinlock->spinlock);
71};
72static inline void nvgpu_raw_spinlock_acquire(struct nvgpu_raw_spinlock *spinlock)
73{
74 raw_spin_lock(&spinlock->spinlock);
75};
76static inline void nvgpu_raw_spinlock_release(struct nvgpu_raw_spinlock *spinlock)
77{
78 raw_spin_unlock(&spinlock->spinlock);
79};
80
81#endif /* NVGPU_LOCK_LINUX_H */
diff --git a/include/nvgpu/linux/nvgpu_mem.h b/include/nvgpu/linux/nvgpu_mem.h
deleted file mode 100644
index e5f5031..0000000
--- a/include/nvgpu/linux/nvgpu_mem.h
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_LINUX_NVGPU_MEM_H__
18#define __NVGPU_LINUX_NVGPU_MEM_H__
19
20struct page;
21struct sg_table;
22struct scatterlist;
23struct nvgpu_sgt;
24
25struct gk20a;
26struct nvgpu_mem;
27struct nvgpu_gmmu_attrs;
28
29struct nvgpu_mem_priv {
30 struct page **pages;
31 struct sg_table *sgt;
32 unsigned long flags;
33};
34
35u64 nvgpu_mem_get_addr_sgl(struct gk20a *g, struct scatterlist *sgl);
36struct nvgpu_sgt *nvgpu_mem_linux_sgt_create(struct gk20a *g,
37 struct sg_table *sgt);
38void nvgpu_mem_linux_sgt_free(struct gk20a *g, struct nvgpu_sgt *sgt);
39struct nvgpu_sgt *nvgpu_linux_sgt_create(struct gk20a *g,
40 struct sg_table *sgt);
41/**
42 * __nvgpu_mem_create_from_pages - Create an nvgpu_mem from physical pages.
43 *
44 * @g - The GPU.
45 * @dest - nvgpu_mem to initialize.
46 * @pages - A list of page pointers.
47 * @nr_pages - The number of pages in @pages.
48 *
49 * Create a new nvgpu_mem struct from a pre-existing list of physical pages. The
50 * pages need not be contiguous (the underlying scatter gather list will help
51 * with that). However, note, this API will explicitly make it so that the GMMU
52 * mapping code bypasses SMMU access for the passed pages. This allows one to
53 * make mem_descs that describe MMIO regions or other non-DRAM things.
54 *
55 * This only works for SYSMEM (or other things like SYSMEM - basically just not
56 * VIDMEM). Also, this API is only available for Linux as it heavily depends on
57 * the notion of struct %page.
58 *
59 * The resulting nvgpu_mem should be released with the nvgpu_dma_free() or the
60 * nvgpu_dma_unmap_free() function depending on whether or not the resulting
61 * nvgpu_mem has been mapped. The underlying pages themselves must be cleaned up
62 * by the caller of this API.
63 *
64 * Returns 0 on success, or a relevant error otherwise.
65 */
66int __nvgpu_mem_create_from_pages(struct gk20a *g, struct nvgpu_mem *dest,
67 struct page **pages, int nr_pages);
68
69/**
70 * __nvgpu_mem_create_from_phys - Create an nvgpu_mem from physical mem.
71 *
72 * @g - The GPU.
73 * @dest - nvgpu_mem to initialize.
74 * @src_phys - start address of physical mem
75 * @nr_pages - The number of pages in phys.
76 *
77 * Create a new nvgpu_mem struct from a physical memory aperure. The physical
78 * memory aperture needs to be contiguous for requested @nr_pages. This API
79 * only works for SYSMEM.
80 *
81 * The resulting nvgpu_mem should be released with the nvgpu_dma_free() or the
82 * nvgpu_dma_unmap_free() function depending on whether or not the resulting
83 * nvgpu_mem has been mapped.
84 *
85 * Returns 0 on success, or a relevant error otherwise.
86 */
87int __nvgpu_mem_create_from_phys(struct gk20a *g, struct nvgpu_mem *dest,
88 u64 src_phys, int nr_pages);
89#endif
diff --git a/include/nvgpu/linux/nvlink.h b/include/nvgpu/linux/nvlink.h
deleted file mode 100644
index 550a897..0000000
--- a/include/nvgpu/linux/nvlink.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_LINUX_NVLINK_H__
24#define __NVGPU_LINUX_NVLINK_H__
25
26#ifdef CONFIG_TEGRA_NVLINK
27#include <linux/mutex.h>
28#include <linux/platform/tegra/tegra-nvlink.h>
29#endif
30
31#endif
diff --git a/include/nvgpu/linux/os_fence_android.h b/include/nvgpu/linux/os_fence_android.h
deleted file mode 100644
index 201b530..0000000
--- a/include/nvgpu/linux/os_fence_android.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_OS_FENCE_ANDROID_H__
24#define __NVGPU_OS_FENCE_ANDROID_H__
25
26struct gk20a;
27struct nvgpu_os_fence;
28struct sync_fence;
29struct channel_gk20a;
30
31struct sync_fence *nvgpu_get_sync_fence(struct nvgpu_os_fence *s);
32
33void nvgpu_os_fence_android_drop_ref(struct nvgpu_os_fence *s);
34
35int nvgpu_os_fence_sema_fdget(struct nvgpu_os_fence *fence_out,
36 struct channel_gk20a *c, int fd);
37
38void nvgpu_os_fence_init(struct nvgpu_os_fence *fence_out,
39 struct gk20a *g, const struct nvgpu_os_fence_ops *fops,
40 struct sync_fence *fence);
41
42void nvgpu_os_fence_android_install_fd(struct nvgpu_os_fence *s, int fd);
43
44int nvgpu_os_fence_syncpt_fdget(
45 struct nvgpu_os_fence *fence_out,
46 struct channel_gk20a *c, int fd);
47
48#endif /* __NVGPU_OS_FENCE_ANDROID_H__ */ \ No newline at end of file
diff --git a/include/nvgpu/linux/rwsem.h b/include/nvgpu/linux/rwsem.h
deleted file mode 100644
index 7d073d3..0000000
--- a/include/nvgpu/linux/rwsem.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_RWSEM_LINUX_H__
18#define __NVGPU_RWSEM_LINUX_H__
19
20#include <linux/rwsem.h>
21
22struct nvgpu_rwsem {
23 struct rw_semaphore rwsem;
24};
25
26#endif
diff --git a/include/nvgpu/linux/sim.h b/include/nvgpu/linux/sim.h
deleted file mode 100644
index 99c6348..0000000
--- a/include/nvgpu/linux/sim.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 *
3 * nvgpu sim support
4 *
5 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __SIM_LINUX_H__
21#define __SIM_LINUX_H__
22
23struct platform_device;
24
25struct sim_nvgpu_linux {
26 struct sim_nvgpu sim;
27 struct resource *reg_mem;
28 void __iomem *regs;
29 void (*remove_support_linux)(struct gk20a *g);
30};
31
32void sim_writel(struct sim_nvgpu *sim, u32 r, u32 v);
33u32 sim_readl(struct sim_nvgpu *sim, u32 r);
34
35int nvgpu_init_sim_support_linux(struct gk20a *g,
36 struct platform_device *dev);
37void nvgpu_remove_sim_support_linux(struct gk20a *g);
38#endif
diff --git a/include/nvgpu/linux/sim_pci.h b/include/nvgpu/linux/sim_pci.h
deleted file mode 100644
index b248f07..0000000
--- a/include/nvgpu/linux/sim_pci.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 *
3 * nvgpu sim support pci
4 *
5 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __SIM_PCI_LINUX_H__
21#define __SIM_PCI_LINUX_H__
22
23int nvgpu_init_sim_support_linux_pci(struct gk20a *g);
24void nvgpu_remove_sim_support_linux_pci(struct gk20a *g);
25
26#endif
diff --git a/include/nvgpu/linux/thread.h b/include/nvgpu/linux/thread.h
deleted file mode 100644
index 1355319..0000000
--- a/include/nvgpu/linux/thread.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_THREAD_LINUX_H__
18#define __NVGPU_THREAD_LINUX_H__
19
20struct task_struct;
21
22struct nvgpu_thread {
23 struct task_struct *task;
24 bool running;
25 int (*fn)(void *);
26 void *data;
27};
28
29#endif /* __NVGPU_THREAD_LINUX_H__ */
diff --git a/include/nvgpu/linux/vm.h b/include/nvgpu/linux/vm.h
deleted file mode 100644
index 6f3beaa..0000000
--- a/include/nvgpu/linux/vm.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __COMMON_LINUX_VM_PRIV_H__
18#define __COMMON_LINUX_VM_PRIV_H__
19
20#include <nvgpu/types.h>
21
22#include <asm/cacheflush.h>
23
24/*
25 * Couple of places explicitly flush caches still. Any DMA buffer we allocate
26 * from within the GPU is writecombine and as a result does not need this but
27 * there seem to be exceptions.
28 */
29#ifdef CONFIG_ARM64
30#define outer_flush_range(a, b)
31#define __cpuc_flush_dcache_area __flush_dcache_area
32#endif
33
34struct sg_table;
35struct dma_buf;
36struct device;
37
38struct vm_gk20a;
39struct vm_gk20a_mapping_batch;
40struct nvgpu_vm_area;
41
42struct nvgpu_os_buffer {
43 struct dma_buf *dmabuf;
44 struct dma_buf_attachment *attachment;
45 struct device *dev;
46};
47
48struct nvgpu_mapped_buf_priv {
49 struct dma_buf *dmabuf;
50 struct dma_buf_attachment *attachment;
51 struct sg_table *sgt;
52};
53
54/* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */
55int nvgpu_vm_map_linux(struct vm_gk20a *vm,
56 struct dma_buf *dmabuf,
57 u64 map_addr,
58 u32 flags,
59 u32 page_size,
60 s16 compr_kind,
61 s16 incompr_kind,
62 int rw_flag,
63 u64 buffer_offset,
64 u64 mapping_size,
65 struct vm_gk20a_mapping_batch *mapping_batch,
66 u64 *gpu_va);
67
68/*
69 * Notes:
70 * - Batch may be NULL if map op is not part of a batch.
71 * - NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set
72 */
73int nvgpu_vm_map_buffer(struct vm_gk20a *vm,
74 int dmabuf_fd,
75 u64 *map_addr,
76 u32 flags, /* NVGPU_AS_MAP_BUFFER_FLAGS_ */
77 u32 page_size,
78 s16 compr_kind,
79 s16 incompr_kind,
80 u64 buffer_offset,
81 u64 mapping_size,
82 struct vm_gk20a_mapping_batch *batch);
83
84/* find buffer corresponding to va */
85int nvgpu_vm_find_buf(struct vm_gk20a *vm, u64 gpu_va,
86 struct dma_buf **dmabuf,
87 u64 *offset);
88
89enum nvgpu_aperture gk20a_dmabuf_aperture(struct gk20a *g,
90 struct dma_buf *dmabuf);
91
92#endif
diff --git a/include/nvgpu/list.h b/include/nvgpu/list.h
deleted file mode 100644
index 1608035..0000000
--- a/include/nvgpu/list.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_LIST_H
24#define NVGPU_LIST_H
25#include <nvgpu/types.h>
26
27struct nvgpu_list_node {
28 struct nvgpu_list_node *prev;
29 struct nvgpu_list_node *next;
30};
31
32static inline void nvgpu_init_list_node(struct nvgpu_list_node *node)
33{
34 node->prev = node;
35 node->next = node;
36}
37
38static inline void nvgpu_list_add(struct nvgpu_list_node *new_node, struct nvgpu_list_node *head)
39{
40 new_node->next = head->next;
41 new_node->next->prev = new_node;
42 new_node->prev = head;
43 head->next = new_node;
44}
45
46static inline void nvgpu_list_add_tail(struct nvgpu_list_node *new_node, struct nvgpu_list_node *head)
47{
48 new_node->prev = head->prev;
49 new_node->prev->next = new_node;
50 new_node->next = head;
51 head->prev = new_node;
52}
53
54static inline void nvgpu_list_del(struct nvgpu_list_node *node)
55{
56 node->prev->next = node->next;
57 node->next->prev = node->prev;
58 nvgpu_init_list_node(node);
59}
60
61static inline bool nvgpu_list_empty(struct nvgpu_list_node *head)
62{
63 return head->next == head;
64}
65
66static inline void nvgpu_list_move(struct nvgpu_list_node *node, struct nvgpu_list_node *head)
67{
68 nvgpu_list_del(node);
69 nvgpu_list_add(node, head);
70}
71
72static inline void nvgpu_list_replace_init(struct nvgpu_list_node *old_node, struct nvgpu_list_node *new_node)
73{
74 new_node->next = old_node->next;
75 new_node->next->prev = new_node;
76 new_node->prev = old_node->prev;
77 new_node->prev->next = new_node;
78 nvgpu_init_list_node(old_node);
79}
80
81#define nvgpu_list_entry(ptr, type, member) \
82 type ## _from_ ## member(ptr)
83
84#define nvgpu_list_next_entry(pos, type, member) \
85 nvgpu_list_entry((pos)->member.next, type, member)
86
87#define nvgpu_list_first_entry(ptr, type, member) \
88 nvgpu_list_entry((ptr)->next, type, member)
89
90#define nvgpu_list_last_entry(ptr, type, member) \
91 nvgpu_list_entry((ptr)->prev, type, member)
92
93#define nvgpu_list_for_each_entry(pos, head, type, member) \
94 for (pos = nvgpu_list_first_entry(head, type, member); \
95 &pos->member != (head); \
96 pos = nvgpu_list_next_entry(pos, type, member))
97
98#define nvgpu_list_for_each_entry_safe(pos, n, head, type, member) \
99 for (pos = nvgpu_list_first_entry(head, type, member), \
100 n = nvgpu_list_next_entry(pos, type, member); \
101 &pos->member != (head); \
102 pos = n, n = nvgpu_list_next_entry(n, type, member))
103
104#endif /* NVGPU_LIST_H */
diff --git a/include/nvgpu/lock.h b/include/nvgpu/lock.h
deleted file mode 100644
index 7e4b2ac..0000000
--- a/include/nvgpu/lock.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_LOCK_H
24#define NVGPU_LOCK_H
25
26#ifdef __KERNEL__
27#include <nvgpu/linux/lock.h>
28#elif defined(__NVGPU_POSIX__)
29#include <nvgpu/posix/lock.h>
30#else
31#include <nvgpu_rmos/include/lock.h>
32#endif
33
34/*
35 * struct nvgpu_mutex
36 *
37 * Should be implemented per-OS in a separate library
38 * But implementation should adhere to mutex implementation
39 * as specified in Linux Documentation
40 */
41struct nvgpu_mutex;
42
43/*
44 * struct nvgpu_spinlock
45 *
46 * Should be implemented per-OS in a separate library
47 * But implementation should adhere to spinlock implementation
48 * as specified in Linux Documentation
49 */
50struct nvgpu_spinlock;
51
52/*
53 * struct nvgpu_raw_spinlock
54 *
55 * Should be implemented per-OS in a separate library
56 * But implementation should adhere to raw_spinlock implementation
57 * as specified in Linux Documentation
58 */
59struct nvgpu_raw_spinlock;
60
61int nvgpu_mutex_init(struct nvgpu_mutex *mutex);
62void nvgpu_mutex_acquire(struct nvgpu_mutex *mutex);
63void nvgpu_mutex_release(struct nvgpu_mutex *mutex);
64int nvgpu_mutex_tryacquire(struct nvgpu_mutex *mutex);
65void nvgpu_mutex_destroy(struct nvgpu_mutex *mutex);
66
67void nvgpu_spinlock_init(struct nvgpu_spinlock *spinlock);
68void nvgpu_spinlock_acquire(struct nvgpu_spinlock *spinlock);
69void nvgpu_spinlock_release(struct nvgpu_spinlock *spinlock);
70
71void nvgpu_raw_spinlock_init(struct nvgpu_raw_spinlock *spinlock);
72void nvgpu_raw_spinlock_acquire(struct nvgpu_raw_spinlock *spinlock);
73void nvgpu_raw_spinlock_release(struct nvgpu_raw_spinlock *spinlock);
74
75#endif /* NVGPU_LOCK_H */
diff --git a/include/nvgpu/log.h b/include/nvgpu/log.h
deleted file mode 100644
index 2bcca33..0000000
--- a/include/nvgpu/log.h
+++ /dev/null
@@ -1,184 +0,0 @@
1/*
2 * Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_LOG_H
24#define NVGPU_LOG_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/bitops.h>
28
29struct gk20a;
30
31enum nvgpu_log_type {
32 NVGPU_ERROR,
33 NVGPU_WARNING,
34 NVGPU_DEBUG,
35 NVGPU_INFO,
36};
37
38/*
39 * Each OS must implement these functions. They handle the OS specific nuances
40 * of printing data to a UART, log, whatever.
41 */
42__attribute__((format (printf, 5, 6)))
43void __nvgpu_log_msg(struct gk20a *g, const char *func_name, int line,
44 enum nvgpu_log_type type, const char *fmt, ...);
45
46__attribute__((format (printf, 5, 6)))
47void __nvgpu_log_dbg(struct gk20a *g, u64 log_mask,
48 const char *func_name, int line,
49 const char *fmt, ...);
50
51/*
52 * Use this define to set a default mask.
53 */
54#define NVGPU_DEFAULT_DBG_MASK (0)
55
56#define gpu_dbg_info BIT(0) /* Lightly verbose info. */
57#define gpu_dbg_fn BIT(1) /* Function name tracing. */
58#define gpu_dbg_reg BIT(2) /* Register accesses; very verbose. */
59#define gpu_dbg_pte BIT(3) /* GMMU PTEs. */
60#define gpu_dbg_intr BIT(4) /* Interrupts. */
61#define gpu_dbg_pmu BIT(5) /* gk20a pmu. */
62#define gpu_dbg_clk BIT(6) /* gk20a clk. */
63#define gpu_dbg_map BIT(7) /* Memory mappings. */
64#define gpu_dbg_map_v BIT(8) /* Verbose mem mappings. */
65#define gpu_dbg_gpu_dbg BIT(9) /* GPU debugger/profiler. */
66#define gpu_dbg_cde BIT(10) /* cde info messages. */
67#define gpu_dbg_cde_ctx BIT(11) /* cde context usage messages. */
68#define gpu_dbg_ctxsw BIT(12) /* ctxsw tracing. */
69#define gpu_dbg_sched BIT(13) /* Sched control tracing. */
70#define gpu_dbg_sema BIT(14) /* Semaphore debugging. */
71#define gpu_dbg_sema_v BIT(15) /* Verbose semaphore debugging. */
72#define gpu_dbg_pmu_pstate BIT(16) /* p state controlled by pmu. */
73#define gpu_dbg_xv BIT(17) /* XVE debugging. */
74#define gpu_dbg_shutdown BIT(18) /* GPU shutdown tracing. */
75#define gpu_dbg_kmem BIT(19) /* Kmem tracking debugging. */
76#define gpu_dbg_pd_cache BIT(20) /* PD cache traces. */
77#define gpu_dbg_alloc BIT(21) /* Allocator debugging. */
78#define gpu_dbg_dma BIT(22) /* DMA allocation prints. */
79#define gpu_dbg_sgl BIT(23) /* SGL related traces. */
80#define gpu_dbg_vidmem BIT(24) /* VIDMEM tracing. */
81#define gpu_dbg_nvlink BIT(25) /* nvlink Operation tracing. */
82#define gpu_dbg_clk_arb BIT(26) /* Clk arbiter debugging. */
83#define gpu_dbg_ecc BIT(27) /* Print ECC Info Logs. */
84#define gpu_dbg_mem BIT(31) /* memory accesses; very verbose. */
85
86/**
87 * nvgpu_log_mask_enabled - Check if logging is enabled
88 *
89 * @g - The GPU.
90 * @log_mask - The mask the check against.
91 *
92 * Check if, given the passed mask, logging would actually happen. This is
93 * useful for avoiding calling the logging function many times when we know that
94 * said prints would not happen. For example for-loops of log statements in
95 * critical paths.
96 */
97int nvgpu_log_mask_enabled(struct gk20a *g, u64 log_mask);
98
99/**
100 * nvgpu_log - Print a debug message
101 *
102 * @g - The GPU.
103 * @log_mask - A mask defining when the print should happen. See enum
104 * %nvgpu_log_categories.
105 * @fmt - A format string (printf style).
106 * @arg... - Arguments for the format string.
107 *
108 * Print a message if the log_mask matches the enabled debugging.
109 */
110#define nvgpu_log(g, log_mask, fmt, arg...) \
111 __nvgpu_log_dbg(g, (u32)log_mask, __func__, __LINE__, fmt, ##arg)
112
113/**
114 * nvgpu_err - Print an error
115 *
116 * @g - The GPU.
117 * @fmt - A format string (printf style).
118 * @arg... - Arguments for the format string.
119 *
120 * Uncondtionally print an error message.
121 */
122#define nvgpu_err(g, fmt, arg...) \
123 __nvgpu_log_msg(g, __func__, __LINE__, NVGPU_ERROR, fmt, ##arg)
124
125/**
126 * nvgpu_err - Print a warning
127 *
128 * @g - The GPU.
129 * @fmt - A format string (printf style).
130 * @arg... - Arguments for the format string.
131 *
132 * Uncondtionally print a warming message.
133 */
134#define nvgpu_warn(g, fmt, arg...) \
135 __nvgpu_log_msg(g, __func__, __LINE__, NVGPU_WARNING, fmt, ##arg)
136
137/**
138 * nvgpu_info - Print an info message
139 *
140 * @g - The GPU.
141 * @fmt - A format string (printf style).
142 * @arg... - Arguments for the format string.
143 *
144 * Unconditionally print an information message.
145 */
146#define nvgpu_info(g, fmt, arg...) \
147 __nvgpu_log_msg(g, __func__, __LINE__, NVGPU_INFO, fmt, ##arg)
148
149/*
150 * Some convenience macros.
151 */
152#define nvgpu_log_fn(g, fmt, arg...) nvgpu_log(g, gpu_dbg_fn, fmt, ##arg)
153#define nvgpu_log_info(g, fmt, arg...) nvgpu_log(g, gpu_dbg_info, fmt, ##arg)
154
155/******************************************************************************
156 * The old legacy debugging API minus some parts that are unnecessary. *
157 * Please, please, please do not use this!!! This is still around to aid *
158 * transitioning to the new API. *
159 * *
160 * This changes up the print formats to be closer to the new APIs formats. *
161 * Also it removes the dev_warn() and dev_err() usage. Those arguments are *
162 * ignored now. *
163 ******************************************************************************/
164
165/*
166 * This exist for backwards compatibility with the old debug/logging API. If you
167 * want ftrace support use the new API!
168 */
169extern u64 nvgpu_dbg_mask;
170
171#define gk20a_dbg(log_mask, fmt, arg...) \
172 do { \
173 if (((log_mask) & nvgpu_dbg_mask) != 0) \
174 __nvgpu_log_msg(NULL, __func__, __LINE__, \
175 NVGPU_DEBUG, fmt "\n", ##arg); \
176 } while (0)
177
178/*
179 * Some convenience macros.
180 */
181#define gk20a_dbg_fn(fmt, arg...) gk20a_dbg(gpu_dbg_fn, fmt, ##arg)
182#define gk20a_dbg_info(fmt, arg...) gk20a_dbg(gpu_dbg_info, fmt, ##arg)
183
184#endif /* NVGPU_LOG_H */
diff --git a/include/nvgpu/log2.h b/include/nvgpu/log2.h
deleted file mode 100644
index 98db1ec..0000000
--- a/include/nvgpu/log2.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_LOG2_H
23#define NVGPU_LOG2_H
24
25#ifdef __KERNEL__
26#include <linux/log2.h>
27#elif defined(__NVGPU_POSIX__)
28#include <nvgpu/posix/log2.h>
29#endif
30
31#endif /* NVGPU_LOG2_H */
diff --git a/include/nvgpu/ltc.h b/include/nvgpu/ltc.h
deleted file mode 100644
index a674a29..0000000
--- a/include/nvgpu/ltc.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_LTC_H
24#define NVGPU_LTC_H
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29
30int nvgpu_init_ltc_support(struct gk20a *g);
31void nvgpu_ltc_sync_enabled(struct gk20a *g);
32int nvgpu_ltc_alloc_cbc(struct gk20a *g, size_t compbit_backing_size,
33 bool vidmem_alloc);
34
35#endif /* NVGPU_LTC_H */
diff --git a/include/nvgpu/mc.h b/include/nvgpu/mc.h
deleted file mode 100644
index 3c012f9..0000000
--- a/include/nvgpu/mc.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_MC_H
24#define NVGPU_MC_H
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29
30#define NVGPU_MC_INTR_STALLING 0U
31#define NVGPU_MC_INTR_NONSTALLING 1U
32
33u32 nvgpu_mc_boot_0(struct gk20a *g, u32 *arch, u32 *impl, u32 *rev);
34
35#endif
diff --git a/include/nvgpu/mm.h b/include/nvgpu/mm.h
deleted file mode 100644
index 01063bc..0000000
--- a/include/nvgpu/mm.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_MM_H
24#define NVGPU_MM_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/cond.h>
28#include <nvgpu/thread.h>
29#include <nvgpu/lock.h>
30#include <nvgpu/atomic.h>
31#include <nvgpu/nvgpu_mem.h>
32#include <nvgpu/allocator.h>
33#include <nvgpu/list.h>
34#include <nvgpu/sizes.h>
35
36struct gk20a;
37struct vm_gk20a;
38struct nvgpu_mem;
39struct nvgpu_pd_cache;
40
41#define NVGPU_MM_MMU_FAULT_TYPE_OTHER_AND_NONREPLAY 0
42#define NVGPU_MM_MMU_FAULT_TYPE_REPLAY 1
43
44#define FAULT_TYPE_NUM 2 /* replay and nonreplay faults */
45
46struct mmu_fault_info {
47 u64 inst_ptr;
48 u32 inst_aperture;
49 u64 fault_addr;
50 u32 fault_addr_aperture;
51 u32 timestamp_lo;
52 u32 timestamp_hi;
53 u32 mmu_engine_id;
54 u32 gpc_id;
55 u32 client_type;
56 u32 client_id;
57 u32 fault_type;
58 u32 access_type;
59 u32 protected_mode;
60 u32 replayable_fault;
61 u32 replay_fault_en;
62 u32 valid;
63 u32 faulted_pbdma;
64 u32 faulted_engine;
65 u32 faulted_subid;
66 u32 chid;
67 struct channel_gk20a *refch;
68 const char *client_type_desc;
69 const char *fault_type_desc;
70 const char *client_id_desc;
71};
72
73enum nvgpu_flush_op {
74 NVGPU_FLUSH_DEFAULT,
75 NVGPU_FLUSH_FB,
76 NVGPU_FLUSH_L2_INV,
77 NVGPU_FLUSH_L2_FLUSH,
78 NVGPU_FLUSH_CBC_CLEAN,
79};
80
81struct mm_gk20a {
82 struct gk20a *g;
83
84 /* GPU VA default sizes address spaces for channels */
85 struct {
86 u64 user_size; /* userspace-visible GPU VA region */
87 u64 kernel_size; /* kernel-only GPU VA region */
88 } channel;
89
90 struct {
91 u32 aperture_size;
92 struct vm_gk20a *vm;
93 struct nvgpu_mem inst_block;
94 } bar1;
95
96 struct {
97 u32 aperture_size;
98 struct vm_gk20a *vm;
99 struct nvgpu_mem inst_block;
100 } bar2;
101
102 struct {
103 u32 aperture_size;
104 struct vm_gk20a *vm;
105 struct nvgpu_mem inst_block;
106 } pmu;
107
108 struct {
109 /* using pmu vm currently */
110 struct nvgpu_mem inst_block;
111 } hwpm;
112
113 struct {
114 struct vm_gk20a *vm;
115 struct nvgpu_mem inst_block;
116 } perfbuf;
117
118 struct {
119 struct vm_gk20a *vm;
120 } cde;
121
122 struct {
123 struct vm_gk20a *vm;
124 } ce;
125
126 struct nvgpu_pd_cache *pd_cache;
127
128 struct nvgpu_mutex l2_op_lock;
129 struct nvgpu_mutex tlb_lock;
130 struct nvgpu_mutex priv_lock;
131
132 struct nvgpu_mem bar2_desc;
133
134 struct nvgpu_mem hw_fault_buf[FAULT_TYPE_NUM];
135 struct mmu_fault_info fault_info[FAULT_TYPE_NUM];
136 struct nvgpu_mutex hub_isr_mutex;
137
138 /*
139 * Separate function to cleanup the CE since it requires a channel to
140 * be closed which must happen before fifo cleanup.
141 */
142 void (*remove_ce_support)(struct mm_gk20a *mm);
143 void (*remove_support)(struct mm_gk20a *mm);
144 bool sw_ready;
145 int physical_bits;
146 bool use_full_comp_tag_line;
147 bool ltc_enabled_current;
148 bool ltc_enabled_target;
149 bool disable_bigpage;
150
151 struct nvgpu_mem sysmem_flush;
152
153 u32 pramin_window;
154 struct nvgpu_spinlock pramin_window_lock;
155
156 struct {
157 size_t size;
158 u64 base;
159 size_t bootstrap_size;
160 u64 bootstrap_base;
161
162 struct nvgpu_allocator allocator;
163 struct nvgpu_allocator bootstrap_allocator;
164
165 u32 ce_ctx_id;
166 volatile bool cleared;
167 struct nvgpu_mutex first_clear_mutex;
168
169 struct nvgpu_list_node clear_list_head;
170 struct nvgpu_mutex clear_list_mutex;
171
172 struct nvgpu_cond clearing_thread_cond;
173 struct nvgpu_thread clearing_thread;
174 struct nvgpu_mutex clearing_thread_lock;
175 nvgpu_atomic_t pause_count;
176
177 nvgpu_atomic64_t bytes_pending;
178 } vidmem;
179
180 struct nvgpu_mem mmu_wr_mem;
181 struct nvgpu_mem mmu_rd_mem;
182};
183
184#define gk20a_from_mm(mm) ((mm)->g)
185#define gk20a_from_vm(vm) ((vm)->mm->g)
186
187static inline int bar1_aperture_size_mb_gk20a(void)
188{
189 return 16; /* 16MB is more than enough atm. */
190}
191
192/* The maximum GPU VA range supported */
193#define NV_GMMU_VA_RANGE 38
194
195/* The default userspace-visible GPU VA size */
196#define NV_MM_DEFAULT_USER_SIZE (1ULL << 37)
197
198/* The default kernel-reserved GPU VA size */
199#define NV_MM_DEFAULT_KERNEL_SIZE (1ULL << 32)
200
201/*
202 * When not using unified address spaces, the bottom 56GB of the space are used
203 * for small pages, and the remaining high memory is used for large pages.
204 */
205static inline u64 nvgpu_gmmu_va_small_page_limit(void)
206{
207 return ((u64)SZ_1G * 56U);
208}
209
210u32 nvgpu_vm_get_pte_size(struct vm_gk20a *vm, u64 base, u64 size);
211
212void nvgpu_init_mm_ce_context(struct gk20a *g);
213int nvgpu_init_mm_support(struct gk20a *g);
214int nvgpu_init_mm_setup_hw(struct gk20a *g);
215
216u64 nvgpu_inst_block_addr(struct gk20a *g, struct nvgpu_mem *mem);
217void nvgpu_free_inst_block(struct gk20a *g, struct nvgpu_mem *inst_block);
218
219int nvgpu_mm_suspend(struct gk20a *g);
220u32 nvgpu_mm_get_default_big_page_size(struct gk20a *g);
221u32 nvgpu_mm_get_available_big_page_sizes(struct gk20a *g);
222
223#endif /* NVGPU_MM_H */
diff --git a/include/nvgpu/nvgpu_common.h b/include/nvgpu/nvgpu_common.h
deleted file mode 100644
index 3466051..0000000
--- a/include/nvgpu/nvgpu_common.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_COMMON_H
24#define NVGPU_COMMON_H
25
26struct gk20a;
27struct class;
28
29int nvgpu_probe(struct gk20a *g,
30 const char *debugfs_symlink,
31 const char *interface_name,
32 struct class *class);
33
34void nvgpu_kernel_restart(void *cmd);
35
36#endif
diff --git a/include/nvgpu/nvgpu_err.h b/include/nvgpu/nvgpu_err.h
deleted file mode 100644
index 0595faf..0000000
--- a/include/nvgpu/nvgpu_err.h
+++ /dev/null
@@ -1,359 +0,0 @@
1/*
2 * Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_NVGPU_ERR_H
24#define NVGPU_NVGPU_ERR_H
25
26/**
27 * @file
28 *
29 * Define indices for HW units and errors. Define structures used to carry error
30 * information. Declare prototype for APIs that are used to report GPU HW errors
31 * to the Safety_Services framework.
32 */
33
34#include <nvgpu/types.h>
35#include <nvgpu/atomic.h>
36
37struct gk20a;
38
39/**
40 * @defgroup INDICES_FOR_GPU_HW_UNITS
41 * Macros used to assign unique index to GPU HW units.
42 * @{
43 */
44#define NVGPU_ERR_MODULE_SM (0U)
45#define NVGPU_ERR_MODULE_FECS (1U)
46#define NVGPU_ERR_MODULE_PMU (2U)
47/**
48 * @}
49 */
50
51/**
52 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_SM
53 * Macros used to assign unique index to errors reported from the SM unit.
54 * @{
55 */
56#define GPU_SM_L1_TAG_ECC_CORRECTED (0U)
57#define GPU_SM_L1_TAG_ECC_UNCORRECTED (1U)
58#define GPU_SM_CBU_ECC_UNCORRECTED (3U)
59#define GPU_SM_LRF_ECC_UNCORRECTED (5U)
60#define GPU_SM_L1_DATA_ECC_UNCORRECTED (7U)
61#define GPU_SM_ICACHE_L0_DATA_ECC_UNCORRECTED (9U)
62#define GPU_SM_ICACHE_L1_DATA_ECC_UNCORRECTED (11U)
63#define GPU_SM_ICACHE_L0_PREDECODE_ECC_UNCORRECTED (13U)
64#define GPU_SM_L1_TAG_MISS_FIFO_ECC_UNCORRECTED (15U)
65#define GPU_SM_L1_TAG_S2R_PIXPRF_ECC_UNCORRECTED (17U)
66#define GPU_SM_ICACHE_L1_PREDECODE_ECC_UNCORRECTED (20U)
67/**
68 * @}
69 */
70
71/**
72 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_FECS
73 * Macros used to assign unique index to errors reported from the FECS unit.
74 * @{
75 */
76#define GPU_FECS_FALCON_IMEM_ECC_CORRECTED (0U)
77#define GPU_FECS_FALCON_IMEM_ECC_UNCORRECTED (1U)
78#define GPU_FECS_FALCON_DMEM_ECC_UNCORRECTED (3U)
79/**
80 * @}
81 */
82
83/**
84 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_GPCCS
85 * Macros used to assign unique index to errors reported from the GPCCS unit.
86 * @{
87 */
88#define GPU_GPCCS_FALCON_IMEM_ECC_CORRECTED (0U)
89#define GPU_GPCCS_FALCON_IMEM_ECC_UNCORRECTED (1U)
90#define GPU_GPCCS_FALCON_DMEM_ECC_UNCORRECTED (3U)
91/**
92 * @}
93 */
94
95/**
96 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_MMU
97 * Macros used to assign unique index to errors reported from the MMU unit.
98 * @{
99 */
100#define GPU_MMU_L1TLB_SA_DATA_ECC_UNCORRECTED (1U)
101#define GPU_MMU_L1TLB_FA_DATA_ECC_UNCORRECTED (3U)
102/**
103 * @}
104 */
105
106/**
107 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_GCC
108 * Macros used to assign unique index to errors reported from the GCC unit.
109 * @{
110 */
111#define GPU_GCC_L15_ECC_UNCORRECTED (1U)
112/**
113 * @}
114 */
115
116
117/**
118 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_PMU
119 * Macros used to assign unique index to errors reported from the PMU unit.
120 * @{
121 */
122#define GPU_PMU_FALCON_IMEM_ECC_CORRECTED (0U)
123#define GPU_PMU_FALCON_IMEM_ECC_UNCORRECTED (1U)
124#define GPU_PMU_FALCON_DMEM_ECC_UNCORRECTED (3U)
125/**
126 * @}
127 */
128
129/**
130 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_LTC
131 * Macros used to assign unique index to errors reported from the LTC unit.
132 * @{
133 */
134#define GPU_LTC_CACHE_DSTG_ECC_CORRECTED (0U)
135#define GPU_LTC_CACHE_DSTG_ECC_UNCORRECTED (1U)
136#define GPU_LTC_CACHE_TSTG_ECC_UNCORRECTED (3U)
137#define GPU_LTC_CACHE_DSTG_BE_ECC_UNCORRECTED (7U)
138/**
139 * @}
140 */
141
142/**
143 * @defgroup LIST_OF_ERRORS_REPORTED_FROM_HUBMMU
144 * Macros used to assign unique index to errors reported from the HUBMMU unit.
145 * @{
146 */
147#define GPU_HUBMMU_L2TLB_SA_DATA_ECC_UNCORRECTED (1U)
148#define GPU_HUBMMU_TLB_SA_DATA_ECC_UNCORRECTED (3U)
149#define GPU_HUBMMU_PTE_DATA_ECC_UNCORRECTED (5U)
150#define GPU_HUBMMU_PDE0_DATA_ECC_UNCORRECTED (7U)
151#define GPU_HUBMMU_PAGE_FAULT_ERROR (8U)
152
153
154#ifdef CONFIG_NVGPU_SUPPORT_LINUX_ECC_ERROR_REPORTING
155/**
156 * @}
157 */
158
159/**
160 * nvgpu_err_desc structure holds fields which describe an error along with
161 * function callback which can be used to inject the error.
162 */
163struct nvgpu_err_desc {
164 /** String representation of error. */
165 const char *name;
166
167 /** Flag to classify an error as critical or non-critical. */
168 bool is_critical;
169
170 /**
171 * Error Threshold: once this threshold value is reached, then the
172 * corresponding error counter will be reset to 0 and the error will be
173 * propagated to Safety_Services.
174 */
175 int err_threshold;
176
177 /**
178 * Total number of times an error has occurred (since its last reset).
179 */
180 nvgpu_atomic_t err_count;
181
182 /** Error ID. */
183 u8 error_id;
184};
185
186/**
187 * gpu_err_header structure holds fields which are required to identify the
188 * version of header, sub-error type, sub-unit id, error address and time stamp.
189 */
190struct gpu_err_header {
191 /** Version of GPU error header. */
192 struct {
193 /** Major version number. */
194 u16 major;
195 /** Minor version number. */
196 u16 minor;
197 } version;
198
199 /** Sub error type corresponding to the error that is being reported. */
200 u32 sub_err_type;
201
202 /** ID of the sub-unit in a HW unit which encountered an error. */
203 u64 sub_unit_id;
204
205 /** Location of the error. */
206 u64 address;
207
208 /** Timestamp in nano seconds. */
209 u64 timestamp_ns;
210};
211
212struct gpu_ecc_error_info {
213 struct gpu_err_header header;
214
215 /** Number of ECC errors. */
216 u64 err_cnt;
217};
218
219/**
220 * nvgpu_err_hw_module structure holds fields which describe the h/w modules
221 * error reporting capabilities.
222 */
223struct nvgpu_err_hw_module {
224 /** String representation of a given HW unit. */
225 const char *name;
226
227 /** HW unit ID. */
228 u32 hw_unit;
229
230 /** Total number of errors reported from a given HW unit. */
231 u32 num_errs;
232
233 u32 base_ecc_service_id;
234
235 /** Used to get error description from look-up table. */
236 struct nvgpu_err_desc *errs;
237};
238
239struct nvgpu_ecc_reporting_ops {
240 void (*report_ecc_err)(struct gk20a *g, u32 hw_unit, u32 inst,
241 u32 err_id, u64 err_addr, u64 err_count);
242};
243
244struct nvgpu_ecc_reporting {
245 struct nvgpu_spinlock lock;
246 /* This flag is protected by the above spinlock */
247 bool ecc_reporting_service_enabled;
248 const struct nvgpu_ecc_reporting_ops *ops;
249};
250
251 /**
252 * This macro is used to initialize the members of nvgpu_err_desc struct.
253 */
254#define GPU_ERR(err, critical, id, threshold, ecount) \
255{ \
256 .name = (err), \
257 .is_critical = (critical), \
258 .error_id = (id), \
259 .err_threshold = (threshold), \
260 .err_count = NVGPU_ATOMIC_INIT(ecount), \
261}
262
263/**
264 * This macro is used to initialize critical errors.
265 */
266#define GPU_CRITERR(err, id, threshold, ecount) \
267 GPU_ERR(err, true, id, threshold, ecount)
268
269/**
270 * This macro is used to initialize non-critical errors.
271 */
272#define GPU_NONCRITERR(err, id, threshold, ecount) \
273 GPU_ERR(err, false, id, threshold, ecount)
274
275/**
276 * @brief GPU HW errors need to be reported to Safety_Services via SDL unit.
277 * This function provides an interface to report ECC erros to SDL unit.
278 *
279 * @param g [in] - The GPU driver struct.
280 * @param hw_unit [in] - Index of HW unit.
281 * - List of valid HW unit IDs
282 * - NVGPU_ERR_MODULE_SM
283 * - NVGPU_ERR_MODULE_FECS
284 * - NVGPU_ERR_MODULE_GPCCS
285 * - NVGPU_ERR_MODULE_MMU
286 * - NVGPU_ERR_MODULE_GCC
287 * - NVGPU_ERR_MODULE_PMU
288 * - NVGPU_ERR_MODULE_LTC
289 * - NVGPU_ERR_MODULE_HUBMMU
290 * @param inst [in] - Instance ID.
291 * - In case of multiple instances of the same HW
292 * unit (e.g., there are multiple instances of
293 * SM), it is used to identify the instance
294 * that encountered a fault.
295 * @param err_id [in] - Error index.
296 * - For SM:
297 * - Min: GPU_SM_L1_TAG_ECC_CORRECTED
298 * - Max: GPU_SM_ICACHE_L1_PREDECODE_ECC_UNCORRECTED
299 * - For FECS:
300 * - Min: GPU_FECS_FALCON_IMEM_ECC_CORRECTED
301 * - Max: GPU_FECS_INVALID_ERROR
302 * - For GPCCS:
303 * - Min: GPU_GPCCS_FALCON_IMEM_ECC_CORRECTED
304 * - Max: GPU_GPCCS_FALCON_DMEM_ECC_UNCORRECTED
305 * - For MMU:
306 * - Min: GPU_MMU_L1TLB_SA_DATA_ECC_UNCORRECTED
307 * - Max: GPU_MMU_L1TLB_FA_DATA_ECC_UNCORRECTED
308 * - For GCC:
309 * - Min: GPU_GCC_L15_ECC_UNCORRECTED
310 * - Max: GPU_GCC_L15_ECC_UNCORRECTED
311 * - For PMU:
312 * - Min: GPU_PMU_FALCON_IMEM_ECC_CORRECTED
313 * - Max: GPU_PMU_FALCON_DMEM_ECC_UNCORRECTED
314 * - For LTC:
315 * - Min: GPU_LTC_CACHE_DSTG_ECC_CORRECTED
316 * - Max: GPU_LTC_CACHE_DSTG_BE_ECC_UNCORRECTED
317 * - For HUBMMU:
318 * - Min: GPU_HUBMMU_L2TLB_SA_DATA_ECC_UNCORRECTED
319 * - Max: GPU_HUBMMU_PDE0_DATA_ECC_UNCORRECTED
320 * @param err_addr [in] - Error address.
321 * - This is the location at which correctable or
322 * uncorrectable error has occurred.
323 * @param err_count [in] - Error count.
324 *
325 * - Checks whether SDL is supported in the current GPU platform. If SDL is not
326 * supported, it simply returns.
327 * - Validates both \a hw_unit and \a err_id indices. In case of a failure,
328 * invokes #nvgpu_sdl_handle_report_failure() api.
329 * - Gets the current time of a clock. In case of a failure, invokes
330 * #nvgpu_sdl_handle_report_failure() api.
331 * - Gets error description from internal look-up table using \a hw_unit and
332 * \a err_id indices.
333 * - Forms error packet using details such as time-stamp, \a hw_unit, \a err_id,
334 * criticality of the error, \a inst, \a err_addr, \a err_count, error
335 * description, and size of the error packet.
336 * - Performs compile-time assert check to ensure that the size of the error
337 * packet does not exceed the maximum allowable size specified in
338 * #MAX_ERR_MSG_SIZE.
339 *
340 * @return None
341 */
342void nvgpu_report_ecc_err(struct gk20a *g, u32 hw_unit, u32 inst,
343 u32 err_id, u64 err_addr, u64 err_count);
344
345void nvgpu_init_ecc_reporting(struct gk20a *g);
346void nvgpu_enable_ecc_reporting(struct gk20a *g);
347void nvgpu_disable_ecc_reporting(struct gk20a *g);
348void nvgpu_deinit_ecc_reporting(struct gk20a *g);
349
350#else
351
352static inline void nvgpu_report_ecc_err(struct gk20a *g, u32 hw_unit, u32 inst,
353 u32 err_id, u64 err_addr, u64 err_count) {
354
355}
356
357#endif /* CONFIG_NVGPU_SUPPORT_LINUX_ECC_ERROR_REPORTING */
358
359#endif /* NVGPU_NVGPU_ERR_H */ \ No newline at end of file
diff --git a/include/nvgpu/nvgpu_mem.h b/include/nvgpu/nvgpu_mem.h
deleted file mode 100644
index 4e84f2a..0000000
--- a/include/nvgpu/nvgpu_mem.h
+++ /dev/null
@@ -1,359 +0,0 @@
1/*
2 * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_MEM_H
24#define NVGPU_MEM_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/list.h>
28#include <nvgpu/enabled.h>
29
30#ifdef __KERNEL__
31#include <nvgpu/linux/nvgpu_mem.h>
32#elif defined(__NVGPU_POSIX__)
33#include <nvgpu/posix/nvgpu_mem.h>
34#else
35#include <nvgpu_rmos/include/nvgpu_mem.h>
36#endif
37
38struct page;
39struct sg_table;
40struct nvgpu_sgt;
41
42struct gk20a;
43struct nvgpu_allocator;
44struct nvgpu_gmmu_attrs;
45struct nvgpu_page_alloc;
46
47#define NVGPU_MEM_DMA_ERROR (~0ULL)
48
49/*
50 * Real location of a buffer - nvgpu_aperture_mask() will deduce what will be
51 * told to the gpu about the aperture, but this flag designates where the
52 * memory actually was allocated from.
53 */
54enum nvgpu_aperture {
55 APERTURE_INVALID = 0, /* unallocated or N/A */
56 APERTURE_SYSMEM,
57
58 /* Don't use directly. Use APERTURE_SYSMEM, this is used internally. */
59 APERTURE_SYSMEM_COH,
60
61 APERTURE_VIDMEM
62};
63
64/*
65 * Forward declared opaque placeholder type that does not really exist, but
66 * helps the compiler help us about getting types right. In reality,
67 * implementors of nvgpu_sgt_ops will have some concrete type in place of this.
68 */
69struct nvgpu_sgl;
70
71struct nvgpu_sgt_ops {
72 struct nvgpu_sgl *(*sgl_next)(struct nvgpu_sgl *sgl);
73 u64 (*sgl_phys)(struct gk20a *g, struct nvgpu_sgl *sgl);
74 u64 (*sgl_dma)(struct nvgpu_sgl *sgl);
75 u64 (*sgl_length)(struct nvgpu_sgl *sgl);
76 u64 (*sgl_gpu_addr)(struct gk20a *g, struct nvgpu_sgl *sgl,
77 struct nvgpu_gmmu_attrs *attrs);
78 /*
79 * If left NULL then iommuable is assumed to be false.
80 */
81 bool (*sgt_iommuable)(struct gk20a *g, struct nvgpu_sgt *sgt);
82
83 /*
84 * Note: this operates on the whole SGT not a specific SGL entry.
85 */
86 void (*sgt_free)(struct gk20a *g, struct nvgpu_sgt *sgt);
87};
88
89/*
90 * Scatter gather table: this is a list of scatter list entries and the ops for
91 * interacting with those entries.
92 */
93struct nvgpu_sgt {
94 /*
95 * Ops for interacting with the underlying scatter gather list entries.
96 */
97 const struct nvgpu_sgt_ops *ops;
98
99 /*
100 * The first node in the scatter gather list.
101 */
102 struct nvgpu_sgl *sgl;
103};
104
105/*
106 * This struct holds the necessary information for describing a struct
107 * nvgpu_mem's scatter gather list.
108 *
109 * This is one underlying implementation for nvgpu_sgl. Not all nvgpu_sgt's use
110 * this particular implementation. Nor is a given OS required to use this at
111 * all.
112 */
113struct nvgpu_mem_sgl {
114 /*
115 * Internally this is implemented as a singly linked list.
116 */
117 struct nvgpu_mem_sgl *next;
118
119 /*
120 * There is both a phys address and a DMA address since some systems,
121 * for example ones with an IOMMU, may see these as different addresses.
122 */
123 u64 phys;
124 u64 dma;
125 u64 length;
126};
127
128/*
129 * Iterate over the SGL entries in an SGT.
130 */
131#define nvgpu_sgt_for_each_sgl(__sgl__, __sgt__) \
132 for ((__sgl__) = (__sgt__)->sgl; \
133 (__sgl__) != NULL; \
134 (__sgl__) = nvgpu_sgt_get_next(__sgt__, __sgl__))
135
136struct nvgpu_mem {
137 /*
138 * Populated for all nvgpu_mem structs - vidmem or system.
139 */
140 enum nvgpu_aperture aperture;
141 size_t size;
142 size_t aligned_size;
143 u64 gpu_va;
144 bool skip_wmb;
145 bool free_gpu_va;
146
147 /*
148 * Set when a nvgpu_mem struct is not a "real" nvgpu_mem struct. Instead
149 * the struct is just a copy of another nvgpu_mem struct.
150 */
151#define NVGPU_MEM_FLAG_SHADOW_COPY (1 << 0)
152
153 /*
154 * Specify that the GVA mapping is a fixed mapping - that is the caller
155 * chose the GPU VA, not the GMMU mapping function. Only relevant for
156 * VIDMEM.
157 */
158#define NVGPU_MEM_FLAG_FIXED (1 << 1)
159
160 /*
161 * Set for user generated VIDMEM allocations. This triggers a special
162 * cleanup path that clears the vidmem on free. Given that the VIDMEM is
163 * zeroed on boot this means that all user vidmem allocations are
164 * therefor zeroed (to prevent leaking information in VIDMEM buffers).
165 */
166#define NVGPU_MEM_FLAG_USER_MEM (1 << 2)
167
168 /*
169 * Internal flag that specifies this struct has not been made with DMA
170 * memory and as a result should not try to use the DMA routines for
171 * freeing the backing memory.
172 *
173 * However, this will not stop the DMA API from freeing other parts of
174 * nvgpu_mem in a system specific way.
175 */
176#define __NVGPU_MEM_FLAG_NO_DMA (1 << 3)
177 /*
178 * Some nvgpu_mem objects act as facades to memory buffers owned by
179 * someone else. This internal flag specifies that the sgt field is
180 * "borrowed", and it must not be freed by us.
181 *
182 * Of course the caller will have to make sure that the sgt owner
183 * outlives the nvgpu_mem.
184 */
185#define NVGPU_MEM_FLAG_FOREIGN_SGT (1 << 4)
186 unsigned long mem_flags;
187
188 /*
189 * Only populated for a sysmem allocation.
190 */
191 void *cpu_va;
192
193 /*
194 * Fields only populated for vidmem allocations.
195 */
196 struct nvgpu_page_alloc *vidmem_alloc;
197 struct nvgpu_allocator *allocator;
198 struct nvgpu_list_node clear_list_entry;
199
200 /*
201 * This is defined by the system specific header. It can be empty if
202 * there's no system specific stuff for a given system.
203 */
204 struct nvgpu_mem_priv priv;
205};
206
207static inline struct nvgpu_mem *
208nvgpu_mem_from_clear_list_entry(struct nvgpu_list_node *node)
209{
210 return (struct nvgpu_mem *)
211 ((uintptr_t)node - offsetof(struct nvgpu_mem,
212 clear_list_entry));
213};
214
215static inline const char *nvgpu_aperture_str(struct gk20a *g,
216 enum nvgpu_aperture aperture)
217{
218 switch (aperture) {
219 case APERTURE_INVALID:
220 return "INVAL";
221 case APERTURE_SYSMEM:
222 return "SYSMEM";
223 case APERTURE_SYSMEM_COH:
224 return "SYSCOH";
225 case APERTURE_VIDMEM:
226 return "VIDMEM";
227 };
228 return "UNKNOWN";
229}
230
231bool nvgpu_aperture_is_sysmem(enum nvgpu_aperture ap);
232bool nvgpu_mem_is_sysmem(struct nvgpu_mem *mem);
233
234/*
235 * Returns true if the passed nvgpu_mem has been allocated (i.e it's valid for
236 * subsequent use).
237 */
238static inline bool nvgpu_mem_is_valid(struct nvgpu_mem *mem)
239{
240 /*
241 * Internally the DMA APIs must set/unset the aperture flag when
242 * allocating/freeing the buffer. So check that to see if the *mem
243 * has been allocated or not.
244 *
245 * This relies on mem_descs being zeroed before being initialized since
246 * APERTURE_INVALID is equal to 0.
247 */
248 return mem->aperture != APERTURE_INVALID;
249
250}
251
252/**
253 * nvgpu_mem_sgt_create_from_mem - Create a scatter list from an nvgpu_mem.
254 *
255 * @g - The GPU.
256 * @mem - The source memory allocation to use.
257 *
258 * Create a scatter gather table from the passed @mem struct. This list lets the
259 * calling code iterate across each chunk of a DMA allocation for when that DMA
260 * allocation is not completely contiguous.
261 */
262struct nvgpu_sgt *nvgpu_sgt_create_from_mem(struct gk20a *g,
263 struct nvgpu_mem *mem);
264
265struct nvgpu_sgl *nvgpu_sgt_get_next(struct nvgpu_sgt *sgt,
266 struct nvgpu_sgl *sgl);
267u64 nvgpu_sgt_get_phys(struct gk20a *g, struct nvgpu_sgt *sgt,
268 struct nvgpu_sgl *sgl);
269u64 nvgpu_sgt_get_dma(struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl);
270u64 nvgpu_sgt_get_length(struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl);
271u64 nvgpu_sgt_get_gpu_addr(struct gk20a *g, struct nvgpu_sgt *sgt,
272 struct nvgpu_sgl *sgl,
273 struct nvgpu_gmmu_attrs *attrs);
274void nvgpu_sgt_free(struct gk20a *g, struct nvgpu_sgt *sgt);
275
276bool nvgpu_sgt_iommuable(struct gk20a *g, struct nvgpu_sgt *sgt);
277u64 nvgpu_sgt_alignment(struct gk20a *g, struct nvgpu_sgt *sgt);
278
279/**
280 * nvgpu_mem_create_from_mem - Create a new nvgpu_mem struct from an old one.
281 *
282 * @g - The GPU.
283 * @dest - Destination nvgpu_mem to hold resulting memory description.
284 * @src - Source memory. Must be valid.
285 * @start_page - Starting page to use.
286 * @nr_pages - Number of pages to place in the new nvgpu_mem.
287 *
288 * Create a new nvgpu_mem struct describing a subsection of the @src nvgpu_mem.
289 * This will create an nvpgu_mem object starting at @start_page and is @nr_pages
290 * long. This currently only works on SYSMEM nvgpu_mems. If this is called on a
291 * VIDMEM nvgpu_mem then this will return an error.
292 *
293 * There is a _major_ caveat to this API: if the source buffer is freed before
294 * the copy is freed then the copy will become invalid. This is a result from
295 * how typical DMA APIs work: we can't call free on the buffer multiple times.
296 * Nor can we call free on parts of a buffer. Thus the only way to ensure that
297 * the entire buffer is actually freed is to call free once on the source
298 * buffer. Since these nvgpu_mem structs are not ref-counted in anyway it is up
299 * to the caller of this API to _ensure_ that the resulting nvgpu_mem buffer
300 * from this API is freed before the source buffer. Otherwise there can and will
301 * be memory corruption.
302 *
303 * The resulting nvgpu_mem should be released with the nvgpu_dma_free() or the
304 * nvgpu_dma_unmap_free() function depending on whether or not the resulting
305 * nvgpu_mem has been mapped.
306 *
307 * This will return 0 on success. An error is returned if the resulting
308 * nvgpu_mem would not make sense or if a new scatter gather table cannot be
309 * created.
310 */
311int nvgpu_mem_create_from_mem(struct gk20a *g,
312 struct nvgpu_mem *dest, struct nvgpu_mem *src,
313 u64 start_page, int nr_pages);
314
315/*
316 * Really free a vidmem buffer. There's a fair amount of work involved in
317 * freeing vidmem buffers in the DMA API. This handles none of that - it only
318 * frees the underlying vidmem specific structures used in vidmem buffers.
319 *
320 * This is implemented in the OS specific code. If it's not necessary it can
321 * be a noop. But the symbol must at least be present.
322 */
323void __nvgpu_mem_free_vidmem_alloc(struct gk20a *g, struct nvgpu_mem *vidmem);
324
325/*
326 * Buffer accessors. Sysmem buffers always have a CPU mapping and vidmem
327 * buffers are accessed via PRAMIN.
328 */
329
330/* word-indexed offset */
331u32 nvgpu_mem_rd32(struct gk20a *g, struct nvgpu_mem *mem, u32 w);
332/* byte offset (32b-aligned) */
333u32 nvgpu_mem_rd(struct gk20a *g, struct nvgpu_mem *mem, u32 offset);
334/* memcpy to cpu, offset and size in bytes (32b-aligned) */
335void nvgpu_mem_rd_n(struct gk20a *g, struct nvgpu_mem *mem, u32 offset,
336 void *dest, u32 size);
337
338/* word-indexed offset */
339void nvgpu_mem_wr32(struct gk20a *g, struct nvgpu_mem *mem, u32 w, u32 data);
340/* byte offset (32b-aligned) */
341void nvgpu_mem_wr(struct gk20a *g, struct nvgpu_mem *mem, u32 offset, u32 data);
342/* memcpy from cpu, offset and size in bytes (32b-aligned) */
343void nvgpu_mem_wr_n(struct gk20a *g, struct nvgpu_mem *mem, u32 offset,
344 void *src, u32 size);
345/* size and offset in bytes (32b-aligned), filled with the constant byte c */
346void nvgpu_memset(struct gk20a *g, struct nvgpu_mem *mem, u32 offset,
347 u32 c, u32 size);
348
349u64 nvgpu_mem_get_addr(struct gk20a *g, struct nvgpu_mem *mem);
350u64 nvgpu_mem_get_phys_addr(struct gk20a *g, struct nvgpu_mem *mem);
351
352u32 nvgpu_aperture_mask_raw(struct gk20a *g, enum nvgpu_aperture aperture,
353 u32 sysmem_mask, u32 sysmem_coh_mask, u32 vidmem_mask);
354u32 nvgpu_aperture_mask(struct gk20a *g, struct nvgpu_mem *mem,
355 u32 sysmem_mask, u32 sysmem_coh_mask, u32 vidmem_mask);
356
357u64 nvgpu_mem_iommu_translate(struct gk20a *g, u64 phys);
358
359#endif /* NVGPU_MEM_H */
diff --git a/include/nvgpu/nvhost.h b/include/nvgpu/nvhost.h
deleted file mode 100644
index 74dc48b..0000000
--- a/include/nvgpu/nvhost.h
+++ /dev/null
@@ -1,112 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_NVHOST_H
24#define NVGPU_NVHOST_H
25
26#ifdef CONFIG_TEGRA_GK20A_NVHOST
27
28#include <nvgpu/types.h>
29
30struct nvgpu_nvhost_dev;
31struct gk20a;
32struct sync_pt;
33struct sync_fence;
34struct timespec;
35
36int nvgpu_get_nvhost_dev(struct gk20a *g);
37void nvgpu_free_nvhost_dev(struct gk20a *g);
38
39int nvgpu_nvhost_module_busy_ext(struct nvgpu_nvhost_dev *nvhost_dev);
40void nvgpu_nvhost_module_idle_ext(struct nvgpu_nvhost_dev *nvhost_dev);
41
42void nvgpu_nvhost_debug_dump_device(struct nvgpu_nvhost_dev *nvhost_dev);
43
44int nvgpu_nvhost_syncpt_is_expired_ext(struct nvgpu_nvhost_dev *nvhost_dev,
45 u32 id, u32 thresh);
46int nvgpu_nvhost_syncpt_wait_timeout_ext(struct nvgpu_nvhost_dev *nvhost_dev,
47 u32 id, u32 thresh, u32 timeout, u32 *value, struct timespec *ts);
48
49u32 nvgpu_nvhost_syncpt_incr_max_ext(struct nvgpu_nvhost_dev *nvhost_dev,
50 u32 id, u32 incrs);
51void nvgpu_nvhost_syncpt_set_min_eq_max_ext(struct nvgpu_nvhost_dev *nvhost_dev,
52 u32 id);
53int nvgpu_nvhost_syncpt_read_ext_check(struct nvgpu_nvhost_dev *nvhost_dev,
54 u32 id, u32 *val);
55u32 nvgpu_nvhost_syncpt_read_maxval(struct nvgpu_nvhost_dev *nvhost_dev,
56 u32 id);
57void nvgpu_nvhost_syncpt_set_safe_state(
58 struct nvgpu_nvhost_dev *nvhost_dev, u32 id);
59
60int nvgpu_nvhost_intr_register_notifier(struct nvgpu_nvhost_dev *nvhost_dev,
61 u32 id, u32 thresh, void (*callback)(void *, int), void *private_data);
62
63const char *nvgpu_nvhost_syncpt_get_name(struct nvgpu_nvhost_dev *nvhost_dev,
64 int id);
65bool nvgpu_nvhost_syncpt_is_valid_pt_ext(struct nvgpu_nvhost_dev *nvhost_dev,
66 u32 id);
67void nvgpu_nvhost_syncpt_put_ref_ext(struct nvgpu_nvhost_dev *nvhost_dev,
68 u32 id);
69u32 nvgpu_nvhost_get_syncpt_host_managed(struct nvgpu_nvhost_dev *nvhost_dev,
70 u32 param,
71 const char *syncpt_name);
72u32 nvgpu_nvhost_get_syncpt_client_managed(struct nvgpu_nvhost_dev *nvhost_dev,
73 const char *syncpt_name);
74
75int nvgpu_nvhost_create_symlink(struct gk20a *g);
76void nvgpu_nvhost_remove_symlink(struct gk20a *g);
77
78#ifdef CONFIG_SYNC
79u32 nvgpu_nvhost_sync_pt_id(struct sync_pt *pt);
80u32 nvgpu_nvhost_sync_pt_thresh(struct sync_pt *pt);
81int nvgpu_nvhost_sync_num_pts(struct sync_fence *fence);
82
83struct sync_fence *nvgpu_nvhost_sync_fdget(int fd);
84struct sync_fence *nvgpu_nvhost_sync_create_fence(
85 struct nvgpu_nvhost_dev *nvhost_dev,
86 u32 id, u32 thresh, const char *name);
87#endif /* CONFIG_SYNC */
88
89#ifdef CONFIG_TEGRA_T19X_GRHOST
90int nvgpu_nvhost_syncpt_unit_interface_get_aperture(
91 struct nvgpu_nvhost_dev *nvhost_dev,
92 u64 *base, size_t *size);
93u32 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id);
94int nvgpu_nvhost_syncpt_init(struct gk20a *g);
95#else
96static inline int nvgpu_nvhost_syncpt_unit_interface_get_aperture(
97 struct nvgpu_nvhost_dev *nvhost_dev,
98 u64 *base, size_t *size)
99{
100 return -EINVAL;
101}
102static inline u32 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id)
103{
104 return 0;
105}
106static inline int nvgpu_nvhost_syncpt_init(struct gk20a *g)
107{
108 return 0;
109}
110#endif
111#endif /* CONFIG_TEGRA_GK20A_NVHOST */
112#endif /* NVGPU_NVHOST_H */
diff --git a/include/nvgpu/nvlink.h b/include/nvgpu/nvlink.h
deleted file mode 100644
index a74111c..0000000
--- a/include/nvgpu/nvlink.h
+++ /dev/null
@@ -1,237 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_NVLINK_H
24#define NVGPU_NVLINK_H
25
26#include <nvgpu/types.h>
27
28#ifdef __KERNEL__
29#include <nvgpu/linux/nvlink.h>
30#elif defined(__NVGPU_POSIX__)
31#include <nvgpu/posix/nvlink.h>
32#else
33#include <nvgpu_rmos/include/nvlink.h>
34#endif
35
36#define NV_NVLINK_REG_POLL_TIMEOUT_MS 3000
37#define NV_NVLINK_TIMEOUT_DELAY_US 5
38
39#define MINION_REG_RD32(g, off) gk20a_readl(g, g->nvlink.minion_base + (off))
40#define MINION_REG_WR32(g, off, v) gk20a_writel(g, g->nvlink.minion_base + (off), (v))
41#define IOCTRL_REG_RD32(g, off) gk20a_readl(g, g->nvlink.ioctrl_base + (off))
42#define IOCTRL_REG_WR32(g, off, v) gk20a_writel(g, g->nvlink.ioctrl_base + (off), (v))
43#define MIF_REG_RD32(g, id, off) gk20a_readl(g, g->nvlink.links[(id)].mif_base + (off))
44#define MIF_REG_WR32(g, id, off, v) gk20a_writel(g, g->nvlink.links[(id)].mif_base + (off), (v))
45#define IPT_REG_RD32(g, off) gk20a_readl(g, g->nvlink.ipt_base + (off))
46#define IPT_REG_WR32(g, off, v) gk20a_writel(g, g->nvlink.ipt_base + (off), (v))
47#define TLC_REG_RD32(g, id, off) gk20a_readl(g, g->nvlink.links[(id)].tl_base + (off))
48#define TLC_REG_WR32(g, id, off, v) gk20a_writel(g, g->nvlink.links[(id)].tl_base + (off), (v))
49#define DLPL_REG_RD32(g, id, off) gk20a_readl(g, g->nvlink.links[(id)].dlpl_base + (off))
50#define DLPL_REG_WR32(g, id, off, v) gk20a_writel(g, g->nvlink.links[(id)].dlpl_base + (off), (v))
51
52struct gk20a;
53
54struct nvgpu_nvlink_ioctrl_list {
55 bool valid;
56 u32 pri_base_addr;
57 u8 intr_enum;
58 u8 reset_enum;
59};
60
61struct nvgpu_nvlink_device_list {
62 bool valid;
63 u8 device_type;
64 u8 device_id;
65 u8 device_version;
66 u32 pri_base_addr;
67 u8 intr_enum;
68 u8 reset_enum;
69 u8 num_tx;
70 u8 num_rx;
71 u8 pll_master;
72 u8 pll_master_id;
73};
74
75enum nvgpu_nvlink_endp {
76 nvgpu_nvlink_endp_gpu,
77 nvgpu_nvlink_endp_tegra,
78 nvgpu_nvlink_endp__last,
79};
80
81enum nvgpu_nvlink_link_mode {
82 nvgpu_nvlink_link_off,
83 nvgpu_nvlink_link_hs,
84 nvgpu_nvlink_link_safe,
85 nvgpu_nvlink_link_fault,
86 nvgpu_nvlink_link_rcvy_ac,
87 nvgpu_nvlink_link_rcvy_sw,
88 nvgpu_nvlink_link_rcvy_rx,
89 nvgpu_nvlink_link_detect,
90 nvgpu_nvlink_link_reset,
91 nvgpu_nvlink_link_enable_pm,
92 nvgpu_nvlink_link_disable_pm,
93 nvgpu_nvlink_link_disable_err_detect,
94 nvgpu_nvlink_link_lane_disable,
95 nvgpu_nvlink_link_lane_shutdown,
96 nvgpu_nvlink_link__last,
97};
98
99enum nvgpu_nvlink_sublink_mode {
100 nvgpu_nvlink_sublink_tx_hs,
101 nvgpu_nvlink_sublink_tx_enable_pm,
102 nvgpu_nvlink_sublink_tx_disable_pm,
103 nvgpu_nvlink_sublink_tx_single_lane,
104 nvgpu_nvlink_sublink_tx_safe,
105 nvgpu_nvlink_sublink_tx_off,
106 nvgpu_nvlink_sublink_tx_common,
107 nvgpu_nvlink_sublink_tx_common_disable,
108 nvgpu_nvlink_sublink_tx_data_ready,
109 nvgpu_nvlink_sublink_tx_prbs_en,
110 nvgpu_nvlink_sublink_tx__last,
111 /* RX */
112 nvgpu_nvlink_sublink_rx_hs,
113 nvgpu_nvlink_sublink_rx_enable_pm,
114 nvgpu_nvlink_sublink_rx_disable_pm,
115 nvgpu_nvlink_sublink_rx_single_lane,
116 nvgpu_nvlink_sublink_rx_safe,
117 nvgpu_nvlink_sublink_rx_off,
118 nvgpu_nvlink_sublink_rx_rxcal,
119 nvgpu_nvlink_sublink_rx__last,
120};
121
122struct nvgpu_nvlink_conn_info {
123 enum nvgpu_nvlink_endp device_type;
124 u32 link_number;
125 bool is_connected;
126};
127
128struct nvgpu_nvlink_link {
129 bool valid;
130 struct gk20a *g;
131 u8 link_id;
132
133 u32 dlpl_base;
134 u8 dlpl_version;
135
136 u32 tl_base;
137 u8 tl_version;
138
139 u32 mif_base;
140 u8 mif_version;
141
142 u8 intr_enum;
143 u8 reset_enum;
144
145 bool dl_init_done;
146
147 u8 pll_master_link_id;
148 u8 pll_slave_link_id;
149
150 struct nvgpu_nvlink_conn_info remote_info;
151 void *priv;
152};
153
154#define NVLINK_MAX_LINKS_SW 6
155
156enum nvgpu_nvlink_speed {
157 nvgpu_nvlink_speed_25G,
158 nvgpu_nvlink_speed_20G,
159 nvgpu_nvlink_speed__last,
160};
161
162struct nvgpu_nvlink_dev {
163 struct nvgpu_nvlink_ioctrl_list *ioctrl_table;
164 u32 io_num_entries;
165
166 struct nvgpu_nvlink_device_list *device_table;
167 u32 num_devices;
168
169 struct nvgpu_nvlink_link links[NVLINK_MAX_LINKS_SW];
170
171 u8 dlpl_type;
172 u32 dlpl_base[NVLINK_MAX_LINKS_SW];
173
174 u8 tl_type;
175 u32 tl_base[NVLINK_MAX_LINKS_SW];
176
177 u8 mif_type;
178 u32 mif_base[NVLINK_MAX_LINKS_SW];
179
180 u8 ipt_type;
181 u32 ipt_base;
182 u8 ipt_version;
183
184 u8 dlpl_multicast_type;
185 u8 dlpl_multicast_version;
186 u32 dlpl_multicast_base;
187
188 u8 tl_multicast_type;
189 u8 tl_multicast_version;
190 u32 tl_multicast_base;
191
192 u8 mif_multicast_type;
193 u8 mif_multicast_version;
194 u32 mif_multicast_base;
195
196 u8 ioctrl_type;
197 u32 ioctrl_base;
198
199 u8 minion_type;
200 u32 minion_base;
201 u8 minion_version;
202
203 u32 discovered_links;
204
205 /* VBIOS settings */
206 u32 link_disable_mask;
207 u32 link_mode_mask;
208 u32 link_refclk_mask;
209 u8 train_at_boot;
210 u32 ac_coupling_mask;
211
212 u32 connected_links;
213 u32 initialized_links;
214 u32 enabled_links;
215 u32 init_pll_done;
216
217 enum nvgpu_nvlink_speed speed;
218
219 /* tlc cached errors */
220 u32 tlc_rx_err_status_0[NVLINK_MAX_LINKS_SW];
221 u32 tlc_rx_err_status_1[NVLINK_MAX_LINKS_SW];
222 u32 tlc_tx_err_status_0[NVLINK_MAX_LINKS_SW];
223
224 /* priv struct */
225 void *priv;
226};
227
228int nvgpu_nvlink_enumerate(struct gk20a *g);
229int nvgpu_nvlink_train(struct gk20a *g, u32 link_id, bool from_off);
230int nvgpu_nvlink_read_dt_props(struct gk20a *g);
231
232int nvgpu_nvlink_probe(struct gk20a *g);
233int nvgpu_nvlink_remove(struct gk20a *g);
234
235void nvgpu_mss_nvlink_init_credits(struct gk20a *g);
236
237#endif /* NVGPU_NVLINK_H */
diff --git a/include/nvgpu/os_fence.h b/include/nvgpu/os_fence.h
deleted file mode 100644
index 272b076..0000000
--- a/include/nvgpu/os_fence.h
+++ /dev/null
@@ -1,138 +0,0 @@
1/*
2 * nvgpu os fence
3 *
4 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef NVGPU_OS_FENCE_H
26#define NVGPU_OS_FENCE_H
27
28#include <nvgpu/errno.h>
29
30struct nvgpu_semaphore;
31struct channel_gk20a;
32struct priv_cmd_entry;
33struct nvgpu_nvhost_dev;
34
35/*
36 * struct nvgpu_os_fence adds an abstraction to the earlier Android Sync
37 * Framework, specifically the sync-fence mechanism and the newer DMA sync
38 * APIs from linux-4.9. This abstraction provides the high-level definition
39 * as well as APIs that can be used by other OSes in future to have their own
40 * alternatives for the sync-framework.
41 */
42struct nvgpu_os_fence;
43
44/*
45 * struct nvgpu_os_fence depends on the following ops structure
46 */
47struct nvgpu_os_fence_ops {
48 /*
49 * This API is used to iterate through multiple fence points within the
50 * fence and program the pushbuffer method for wait command.
51 */
52 int (*program_waits)(struct nvgpu_os_fence *s,
53 struct priv_cmd_entry *wait_cmd,
54 struct channel_gk20a *c,
55 int max_wait_cmds);
56
57 /*
58 * This should be the last operation on the OS fence. The
59 * OS fence acts as a place-holder for the underlying fence
60 * implementation e.g. sync_fences. For each construct/fdget call
61 * there needs to be a drop_ref call. This reduces a reference count
62 * for the underlying sync_fence.
63 */
64 void (*drop_ref)(struct nvgpu_os_fence *s);
65
66 /*
67 * Used to install the fd in the corresponding OS. The underlying
68 * implementation varies from OS to OS.
69 */
70 void (*install_fence)(struct nvgpu_os_fence *s, int fd);
71};
72
73/*
74 * The priv structure here is used to contain the struct sync_fence
75 * for LINUX_VERSION <= 4.9 and dma_fence for LINUX_VERSION > 4.9
76 */
77struct nvgpu_os_fence {
78 void *priv;
79 struct gk20a *g;
80 const struct nvgpu_os_fence_ops *ops;
81};
82
83/*
84 * This API is used to validate the nvgpu_os_fence
85 */
86static inline int nvgpu_os_fence_is_initialized(struct nvgpu_os_fence *fence)
87{
88 return (fence->ops != NULL);
89}
90
91#ifdef CONFIG_SYNC
92
93int nvgpu_os_fence_sema_create(
94 struct nvgpu_os_fence *fence_out,
95 struct channel_gk20a *c,
96 struct nvgpu_semaphore *sema);
97
98int nvgpu_os_fence_fdget(
99 struct nvgpu_os_fence *fence_out,
100 struct channel_gk20a *c, int fd);
101
102#else
103
104static inline int nvgpu_os_fence_sema_create(
105 struct nvgpu_os_fence *fence_out,
106 struct channel_gk20a *c,
107 struct nvgpu_semaphore *sema)
108{
109 return -ENOSYS;
110}
111static inline int nvgpu_os_fence_fdget(
112 struct nvgpu_os_fence *fence_out,
113 struct channel_gk20a *c, int fd)
114{
115 return -ENOSYS;
116}
117
118#endif /* CONFIG_SYNC */
119
120#if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_SYNC)
121
122int nvgpu_os_fence_syncpt_create(struct nvgpu_os_fence *fence_out,
123 struct channel_gk20a *c, struct nvgpu_nvhost_dev *nvhost_dev,
124 u32 id, u32 thresh);
125
126#else
127
128static inline int nvgpu_os_fence_syncpt_create(
129 struct nvgpu_os_fence *fence_out, struct channel_gk20a *c,
130 struct nvgpu_nvhost_dev *nvhost_dev,
131 u32 id, u32 thresh)
132{
133 return -ENOSYS;
134}
135
136#endif /* CONFIG_TEGRA_GK20A_NVHOST && CONFIG_SYNC */
137
138#endif /* NVGPU_OS_FENCE_H */
diff --git a/include/nvgpu/os_sched.h b/include/nvgpu/os_sched.h
deleted file mode 100644
index c8843b1..0000000
--- a/include/nvgpu/os_sched.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_OS_SCHED_H
24#define NVGPU_OS_SCHED_H
25
26#include <nvgpu/log.h>
27
28struct gk20a;
29
30/**
31 * nvgpu_current_tid - Query the id of current thread
32 *
33 */
34int nvgpu_current_tid(struct gk20a *g);
35
36/**
37 * nvgpu_current_pid - Query the id of current process
38 *
39 */
40int nvgpu_current_pid(struct gk20a *g);
41
42void __nvgpu_print_current(struct gk20a *g, const char *func_name, int line,
43 void *ctx, enum nvgpu_log_type type);
44/**
45 * nvgpu_print_current - print the name of current calling process
46 *
47 */
48#define nvgpu_print_current(g, ctx, type) \
49 __nvgpu_print_current(g, __func__, __LINE__, ctx, type)
50
51#endif /* NVGPU_OS_SCHED_H */
diff --git a/include/nvgpu/page_allocator.h b/include/nvgpu/page_allocator.h
deleted file mode 100644
index a6e0205..0000000
--- a/include/nvgpu/page_allocator.h
+++ /dev/null
@@ -1,185 +0,0 @@
1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef PAGE_ALLOCATOR_PRIV_H
24#define PAGE_ALLOCATOR_PRIV_H
25
26#include <nvgpu/allocator.h>
27#include <nvgpu/nvgpu_mem.h>
28#include <nvgpu/kmem.h>
29#include <nvgpu/list.h>
30#include <nvgpu/rbtree.h>
31
32struct nvgpu_allocator;
33
34/*
35 * This allocator implements the ability to do SLAB style allocation since the
36 * GPU has two page sizes available - 4k and 64k/128k. When the default
37 * granularity is the large page size (64k/128k) small allocations become very
38 * space inefficient. This is most notable in PDE and PTE blocks which are 4k
39 * in size.
40 *
41 * Thus we need the ability to suballocate in 64k pages. The way we do this for
42 * the GPU is as follows. We have several buckets for sub-64K allocations:
43 *
44 * B0 - 4k
45 * B1 - 8k
46 * B3 - 16k
47 * B4 - 32k
48 * B5 - 64k (for when large pages are 128k)
49 *
50 * When an allocation comes in for less than the large page size (from now on
51 * assumed to be 64k) the allocation is satisfied by one of the buckets.
52 */
53struct page_alloc_slab {
54 struct nvgpu_list_node empty;
55 struct nvgpu_list_node partial;
56 struct nvgpu_list_node full;
57
58 int nr_empty;
59 int nr_partial;
60 int nr_full;
61
62 u32 slab_size;
63};
64
65enum slab_page_state {
66 SP_EMPTY,
67 SP_PARTIAL,
68 SP_FULL,
69 SP_NONE
70};
71
72struct page_alloc_slab_page {
73 unsigned long bitmap;
74 u64 page_addr;
75 u32 slab_size;
76
77 u32 nr_objects;
78 u32 nr_objects_alloced;
79
80 enum slab_page_state state;
81
82 struct page_alloc_slab *owner;
83 struct nvgpu_list_node list_entry;
84};
85
86static inline struct page_alloc_slab_page *
87page_alloc_slab_page_from_list_entry(struct nvgpu_list_node *node)
88{
89 return (struct page_alloc_slab_page *)
90 ((uintptr_t)node - offsetof(struct page_alloc_slab_page, list_entry));
91};
92
93/*
94 * Struct to handle internal management of page allocation. It holds a list
95 * of the chunks of pages that make up the overall allocation - much like a
96 * scatter gather table.
97 */
98struct nvgpu_page_alloc {
99 /*
100 * nvgpu_sgt for describing the actual allocation. Convenient for
101 * GMMU mapping.
102 */
103 struct nvgpu_sgt sgt;
104
105 int nr_chunks;
106 u64 length;
107
108 /*
109 * Only useful for the RB tree - since the alloc may have discontiguous
110 * pages the base is essentially irrelevant except for the fact that it
111 * is guarenteed to be unique.
112 */
113 u64 base;
114
115 struct nvgpu_rbtree_node tree_entry;
116
117 /*
118 * Set if this is a slab alloc. Points back to the slab page that owns
119 * this particular allocation. nr_chunks will always be 1 if this is
120 * set.
121 */
122 struct page_alloc_slab_page *slab_page;
123};
124
125static inline struct nvgpu_page_alloc *
126nvgpu_page_alloc_from_rbtree_node(struct nvgpu_rbtree_node *node)
127{
128 return (struct nvgpu_page_alloc *)
129 ((uintptr_t)node - offsetof(struct nvgpu_page_alloc, tree_entry));
130};
131
132struct nvgpu_page_allocator {
133 struct nvgpu_allocator *owner; /* Owner of this allocator. */
134
135 /*
136 * Use a buddy allocator to manage the allocation of the underlying
137 * pages. This lets us abstract the discontiguous allocation handling
138 * out of the annoyingly complicated buddy allocator.
139 */
140 struct nvgpu_allocator source_allocator;
141
142 /*
143 * Page params.
144 */
145 u64 base;
146 u64 length;
147 u64 page_size;
148 u32 page_shift;
149
150 struct nvgpu_rbtree_node *allocs; /* Outstanding allocations. */
151
152 struct page_alloc_slab *slabs;
153 int nr_slabs;
154
155 struct nvgpu_kmem_cache *alloc_cache;
156 struct nvgpu_kmem_cache *slab_page_cache;
157
158 u64 flags;
159
160 /*
161 * Stat tracking.
162 */
163 u64 nr_allocs;
164 u64 nr_frees;
165 u64 nr_fixed_allocs;
166 u64 nr_fixed_frees;
167 u64 nr_slab_allocs;
168 u64 nr_slab_frees;
169 u64 pages_alloced;
170 u64 pages_freed;
171};
172
173static inline struct nvgpu_page_allocator *page_allocator(
174 struct nvgpu_allocator *a)
175{
176 return (struct nvgpu_page_allocator *)(a)->priv;
177}
178
179static inline struct nvgpu_allocator *palloc_owner(
180 struct nvgpu_page_allocator *a)
181{
182 return a->owner;
183}
184
185#endif
diff --git a/include/nvgpu/pci.h b/include/nvgpu/pci.h
deleted file mode 100644
index b38465a..0000000
--- a/include/nvgpu/pci.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_PCI_H
24#define NVGPU_PCI_H
25
26#ifdef __KERNEL__
27#include <linux/pci_ids.h>
28#elif defined(__NVGPU_POSIX__)
29#include <nvgpu/posix/pci.h>
30#elif defined(__QNX__)
31#include <nvgpu_rmos/include/pci.h>
32#else
33/*
34 * In case someone tries to use this without implementing support!
35 */
36#error "Build bug: need PCI headers!"
37#endif
38
39#endif /* NVGPU_PCI_H */
diff --git a/include/nvgpu/pmu.h b/include/nvgpu/pmu.h
deleted file mode 100644
index fb1b016..0000000
--- a/include/nvgpu/pmu.h
+++ /dev/null
@@ -1,545 +0,0 @@
1/*
2 * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_PMU_H
24#define NVGPU_PMU_H
25
26#include <nvgpu/kmem.h>
27#include <nvgpu/nvgpu_mem.h>
28#include <nvgpu/allocator.h>
29#include <nvgpu/lock.h>
30#include <nvgpu/cond.h>
31#include <nvgpu/thread.h>
32#include <nvgpu/nvgpu_common.h>
33#include <nvgpu/flcnif_cmn.h>
34#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h>
35#include <nvgpu/falcon.h>
36
37#define nvgpu_pmu_dbg(g, fmt, args...) \
38 nvgpu_log(g, gpu_dbg_pmu, fmt, ##args)
39
40/* defined by pmu hw spec */
41#define GK20A_PMU_VA_SIZE (512 * 1024 * 1024)
42#define GK20A_PMU_UCODE_SIZE_MAX (256 * 1024)
43#define GK20A_PMU_SEQ_BUF_SIZE 4096
44
45#define GK20A_PMU_TRACE_BUFSIZE 0x4000 /* 4K */
46#define GK20A_PMU_DMEM_BLKSIZE2 8
47
48#define PMU_MODE_MISMATCH_STATUS_MAILBOX_R 6
49#define PMU_MODE_MISMATCH_STATUS_VAL 0xDEADDEAD
50
51/* Falcon Register index */
52#define PMU_FALCON_REG_R0 (0)
53#define PMU_FALCON_REG_R1 (1)
54#define PMU_FALCON_REG_R2 (2)
55#define PMU_FALCON_REG_R3 (3)
56#define PMU_FALCON_REG_R4 (4)
57#define PMU_FALCON_REG_R5 (5)
58#define PMU_FALCON_REG_R6 (6)
59#define PMU_FALCON_REG_R7 (7)
60#define PMU_FALCON_REG_R8 (8)
61#define PMU_FALCON_REG_R9 (9)
62#define PMU_FALCON_REG_R10 (10)
63#define PMU_FALCON_REG_R11 (11)
64#define PMU_FALCON_REG_R12 (12)
65#define PMU_FALCON_REG_R13 (13)
66#define PMU_FALCON_REG_R14 (14)
67#define PMU_FALCON_REG_R15 (15)
68#define PMU_FALCON_REG_IV0 (16)
69#define PMU_FALCON_REG_IV1 (17)
70#define PMU_FALCON_REG_UNDEFINED (18)
71#define PMU_FALCON_REG_EV (19)
72#define PMU_FALCON_REG_SP (20)
73#define PMU_FALCON_REG_PC (21)
74#define PMU_FALCON_REG_IMB (22)
75#define PMU_FALCON_REG_DMB (23)
76#define PMU_FALCON_REG_CSW (24)
77#define PMU_FALCON_REG_CCR (25)
78#define PMU_FALCON_REG_SEC (26)
79#define PMU_FALCON_REG_CTX (27)
80#define PMU_FALCON_REG_EXCI (28)
81#define PMU_FALCON_REG_RSVD0 (29)
82#define PMU_FALCON_REG_RSVD1 (30)
83#define PMU_FALCON_REG_RSVD2 (31)
84#define PMU_FALCON_REG_SIZE (32)
85
86/* Choices for pmu_state */
87#define PMU_STATE_OFF 0U /* PMU is off */
88#define PMU_STATE_STARTING 1U /* PMU is on, but not booted */
89#define PMU_STATE_INIT_RECEIVED 2U /* PMU init message received */
90#define PMU_STATE_ELPG_BOOTING 3U /* PMU is booting */
91#define PMU_STATE_ELPG_BOOTED 4U /* ELPG is initialized */
92#define PMU_STATE_LOADING_PG_BUF 5U /* Loading PG buf */
93#define PMU_STATE_LOADING_ZBC 6U /* Loading ZBC buf */
94#define PMU_STATE_STARTED 7U /* Fully unitialized */
95#define PMU_STATE_EXIT 8U /* Exit PMU state machine */
96
97/* state transition :
98 * OFF => [OFF_ON_PENDING optional] => ON_PENDING => ON => OFF
99 * ON => OFF is always synchronized
100 */
101/* elpg is off */
102#define PMU_ELPG_STAT_OFF 0U
103/* elpg is on */
104#define PMU_ELPG_STAT_ON 1U
105/* elpg is off, ALLOW cmd has been sent, wait for ack */
106#define PMU_ELPG_STAT_ON_PENDING 2U
107/* elpg is on, DISALLOW cmd has been sent, wait for ack */
108#define PMU_ELPG_STAT_OFF_PENDING 3U
109/* elpg is off, caller has requested on, but ALLOW
110 * cmd hasn't been sent due to ENABLE_ALLOW delay
111 */
112#define PMU_ELPG_STAT_OFF_ON_PENDING 4U
113
114#define GK20A_PMU_UCODE_NB_MAX_OVERLAY 32U
115#define GK20A_PMU_UCODE_NB_MAX_DATE_LENGTH 64U
116
117#define PMU_MAX_NUM_SEQUENCES (256U)
118#define PMU_SEQ_BIT_SHIFT (5U)
119#define PMU_SEQ_TBL_SIZE \
120 (PMU_MAX_NUM_SEQUENCES >> PMU_SEQ_BIT_SHIFT)
121
122#define PMU_INVALID_SEQ_DESC (~0)
123
124enum {
125 GK20A_PMU_DMAIDX_UCODE = 0,
126 GK20A_PMU_DMAIDX_VIRT = 1,
127 GK20A_PMU_DMAIDX_PHYS_VID = 2,
128 GK20A_PMU_DMAIDX_PHYS_SYS_COH = 3,
129 GK20A_PMU_DMAIDX_PHYS_SYS_NCOH = 4,
130 GK20A_PMU_DMAIDX_RSVD = 5,
131 GK20A_PMU_DMAIDX_PELPG = 6,
132 GK20A_PMU_DMAIDX_END = 7
133};
134
135enum {
136 PMU_SEQ_STATE_FREE = 0,
137 PMU_SEQ_STATE_PENDING,
138 PMU_SEQ_STATE_USED,
139 PMU_SEQ_STATE_CANCELLED
140};
141
142/*PG defines used by nvpgu-pmu*/
143#define PMU_PG_IDLE_THRESHOLD_SIM 1000
144#define PMU_PG_POST_POWERUP_IDLE_THRESHOLD_SIM 4000000
145/* TBD: QT or else ? */
146#define PMU_PG_IDLE_THRESHOLD 15000
147#define PMU_PG_POST_POWERUP_IDLE_THRESHOLD 1000000
148
149#define PMU_PG_LPWR_FEATURE_RPPG 0x0
150#define PMU_PG_LPWR_FEATURE_MSCG 0x1
151
152#define PMU_MSCG_DISABLED 0U
153#define PMU_MSCG_ENABLED 1U
154
155/* Default Sampling Period of AELPG */
156#define APCTRL_SAMPLING_PERIOD_PG_DEFAULT_US (1000000)
157
158/* Default values of APCTRL parameters */
159#define APCTRL_MINIMUM_IDLE_FILTER_DEFAULT_US (100)
160#define APCTRL_MINIMUM_TARGET_SAVING_DEFAULT_US (10000)
161#define APCTRL_POWER_BREAKEVEN_DEFAULT_US (2000)
162#define APCTRL_CYCLES_PER_SAMPLE_MAX_DEFAULT (200)
163
164/* pmu load const defines */
165#define PMU_BUSY_CYCLES_NORM_MAX (1000U)
166
167/* RPC */
168#define PMU_RPC_EXECUTE(_stat, _pmu, _unit, _func, _prpc, _size)\
169 do { \
170 memset(&((_prpc)->hdr), 0, sizeof((_prpc)->hdr));\
171 \
172 (_prpc)->hdr.unit_id = PMU_UNIT_##_unit; \
173 (_prpc)->hdr.function = NV_PMU_RPC_ID_##_unit##_##_func;\
174 (_prpc)->hdr.flags = 0x0; \
175 \
176 _stat = nvgpu_pmu_rpc_execute(_pmu, &((_prpc)->hdr), \
177 (sizeof(*(_prpc)) - sizeof((_prpc)->scratch)),\
178 (_size), NULL, NULL, false); \
179 } while (0)
180
181/* RPC blocking call to copy back data from PMU to _prpc */
182#define PMU_RPC_EXECUTE_CPB(_stat, _pmu, _unit, _func, _prpc, _size)\
183 do { \
184 memset(&((_prpc)->hdr), 0, sizeof((_prpc)->hdr));\
185 \
186 (_prpc)->hdr.unit_id = PMU_UNIT_##_unit; \
187 (_prpc)->hdr.function = NV_PMU_RPC_ID_##_unit##_##_func;\
188 (_prpc)->hdr.flags = 0x0; \
189 \
190 _stat = nvgpu_pmu_rpc_execute(_pmu, &((_prpc)->hdr), \
191 (sizeof(*(_prpc)) - sizeof((_prpc)->scratch)),\
192 (_size), NULL, NULL, true); \
193 } while (0)
194
195/* RPC non-blocking with call_back handler option */
196#define PMU_RPC_EXECUTE_CB(_stat, _pmu, _unit, _func, _prpc, _size, _cb, _cbp)\
197 do { \
198 memset(&((_prpc)->hdr), 0, sizeof((_prpc)->hdr));\
199 \
200 (_prpc)->hdr.unit_id = PMU_UNIT_##_unit; \
201 (_prpc)->hdr.function = NV_PMU_RPC_ID_##_unit##_##_func;\
202 (_prpc)->hdr.flags = 0x0; \
203 \
204 _stat = nvgpu_pmu_rpc_execute(_pmu, &((_prpc)->hdr), \
205 (sizeof(*(_prpc)) - sizeof((_prpc)->scratch)),\
206 (_size), _cb, _cbp, false); \
207 } while (0)
208
209typedef void (*pmu_callback)(struct gk20a *, struct pmu_msg *, void *, u32,
210 u32);
211
212struct rpc_handler_payload {
213 void *rpc_buff;
214 bool is_mem_free_set;
215 bool complete;
216};
217
218struct pmu_rpc_desc {
219 void *prpc;
220 u16 size_rpc;
221 u16 size_scratch;
222};
223
224struct pmu_payload {
225 struct {
226 void *buf;
227 u32 offset;
228 u32 size;
229 u32 fb_size;
230 } in, out;
231 struct pmu_rpc_desc rpc;
232};
233
234struct pmu_ucode_desc {
235 u32 descriptor_size;
236 u32 image_size;
237 u32 tools_version;
238 u32 app_version;
239 char date[GK20A_PMU_UCODE_NB_MAX_DATE_LENGTH];
240 u32 bootloader_start_offset;
241 u32 bootloader_size;
242 u32 bootloader_imem_offset;
243 u32 bootloader_entry_point;
244 u32 app_start_offset;
245 u32 app_size;
246 u32 app_imem_offset;
247 u32 app_imem_entry;
248 u32 app_dmem_offset;
249 /* Offset from appStartOffset */
250 u32 app_resident_code_offset;
251 /* Exact size of the resident code
252 * ( potentially contains CRC inside at the end )
253 */
254 u32 app_resident_code_size;
255 /* Offset from appStartOffset */
256 u32 app_resident_data_offset;
257 /* Exact size of the resident code
258 * ( potentially contains CRC inside at the end )
259 */
260 u32 app_resident_data_size;
261 u32 nb_overlays;
262 struct {u32 start; u32 size; } load_ovl[GK20A_PMU_UCODE_NB_MAX_OVERLAY];
263 u32 compressed;
264};
265
266struct pmu_ucode_desc_v1 {
267 u32 descriptor_size;
268 u32 image_size;
269 u32 tools_version;
270 u32 app_version;
271 char date[GK20A_PMU_UCODE_NB_MAX_DATE_LENGTH];
272 u32 bootloader_start_offset;
273 u32 bootloader_size;
274 u32 bootloader_imem_offset;
275 u32 bootloader_entry_point;
276 u32 app_start_offset;
277 u32 app_size;
278 u32 app_imem_offset;
279 u32 app_imem_entry;
280 u32 app_dmem_offset;
281 u32 app_resident_code_offset;
282 u32 app_resident_code_size;
283 u32 app_resident_data_offset;
284 u32 app_resident_data_size;
285 u32 nb_imem_overlays;
286 u32 nb_dmem_overlays;
287 struct {u32 start; u32 size; } load_ovl[64];
288 u32 compressed;
289};
290
291struct pmu_mutex {
292 u32 id;
293 u32 index;
294 u32 ref_cnt;
295};
296
297struct pmu_sequence {
298 u8 id;
299 u32 state;
300 u32 desc;
301 struct pmu_msg *msg;
302 union {
303 struct pmu_allocation_v1 in_v1;
304 struct pmu_allocation_v2 in_v2;
305 struct pmu_allocation_v3 in_v3;
306 };
307 struct nvgpu_mem *in_mem;
308 union {
309 struct pmu_allocation_v1 out_v1;
310 struct pmu_allocation_v2 out_v2;
311 struct pmu_allocation_v3 out_v3;
312 };
313 struct nvgpu_mem *out_mem;
314 u8 *out_payload;
315 pmu_callback callback;
316 void *cb_params;
317};
318
319struct nvgpu_pg_init {
320 bool state_change;
321 bool state_destroy;
322 struct nvgpu_cond wq;
323 struct nvgpu_thread state_task;
324};
325
326struct nvgpu_pmu {
327 struct gk20a *g;
328 struct nvgpu_falcon *flcn;
329
330 union {
331 struct pmu_ucode_desc *desc;
332 struct pmu_ucode_desc_v1 *desc_v1;
333 };
334 struct nvgpu_mem ucode;
335
336 struct nvgpu_mem pg_buf;
337
338 /* TBD: remove this if ZBC seq is fixed */
339 struct nvgpu_mem seq_buf;
340 struct nvgpu_mem trace_buf;
341 struct nvgpu_mem super_surface_buf;
342
343 bool buf_loaded;
344
345 struct pmu_sha1_gid gid_info;
346
347 struct nvgpu_falcon_queue queue[PMU_QUEUE_COUNT];
348
349 struct pmu_sequence *seq;
350 unsigned long pmu_seq_tbl[PMU_SEQ_TBL_SIZE];
351 u32 next_seq_desc;
352
353 struct pmu_mutex *mutex;
354 u32 mutex_cnt;
355
356 struct nvgpu_mutex pmu_copy_lock;
357 struct nvgpu_mutex pmu_seq_lock;
358
359 struct nvgpu_allocator dmem;
360
361 u32 *ucode_image;
362 bool pmu_ready;
363
364 u32 perfmon_query;
365
366 u32 zbc_save_done;
367
368 u32 stat_dmem_offset[PMU_PG_ELPG_ENGINE_ID_INVALID_ENGINE];
369
370 u32 elpg_stat;
371 u32 disallow_state;
372
373 u32 mscg_stat;
374 u32 mscg_transition_state;
375
376 u32 pmu_state;
377
378#define PMU_ELPG_ENABLE_ALLOW_DELAY_MSEC 1 /* msec */
379 struct nvgpu_pg_init pg_init;
380 struct nvgpu_mutex pg_mutex; /* protect pg-RPPG/MSCG enable/disable */
381 struct nvgpu_mutex elpg_mutex; /* protect elpg enable/disable */
382 /* disable -1, enable +1, <=0 elpg disabled, > 0 elpg enabled */
383 int elpg_refcnt;
384
385 union {
386 struct pmu_perfmon_counter_v2 perfmon_counter_v2;
387 };
388 u32 perfmon_state_id[PMU_DOMAIN_GROUP_NUM];
389
390 bool initialized;
391
392 void (*remove_support)(struct nvgpu_pmu *pmu);
393 bool sw_ready;
394 bool perfmon_ready;
395
396 u32 sample_buffer;
397 u32 load_shadow;
398 u32 load_avg;
399 u32 load;
400
401 struct nvgpu_mutex isr_mutex;
402 bool isr_enabled;
403
404 bool zbc_ready;
405 union {
406 struct pmu_cmdline_args_v3 args_v3;
407 struct pmu_cmdline_args_v4 args_v4;
408 struct pmu_cmdline_args_v5 args_v5;
409 struct pmu_cmdline_args_v6 args_v6;
410 };
411 unsigned long perfmon_events_cnt;
412 bool perfmon_sampling_enabled;
413 u8 pmu_mode; /*Added for GM20b, and ACR*/
414 u32 falcon_id;
415 u32 aelpg_param[5];
416 u32 override_done;
417
418 struct nvgpu_firmware *fw;
419};
420
421struct pmu_surface {
422 struct nvgpu_mem vidmem_desc;
423 struct nvgpu_mem sysmem_desc;
424 struct flcn_mem_desc_v0 params;
425};
426
427/*PG defines used by nvpgu-pmu*/
428struct pmu_pg_stats_data {
429 u32 gating_cnt;
430 u32 ingating_time;
431 u32 ungating_time;
432 u32 avg_entry_latency_us;
433 u32 avg_exit_latency_us;
434};
435
436/*!
437 * Structure/object which single register write need to be done during PG init
438 * sequence to set PROD values.
439 */
440struct pg_init_sequence_list {
441 u32 regaddr;
442 u32 writeval;
443};
444
445/* PMU IPC Methods */
446void nvgpu_pmu_seq_init(struct nvgpu_pmu *pmu);
447
448int nvgpu_pmu_mutex_acquire(struct nvgpu_pmu *pmu, u32 id, u32 *token);
449int nvgpu_pmu_mutex_release(struct nvgpu_pmu *pmu, u32 id, u32 *token);
450
451int nvgpu_pmu_queue_init(struct nvgpu_pmu *pmu, u32 id,
452 union pmu_init_msg_pmu *init);
453
454/* send a cmd to pmu */
455int nvgpu_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd,
456 struct pmu_msg *msg, struct pmu_payload *payload,
457 u32 queue_id, pmu_callback callback, void *cb_param,
458 u32 *seq_desc, unsigned long timeout);
459
460int nvgpu_pmu_process_message(struct nvgpu_pmu *pmu);
461
462/* perfmon */
463int nvgpu_pmu_init_perfmon(struct nvgpu_pmu *pmu);
464int nvgpu_pmu_perfmon_start_sampling(struct nvgpu_pmu *pmu);
465int nvgpu_pmu_perfmon_stop_sampling(struct nvgpu_pmu *pmu);
466int nvgpu_pmu_perfmon_start_sampling_rpc(struct nvgpu_pmu *pmu);
467int nvgpu_pmu_perfmon_stop_sampling_rpc(struct nvgpu_pmu *pmu);
468int nvgpu_pmu_perfmon_get_samples_rpc(struct nvgpu_pmu *pmu);
469int nvgpu_pmu_handle_perfmon_event(struct nvgpu_pmu *pmu,
470 struct pmu_perfmon_msg *msg);
471int nvgpu_pmu_init_perfmon_rpc(struct nvgpu_pmu *pmu);
472int nvgpu_pmu_load_norm(struct gk20a *g, u32 *load);
473int nvgpu_pmu_load_update(struct gk20a *g);
474int nvgpu_pmu_busy_cycles_norm(struct gk20a *g, u32 *norm);
475void nvgpu_pmu_reset_load_counters(struct gk20a *g);
476void nvgpu_pmu_get_load_counters(struct gk20a *g, u32 *busy_cycles,
477 u32 *total_cycles);
478
479int nvgpu_pmu_handle_therm_event(struct nvgpu_pmu *pmu,
480 struct nv_pmu_therm_msg *msg);
481
482/* PMU init */
483int nvgpu_init_pmu_support(struct gk20a *g);
484int nvgpu_pmu_destroy(struct gk20a *g);
485int nvgpu_pmu_process_init_msg(struct nvgpu_pmu *pmu,
486 struct pmu_msg *msg);
487int nvgpu_pmu_super_surface_alloc(struct gk20a *g,
488 struct nvgpu_mem *mem_surface, u32 size);
489
490void nvgpu_pmu_state_change(struct gk20a *g, u32 pmu_state,
491 bool post_change_event);
492void nvgpu_kill_task_pg_init(struct gk20a *g);
493
494/* NVGPU-PMU MEM alloc */
495void nvgpu_pmu_surface_free(struct gk20a *g, struct nvgpu_mem *mem);
496void nvgpu_pmu_surface_describe(struct gk20a *g, struct nvgpu_mem *mem,
497 struct flcn_mem_desc_v0 *fb);
498int nvgpu_pmu_vidmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem,
499 u32 size);
500int nvgpu_pmu_sysmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem,
501 u32 size);
502
503/* PMU F/W support */
504int nvgpu_init_pmu_fw_support(struct nvgpu_pmu *pmu);
505int nvgpu_pmu_prepare_ns_ucode_blob(struct gk20a *g);
506
507/* PG init*/
508int nvgpu_pmu_init_powergating(struct gk20a *g);
509int nvgpu_pmu_init_bind_fecs(struct gk20a *g);
510void nvgpu_pmu_setup_hw_load_zbc(struct gk20a *g);
511
512/* PMU reset */
513int nvgpu_pmu_reset(struct gk20a *g);
514
515/* PG enable/disable */
516int nvgpu_pmu_reenable_elpg(struct gk20a *g);
517int nvgpu_pmu_enable_elpg(struct gk20a *g);
518int nvgpu_pmu_disable_elpg(struct gk20a *g);
519int nvgpu_pmu_pg_global_enable(struct gk20a *g, u32 enable_pg);
520
521int nvgpu_pmu_get_pg_stats(struct gk20a *g, u32 pg_engine_id,
522 struct pmu_pg_stats_data *pg_stat_data);
523
524/* AELPG */
525int nvgpu_aelpg_init(struct gk20a *g);
526int nvgpu_aelpg_init_and_enable(struct gk20a *g, u8 ctrl_id);
527int nvgpu_pmu_ap_send_command(struct gk20a *g,
528 union pmu_ap_cmd *p_ap_cmd, bool b_block);
529
530/* PMU debug */
531void nvgpu_pmu_dump_falcon_stats(struct nvgpu_pmu *pmu);
532void nvgpu_pmu_dump_elpg_stats(struct nvgpu_pmu *pmu);
533bool nvgpu_find_hex_in_string(char *strings, struct gk20a *g, u32 *hex_pos);
534
535/* PMU RPC */
536int nvgpu_pmu_rpc_execute(struct nvgpu_pmu *pmu, struct nv_pmu_rpc_header *rpc,
537 u16 size_rpc, u16 size_scratch, pmu_callback callback, void *cb_param,
538 bool is_copy_back);
539
540/* PMU wait*/
541int pmu_wait_message_cond(struct nvgpu_pmu *pmu, u32 timeout_ms,
542 void *var, u8 val);
543
544struct gk20a *gk20a_from_pmu(struct nvgpu_pmu *pmu);
545#endif /* NVGPU_PMU_H */
diff --git a/include/nvgpu/pmuif/gpmu_super_surf_if.h b/include/nvgpu/pmuif/gpmu_super_surf_if.h
deleted file mode 100644
index b0f9e10..0000000
--- a/include/nvgpu/pmuif/gpmu_super_surf_if.h
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMU_SUPER_SURF_IF_H
23#define NVGPU_PMUIF_GPMU_SUPER_SURF_IF_H
24
25struct nv_pmu_super_surface_hdr {
26 u32 memberMask;
27 u16 dmemBufferSizeMax;
28};
29
30NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_super_surface_hdr,
31 sizeof(struct nv_pmu_super_surface_hdr));
32
33/*
34 * Global Super Surface structure for combined INIT data required by PMU.
35 * NOTE: Any new substructures or entries must be aligned.
36 */
37struct nv_pmu_super_surface {
38 union nv_pmu_super_surface_hdr_aligned hdr;
39
40 struct {
41 struct nv_pmu_volt_volt_device_boardobj_grp_set volt_device_grp_set;
42 struct nv_pmu_volt_volt_policy_boardobj_grp_set volt_policy_grp_set;
43 struct nv_pmu_volt_volt_rail_boardobj_grp_set volt_rail_grp_set;
44
45 struct nv_pmu_volt_volt_policy_boardobj_grp_get_status volt_policy_grp_get_status;
46 struct nv_pmu_volt_volt_rail_boardobj_grp_get_status volt_rail_grp_get_status;
47 struct nv_pmu_volt_volt_device_boardobj_grp_get_status volt_device_grp_get_status;
48 } volt;
49 struct {
50 struct nv_pmu_clk_clk_vin_device_boardobj_grp_set clk_vin_device_grp_set;
51 struct nv_pmu_clk_clk_domain_boardobj_grp_set clk_domain_grp_set;
52 struct nv_pmu_clk_clk_freq_controller_boardobj_grp_set clk_freq_controller_grp_set;
53 u8 clk_rsvd2[0x200];
54 struct nv_pmu_clk_clk_fll_device_boardobj_grp_set clk_fll_device_grp_set;
55 struct nv_pmu_clk_clk_prog_boardobj_grp_set clk_prog_grp_set;
56 struct nv_pmu_clk_clk_vf_point_boardobj_grp_set clk_vf_point_grp_set;
57 struct nv_pmu_clk_clk_vin_device_boardobj_grp_get_status clk_vin_device_grp_get_status;
58 struct nv_pmu_clk_clk_fll_device_boardobj_grp_get_status clk_fll_device_grp_get_status;
59 struct nv_pmu_clk_clk_vf_point_boardobj_grp_get_status clk_vf_point_grp_get_status;
60 u8 clk_rsvd[0x4660];
61 } clk;
62 struct {
63 struct nv_pmu_perf_vfe_equ_boardobj_grp_set vfe_equ_grp_set;
64 struct nv_pmu_perf_vfe_var_boardobj_grp_set vfe_var_grp_set;
65
66 struct nv_pmu_perf_vfe_var_boardobj_grp_get_status vfe_var_grp_get_status;
67 u8 perf_rsvd[0x40790];
68 u8 perfcf_rsvd[0x1eb0];
69 } perf;
70 struct {
71 struct nv_pmu_therm_therm_channel_boardobj_grp_set therm_channel_grp_set;
72 struct nv_pmu_therm_therm_device_boardobj_grp_set therm_device_grp_set;
73 u8 therm_rsvd[0x1460];
74 } therm;
75};
76
77#endif /* NVGPU_PMUIF_GPMU_SUPER_SURF_IF_H */
diff --git a/include/nvgpu/pmuif/gpmuif_acr.h b/include/nvgpu/pmuif/gpmuif_acr.h
deleted file mode 100644
index c305589..0000000
--- a/include/nvgpu/pmuif/gpmuif_acr.h
+++ /dev/null
@@ -1,159 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIF_ACR_H
23#define NVGPU_PMUIF_GPMUIF_ACR_H
24
25/* ACR Commands/Message structures */
26
27enum {
28 PMU_ACR_CMD_ID_INIT_WPR_REGION = 0x0,
29 PMU_ACR_CMD_ID_BOOTSTRAP_FALCON,
30 PMU_ACR_CMD_ID_RESERVED,
31 PMU_ACR_CMD_ID_BOOTSTRAP_MULTIPLE_FALCONS,
32};
33
34/*
35 * Initializes the WPR region details
36 */
37struct pmu_acr_cmd_init_wpr_details {
38 u8 cmd_type;
39 u32 regionid;
40 u32 wproffset;
41
42};
43
44/*
45 * falcon ID to bootstrap
46 */
47struct pmu_acr_cmd_bootstrap_falcon {
48 u8 cmd_type;
49 u32 flags;
50 u32 falconid;
51};
52
53/*
54 * falcon ID to bootstrap
55 */
56struct pmu_acr_cmd_bootstrap_multiple_falcons {
57 u8 cmd_type;
58 u32 flags;
59 u32 falconidmask;
60 u32 usevamask;
61 struct falc_u64 wprvirtualbase;
62};
63
64#define PMU_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_NO 1
65#define PMU_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_YES 0
66
67
68struct pmu_acr_cmd {
69 union {
70 u8 cmd_type;
71 struct pmu_acr_cmd_bootstrap_falcon bootstrap_falcon;
72 struct pmu_acr_cmd_init_wpr_details init_wpr;
73 struct pmu_acr_cmd_bootstrap_multiple_falcons boot_falcons;
74 };
75};
76
77/* acr messages */
78
79/*
80 * returns the WPR region init information
81 */
82#define PMU_ACR_MSG_ID_INIT_WPR_REGION 0
83
84/*
85 * Returns the Bootstrapped falcon ID to RM
86 */
87#define PMU_ACR_MSG_ID_BOOTSTRAP_FALCON 1
88
89/*
90 * Returns the WPR init status
91 */
92#define PMU_ACR_SUCCESS 0
93#define PMU_ACR_ERROR 1
94
95/*
96 * PMU notifies about bootstrap status of falcon
97 */
98struct pmu_acr_msg_bootstrap_falcon {
99 u8 msg_type;
100 union {
101 u32 errorcode;
102 u32 falconid;
103 };
104};
105
106struct pmu_acr_msg {
107 union {
108 u8 msg_type;
109 struct pmu_acr_msg_bootstrap_falcon acrmsg;
110 };
111};
112
113/* ACR RPC */
114#define NV_PMU_RPC_ID_ACR_INIT_WPR_REGION 0x00
115#define NV_PMU_RPC_ID_ACR_WRITE_CBC_BASE 0x01
116#define NV_PMU_RPC_ID_ACR_BOOTSTRAP_FALCON 0x02
117#define NV_PMU_RPC_ID_ACR_BOOTSTRAP_GR_FALCONS 0x03
118#define NV_PMU_RPC_ID_ACR__COUNT 0x04
119
120/*
121 * structure that holds data used
122 * to execute INIT_WPR_REGION RPC.
123 */
124struct nv_pmu_rpc_struct_acr_init_wpr_region {
125 /*[IN/OUT] Must be first field in RPC structure */
126 struct nv_pmu_rpc_header hdr;
127 /*[IN] ACR region ID of WPR region */
128 u32 wpr_regionId;
129 /* [IN] WPR offset from startAddress */
130 u32 wpr_offset;
131 u32 scratch[1];
132};
133
134/*
135 * structure that holds data used to
136 * execute BOOTSTRAP_GR_FALCONS RPC.
137 */
138struct nv_pmu_rpc_struct_acr_bootstrap_gr_falcons {
139 /*[IN/OUT] Must be first field in RPC structure */
140 struct nv_pmu_rpc_header hdr;
141 /* [IN] Mask of falcon IDs @ref LSF_FALCON_ID_<XYZ> */
142 u32 falcon_id_mask;
143 /*
144 * [IN] Boostrapping flags @ref
145 * PMU_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_<XYZ>
146 */
147 u32 flags;
148 /* [IN] Indicate whether the particular falon uses VA */
149 u32 falcon_va_mask;
150 /*
151 * [IN] WPR Base Address in VA. The Inst Block containing
152 * this VA should be bound to both PMU and GR falcons
153 * during the falcon boot
154 */
155 struct falc_u64 wpr_base_virtual;
156 u32 scratch[1];
157};
158
159#endif /* NVGPU_PMUIF_GPMUIF_ACR_H */
diff --git a/include/nvgpu/pmuif/gpmuif_ap.h b/include/nvgpu/pmuif/gpmuif_ap.h
deleted file mode 100644
index 776fce8..0000000
--- a/include/nvgpu/pmuif/gpmuif_ap.h
+++ /dev/null
@@ -1,256 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIF_AP_H
23#define NVGPU_PMUIF_GPMUIF_AP_H
24
25/* PMU Command/Message Interfaces for Adaptive Power */
26/* Macro to get Histogram index */
27#define PMU_AP_HISTOGRAM(idx) (idx)
28#define PMU_AP_HISTOGRAM_CONT (4)
29
30/* Total number of histogram bins */
31#define PMU_AP_CFG_HISTOGRAM_BIN_N (16)
32
33/* Mapping between Idle counters and histograms */
34#define PMU_AP_IDLE_MASK_HIST_IDX_0 (2)
35#define PMU_AP_IDLE_MASK_HIST_IDX_1 (3)
36#define PMU_AP_IDLE_MASK_HIST_IDX_2 (5)
37#define PMU_AP_IDLE_MASK_HIST_IDX_3 (6)
38
39
40/* Mapping between AP_CTRLs and Histograms */
41#define PMU_AP_HISTOGRAM_IDX_GRAPHICS (PMU_AP_HISTOGRAM(1))
42
43/* Mapping between AP_CTRLs and Idle counters */
44#define PMU_AP_IDLE_MASK_GRAPHICS (PMU_AP_IDLE_MASK_HIST_IDX_1)
45
46/* Adaptive Power Controls (AP_CTRL) */
47enum {
48 PMU_AP_CTRL_ID_GRAPHICS = 0x0,
49 PMU_AP_CTRL_ID_MAX,
50};
51
52/* AP_CTRL Statistics */
53struct pmu_ap_ctrl_stat {
54 /*
55 * Represents whether AP is active or not
56 */
57 u8 b_active;
58
59 /* Idle filter represented by histogram bin index */
60 u8 idle_filter_x;
61 u8 rsvd[2];
62
63 /* Total predicted power saving cycles. */
64 s32 power_saving_h_cycles;
65
66 /* Counts how many times AP gave us -ve power benefits. */
67 u32 bad_decision_count;
68
69 /*
70 * Number of times ap structure needs to skip AP iterations
71 * KICK_CTRL from kernel updates this parameter.
72 */
73 u32 skip_count;
74 u8 bin[PMU_AP_CFG_HISTOGRAM_BIN_N];
75};
76
77/* Parameters initialized by INITn APCTRL command */
78struct pmu_ap_ctrl_init_params {
79 /* Minimum idle filter value in Us */
80 u32 min_idle_filter_us;
81
82 /*
83 * Minimum Targeted Saving in Us. AP will update idle thresholds only
84 * if power saving achieved by updating idle thresholds is greater than
85 * Minimum targeted saving.
86 */
87 u32 min_target_saving_us;
88
89 /* Minimum targeted residency of power feature in Us */
90 u32 power_break_even_us;
91
92 /*
93 * Maximum number of allowed power feature cycles per sample.
94 *
95 * We are allowing at max "pgPerSampleMax" cycles in one iteration of AP
96 * AKA pgPerSampleMax in original algorithm.
97 */
98 u32 cycles_per_sample_max;
99};
100
101/* AP Commands/Message structures */
102
103/*
104 * Structure for Generic AP Commands
105 */
106struct pmu_ap_cmd_common {
107 u8 cmd_type;
108 u16 cmd_id;
109};
110
111/*
112 * Structure for INIT AP command
113 */
114struct pmu_ap_cmd_init {
115 u8 cmd_type;
116 u16 cmd_id;
117 u8 rsvd;
118 u32 pg_sampling_period_us;
119};
120
121/*
122 * Structure for Enable/Disable ApCtrl Commands
123 */
124struct pmu_ap_cmd_enable_ctrl {
125 u8 cmd_type;
126 u16 cmd_id;
127
128 u8 ctrl_id;
129};
130
131struct pmu_ap_cmd_disable_ctrl {
132 u8 cmd_type;
133 u16 cmd_id;
134
135 u8 ctrl_id;
136};
137
138/*
139 * Structure for INIT command
140 */
141struct pmu_ap_cmd_init_ctrl {
142 u8 cmd_type;
143 u16 cmd_id;
144 u8 ctrl_id;
145 struct pmu_ap_ctrl_init_params params;
146};
147
148struct pmu_ap_cmd_init_and_enable_ctrl {
149 u8 cmd_type;
150 u16 cmd_id;
151 u8 ctrl_id;
152 struct pmu_ap_ctrl_init_params params;
153};
154
155/*
156 * Structure for KICK_CTRL command
157 */
158struct pmu_ap_cmd_kick_ctrl {
159 u8 cmd_type;
160 u16 cmd_id;
161 u8 ctrl_id;
162
163 u32 skip_count;
164};
165
166/*
167 * Structure for PARAM command
168 */
169struct pmu_ap_cmd_param {
170 u8 cmd_type;
171 u16 cmd_id;
172 u8 ctrl_id;
173
174 u32 data;
175};
176
177/*
178 * Defines for AP commands
179 */
180enum {
181 PMU_AP_CMD_ID_INIT = 0x0,
182 PMU_AP_CMD_ID_INIT_AND_ENABLE_CTRL,
183 PMU_AP_CMD_ID_ENABLE_CTRL,
184 PMU_AP_CMD_ID_DISABLE_CTRL,
185 PMU_AP_CMD_ID_KICK_CTRL,
186};
187
188/*
189 * AP Command
190 */
191union pmu_ap_cmd {
192 u8 cmd_type;
193 struct pmu_ap_cmd_common cmn;
194 struct pmu_ap_cmd_init init;
195 struct pmu_ap_cmd_init_and_enable_ctrl init_and_enable_ctrl;
196 struct pmu_ap_cmd_enable_ctrl enable_ctrl;
197 struct pmu_ap_cmd_disable_ctrl disable_ctrl;
198 struct pmu_ap_cmd_kick_ctrl kick_ctrl;
199};
200
201/*
202 * Structure for generic AP Message
203 */
204struct pmu_ap_msg_common {
205 u8 msg_type;
206 u16 msg_id;
207};
208
209/*
210 * Structure for INIT_ACK Message
211 */
212struct pmu_ap_msg_init_ack {
213 u8 msg_type;
214 u16 msg_id;
215 u8 ctrl_id;
216 u32 stats_dmem_offset;
217};
218
219/*
220 * Defines for AP messages
221 */
222enum {
223 PMU_AP_MSG_ID_INIT_ACK = 0x0,
224};
225
226/*
227 * AP Message
228 */
229union pmu_ap_msg {
230 u8 msg_type;
231 struct pmu_ap_msg_common cmn;
232 struct pmu_ap_msg_init_ack init_ack;
233};
234
235/*
236 * Adaptive Power Controller
237 */
238struct ap_ctrl {
239 u32 stats_dmem_offset;
240 u32 disable_reason_mask;
241 struct pmu_ap_ctrl_stat stat_cache;
242 u8 b_ready;
243};
244
245/*
246 * Adaptive Power structure
247 *
248 * ap structure provides generic infrastructure to make any power feature
249 * adaptive.
250 */
251struct pmu_ap {
252 u32 supported_mask;
253 struct ap_ctrl ap_ctrl[PMU_AP_CTRL_ID_MAX];
254};
255
256#endif /* NVGPU_PMUIF_GPMUIF_AP_H*/
diff --git a/include/nvgpu/pmuif/gpmuif_cmn.h b/include/nvgpu/pmuif/gpmuif_cmn.h
deleted file mode 100644
index 0989754..0000000
--- a/include/nvgpu/pmuif/gpmuif_cmn.h
+++ /dev/null
@@ -1,142 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIF_CMN_H
23#define NVGPU_PMUIF_GPMUIF_CMN_H
24
25/*
26 * Defines the logical queue IDs that must be used when submitting
27 * commands to the PMU
28 */
29/* write by sw, read by pmu, protected by sw mutex lock */
30#define PMU_COMMAND_QUEUE_HPQ 0U
31/* write by sw, read by pmu, protected by sw mutex lock */
32#define PMU_COMMAND_QUEUE_LPQ 1U
33/* write by pmu, read by sw, accessed by interrupt handler, no lock */
34#define PMU_MESSAGE_QUEUE 4U
35#define PMU_QUEUE_COUNT 5U
36
37#define PMU_IS_COMMAND_QUEUE(id) \
38 ((id) < PMU_MESSAGE_QUEUE)
39
40#define PMU_IS_SW_COMMAND_QUEUE(id) \
41 (((id) == PMU_COMMAND_QUEUE_HPQ) || \
42 ((id) == PMU_COMMAND_QUEUE_LPQ))
43
44#define PMU_IS_MESSAGE_QUEUE(id) \
45 ((id) == PMU_MESSAGE_QUEUE)
46
47#define OFLAG_READ 0U
48#define OFLAG_WRITE 1U
49
50#define QUEUE_SET (true)
51#define QUEUE_GET (false)
52
53#define QUEUE_ALIGNMENT (4U)
54
55/* An enumeration containing all valid logical mutex identifiers */
56enum {
57 PMU_MUTEX_ID_RSVD1 = 0,
58 PMU_MUTEX_ID_GPUSER,
59 PMU_MUTEX_ID_QUEUE_BIOS,
60 PMU_MUTEX_ID_QUEUE_SMI,
61 PMU_MUTEX_ID_GPMUTEX,
62 PMU_MUTEX_ID_I2C,
63 PMU_MUTEX_ID_RMLOCK,
64 PMU_MUTEX_ID_MSGBOX,
65 PMU_MUTEX_ID_FIFO,
66 PMU_MUTEX_ID_PG,
67 PMU_MUTEX_ID_GR,
68 PMU_MUTEX_ID_CLK,
69 PMU_MUTEX_ID_RSVD6,
70 PMU_MUTEX_ID_RSVD7,
71 PMU_MUTEX_ID_RSVD8,
72 PMU_MUTEX_ID_RSVD9,
73 PMU_MUTEX_ID_INVALID
74};
75
76#define PMU_MUTEX_ID_IS_VALID(id) \
77 ((id) < PMU_MUTEX_ID_INVALID)
78
79#define PMU_INVALID_MUTEX_OWNER_ID (0)
80
81/*
82 * The PMU's frame-buffer interface block has several slots/indices
83 * which can be bound to support DMA to various surfaces in memory
84 */
85enum {
86 PMU_DMAIDX_UCODE = 0,
87 PMU_DMAIDX_VIRT = 1,
88 PMU_DMAIDX_PHYS_VID = 2,
89 PMU_DMAIDX_PHYS_SYS_COH = 3,
90 PMU_DMAIDX_PHYS_SYS_NCOH = 4,
91 PMU_DMAIDX_RSVD = 5,
92 PMU_DMAIDX_PELPG = 6,
93 PMU_DMAIDX_END = 7
94};
95
96/*
97 * Falcon PMU DMA's minimum size in bytes.
98 */
99#define PMU_DMA_MIN_READ_SIZE_BYTES 16
100#define PMU_DMA_MIN_WRITE_SIZE_BYTES 4
101
102#define PMU_FB_COPY_RW_ALIGNMENT \
103 ((PMU_DMA_MIN_READ_SIZE_BYTES > PMU_DMA_MIN_WRITE_SIZE_BYTES) ? \
104 PMU_DMA_MIN_READ_SIZE_BYTES : PMU_DMA_MIN_WRITE_SIZE_BYTES)
105
106/*
107 * Macros to make aligned versions of RM_PMU_XXX structures. PMU needs aligned
108 * data structures to issue DMA read/write operations.
109 */
110#define NV_PMU_MAKE_ALIGNED_STRUCT(name, size) \
111union name##_aligned { \
112 struct name data; \
113 u8 pad[ALIGN_UP(sizeof(struct name), \
114 (PMU_FB_COPY_RW_ALIGNMENT))]; \
115}
116
117#define NV_PMU_MAKE_ALIGNED_UNION(name, size) \
118union name##_aligned { \
119 union name data; \
120 u8 pad[ALIGN_UP(sizeof(union name), \
121 (PMU_FB_COPY_RW_ALIGNMENT))]; \
122}
123
124/* RPC (Remote Procedure Call) header structure */
125#define NV_PMU_RPC_FLAGS_TYPE_SYNC 0x00000000
126
127struct nv_pmu_rpc_header {
128 /* Identifies the unit servicing requested RPC*/
129 u8 unit_id;
130 /* Identifies the requested RPC (within the unit)*/
131 u8 function;
132 /* RPC call flags (@see PMU_RPC_FLAGS) */
133 u8 flags;
134 /* Falcon's status code to describe failures*/
135 u8 flcn_status;
136 /* RPC's total exec. time (measured on nvgpu driver side)*/
137 u32 exec_time_nv_ns;
138 /* RPC's actual exec. time (measured on PMU side)*/
139 u32 exec_time_pmu_ns;
140};
141
142#endif /* NVGPU_PMUIF_GPMUIF_CMN_H*/
diff --git a/include/nvgpu/pmuif/gpmuif_perfmon.h b/include/nvgpu/pmuif/gpmuif_perfmon.h
deleted file mode 100644
index 8324e36..0000000
--- a/include/nvgpu/pmuif/gpmuif_perfmon.h
+++ /dev/null
@@ -1,241 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIF_PERFMON_H
23#define NVGPU_PMUIF_GPMUIF_PERFMON_H
24
25/*perfmon task defines*/
26
27#define PMU_DOMAIN_GROUP_PSTATE 0
28#define PMU_DOMAIN_GROUP_GPC2CLK 1
29#define PMU_DOMAIN_GROUP_NUM 2
30
31#define PMU_PERFMON_FLAG_ENABLE_INCREASE (0x00000001)
32#define PMU_PERFMON_FLAG_ENABLE_DECREASE (0x00000002)
33#define PMU_PERFMON_FLAG_CLEAR_PREV (0x00000004)
34
35#define NV_PMU_PERFMON_MAX_COUNTERS 10U
36
37enum pmu_perfmon_cmd_start_fields {
38 COUNTER_ALLOC
39};
40
41enum {
42 PMU_PERFMON_CMD_ID_START = 0,
43 PMU_PERFMON_CMD_ID_STOP = 1,
44 PMU_PERFMON_CMD_ID_INIT = 2
45};
46
47struct pmu_perfmon_counter_v2 {
48 u8 index;
49 u8 flags;
50 u8 group_id;
51 u8 valid;
52 u16 upper_threshold; /* units of 0.01% */
53 u16 lower_threshold; /* units of 0.01% */
54 u32 scale;
55};
56
57struct pmu_perfmon_counter_v3 {
58 u8 index;
59 u8 group_id;
60 u16 flags;
61 u16 upper_threshold; /* units of 0.01% */
62 u16 lower_threshold; /* units of 0.01% */
63 u32 scale;
64};
65
66struct pmu_perfmon_cmd_start_v3 {
67 u8 cmd_type;
68 u8 group_id;
69 u8 state_id;
70 u8 flags;
71 struct pmu_allocation_v3 counter_alloc;
72};
73
74struct pmu_perfmon_cmd_start_v2 {
75 u8 cmd_type;
76 u8 group_id;
77 u8 state_id;
78 u8 flags;
79 struct pmu_allocation_v2 counter_alloc;
80};
81
82struct pmu_perfmon_cmd_start_v1 {
83 u8 cmd_type;
84 u8 group_id;
85 u8 state_id;
86 u8 flags;
87 struct pmu_allocation_v1 counter_alloc;
88};
89
90struct pmu_perfmon_cmd_stop {
91 u8 cmd_type;
92};
93
94struct pmu_perfmon_cmd_init_v3 {
95 u8 cmd_type;
96 u8 to_decrease_count;
97 u8 base_counter_id;
98 u32 sample_period_us;
99 struct pmu_allocation_v3 counter_alloc;
100 u8 num_counters;
101 u8 samples_in_moving_avg;
102 u16 sample_buffer;
103};
104
105struct pmu_perfmon_cmd_init_v2 {
106 u8 cmd_type;
107 u8 to_decrease_count;
108 u8 base_counter_id;
109 u32 sample_period_us;
110 struct pmu_allocation_v2 counter_alloc;
111 u8 num_counters;
112 u8 samples_in_moving_avg;
113 u16 sample_buffer;
114};
115
116struct pmu_perfmon_cmd_init_v1 {
117 u8 cmd_type;
118 u8 to_decrease_count;
119 u8 base_counter_id;
120 u32 sample_period_us;
121 struct pmu_allocation_v1 counter_alloc;
122 u8 num_counters;
123 u8 samples_in_moving_avg;
124 u16 sample_buffer;
125};
126
127struct pmu_perfmon_cmd {
128 union {
129 u8 cmd_type;
130 struct pmu_perfmon_cmd_start_v1 start_v1;
131 struct pmu_perfmon_cmd_start_v2 start_v2;
132 struct pmu_perfmon_cmd_start_v3 start_v3;
133 struct pmu_perfmon_cmd_stop stop;
134 struct pmu_perfmon_cmd_init_v1 init_v1;
135 struct pmu_perfmon_cmd_init_v2 init_v2;
136 struct pmu_perfmon_cmd_init_v3 init_v3;
137 };
138};
139
140struct pmu_zbc_cmd {
141 u8 cmd_type;
142 u8 pad;
143 u16 entry_mask;
144};
145
146/* PERFMON MSG */
147enum {
148 PMU_PERFMON_MSG_ID_INCREASE_EVENT = 0,
149 PMU_PERFMON_MSG_ID_DECREASE_EVENT = 1,
150 PMU_PERFMON_MSG_ID_INIT_EVENT = 2,
151 PMU_PERFMON_MSG_ID_ACK = 3
152};
153
154struct pmu_perfmon_msg_generic {
155 u8 msg_type;
156 u8 state_id;
157 u8 group_id;
158 u8 data;
159};
160
161struct pmu_perfmon_msg {
162 union {
163 u8 msg_type;
164 struct pmu_perfmon_msg_generic gen;
165 };
166};
167
168/* PFERMON RPC interface*/
169/*
170 * RPC calls serviced by PERFMON unit.
171 */
172#define NV_PMU_RPC_ID_PERFMON_T18X_INIT 0x00
173#define NV_PMU_RPC_ID_PERFMON_T18X_DEINIT 0x01
174#define NV_PMU_RPC_ID_PERFMON_T18X_START 0x02
175#define NV_PMU_RPC_ID_PERFMON_T18X_STOP 0x03
176#define NV_PMU_RPC_ID_PERFMON_T18X_QUERY 0x04
177#define NV_PMU_RPC_ID_PERFMON_T18X__COUNT 0x05
178
179/*
180 * structure that holds data used to
181 * execute Perfmon INIT RPC.
182 * hdr - RPC header
183 * sample_periodus - Desired period in between samples.
184 * to_decrease_count - Consecutive samples before decrease event.
185 * base_counter_id - Index of the base counter.
186 * samples_in_moving_avg - Number of values in moving average.
187 * num_counters - Num of counters PMU should use.
188 * counter - Counters.
189 */
190struct nv_pmu_rpc_struct_perfmon_init {
191 struct nv_pmu_rpc_header hdr;
192 u32 sample_periodus;
193 u8 to_decrease_count;
194 u8 base_counter_id;
195 u8 samples_in_moving_avg;
196 u8 num_counters;
197 struct pmu_perfmon_counter_v3 counter[NV_PMU_PERFMON_MAX_COUNTERS];
198 u32 scratch[1];
199};
200
201/*
202 * structure that holds data used to
203 * execute Perfmon START RPC.
204 * hdr - RPC header
205 * group_id - NV group ID
206 * state_id - NV state ID
207 * flags - PMU_PERFON flags
208 * counters - Counters.
209 */
210struct nv_pmu_rpc_struct_perfmon_start {
211 struct nv_pmu_rpc_header hdr;
212 u8 group_id;
213 u8 state_id;
214 u8 flags;
215 struct pmu_perfmon_counter_v3 counter[NV_PMU_PERFMON_MAX_COUNTERS];
216 u32 scratch[1];
217};
218
219/*
220 * structure that holds data used to
221 * execute Perfmon STOP RPC.
222 * hdr - RPC header
223 */
224struct nv_pmu_rpc_struct_perfmon_stop {
225 struct nv_pmu_rpc_header hdr;
226 u32 scratch[1];
227};
228
229/*
230 * structure that holds data used to
231 * execute QUERY RPC.
232 * hdr - RPC header
233 * sample_buffer - Output buffer from pmu containing utilization samples.
234 */
235struct nv_pmu_rpc_struct_perfmon_query {
236 struct nv_pmu_rpc_header hdr;
237 u16 sample_buffer[NV_PMU_PERFMON_MAX_COUNTERS];
238 u32 scratch[1];
239};
240
241#endif /* NVGPU_PMUIF_GPMUIF_PERFMON_H */
diff --git a/include/nvgpu/pmuif/gpmuif_pg.h b/include/nvgpu/pmuif/gpmuif_pg.h
deleted file mode 100644
index 58311ae..0000000
--- a/include/nvgpu/pmuif/gpmuif_pg.h
+++ /dev/null
@@ -1,424 +0,0 @@
1/*
2 * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIF_PG_H
23#define NVGPU_PMUIF_GPMUIF_PG_H
24
25#include "gpmuif_ap.h"
26#include "gpmuif_pg_rppg.h"
27
28/*PG defines*/
29
30/* Identifier for each PG */
31#define PMU_PG_ELPG_ENGINE_ID_GRAPHICS (0x00000000U)
32#define PMU_PG_ELPG_ENGINE_ID_MS (0x00000004U)
33#define PMU_PG_ELPG_ENGINE_ID_INVALID_ENGINE (0x00000005U)
34#define PMU_PG_ELPG_ENGINE_MAX PMU_PG_ELPG_ENGINE_ID_INVALID_ENGINE
35
36/* Async PG message IDs */
37enum {
38 PMU_PG_MSG_ASYNC_CMD_DISALLOW,
39};
40
41/* PG message */
42enum {
43 PMU_PG_ELPG_MSG_INIT_ACK,
44 PMU_PG_ELPG_MSG_DISALLOW_ACK,
45 PMU_PG_ELPG_MSG_ALLOW_ACK,
46 PMU_PG_ELPG_MSG_FREEZE_ACK,
47 PMU_PG_ELPG_MSG_FREEZE_ABORT,
48 PMU_PG_ELPG_MSG_UNFREEZE_ACK,
49};
50
51struct pmu_pg_msg_elpg_msg {
52 u8 msg_type;
53 u8 engine_id;
54 u16 msg;
55};
56
57enum {
58 PMU_PG_STAT_MSG_RESP_DMEM_OFFSET = 0,
59};
60
61struct pmu_pg_msg_stat {
62 u8 msg_type;
63 u8 engine_id;
64 u16 sub_msg_id;
65 u32 data;
66};
67
68enum {
69 PMU_PG_MSG_ENG_BUF_LOADED,
70 PMU_PG_MSG_ENG_BUF_UNLOADED,
71 PMU_PG_MSG_ENG_BUF_FAILED,
72};
73
74struct pmu_pg_msg_eng_buf_stat {
75 u8 msg_type;
76 u8 engine_id;
77 u8 buf_idx;
78 u8 status;
79};
80
81struct pmu_pg_msg_async_cmd_resp {
82 u8 msg_type;
83 u8 ctrl_id;
84 u8 msg_id;
85};
86
87struct pmu_pg_msg {
88 union {
89 u8 msg_type;
90 struct pmu_pg_msg_elpg_msg elpg_msg;
91 struct pmu_pg_msg_stat stat;
92 struct pmu_pg_msg_eng_buf_stat eng_buf_stat;
93 struct pmu_pg_msg_async_cmd_resp async_cmd_resp;
94 /* TBD: other pg messages */
95 union pmu_ap_msg ap_msg;
96 struct nv_pmu_rppg_msg rppg_msg;
97 };
98};
99
100/* PG commands */
101enum {
102 PMU_PG_ELPG_CMD_INIT,
103 PMU_PG_ELPG_CMD_DISALLOW,
104 PMU_PG_ELPG_CMD_ALLOW,
105 PMU_PG_ELPG_CMD_FREEZE,
106 PMU_PG_ELPG_CMD_UNFREEZE,
107};
108
109enum {
110 PMU_PG_CMD_ID_ELPG_CMD = 0,
111 PMU_PG_CMD_ID_ENG_BUF_LOAD,
112 PMU_PG_CMD_ID_ENG_BUF_UNLOAD,
113 PMU_PG_CMD_ID_PG_STAT,
114 PMU_PG_CMD_ID_PG_LOG_INIT,
115 PMU_PG_CMD_ID_PG_LOG_FLUSH,
116 PMU_PG_CMD_ID_PG_PARAM,
117 PMU_PG_CMD_ID_ELPG_INIT,
118 PMU_PG_CMD_ID_ELPG_POLL_CTXSAVE,
119 PMU_PG_CMD_ID_ELPG_ABORT_POLL,
120 PMU_PG_CMD_ID_ELPG_PWR_UP,
121 PMU_PG_CMD_ID_ELPG_DISALLOW,
122 PMU_PG_CMD_ID_ELPG_ALLOW,
123 PMU_PG_CMD_ID_AP,
124 RM_PMU_PG_CMD_ID_PSI,
125 RM_PMU_PG_CMD_ID_CG,
126 PMU_PG_CMD_ID_ZBC_TABLE_UPDATE,
127 PMU_PG_CMD_ID_PWR_RAIL_GATE_DISABLE = 0x20,
128 PMU_PG_CMD_ID_PWR_RAIL_GATE_ENABLE,
129 PMU_PG_CMD_ID_PWR_RAIL_SMU_MSG_DISABLE,
130 PMU_PMU_PG_CMD_ID_RPPG = 0x24,
131};
132
133enum {
134 PMU_PG_STAT_CMD_ALLOC_DMEM = 0,
135};
136
137enum {
138 SLOWDOWN_FACTOR_FPDIV_BY1 = 0,
139 SLOWDOWN_FACTOR_FPDIV_BY1P5,
140 SLOWDOWN_FACTOR_FPDIV_BY2,
141 SLOWDOWN_FACTOR_FPDIV_BY2P5,
142 SLOWDOWN_FACTOR_FPDIV_BY3,
143 SLOWDOWN_FACTOR_FPDIV_BY3P5,
144 SLOWDOWN_FACTOR_FPDIV_BY4,
145 SLOWDOWN_FACTOR_FPDIV_BY4P5,
146 SLOWDOWN_FACTOR_FPDIV_BY5,
147 SLOWDOWN_FACTOR_FPDIV_BY5P5,
148 SLOWDOWN_FACTOR_FPDIV_BY6,
149 SLOWDOWN_FACTOR_FPDIV_BY6P5,
150 SLOWDOWN_FACTOR_FPDIV_BY7,
151 SLOWDOWN_FACTOR_FPDIV_BY7P5,
152 SLOWDOWN_FACTOR_FPDIV_BY8,
153 SLOWDOWN_FACTOR_FPDIV_BY8P5,
154 SLOWDOWN_FACTOR_FPDIV_BY9,
155 SLOWDOWN_FACTOR_FPDIV_BY9P5,
156 SLOWDOWN_FACTOR_FPDIV_BY10,
157 SLOWDOWN_FACTOR_FPDIV_BY10P5,
158 SLOWDOWN_FACTOR_FPDIV_BY11,
159 SLOWDOWN_FACTOR_FPDIV_BY11P5,
160 SLOWDOWN_FACTOR_FPDIV_BY12,
161 SLOWDOWN_FACTOR_FPDIV_BY12P5,
162 SLOWDOWN_FACTOR_FPDIV_BY13,
163 SLOWDOWN_FACTOR_FPDIV_BY13P5,
164 SLOWDOWN_FACTOR_FPDIV_BY14,
165 SLOWDOWN_FACTOR_FPDIV_BY14P5,
166 SLOWDOWN_FACTOR_FPDIV_BY15,
167 SLOWDOWN_FACTOR_FPDIV_BY15P5,
168 SLOWDOWN_FACTOR_FPDIV_BY16,
169 SLOWDOWN_FACTOR_FPDIV_BY16P5,
170 SLOWDOWN_FACTOR_FPDIV_BY17 = 0x20,
171 SLOWDOWN_FACTOR_FPDIV_BY18 = 0x22,
172 SLOWDOWN_FACTOR_FPDIV_BY19 = 0x24,
173 SLOWDOWN_FACTOR_FPDIV_BY20 = 0x26,
174 SLOWDOWN_FACTOR_FPDIV_BY21 = 0x28,
175 SLOWDOWN_FACTOR_FPDIV_BY22 = 0x2a,
176 SLOWDOWN_FACTOR_FPDIV_BY23 = 0x2c,
177 SLOWDOWN_FACTOR_FPDIV_BY24 = 0x2e,
178 SLOWDOWN_FACTOR_FPDIV_BY25 = 0x30,
179 SLOWDOWN_FACTOR_FPDIV_BY26 = 0x32,
180 SLOWDOWN_FACTOR_FPDIV_BY27 = 0x34,
181 SLOWDOWN_FACTOR_FPDIV_BY28 = 0x36,
182 SLOWDOWN_FACTOR_FPDIV_BY29 = 0x38,
183 SLOWDOWN_FACTOR_FPDIV_BY30 = 0x3a,
184 SLOWDOWN_FACTOR_FPDIV_BY31 = 0x3c,
185 SLOWDOWN_FACTOR_FPDIV_BYMAX,
186};
187
188#define PMU_PG_PARAM_CMD_GR_INIT_PARAM 0x0U
189#define PMU_PG_PARAM_CMD_MS_INIT_PARAM 0x01U
190#define PMU_PG_PARAM_CMD_MCLK_CHANGE 0x04U
191#define PMU_PG_PARAM_CMD_POST_INIT 0x06U
192#define PMU_PG_PARAM_CMD_SUB_FEATURE_MASK_UPDATE 0x07U
193
194#define NVGPU_PMU_GR_FEATURE_MASK_SDIV_SLOWDOWN BIT32(0)
195#define NVGPU_PMU_GR_FEATURE_MASK_POWER_GATING BIT32(2)
196#define NVGPU_PMU_GR_FEATURE_MASK_RPPG BIT32(3)
197#define NVGPU_PMU_GR_FEATURE_MASK_PRIV_RING BIT32(5)
198#define NVGPU_PMU_GR_FEATURE_MASK_UNBIND BIT32(6)
199#define NVGPU_PMU_GR_FEATURE_MASK_SAVE_GLOBAL_STATE BIT32(7)
200#define NVGPU_PMU_GR_FEATURE_MASK_RESET_ENTRY BIT32(8)
201#define NVGPU_PMU_GR_FEATURE_MASK_HW_SEQUENCE BIT32(9)
202#define NVGPU_PMU_GR_FEATURE_MASK_ELPG_SRAM BIT32(10)
203#define NVGPU_PMU_GR_FEATURE_MASK_ELPG_LOGIC BIT32(11)
204#define NVGPU_PMU_GR_FEATURE_MASK_ELPG_L2RPPG BIT32(12)
205
206#define NVGPU_PMU_GR_FEATURE_MASK_ALL \
207 ( \
208 NVGPU_PMU_GR_FEATURE_MASK_SDIV_SLOWDOWN |\
209 NVGPU_PMU_GR_FEATURE_MASK_POWER_GATING |\
210 NVGPU_PMU_GR_FEATURE_MASK_RPPG |\
211 NVGPU_PMU_GR_FEATURE_MASK_PRIV_RING |\
212 NVGPU_PMU_GR_FEATURE_MASK_UNBIND |\
213 NVGPU_PMU_GR_FEATURE_MASK_SAVE_GLOBAL_STATE |\
214 NVGPU_PMU_GR_FEATURE_MASK_RESET_ENTRY |\
215 NVGPU_PMU_GR_FEATURE_MASK_HW_SEQUENCE |\
216 NVGPU_PMU_GR_FEATURE_MASK_ELPG_SRAM |\
217 NVGPU_PMU_GR_FEATURE_MASK_ELPG_LOGIC |\
218 NVGPU_PMU_GR_FEATURE_MASK_ELPG_L2RPPG \
219 )
220
221#define NVGPU_PMU_MS_FEATURE_MASK_CLOCK_GATING BIT32(0)
222#define NVGPU_PMU_MS_FEATURE_MASK_SW_ASR BIT32(1)
223#define NVGPU_PMU_MS_FEATURE_MASK_RPPG BIT32(8)
224#define NVGPU_PMU_MS_FEATURE_MASK_FB_TRAINING BIT32(5)
225
226#define NVGPU_PMU_MS_FEATURE_MASK_ALL \
227 ( \
228 NVGPU_PMU_MS_FEATURE_MASK_CLOCK_GATING |\
229 NVGPU_PMU_MS_FEATURE_MASK_SW_ASR |\
230 NVGPU_PMU_MS_FEATURE_MASK_RPPG |\
231 NVGPU_PMU_MS_FEATURE_MASK_FB_TRAINING \
232 )
233
234
235struct pmu_pg_cmd_elpg_cmd {
236 u8 cmd_type;
237 u8 engine_id;
238 u16 cmd;
239};
240
241struct pmu_pg_cmd_eng_buf_load_v0 {
242 u8 cmd_type;
243 u8 engine_id;
244 u8 buf_idx;
245 u8 pad;
246 u16 buf_size;
247 u32 dma_base;
248 u8 dma_offset;
249 u8 dma_idx;
250};
251
252struct pmu_pg_cmd_eng_buf_load_v1 {
253 u8 cmd_type;
254 u8 engine_id;
255 u8 buf_idx;
256 u8 pad;
257 struct flcn_mem_desc {
258 struct falc_u64 dma_addr;
259 u16 dma_size;
260 u8 dma_idx;
261 } dma_desc;
262};
263
264struct pmu_pg_cmd_eng_buf_load_v2 {
265 u8 cmd_type;
266 u8 engine_id;
267 u8 buf_idx;
268 u8 pad;
269 struct flcn_mem_desc_v0 dma_desc;
270};
271
272struct pmu_pg_cmd_gr_init_param {
273 u8 cmd_type;
274 u16 sub_cmd_id;
275 u8 featuremask;
276};
277
278struct pmu_pg_cmd_gr_init_param_v2 {
279 u8 cmd_type;
280 u16 sub_cmd_id;
281 u8 featuremask;
282 u8 ldiv_slowdown_factor;
283};
284
285struct pmu_pg_cmd_gr_init_param_v1 {
286 u8 cmd_type;
287 u16 sub_cmd_id;
288 u32 featuremask;
289};
290
291struct pmu_pg_cmd_sub_feature_mask_update {
292 u8 cmd_type;
293 u16 sub_cmd_id;
294 u8 ctrl_id;
295 u32 enabled_mask;
296};
297
298struct pmu_pg_cmd_ms_init_param {
299 u8 cmd_type;
300 u16 cmd_id;
301 u8 psi;
302 u8 idle_flipped_test_enabled;
303 u16 psiSettleTimeUs;
304 u8 rsvd[2];
305 u32 support_mask;
306 u32 abort_timeout_us;
307};
308
309struct pmu_pg_cmd_mclk_change {
310 u8 cmd_type;
311 u16 cmd_id;
312 u8 rsvd;
313 u32 data;
314};
315
316#define PG_VOLT_RAIL_IDX_MAX 2
317
318struct pmu_pg_volt_rail {
319 u8 volt_rail_idx;
320 u8 sleep_volt_dev_idx;
321 u8 sleep_vfe_idx;
322 u32 sleep_voltage_uv;
323 u32 therm_vid0_cache;
324 u32 therm_vid1_cache;
325};
326
327struct pmu_pg_cmd_post_init_param {
328 u8 cmd_type;
329 u16 cmd_id;
330 struct pmu_pg_volt_rail pg_volt_rail[PG_VOLT_RAIL_IDX_MAX];
331};
332
333struct pmu_pg_cmd_stat {
334 u8 cmd_type;
335 u8 engine_id;
336 u16 sub_cmd_id;
337 u32 data;
338};
339
340struct pmu_pg_cmd {
341 union {
342 u8 cmd_type;
343 struct pmu_pg_cmd_elpg_cmd elpg_cmd;
344 struct pmu_pg_cmd_eng_buf_load_v0 eng_buf_load_v0;
345 struct pmu_pg_cmd_eng_buf_load_v1 eng_buf_load_v1;
346 struct pmu_pg_cmd_eng_buf_load_v2 eng_buf_load_v2;
347 struct pmu_pg_cmd_stat stat;
348 struct pmu_pg_cmd_gr_init_param gr_init_param;
349 struct pmu_pg_cmd_gr_init_param_v1 gr_init_param_v1;
350 struct pmu_pg_cmd_gr_init_param_v2 gr_init_param_v2;
351 struct pmu_pg_cmd_ms_init_param ms_init_param;
352 struct pmu_pg_cmd_mclk_change mclk_change;
353 struct pmu_pg_cmd_post_init_param post_init;
354 /* TBD: other pg commands */
355 union pmu_ap_cmd ap_cmd;
356 struct nv_pmu_rppg_cmd rppg_cmd;
357 struct pmu_pg_cmd_sub_feature_mask_update sf_mask_update;
358 };
359};
360
361/* Statistics structure for PG features */
362struct pmu_pg_stats_v2 {
363 u32 entry_count;
364 u32 exit_count;
365 u32 abort_count;
366 u32 detection_count;
367 u32 prevention_activate_count;
368 u32 prevention_deactivate_count;
369 u32 powered_up_time_us;
370 u32 entry_latency_us;
371 u32 exit_latency_us;
372 u32 resident_time_us;
373 u32 entry_latency_avg_us;
374 u32 exit_latency_avg_us;
375 u32 entry_latency_max_us;
376 u32 exit_latency_max_us;
377 u32 total_sleep_time_us;
378 u32 total_non_sleep_time_us;
379};
380
381struct pmu_pg_stats_v1 {
382 /* Number of time PMU successfully engaged sleep state */
383 u32 entry_count;
384 /* Number of time PMU exit sleep state */
385 u32 exit_count;
386 /* Number of time PMU aborted in entry sequence */
387 u32 abort_count;
388 /*
389 * Time for which GPU was neither in Sleep state not
390 * executing sleep sequence.
391 */
392 u32 poweredup_timeus;
393 /* Entry and exit latency of current sleep cycle */
394 u32 entry_latency_us;
395 u32 exitlatencyus;
396 /* Resident time for current sleep cycle. */
397 u32 resident_timeus;
398 /* Rolling average entry and exit latencies */
399 u32 entrylatency_avgus;
400 u32 exitlatency_avgus;
401 /* Max entry and exit latencies */
402 u32 entrylatency_maxus;
403 u32 exitlatency_maxus;
404 /* Total time spent in sleep and non-sleep state */
405 u32 total_sleep_timeus;
406 u32 total_nonsleep_timeus;
407};
408
409struct pmu_pg_stats {
410 u64 pg_entry_start_timestamp;
411 u64 pg_ingating_start_timestamp;
412 u64 pg_exit_start_timestamp;
413 u64 pg_ungating_start_timestamp;
414 u32 pg_avg_entry_time_us;
415 u32 pg_ingating_cnt;
416 u32 pg_ingating_time_us;
417 u32 pg_avg_exit_time_us;
418 u32 pg_ungating_count;
419 u32 pg_ungating_time_us;
420 u32 pg_gating_cnt;
421 u32 pg_gating_deny_cnt;
422};
423
424#endif /* NVGPU_PMUIF_GPMUIF_PG_H*/
diff --git a/include/nvgpu/pmuif/gpmuif_pg_rppg.h b/include/nvgpu/pmuif/gpmuif_pg_rppg.h
deleted file mode 100644
index 05445f6..0000000
--- a/include/nvgpu/pmuif/gpmuif_pg_rppg.h
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIF_PG_RPPG_H
23#define NVGPU_PMUIF_GPMUIF_PG_RPPG_H
24
25#define NV_PMU_RPPG_CTRL_ID_GR (0x0000)
26#define NV_PMU_RPPG_CTRL_ID_MS (0x0001)
27#define NV_PMU_RPPG_CTRL_ID_DI (0x0002)
28#define NV_PMU_RPPG_CTRL_ID_MAX (0x0003)
29
30#define NV_PMU_RPPG_CTRL_MASK_ENABLE_ALL (BIT(NV_PMU_RPPG_CTRL_ID_GR) |\
31 BIT(NV_PMU_RPPG_CTRL_ID_MS) |\
32 BIT(NV_PMU_RPPG_CTRL_ID_DI))
33
34#define NV_PMU_RPPG_CTRL_MASK_DISABLE_ALL 0
35
36enum {
37 NV_PMU_RPPG_DOMAIN_ID_GFX = 0x0,
38 NV_PMU_RPPG_DOMAIN_ID_NON_GFX,
39};
40
41struct nv_pmu_rppg_ctrl_stats {
42 u32 entry_count;
43 u32 exit_count;
44};
45
46struct nv_pmu_rppg_cmd_common {
47 u8 cmd_type;
48 u8 cmd_id;
49};
50
51struct nv_pmu_rppg_cmd_init {
52 u8 cmd_type;
53 u8 cmd_id;
54};
55
56struct nv_pmu_rppg_cmd_init_ctrl {
57 u8 cmd_type;
58 u8 cmd_id;
59 u8 ctrl_id;
60 u8 domain_id;
61};
62
63struct nv_pmu_rppg_cmd_stats_reset {
64 u8 cmd_type;
65 u8 cmd_id;
66 u8 ctrl_id;
67};
68
69struct nv_pmu_rppg_cmd {
70 union {
71 u8 cmd_type;
72 struct nv_pmu_rppg_cmd_common cmn;
73 struct nv_pmu_rppg_cmd_init init;
74 struct nv_pmu_rppg_cmd_init_ctrl init_ctrl;
75 struct nv_pmu_rppg_cmd_stats_reset stats_reset;
76 };
77};
78
79enum {
80 NV_PMU_RPPG_CMD_ID_INIT = 0x0,
81 NV_PMU_RPPG_CMD_ID_INIT_CTRL,
82 NV_PMU_RPPG_CMD_ID_STATS_RESET,
83};
84
85
86struct nv_pmu_rppg_msg_common {
87 u8 msg_type;
88 u8 msg_id;
89};
90
91struct nv_pmu_rppg_msg_init_ctrl_ack {
92 u8 msg_type;
93 u8 msg_id;
94 u8 ctrl_id;
95 u32 stats_dmem_offset;
96};
97
98struct nv_pmu_rppg_msg {
99 union {
100 u8 msg_type;
101 struct nv_pmu_rppg_msg_common cmn;
102 struct nv_pmu_rppg_msg_init_ctrl_ack init_ctrl_ack;
103 };
104};
105
106enum {
107 NV_PMU_RPPG_MSG_ID_INIT_CTRL_ACK = 0x0,
108};
109
110#endif /* NVGPU_PMUIF_GPMUIF_PG_RPPG_H */
diff --git a/include/nvgpu/pmuif/gpmuif_pmu.h b/include/nvgpu/pmuif/gpmuif_pmu.h
deleted file mode 100644
index 0528bd6..0000000
--- a/include/nvgpu/pmuif/gpmuif_pmu.h
+++ /dev/null
@@ -1,193 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIF_PMU_H
23#define NVGPU_PMUIF_GPMUIF_PMU_H
24
25#include <nvgpu/flcnif_cmn.h>
26#include "gpmuif_cmn.h"
27
28/* Make sure size of this structure is a multiple of 4 bytes */
29struct pmu_cmdline_args_v3 {
30 u32 reserved;
31 u32 cpu_freq_hz;
32 u32 falc_trace_size;
33 u32 falc_trace_dma_base;
34 u32 falc_trace_dma_idx;
35 u8 secure_mode;
36 u8 raise_priv_sec;
37 struct pmu_mem_v1 gc6_ctx;
38};
39
40struct pmu_cmdline_args_v4 {
41 u32 reserved;
42 u32 cpu_freq_hz;
43 u32 falc_trace_size;
44 struct falc_dma_addr dma_addr;
45 u32 falc_trace_dma_idx;
46 u8 secure_mode;
47 u8 raise_priv_sec;
48 struct pmu_mem_desc_v0 gc6_ctx;
49 u8 pad;
50};
51
52struct pmu_cmdline_args_v5 {
53 u32 cpu_freq_hz;
54 struct flcn_mem_desc_v0 trace_buf;
55 u8 secure_mode;
56 u8 raise_priv_sec;
57 struct flcn_mem_desc_v0 gc6_ctx;
58 struct flcn_mem_desc_v0 init_data_dma_info;
59 u32 dummy;
60};
61
62struct pmu_cmdline_args_v6 {
63 u32 cpu_freq_hz;
64 struct flcn_mem_desc_v0 trace_buf;
65 u8 secure_mode;
66 u8 raise_priv_sec;
67 struct flcn_mem_desc_v0 gc6_ctx;
68 struct flcn_mem_desc_v0 gc6_bsod_ctx;
69 struct flcn_mem_desc_v0 super_surface;
70 u32 flags;
71};
72
73/* GPU ID */
74#define PMU_SHA1_GID_SIGNATURE 0xA7C66AD2
75#define PMU_SHA1_GID_SIGNATURE_SIZE 4
76
77#define PMU_SHA1_GID_SIZE 16
78
79struct pmu_sha1_gid {
80 bool valid;
81 u8 gid[PMU_SHA1_GID_SIZE];
82};
83
84struct pmu_sha1_gid_data {
85 u8 signature[PMU_SHA1_GID_SIGNATURE_SIZE];
86 u8 gid[PMU_SHA1_GID_SIZE];
87};
88
89/* PMU INIT MSG */
90enum {
91 PMU_INIT_MSG_TYPE_PMU_INIT = 0,
92};
93
94struct pmu_init_msg_pmu_v1 {
95 u8 msg_type;
96 u8 pad;
97 u16 os_debug_entry_point;
98
99 struct {
100 u16 size;
101 u16 offset;
102 u8 index;
103 u8 pad;
104 } queue_info[PMU_QUEUE_COUNT];
105
106 u16 sw_managed_area_offset;
107 u16 sw_managed_area_size;
108};
109
110#define PMU_QUEUE_COUNT_FOR_V5 4
111#define PMU_QUEUE_COUNT_FOR_V4 5
112#define PMU_QUEUE_COUNT_FOR_V3 3
113#define PMU_QUEUE_HPQ_IDX_FOR_V3 0
114#define PMU_QUEUE_LPQ_IDX_FOR_V3 1
115#define PMU_QUEUE_MSG_IDX_FOR_V3 2
116#define PMU_QUEUE_MSG_IDX_FOR_V5 3
117struct pmu_init_msg_pmu_v3 {
118 u8 msg_type;
119 u8 queue_index[PMU_QUEUE_COUNT_FOR_V3];
120 u16 queue_size[PMU_QUEUE_COUNT_FOR_V3];
121 u16 queue_offset;
122
123 u16 sw_managed_area_offset;
124 u16 sw_managed_area_size;
125
126 u16 os_debug_entry_point;
127
128 u8 dummy[18];
129};
130
131struct pmu_init_msg_pmu_v4 {
132 u8 msg_type;
133 u8 queue_index[PMU_QUEUE_COUNT_FOR_V4];
134 u16 queue_size[PMU_QUEUE_COUNT_FOR_V4];
135 u16 queue_offset;
136
137 u16 sw_managed_area_offset;
138 u16 sw_managed_area_size;
139
140 u16 os_debug_entry_point;
141
142 u8 dummy[18];
143};
144
145struct pmu_init_msg_pmu_v5 {
146 u8 msg_type;
147 u8 flcn_status;
148 u8 queue_index[PMU_QUEUE_COUNT_FOR_V5];
149 u16 queue_size[PMU_QUEUE_COUNT_FOR_V5];
150 u16 queue_offset;
151
152 u16 sw_managed_area_offset;
153 u16 sw_managed_area_size;
154
155 u16 os_debug_entry_point;
156
157 u8 dummy[18];
158 u8 pad;
159};
160
161union pmu_init_msg_pmu {
162 struct pmu_init_msg_pmu_v1 v1;
163 struct pmu_init_msg_pmu_v3 v3;
164 struct pmu_init_msg_pmu_v4 v4;
165 struct pmu_init_msg_pmu_v5 v5;
166};
167
168struct pmu_init_msg {
169 union {
170 u8 msg_type;
171 struct pmu_init_msg_pmu_v1 pmu_init_v1;
172 struct pmu_init_msg_pmu_v3 pmu_init_v3;
173 struct pmu_init_msg_pmu_v4 pmu_init_v4;
174 struct pmu_init_msg_pmu_v5 pmu_init_v5;
175 };
176};
177
178/* robust channel (RC) messages */
179enum {
180 PMU_RC_MSG_TYPE_UNHANDLED_CMD = 0,
181};
182
183struct pmu_rc_msg_unhandled_cmd {
184 u8 msg_type;
185 u8 unit_id;
186};
187
188struct pmu_rc_msg {
189 u8 msg_type;
190 struct pmu_rc_msg_unhandled_cmd unhandled_cmd;
191};
192
193#endif /* NVGPU_PMUIF_GPMUIF_PMU_H*/
diff --git a/include/nvgpu/pmuif/gpmuifbios.h b/include/nvgpu/pmuif/gpmuifbios.h
deleted file mode 100644
index e89fbc3..0000000
--- a/include/nvgpu/pmuif/gpmuifbios.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIFBIOS_H
23#define NVGPU_PMUIF_GPMUIFBIOS_H
24
25struct nv_pmu_bios_vfield_register_segment_super {
26 u8 type;
27 u8 low_bit;
28 u8 high_bit;
29};
30
31struct nv_pmu_bios_vfield_register_segment_reg {
32 struct nv_pmu_bios_vfield_register_segment_super super;
33 u32 addr;
34};
35
36struct nv_pmu_bios_vfield_register_segment_index_reg {
37 struct nv_pmu_bios_vfield_register_segment_super super;
38 u32 addr;
39 u32 reg_index;
40 u32 index;
41};
42
43union nv_pmu_bios_vfield_register_segment {
44 struct nv_pmu_bios_vfield_register_segment_super super;
45 struct nv_pmu_bios_vfield_register_segment_reg reg;
46 struct nv_pmu_bios_vfield_register_segment_index_reg index_reg;
47};
48
49
50#endif /* NVGPU_PMUIF_GPMUIFBIOS_H*/
diff --git a/include/nvgpu/pmuif/gpmuifboardobj.h b/include/nvgpu/pmuif/gpmuifboardobj.h
deleted file mode 100644
index 47226aa..0000000
--- a/include/nvgpu/pmuif/gpmuifboardobj.h
+++ /dev/null
@@ -1,234 +0,0 @@
1/*
2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3*
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21*/
22#ifndef NVGPU_PMUIF_GPMUIFBOARDOBJ_H
23#define NVGPU_PMUIF_GPMUIFBOARDOBJ_H
24
25#include <nvgpu/flcnif_cmn.h>
26#include "ctrl/ctrlboardobj.h"
27
28/* board object group command id's. */
29#define NV_PMU_BOARDOBJGRP_CMD_SET 0x00U
30#define NV_PMU_BOARDOBJGRP_CMD_GET_STATUS 0x01U
31
32#define NV_PMU_RPC_ID_CLK_BOARD_OBJ_GRP_CMD 0x00U
33#define NV_PMU_RPC_ID_FAN_BOARD_OBJ_GRP_CMD 0x00U
34#define NV_PMU_RPC_ID_PERF_BOARD_OBJ_GRP_CMD 0x00U
35#define NV_PMU_RPC_ID_PERF_CF_BOARD_OBJ_GRP_CMD 0x00U
36#define NV_PMU_RPC_ID_PMGR_BOARD_OBJ_GRP_CMD 0x00U
37#define NV_PMU_RPC_ID_THERM_BOARD_OBJ_GRP_CMD 0x00U
38#define NV_PMU_RPC_ID_VOLT_BOARD_OBJ_GRP_CMD 0x00U
39
40/*
41 * Base structure describing a BOARDOBJ for communication between Kernel and
42 * PMU.
43 */
44struct nv_pmu_boardobj {
45 u8 type;
46 u8 grp_idx;
47};
48
49/*
50 * Base structure describing a BOARDOBJ for Query interface between Kernel and
51 * PMU.
52 */
53struct nv_pmu_boardobj_query {
54 u8 type;
55 u8 grp_idx;
56};
57
58/*
59 * Virtual base structure describing a BOARDOBJGRP interface between Kernel and
60 * PMU.
61 */
62struct nv_pmu_boardobjgrp_super {
63 u8 type;
64 u8 class_id;
65 u8 obj_slots;
66 u8 flags;
67};
68
69struct nv_pmu_boardobjgrp {
70 struct nv_pmu_boardobjgrp_super super;
71 u32 obj_mask;
72};
73
74struct nv_pmu_boardobjgrp_e32 {
75 struct nv_pmu_boardobjgrp_super super;
76 struct ctrl_boardobjgrp_mask_e32 obj_mask;
77};
78
79struct nv_pmu_boardobjgrp_e255 {
80 struct nv_pmu_boardobjgrp_super super;
81 struct ctrl_boardobjgrp_mask_e255 obj_mask;
82};
83
84struct nv_pmu_boardobj_cmd_grp_payload {
85 struct pmu_allocation_v3 dmem_buf;
86 struct flcn_mem_desc_v0 fb;
87 u8 hdr_size;
88 u8 entry_size;
89};
90
91struct nv_pmu_boardobj_cmd_grp {
92 u8 cmd_type;
93 u8 pad[2];
94 u8 class_id;
95 struct nv_pmu_boardobj_cmd_grp_payload grp;
96};
97
98#define NV_PMU_BOARDOBJ_GRP_ALLOC_OFFSET \
99 (NV_OFFSETOF(NV_PMU_BOARDOBJ_CMD_GRP, grp))
100
101struct nv_pmu_boardobj_cmd {
102 union {
103 u8 cmd_type;
104 struct nv_pmu_boardobj_cmd_grp grp;
105 struct nv_pmu_boardobj_cmd_grp grp_set;
106 struct nv_pmu_boardobj_cmd_grp grp_get_status;
107 };
108};
109
110struct nv_pmu_boardobj_msg_grp {
111 u8 msg_type;
112 bool b_success;
113 flcn_status flcn_status;
114 u8 class_id;
115};
116
117struct nv_pmu_boardobj_msg {
118 union {
119 u8 msg_type;
120 struct nv_pmu_boardobj_msg_grp grp;
121 struct nv_pmu_boardobj_msg_grp grp_set;
122 struct nv_pmu_boardobj_msg_grp grp_get_status;
123 };
124};
125
126/*
127* Macro generating structures describing classes which implement
128* NV_PMU_BOARDOBJGRP via the NV_PMU_BOARDBOBJ_CMD_GRP SET interface.
129*
130* @para _eng Name of implementing engine in which this structure is
131* found.
132* @param _class Class ID of Objects within Board Object Group.
133* @param _slots Max number of elements this group can contain.
134*/
135#define NV_PMU_BOARDOBJ_GRP_SET_MAKE(_eng, _class, _slots) \
136 NV_PMU_MAKE_ALIGNED_STRUCT( \
137 nv_pmu_##_eng##_##_class##_boardobjgrp_set_header, one_structure); \
138 NV_PMU_MAKE_ALIGNED_UNION( \
139 nv_pmu_##_eng##_##_class##_boardobj_set_union, one_union); \
140 struct nv_pmu_##_eng##_##_class##_boardobj_grp_set { \
141 union nv_pmu_##_eng##_##_class##_boardobjgrp_set_header_aligned hdr; \
142 union nv_pmu_##_eng##_##_class##_boardobj_set_union_aligned objects[(_slots)];\
143 }
144
145/*
146* Macro generating structures describing classes which implement
147* NV_PMU_BOARDOBJGRP_E32 via the NV_PMU_BOARDBOBJ_CMD_GRP SET interface.
148*
149* @para _eng Name of implementing engine in which this structure is
150* found.
151* @param _class Class ID of Objects within Board Object Group.
152*/
153#define NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(_eng, _class) \
154 NV_PMU_BOARDOBJ_GRP_SET_MAKE(_eng, _class, \
155 CTRL_BOARDOBJGRP_E32_MAX_OBJECTS)
156
157/*
158* Macro generating structures describing classes which implement
159* NV_PMU_BOARDOBJGRP_E255 via the NV_PMU_BOARDBOBJ_CMD_GRP SET interface.
160*
161* @para _eng Name of implementing engine in which this structure is
162* found.
163* @param _class Class ID of Objects within Board Object Group.
164*/
165#define NV_PMU_BOARDOBJ_GRP_SET_MAKE_E255(_eng, _class) \
166 NV_PMU_BOARDOBJ_GRP_SET_MAKE(_eng, _class, \
167 CTRL_BOARDOBJGRP_E255_MAX_OBJECTS)
168
169/*
170* Macro generating structures for querying dynamic state for classes which
171* implement NV_PMU_BOARDOBJGRP via the NV_PMU_BOARDOBJ_CMD_GRP GET_STATUS
172* interface.
173*
174* @para _eng Name of implementing engine in which this structure is
175* found.
176* @param _class Class ID of Objects within Board Object Group.
177* @param _slots Max number of elements this group can contain.
178*/
179#define NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE(_eng, _class, _slots) \
180 NV_PMU_MAKE_ALIGNED_STRUCT( \
181 nv_pmu_##_eng##_##_class##_boardobjgrp_get_status_header, struct); \
182 NV_PMU_MAKE_ALIGNED_UNION( \
183 nv_pmu_##_eng##_##_class##_boardobj_get_status_union, union); \
184 struct nv_pmu_##_eng##_##_class##_boardobj_grp_get_status { \
185 union nv_pmu_##_eng##_##_class##_boardobjgrp_get_status_header_aligned \
186 hdr; \
187 union nv_pmu_##_eng##_##_class##_boardobj_get_status_union_aligned \
188 objects[(_slots)]; \
189 }
190
191/*
192* Macro generating structures for querying dynamic state for classes which
193* implement NV_PMU_BOARDOBJGRP_E32 via the NV_PMU_BOARDOBJ_CMD_GRP GET_STATUS
194* interface.
195*
196* @para _eng Name of implementing engine in which this structure is
197* found.
198* @param _class Class ID of Objects within Board Object Group.
199*/
200#define NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(_eng, _class) \
201 NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE(_eng, _class, \
202 CTRL_BOARDOBJGRP_E32_MAX_OBJECTS)
203
204/*
205* Macro generating structures for querying dynamic state for classes which
206* implement NV_PMU_BOARDOBJGRP_E255 via the NV_PMU_BOARDOBJ_CMD_GRP GET_STATUS
207* interface.
208*
209* @para _eng Name of implementing engine in which this structure is
210* found.
211* @param _class Class ID of Objects within Board Object Group.
212*/
213#define NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E255(_eng, _class) \
214 NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE(_eng, _class, \
215 CTRL_BOARDOBJGRP_E255_MAX_OBJECTS)
216
217/* RPC */
218
219/*
220 * structure that holds data used to
221 * execute BOARD_OBJ_GRP_CMD RPC.
222 */
223struct nv_pmu_rpc_struct_board_obj_grp_cmd
224{
225 /* [IN/OUT] Must be first field in RPC structure */
226 struct nv_pmu_rpc_header hdr;
227 /* [IN] BOARDOBJGRP class IDs. */
228 u8 class_id;
229 /* [IN] Requested command ID (@ref NV_PMU_BOARDOBJGRP_CMD_***)*/
230 u8 command_id;
231 u32 scratch[1];
232};
233
234#endif /* NVGPU_PMUIF_GPMUIFBOARDOBJ_H */
diff --git a/include/nvgpu/pmuif/gpmuifclk.h b/include/nvgpu/pmuif/gpmuifclk.h
deleted file mode 100644
index 70a913b..0000000
--- a/include/nvgpu/pmuif/gpmuifclk.h
+++ /dev/null
@@ -1,573 +0,0 @@
1/*
2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3*
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21*/
22
23#ifndef NVGPU_PMUIF_GPMUIFCLK_H
24#define NVGPU_PMUIF_GPMUIFCLK_H
25
26#include "ctrl/ctrlboardobj.h"
27#include "ctrl/ctrlvolt.h"
28#include "ctrl/ctrlperf.h"
29#include "ctrl/ctrlclk.h"
30#include "gpmuifboardobj.h"
31#include "gpmuifvolt.h"
32#include <nvgpu/flcnif_cmn.h>
33
34
35/*
36 * Try to get gpc2clk, mclk, sys2clk, xbar2clk work for Pascal
37 *
38 * mclk is same for both
39 * gpc2clk is 17 for Pascal and 13 for Volta, making it 17
40 * as volta uses gpcclk
41 * sys2clk is 20 in Pascal and 15 in Volta.
42 * Changing for Pascal would break nvdclk of Volta
43 * xbar2clk is 19 in Pascal and 14 in Volta
44 * Changing for Pascal would break pwrclk of Volta
45 */
46enum nv_pmu_clk_clkwhich {
47 clkwhich_gpcclk = 1,
48 clkwhich_xbarclk = 2,
49 clkwhich_sysclk = 3,
50 clkwhich_hubclk = 4,
51 clkwhich_mclk = 5,
52 clkwhich_hostclk = 6,
53 clkwhich_dispclk = 7,
54 clkwhich_xclk = 12,
55 clkwhich_gpc2clk = 17,
56 clkwhich_xbar2clk = 14,
57 clkwhich_sys2clk = 15,
58 clkwhich_hub2clk = 16,
59 clkwhich_pwrclk = 19,
60 clkwhich_nvdclk = 20,
61 clkwhich_pciegenclk = 26,
62};
63
64/*
65 * Enumeration of BOARDOBJGRP class IDs within OBJCLK. Used as "classId"
66 * argument for communications between Kernel and PMU via the various generic
67 * BOARDOBJGRP interfaces.
68 */
69#define NV_PMU_CLK_BOARDOBJGRP_CLASS_ID_CLK_DOMAIN 0x00
70#define NV_PMU_CLK_BOARDOBJGRP_CLASS_ID_CLK_PROG 0x01
71#define NV_PMU_CLK_BOARDOBJGRP_CLASS_ID_VIN_DEVICE 0x02
72#define NV_PMU_CLK_BOARDOBJGRP_CLASS_ID_FLL_DEVICE 0x03
73#define NV_PMU_CLK_BOARDOBJGRP_CLASS_ID_CLK_VF_POINT 0x04
74#define NV_PMU_CLK_BOARDOBJGRP_CLASS_ID_CLK_FREQ_CONTROLLER 0x05
75
76/*!
77* CLK_DOMAIN BOARDOBJGRP Header structure. Describes global state about the
78* CLK_DOMAIN feature.
79*/
80struct nv_pmu_clk_clk_domain_boardobjgrp_set_header {
81 struct nv_pmu_boardobjgrp_e32 super;
82 u32 vbios_domains;
83 struct ctrl_boardobjgrp_mask_e32 prog_domains_mask;
84 struct ctrl_boardobjgrp_mask_e32 master_domains_mask;
85 u16 cntr_sampling_periodms;
86 u8 version;
87 bool b_override_o_v_o_c;
88 bool b_debug_mode;
89 bool b_enforce_vf_monotonicity;
90 bool b_enforce_vf_smoothening;
91 u8 volt_rails_max;
92 struct ctrl_clk_clk_delta deltas;
93};
94
95struct nv_pmu_clk_clk_domain_boardobj_set {
96 struct nv_pmu_boardobj super;
97 enum nv_pmu_clk_clkwhich domain;
98 u32 api_domain;
99 u8 perf_domain_grp_idx;
100};
101
102struct nv_pmu_clk_clk_domain_3x_boardobj_set {
103 struct nv_pmu_clk_clk_domain_boardobj_set super;
104 bool b_noise_aware_capable;
105};
106
107struct nv_pmu_clk_clk_domain_3x_fixed_boardobj_set {
108 struct nv_pmu_clk_clk_domain_3x_boardobj_set super;
109 u16 freq_mhz;
110};
111
112struct nv_pmu_clk_clk_domain_3x_prog_boardobj_set {
113 struct nv_pmu_clk_clk_domain_3x_boardobj_set super;
114 u8 clk_prog_idx_first;
115 u8 clk_prog_idx_last;
116 bool b_force_noise_unaware_ordering;
117 struct ctrl_clk_freq_delta factory_delta;
118 short freq_delta_min_mhz;
119 short freq_delta_max_mhz;
120 struct ctrl_clk_clk_delta deltas;
121};
122
123struct nv_pmu_clk_clk_domain_30_prog_boardobj_set {
124 struct nv_pmu_clk_clk_domain_3x_prog_boardobj_set super;
125 u8 noise_unaware_ordering_index;
126 u8 noise_aware_ordering_index;
127};
128
129struct nv_pmu_clk_clk_domain_3x_master_boardobj_set {
130 u8 rsvd; /* Stubbing for RM_PMU_BOARDOBJ_INTERFACE */
131 u32 slave_idxs_mask;
132};
133
134struct nv_pmu_clk_clk_domain_30_master_boardobj_set {
135 struct nv_pmu_clk_clk_domain_30_prog_boardobj_set super;
136 struct nv_pmu_clk_clk_domain_3x_master_boardobj_set master;
137};
138
139struct nv_pmu_clk_clk_domain_3x_slave_boardobj_set {
140 u8 rsvd; /* Stubbing for RM_PMU_BOARDOBJ_INTERFACE */
141 u8 master_idx;
142};
143
144struct nv_pmu_clk_clk_domain_30_slave_boardobj_set {
145 struct nv_pmu_clk_clk_domain_30_prog_boardobj_set super;
146 struct nv_pmu_clk_clk_domain_3x_slave_boardobj_set slave;
147};
148
149struct nv_pmu_clk_clk_domain_35_prog_boardobj_set {
150 struct nv_pmu_clk_clk_domain_3x_prog_boardobj_set super;
151 u8 pre_volt_ordering_index;
152 u8 post_volt_ordering_index;
153 u8 clk_pos;
154 u8 clk_vf_curve_count;
155};
156
157struct nv_pmu_clk_clk_domain_35_master_boardobj_set {
158 struct nv_pmu_clk_clk_domain_35_prog_boardobj_set super;
159 struct nv_pmu_clk_clk_domain_3x_master_boardobj_set master;
160 u32 master_slave_domains_grp_mask;
161};
162
163
164struct nv_pmu_clk_clk_domain_35_slave_boardobj_set {
165 struct nv_pmu_clk_clk_domain_35_prog_boardobj_set super;
166 struct nv_pmu_clk_clk_domain_3x_slave_boardobj_set slave;
167};
168
169union nv_pmu_clk_clk_domain_boardobj_set_union {
170 struct nv_pmu_boardobj board_obj;
171 struct nv_pmu_clk_clk_domain_boardobj_set super;
172 struct nv_pmu_clk_clk_domain_3x_boardobj_set v3x;
173 struct nv_pmu_clk_clk_domain_3x_fixed_boardobj_set v3x_fixed;
174 struct nv_pmu_clk_clk_domain_3x_prog_boardobj_set v3x_prog;
175 struct nv_pmu_clk_clk_domain_30_prog_boardobj_set v30_prog;
176 struct nv_pmu_clk_clk_domain_30_master_boardobj_set v30_master;
177 struct nv_pmu_clk_clk_domain_30_slave_boardobj_set v30_slave;
178 struct nv_pmu_clk_clk_domain_35_prog_boardobj_set v35_prog;
179 struct nv_pmu_clk_clk_domain_35_master_boardobj_set v35_master;
180 struct nv_pmu_clk_clk_domain_35_slave_boardobj_set v35_slave;
181};
182
183NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(clk, clk_domain);
184
185struct nv_pmu_clk_clk_prog_boardobjgrp_set_header {
186 struct nv_pmu_boardobjgrp_e255 super;
187 u8 slave_entry_count;
188 u8 vf_entry_count;
189};
190
191struct nv_pmu_clk_clk_prog_boardobj_set {
192 struct nv_pmu_boardobj super;
193};
194
195struct nv_pmu_clk_clk_prog_1x_boardobj_set {
196 struct nv_pmu_clk_clk_prog_boardobj_set super;
197 u8 source;
198 u16 freq_max_mhz;
199 union ctrl_clk_clk_prog_1x_source_data source_data;
200};
201
202struct nv_pmu_clk_clk_prog_1x_master_boardobj_set {
203 struct nv_pmu_clk_clk_prog_1x_boardobj_set super;
204 u8 rsvd; /* Stubbing for RM_PMU_BOARDOBJ_INTERFACE */
205 bool b_o_c_o_v_enabled;
206 struct ctrl_clk_clk_prog_1x_master_vf_entry vf_entries[
207 CTRL_CLK_CLK_PROG_1X_MASTER_VF_ENTRY_MAX_ENTRIES];
208 struct ctrl_clk_clk_delta deltas;
209 union ctrl_clk_clk_prog_1x_master_source_data source_data;
210};
211
212struct nv_pmu_clk_clk_prog_1x_master_ratio_boardobj_set {
213 struct nv_pmu_clk_clk_prog_1x_master_boardobj_set super;
214 u8 rsvd; /* Stubbing for RM_PMU_BOARDOBJ_INTERFACE */
215 struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry slave_entries[
216 CTRL_CLK_PROG_1X_MASTER_MAX_SLAVE_ENTRIES];
217};
218
219struct nv_pmu_clk_clk_prog_1x_master_table_boardobj_set {
220 struct nv_pmu_clk_clk_prog_1x_master_boardobj_set super;
221 u8 rsvd; /* Stubbing for RM_PMU_BOARDOBJ_INTERFACE */
222 struct ctrl_clk_clk_prog_1x_master_table_slave_entry
223 slave_entries[CTRL_CLK_PROG_1X_MASTER_MAX_SLAVE_ENTRIES];
224};
225
226union nv_pmu_clk_clk_prog_boardobj_set_union {
227 struct nv_pmu_boardobj board_obj;
228 struct nv_pmu_clk_clk_prog_boardobj_set super;
229 struct nv_pmu_clk_clk_prog_1x_boardobj_set v1x;
230 struct nv_pmu_clk_clk_prog_1x_master_boardobj_set v1x_master;
231 struct nv_pmu_clk_clk_prog_1x_master_ratio_boardobj_set v1x_master_ratio;
232 struct nv_pmu_clk_clk_prog_1x_master_table_boardobj_set v1x_master_table;
233};
234
235NV_PMU_BOARDOBJ_GRP_SET_MAKE_E255(clk, clk_prog);
236
237struct nv_pmu_clk_lut_device_desc {
238 u8 vselect_mode;
239 u16 hysteresis_threshold;
240};
241
242struct nv_pmu_clk_regime_desc {
243 u8 regime_id;
244 u8 target_regime_id_override;
245 u16 fixed_freq_regime_limit_mhz;
246};
247
248struct nv_pmu_clk_clk_fll_device_boardobjgrp_set_header {
249 struct nv_pmu_boardobjgrp_e32 super;
250 struct ctrl_boardobjgrp_mask_e32 lut_prog_master_mask;
251 u32 lut_step_size_uv;
252 u32 lut_min_voltage_uv;
253 u8 lut_num_entries;
254 u16 max_min_freq_mhz;
255};
256
257struct nv_pmu_clk_clk_fll_device_boardobj_set {
258 struct nv_pmu_boardobj super;
259 u8 id;
260 u8 mdiv;
261 u8 vin_idx_logic;
262 u8 vin_idx_sram;
263 u8 rail_idx_for_lut;
264 u16 input_freq_mhz;
265 u32 clk_domain;
266 struct nv_pmu_clk_lut_device_desc lut_device;
267 struct nv_pmu_clk_regime_desc regime_desc;
268 u8 min_freq_vfe_idx;
269 u8 freq_ctrl_idx;
270 bool b_skip_pldiv_below_dvco_min;
271 bool b_dvco_1x;
272 struct ctrl_boardobjgrp_mask_e32 lut_prog_broadcast_slave_mask;
273};
274
275union nv_pmu_clk_clk_fll_device_boardobj_set_union {
276 struct nv_pmu_boardobj board_obj;
277 struct nv_pmu_clk_clk_fll_device_boardobj_set super;
278};
279
280NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(clk, clk_fll_device);
281
282struct nv_pmu_clk_clk_vin_device_boardobjgrp_set_header {
283 struct nv_pmu_boardobjgrp_e32 super;
284 bool b_vin_is_disable_allowed;
285};
286
287struct nv_pmu_clk_clk_vin_device_boardobj_set {
288 struct nv_pmu_boardobj super;
289 u8 id;
290 u8 volt_domain;
291 u32 flls_shared_mask;
292};
293
294struct nv_pmu_clk_clk_vin_device_v10_boardobj_set {
295 struct nv_pmu_clk_clk_vin_device_boardobj_set super;
296 struct ctrl_clk_vin_device_info_data_v10 data;
297};
298
299struct nv_pmu_clk_clk_vin_device_v20_boardobj_set {
300 struct nv_pmu_clk_clk_vin_device_boardobj_set super;
301 struct ctrl_clk_vin_device_info_data_v20 data;
302};
303
304union nv_pmu_clk_clk_vin_device_boardobj_set_union {
305 struct nv_pmu_boardobj board_obj;
306 struct nv_pmu_clk_clk_vin_device_boardobj_set super;
307 struct nv_pmu_clk_clk_vin_device_v10_boardobj_set v10;
308 struct nv_pmu_clk_clk_vin_device_v20_boardobj_set v20;
309};
310
311NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(clk, clk_vin_device);
312
313struct nv_pmu_clk_clk_vf_point_boardobjgrp_set_header {
314 struct nv_pmu_boardobjgrp_e255 super;
315};
316
317struct nv_pmu_clk_clk_vf_point_boardobj_set {
318 struct nv_pmu_boardobj super;
319 u8 vfe_equ_idx;
320 u8 volt_rail_idx;
321};
322
323struct nv_pmu_clk_clk_vf_point_freq_boardobj_set {
324 struct nv_pmu_clk_clk_vf_point_boardobj_set super;
325 u16 freq_mhz;
326 int volt_delta_uv;
327};
328
329struct nv_pmu_clk_clk_vf_point_volt_boardobj_set {
330 struct nv_pmu_clk_clk_vf_point_boardobj_set super;
331 u32 source_voltage_uv;
332 struct ctrl_clk_freq_delta freq_delta;
333};
334
335union nv_pmu_clk_clk_vf_point_boardobj_set_union {
336 struct nv_pmu_boardobj board_obj;
337 struct nv_pmu_clk_clk_vf_point_boardobj_set super;
338 struct nv_pmu_clk_clk_vf_point_freq_boardobj_set freq;
339 struct nv_pmu_clk_clk_vf_point_volt_boardobj_set volt;
340};
341
342NV_PMU_BOARDOBJ_GRP_SET_MAKE_E255(clk, clk_vf_point);
343
344struct nv_pmu_clk_clk_vf_point_boardobjgrp_get_status_header {
345 struct nv_pmu_boardobjgrp_e255 super;
346 u32 vf_points_cahce_counter;
347};
348
349struct nv_pmu_clk_clk_vf_point_boardobj_get_status {
350 struct nv_pmu_boardobj super;
351 struct ctrl_clk_vf_pair pair;
352 u8 dummy[38];
353};
354
355struct nv_pmu_clk_clk_vf_point_volt_boardobj_get_status {
356 struct nv_pmu_clk_clk_vf_point_boardobj_get_status super;
357 u16 vf_gain_value;
358};
359
360union nv_pmu_clk_clk_vf_point_boardobj_get_status_union {
361 struct nv_pmu_boardobj board_obj;
362 struct nv_pmu_clk_clk_vf_point_boardobj_get_status super;
363 struct nv_pmu_clk_clk_vf_point_volt_boardobj_get_status volt;
364};
365
366NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E255(clk, clk_vf_point);
367
368#define NV_PMU_VF_INJECT_MAX_CLOCK_DOMAINS (12)
369
370struct nv_pmu_clk_clk_domain_list {
371 u8 num_domains;
372 struct ctrl_clk_clk_domain_list_item clk_domains[
373 NV_PMU_VF_INJECT_MAX_CLOCK_DOMAINS];
374};
375
376struct nv_pmu_clk_clk_domain_list_v1 {
377 u8 num_domains;
378 struct ctrl_clk_clk_domain_list_item_v1 clk_domains[
379 NV_PMU_VF_INJECT_MAX_CLOCK_DOMAINS];
380};
381
382struct nv_pmu_clk_vf_change_inject {
383 u8 flags;
384 struct nv_pmu_clk_clk_domain_list clk_list;
385 struct nv_pmu_volt_volt_rail_list volt_list;
386};
387
388struct nv_pmu_clk_vf_change_inject_v1 {
389 u8 flags;
390 struct nv_pmu_clk_clk_domain_list_v1 clk_list;
391 struct nv_pmu_volt_volt_rail_list_v1 volt_list;
392};
393
394#define NV_NV_PMU_CLK_LOAD_FEATURE_VIN (0x00000002)
395#define NV_NV_PMU_CLK_LOAD_ACTION_MASK_VIN_HW_CAL_PROGRAM_YES (0x00000001)
396
397struct nv_pmu_clk_load_payload_freq_controllers {
398 struct ctrl_boardobjgrp_mask_e32 load_mask;
399};
400
401struct nv_pmu_clk_load {
402 u8 feature;
403 u32 action_mask;
404 union {
405 struct nv_pmu_clk_load_payload_freq_controllers freq_controllers;
406 } payload;
407};
408
409struct nv_pmu_clk_freq_effective_avg {
410 u32 clkDomainMask;
411 u32 freqkHz[CTRL_BOARDOBJ_MAX_BOARD_OBJECTS];
412};
413
414/* CLK_FREQ_CONTROLLER */
415#define NV_NV_PMU_CLK_LOAD_FEATURE_FREQ_CONTROLLER (0x00000003)
416
417#define NV_NV_PMU_CLK_LOAD_ACTION_MASK_FREQ_CONTROLLER_CALLBACK_NO (0x00000000)
418#define NV_NV_PMU_CLK_LOAD_ACTION_MASK_FREQ_CONTROLLER_CALLBACK_YES (0x00000002)
419
420struct nv_pmu_clk_clk_freq_controller_boardobjgrp_set_header {
421 struct nv_pmu_boardobjgrp_e32 super;
422 u32 sampling_period_ms;
423 u8 volt_policy_idx;
424};
425
426struct nv_pmu_clk_clk_freq_controller_boardobj_set {
427 struct nv_pmu_boardobj super;
428 u8 controller_id;
429 u8 parts_freq_mode;
430 bool bdisable;
431 u32 clk_domain;
432 s16 freq_cap_noise_unaware_vmin_above;
433 s16 freq_cap_noise_unaware_vmin_below;
434 s16 freq_hyst_pos_mhz;
435 s16 freq_hyst_neg_mhz;
436};
437
438struct nv_pmu_clk_clk_freq_controller_pi_boardobj_set {
439 struct nv_pmu_clk_clk_freq_controller_boardobj_set super;
440 s32 prop_gain;
441 s32 integ_gain;
442 s32 integ_decay;
443 s32 volt_delta_min;
444 s32 volt_delta_max;
445 u8 slowdown_pct_min;
446 bool bpoison;
447};
448
449union nv_pmu_clk_clk_freq_controller_boardobj_set_union {
450 struct nv_pmu_boardobj board_obj;
451 struct nv_pmu_clk_clk_freq_controller_boardobj_set super;
452 struct nv_pmu_clk_clk_freq_controller_pi_boardobj_set pi;
453};
454
455NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(clk, clk_freq_controller);
456
457#define NV_NV_PMU_CLK_LOAD_FEATURE_FREQ_EFFECTIVE_AVG (0x00000004)
458#define NV_NV_PMU_CLK_LOAD_ACTION_MASK_FREQ_EFFECTIVE_AVG_CALLBACK_NO (0x00000000)
459#define NV_NV_PMU_CLK_LOAD_ACTION_MASK_FREQ_EFFECTIVE_AVG_CALLBACK_YES (0x00000004)
460
461/* CLK CMD ID definitions. */
462#define NV_PMU_CLK_CMD_ID_BOARDOBJ_GRP_SET (0x00000001)
463#define NV_PMU_CLK_CMD_ID_RPC (0x00000000)
464#define NV_PMU_CLK_CMD_ID_BOARDOBJ_GRP_GET_STATUS (0x00000002)
465
466#define NV_PMU_CLK_RPC_ID_LOAD (0x00000001)
467#define NV_PMU_CLK_RPC_ID_CLK_VF_CHANGE_INJECT (0x00000000)
468#define NV_PMU_CLK_RPC_ID_CLK_FREQ_EFF_AVG (0x00000002)
469
470struct nv_pmu_clk_cmd_rpc {
471 u8 cmd_type;
472 u8 pad[3];
473 struct nv_pmu_allocation request;
474};
475
476struct nv_pmu_clk_cmd_generic {
477 u8 cmd_type;
478 bool b_perf_daemon_cmd;
479 u8 pad[2];
480};
481
482#define NV_PMU_CLK_CMD_RPC_ALLOC_OFFSET \
483 (offsetof(struct nv_pmu_clk_cmd_rpc, request))
484
485struct nv_pmu_clk_cmd {
486 union {
487 u8 cmd_type;
488 struct nv_pmu_boardobj_cmd_grp grp_set;
489 struct nv_pmu_clk_cmd_generic generic;
490 struct nv_pmu_clk_cmd_rpc rpc;
491 struct nv_pmu_boardobj_cmd_grp grp_get_status;
492 };
493};
494
495struct nv_pmu_clk_rpc {
496 u8 function;
497 bool b_supported;
498 bool b_success;
499 flcn_status flcn_status;
500 union {
501 struct nv_pmu_clk_vf_change_inject clk_vf_change_inject;
502 struct nv_pmu_clk_vf_change_inject_v1 clk_vf_change_inject_v1;
503 struct nv_pmu_clk_load clk_load;
504 struct nv_pmu_clk_freq_effective_avg clk_freq_effective_avg;
505 } params;
506};
507
508/* CLK MSG ID definitions */
509#define NV_PMU_CLK_MSG_ID_BOARDOBJ_GRP_SET (0x00000001)
510#define NV_PMU_CLK_MSG_ID_RPC (0x00000000)
511#define NV_PMU_CLK_MSG_ID_BOARDOBJ_GRP_GET_STATUS (0x00000002)
512
513struct nv_pmu_clk_msg_rpc {
514 u8 msg_type;
515 u8 rsvd[3];
516 struct nv_pmu_allocation response;
517};
518
519#define NV_PMU_CLK_MSG_RPC_ALLOC_OFFSET \
520 offsetof(struct nv_pmu_clk_msg_rpc, response)
521
522struct nv_pmu_clk_msg {
523 union {
524 u8 msg_type;
525 struct nv_pmu_boardobj_msg_grp grp_set;
526 struct nv_pmu_clk_msg_rpc rpc;
527 struct nv_pmu_boardobj_msg_grp grp_get_status;
528 };
529};
530
531struct nv_pmu_clk_clk_vin_device_boardobjgrp_get_status_header {
532 struct nv_pmu_boardobjgrp_e32 super;
533};
534
535struct nv_pmu_clk_clk_vin_device_boardobj_get_status {
536 struct nv_pmu_boardobj_query super;
537 u32 actual_voltage_uv;
538 u32 corrected_voltage_uv;
539 u8 sampled_code;
540 u8 override_code;
541};
542
543union nv_pmu_clk_clk_vin_device_boardobj_get_status_union {
544 struct nv_pmu_boardobj_query board_obj;
545 struct nv_pmu_clk_clk_vin_device_boardobj_get_status super;
546};
547
548NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(clk, clk_vin_device);
549
550struct nv_pmu_clk_lut_vf_entry {
551 u32 entry;
552};
553
554struct nv_pmu_clk_clk_fll_device_boardobjgrp_get_status_header {
555 struct nv_pmu_boardobjgrp_e32 super;
556};
557
558struct nv_pmu_clk_clk_fll_device_boardobj_get_status {
559 struct nv_pmu_boardobj_query super;
560 u8 current_regime_id;
561 bool b_dvco_min_reached;
562 u16 min_freq_mhz;
563 struct nv_pmu_clk_lut_vf_entry lut_vf_curve[NV_UNSIGNED_ROUNDED_DIV(CTRL_CLK_LUT_NUM_ENTRIES_MAX, 2)];
564};
565
566union nv_pmu_clk_clk_fll_device_boardobj_get_status_union {
567 struct nv_pmu_boardobj_query board_obj;
568 struct nv_pmu_clk_clk_fll_device_boardobj_get_status super;
569};
570
571NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(clk, clk_fll_device);
572
573#endif /*NVGPU_PMUIF_GPMUIFCLK_H*/
diff --git a/include/nvgpu/pmuif/gpmuifperf.h b/include/nvgpu/pmuif/gpmuifperf.h
deleted file mode 100644
index 70b93e1..0000000
--- a/include/nvgpu/pmuif/gpmuifperf.h
+++ /dev/null
@@ -1,154 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIFPERF_H
23#define NVGPU_PMUIF_GPMUIFPERF_H
24
25#include "gpmuifvolt.h"
26#include "gpmuifperfvfe.h"
27
28/*
29* Enumeration of BOARDOBJGRP class IDs within OBJPERF. Used as "classId"
30* argument for communications between Kernel and PMU via the various generic
31* BOARDOBJGRP interfaces.
32*/
33#define NV_PMU_PERF_BOARDOBJGRP_CLASS_ID_VFE_VAR 0x00U
34#define NV_PMU_PERF_BOARDOBJGRP_CLASS_ID_VFE_EQU 0x01U
35
36#define NV_PMU_PERF_CMD_ID_RPC (0x00000002U)
37#define NV_PMU_PERF_CMD_ID_BOARDOBJ_GRP_SET (0x00000003U)
38#define NV_PMU_PERF_CMD_ID_BOARDOBJ_GRP_GET_STATUS (0x00000004U)
39
40/*!
41 * RPC calls serviced by PERF unit.
42 */
43#define NV_PMU_RPC_ID_PERF_BOARD_OBJ_GRP_CMD 0x00U
44#define NV_PMU_RPC_ID_PERF_LOAD 0x01U
45#define NV_PMU_RPC_ID_PERF_CHANGE_SEQ_INFO_GET 0x02U
46#define NV_PMU_RPC_ID_PERF_CHANGE_SEQ_INFO_SET 0x03U
47#define NV_PMU_RPC_ID_PERF_CHANGE_SEQ_SET_CONTROL 0x04U
48#define NV_PMU_RPC_ID_PERF_CHANGE_SEQ_QUEUE_CHANGE 0x05U
49#define NV_PMU_RPC_ID_PERF_CHANGE_SEQ_LOCK 0x06U
50#define NV_PMU_RPC_ID_PERF_CHANGE_SEQ_LOAD 0x07U
51#define NV_PMU_RPC_ID_PERF_CHANGE_SEQ_QUERY 0x08U
52#define NV_PMU_RPC_ID_PERF_PERF_LIMITS_INVALIDATE 0x09U
53#define NV_PMU_RPC_ID_PERF_VFE_EQU_EVAL 0x0AU
54#define NV_PMU_RPC_ID_PERF_VFE_INVALIDATE 0x0BU
55#define NV_PMU_RPC_ID_PERF_VFE_EQU_MONITOR_SET 0x0CU
56#define NV_PMU_RPC_ID_PERF_VFE_EQU_MONITOR_GET 0x0DU
57#define NV_PMU_RPC_ID_PERF__COUNT 0x0EU
58/*
59 * Defines the structure that holds data
60 * used to execute LOAD RPC.
61 */
62struct nv_pmu_rpc_struct_perf_load {
63 /*[IN/OUT] Must be first field in RPC structure */
64 struct nv_pmu_rpc_header hdr;
65 u32 scratch[1];
66};
67
68struct nv_pmu_perf_cmd_set_object {
69 u8 cmd_type;
70 u8 pad[2];
71 u8 object_type;
72 struct nv_pmu_allocation object;
73};
74
75#define NV_PMU_PERF_SET_OBJECT_ALLOC_OFFSET \
76 (offsetof(struct nv_pmu_perf_cmd_set_object, object))
77
78/* RPC IDs */
79#define NV_PMU_PERF_RPC_ID_VFE_LOAD (0x00000001U)
80
81/*!
82* Command requesting execution of the perf RPC.
83*/
84struct nv_pmu_perf_cmd_rpc {
85 u8 cmd_type;
86 u8 pad[3];
87 struct nv_pmu_allocation request;
88};
89
90#define NV_PMU_PERF_CMD_RPC_ALLOC_OFFSET \
91 offsetof(struct nv_pmu_perf_cmd_rpc, request)
92
93/*!
94* Simply a union of all specific PERF commands. Forms the general packet
95* exchanged between the Kernel and PMU when sending and receiving PERF commands
96* (respectively).
97*/
98struct nv_pmu_perf_cmd {
99 union {
100 u8 cmd_type;
101 struct nv_pmu_perf_cmd_set_object set_object;
102 struct nv_pmu_boardobj_cmd_grp grp_set;
103 struct nv_pmu_boardobj_cmd_grp grp_get_status;
104 };
105};
106
107/*!
108* Defines the data structure used to invoke PMU perf RPCs. Same structure is
109* used to return the result of the RPC execution.
110*/
111struct nv_pmu_perf_rpc {
112 u8 function;
113 bool b_supported;
114 bool b_success;
115 flcn_status flcn_status;
116 union {
117 struct nv_pmu_perf_rpc_vfe_equ_eval vfe_equ_eval;
118 struct nv_pmu_perf_rpc_vfe_load vfe_load;
119 } params;
120};
121
122
123/* PERF Message-type Definitions */
124#define NV_PMU_PERF_MSG_ID_RPC (0x00000003U)
125#define NV_PMU_PERF_MSG_ID_BOARDOBJ_GRP_SET (0x00000004U)
126#define NV_PMU_PERF_MSG_ID_BOARDOBJ_GRP_GET_STATUS (0x00000006U)
127#define NV_PMU_PERF_MSG_ID_VFE_CALLBACK (0x00000005U)
128
129/*!
130* Message carrying the result of the perf RPC execution.
131*/
132struct nv_pmu_perf_msg_rpc {
133 u8 msg_type;
134 u8 rsvd[3];
135 struct nv_pmu_allocation response;
136};
137
138#define NV_PMU_PERF_MSG_RPC_ALLOC_OFFSET \
139 (offsetof(struct nv_pmu_perf_msg_rpc, response))
140
141/*!
142* Simply a union of all specific PERF messages. Forms the general packet
143* exchanged between the Kernel and PMU when sending and receiving PERF messages
144* (respectively).
145*/
146struct nv_pmu_perf_msg {
147 union {
148 u8 msg_type;
149 struct nv_pmu_perf_msg_rpc rpc;
150 struct nv_pmu_boardobj_msg_grp grp_set;
151 };
152};
153
154#endif /* NVGPU_PMUIF_GPMUIFPERF_H*/
diff --git a/include/nvgpu/pmuif/gpmuifperfvfe.h b/include/nvgpu/pmuif/gpmuifperfvfe.h
deleted file mode 100644
index d128c32..0000000
--- a/include/nvgpu/pmuif/gpmuifperfvfe.h
+++ /dev/null
@@ -1,206 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_GPMUIFPERFVFE_H
23#define NVGPU_PMUIF_GPMUIFPERFVFE_H
24
25#include "gpmuifbios.h"
26#include "gpmuifboardobj.h"
27#include "ctrl/ctrlperf.h"
28
29#define CTRL_PERF_VFE_EQU_QUADRATIC_COEFF_COUNT 0x03
30#define NV_PMU_PERF_RPC_VFE_EQU_EVAL_VAR_COUNT_MAX 2
31#define NV_PMU_PERF_RPC_VFE_EQU_MONITOR_COUNT_MAX 16
32
33struct nv_pmu_perf_vfe_var_value {
34 u8 var_type;
35 u8 reserved[3];
36 u32 var_value;
37};
38
39union nv_pmu_perf_vfe_equ_result {
40 u32 freq_m_hz;
41 u32 voltu_v;
42 u32 vf_gain;
43 int volt_deltau_v;
44};
45
46struct nv_pmu_perf_rpc_vfe_equ_eval {
47 u8 equ_idx;
48 u8 var_count;
49 u8 output_type;
50 struct nv_pmu_perf_vfe_var_value var_values[
51 NV_PMU_PERF_RPC_VFE_EQU_EVAL_VAR_COUNT_MAX];
52 union nv_pmu_perf_vfe_equ_result result;
53};
54
55struct nv_pmu_perf_rpc_vfe_load {
56 bool b_load;
57};
58
59struct nv_pmu_perf_vfe_var_boardobjgrp_get_status_header {
60 struct nv_pmu_boardobjgrp_e32 super;
61};
62
63struct nv_pmu_perf_vfe_var_get_status_super {
64 struct nv_pmu_boardobj_query board_obj;
65};
66
67struct nv_pmu_perf_vfe_var_single_sensed_fuse_get_status {
68 struct nv_pmu_perf_vfe_var_get_status_super super;
69 struct ctrl_perf_vfe_var_single_sensed_fuse_value fuse_value_integer;
70 struct ctrl_perf_vfe_var_single_sensed_fuse_value fuse_value_hw_integer;
71 u8 fuse_version;
72 bool b_version_check_failed;
73};
74
75union nv_pmu_perf_vfe_var_boardobj_get_status_union {
76 struct nv_pmu_boardobj_query board_obj;
77 struct nv_pmu_perf_vfe_var_get_status_super super;
78 struct nv_pmu_perf_vfe_var_single_sensed_fuse_get_status fuse_status;
79};
80
81NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(perf, vfe_var);
82
83struct nv_pmu_vfe_var {
84 struct nv_pmu_boardobj super;
85 u32 out_range_min;
86 u32 out_range_max;
87 struct ctrl_boardobjgrp_mask_e32 mask_dependent_vars;
88 struct ctrl_boardobjgrp_mask_e255 mask_dependent_equs;
89};
90
91struct nv_pmu_vfe_var_derived {
92 struct nv_pmu_vfe_var super;
93};
94
95struct nv_pmu_vfe_var_derived_product {
96 struct nv_pmu_vfe_var_derived super;
97 u8 var_idx0;
98 u8 var_idx1;
99};
100
101struct nv_pmu_vfe_var_derived_sum {
102 struct nv_pmu_vfe_var_derived super;
103 u8 var_idx0;
104 u8 var_idx1;
105};
106
107struct nv_pmu_vfe_var_single {
108 struct nv_pmu_vfe_var super;
109 u8 override_type;
110 u32 override_value;
111};
112
113struct nv_pmu_vfe_var_single_frequency {
114 struct nv_pmu_vfe_var_single super;
115};
116
117struct nv_pmu_vfe_var_single_sensed {
118 struct nv_pmu_vfe_var_single super;
119};
120
121struct nv_pmu_vfe_var_single_sensed_fuse {
122 struct nv_pmu_vfe_var_single_sensed super;
123 struct ctrl_perf_vfe_var_single_sensed_fuse_override_info override_info;
124 struct ctrl_perf_vfe_var_single_sensed_fuse_vfield_info vfield_info;
125 struct ctrl_perf_vfe_var_single_sensed_fuse_ver_vfield_info vfield_ver_info;
126 struct ctrl_perf_vfe_var_single_sensed_fuse_value fuse_val_default;
127 bool b_fuse_value_signed;
128};
129
130struct nv_pmu_vfe_var_single_sensed_temp {
131 struct nv_pmu_vfe_var_single_sensed super;
132 u8 therm_channel_index;
133 int temp_hysteresis_positive;
134 int temp_hysteresis_negative;
135 int temp_default;
136};
137
138struct nv_pmu_vfe_var_single_voltage {
139 struct nv_pmu_vfe_var_single super;
140};
141
142struct nv_pmu_perf_vfe_var_boardobjgrp_set_header {
143 struct nv_pmu_boardobjgrp_e32 super;
144 u8 polling_periodms;
145};
146
147union nv_pmu_perf_vfe_var_boardobj_set_union {
148 struct nv_pmu_boardobj board_obj;
149 struct nv_pmu_vfe_var var;
150 struct nv_pmu_vfe_var_derived var_derived;
151 struct nv_pmu_vfe_var_derived_product var_derived_product;
152 struct nv_pmu_vfe_var_derived_sum var_derived_sum;
153 struct nv_pmu_vfe_var_single var_single;
154 struct nv_pmu_vfe_var_single_frequency var_single_frequiency;
155 struct nv_pmu_vfe_var_single_sensed var_single_sensed;
156 struct nv_pmu_vfe_var_single_sensed_fuse var_single_sensed_fuse;
157 struct nv_pmu_vfe_var_single_sensed_temp var_single_sensed_temp;
158 struct nv_pmu_vfe_var_single_voltage var_single_voltage;
159};
160
161NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(perf, vfe_var);
162
163struct nv_pmu_vfe_equ {
164 struct nv_pmu_boardobj super;
165 u8 var_idx;
166 u8 equ_idx_next;
167 u8 output_type;
168 u32 out_range_min;
169 u32 out_range_max;
170};
171
172struct nv_pmu_vfe_equ_compare {
173 struct nv_pmu_vfe_equ super;
174 u8 func_id;
175 u8 equ_idx_true;
176 u8 equ_idx_false;
177 u32 criteria;
178};
179
180struct nv_pmu_vfe_equ_minmax {
181 struct nv_pmu_vfe_equ super;
182 bool b_max;
183 u8 equ_idx0;
184 u8 equ_idx1;
185};
186
187struct nv_pmu_vfe_equ_quadratic {
188 struct nv_pmu_vfe_equ super;
189 u32 coeffs[CTRL_PERF_VFE_EQU_QUADRATIC_COEFF_COUNT];
190};
191
192struct nv_pmu_perf_vfe_equ_boardobjgrp_set_header {
193 struct nv_pmu_boardobjgrp_e255 super;
194};
195
196union nv_pmu_perf_vfe_equ_boardobj_set_union {
197 struct nv_pmu_boardobj board_obj;
198 struct nv_pmu_vfe_equ equ;
199 struct nv_pmu_vfe_equ_compare equ_comapre;
200 struct nv_pmu_vfe_equ_minmax equ_minmax;
201 struct nv_pmu_vfe_equ_quadratic equ_quadratic;
202};
203
204NV_PMU_BOARDOBJ_GRP_SET_MAKE_E255(perf, vfe_equ);
205
206#endif /* NVGPU_PMUIF_GPMUIFPERFVFE_H*/
diff --git a/include/nvgpu/pmuif/gpmuifpmgr.h b/include/nvgpu/pmuif/gpmuifpmgr.h
deleted file mode 100644
index a0e6c82..0000000
--- a/include/nvgpu/pmuif/gpmuifpmgr.h
+++ /dev/null
@@ -1,443 +0,0 @@
1/*
2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3*
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21*/
22
23#ifndef NVGPU_PMUIF_GPMUIFPMGR_H
24#define NVGPU_PMUIF_GPMUIFPMGR_H
25
26#include "ctrl/ctrlpmgr.h"
27#include "gpmuifboardobj.h"
28#include <nvgpu/flcnif_cmn.h>
29
30struct nv_pmu_pmgr_i2c_device_desc {
31 struct nv_pmu_boardobj super;
32 u8 dcb_index;
33 u16 i2c_address;
34 u32 i2c_flags;
35 u8 i2c_port;
36};
37
38#define NV_PMU_PMGR_I2C_DEVICE_DESC_TABLE_MAX_DEVICES (32U)
39
40struct nv_pmu_pmgr_i2c_device_desc_table {
41 u32 dev_mask;
42 struct nv_pmu_pmgr_i2c_device_desc
43 devices[NV_PMU_PMGR_I2C_DEVICE_DESC_TABLE_MAX_DEVICES];
44};
45
46struct nv_pmu_pmgr_pwr_device_desc {
47 struct nv_pmu_boardobj super;
48 u32 power_corr_factor;
49};
50
51#define NV_PMU_PMGR_PWR_DEVICE_INA3221_CH_NUM 0x03U
52
53struct nv_pmu_pmgr_pwr_device_desc_ina3221 {
54 struct nv_pmu_pmgr_pwr_device_desc super;
55 u8 i2c_dev_idx;
56 struct ctrl_pmgr_pwr_device_info_rshunt
57 r_shuntm_ohm[NV_PMU_PMGR_PWR_DEVICE_INA3221_CH_NUM];
58 u16 configuration;
59 u16 mask_enable;
60 u32 event_mask;
61 u16 curr_correct_m;
62 s16 curr_correct_b;
63};
64
65union nv_pmu_pmgr_pwr_device_desc_union {
66 struct nv_pmu_boardobj board_obj;
67 struct nv_pmu_pmgr_pwr_device_desc pwr_dev;
68 struct nv_pmu_pmgr_pwr_device_desc_ina3221 ina3221;
69};
70
71struct nv_pmu_pmgr_pwr_device_ba_info {
72 bool b_initialized_and_used;
73};
74
75struct nv_pmu_pmgr_pwr_device_desc_table_header {
76 struct nv_pmu_boardobjgrp_e32 super;
77 struct nv_pmu_pmgr_pwr_device_ba_info ba_info;
78};
79
80NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_pmgr_pwr_device_desc_table_header,
81 sizeof(struct nv_pmu_pmgr_pwr_device_desc_table_header));
82NV_PMU_MAKE_ALIGNED_UNION(nv_pmu_pmgr_pwr_device_desc_union,
83 sizeof(union nv_pmu_pmgr_pwr_device_desc_union));
84
85struct nv_pmu_pmgr_pwr_device_desc_table {
86 union nv_pmu_pmgr_pwr_device_desc_table_header_aligned hdr;
87 union nv_pmu_pmgr_pwr_device_desc_union_aligned
88 devices[CTRL_PMGR_PWR_DEVICES_MAX_DEVICES];
89};
90
91union nv_pmu_pmgr_pwr_device_dmem_size {
92 union nv_pmu_pmgr_pwr_device_desc_table_header_aligned pwr_device_hdr;
93 union nv_pmu_pmgr_pwr_device_desc_union_aligned pwr_device;
94};
95
96struct nv_pmu_pmgr_pwr_channel {
97 struct nv_pmu_boardobj super;
98 u8 pwr_rail;
99 u8 ch_idx;
100 u32 volt_fixedu_v;
101 u32 pwr_corr_slope;
102 s32 pwr_corr_offsetm_w;
103 u32 curr_corr_slope;
104 s32 curr_corr_offsetm_a;
105 u32 dependent_ch_mask;
106};
107
108#define NV_PMU_PMGR_PWR_CHANNEL_MAX_CHANNELS 16U
109
110#define NV_PMU_PMGR_PWR_CHANNEL_MAX_CHRELATIONSHIPS 16U
111
112struct nv_pmu_pmgr_pwr_channel_sensor {
113 struct nv_pmu_pmgr_pwr_channel super;
114 u8 pwr_dev_idx;
115 u8 pwr_dev_prov_idx;
116};
117
118struct nv_pmu_pmgr_pwr_channel_pmu_compactible {
119 u8 pmu_compactible_data[56];
120};
121
122union nv_pmu_pmgr_pwr_channel_union {
123 struct nv_pmu_boardobj board_obj;
124 struct nv_pmu_pmgr_pwr_channel pwr_channel;
125 struct nv_pmu_pmgr_pwr_channel_sensor sensor;
126 struct nv_pmu_pmgr_pwr_channel_pmu_compactible pmu_pwr_channel;
127};
128
129#define NV_PMU_PMGR_PWR_MONITOR_TYPE_NO_POLLING 0x02U
130
131struct nv_pmu_pmgr_pwr_monitor_pstate {
132 u32 hw_channel_mask;
133};
134
135union nv_pmu_pmgr_pwr_monitor_type_specific {
136 struct nv_pmu_pmgr_pwr_monitor_pstate pstate;
137};
138
139struct nv_pmu_pmgr_pwr_chrelationship_pmu_compactible {
140 u8 pmu_compactible_data[28];
141};
142
143union nv_pmu_pmgr_pwr_chrelationship_union {
144 struct nv_pmu_boardobj board_obj;
145 struct nv_pmu_pmgr_pwr_chrelationship_pmu_compactible pmu_pwr_chrelationship;
146};
147
148struct nv_pmu_pmgr_pwr_channel_header {
149 struct nv_pmu_boardobjgrp_e32 super;
150 u8 type;
151 union nv_pmu_pmgr_pwr_monitor_type_specific type_specific;
152 u8 sample_count;
153 u16 sampling_periodms;
154 u16 sampling_period_low_powerms;
155 u32 total_gpu_power_channel_mask;
156 u32 physical_channel_mask;
157};
158
159struct nv_pmu_pmgr_pwr_chrelationship_header {
160 struct nv_pmu_boardobjgrp_e32 super;
161};
162
163NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_pmgr_pwr_channel_header,
164 sizeof(struct nv_pmu_pmgr_pwr_channel_header));
165NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_pmgr_pwr_chrelationship_header,
166 sizeof(struct nv_pmu_pmgr_pwr_chrelationship_header));
167NV_PMU_MAKE_ALIGNED_UNION(nv_pmu_pmgr_pwr_chrelationship_union,
168 sizeof(union nv_pmu_pmgr_pwr_chrelationship_union));
169NV_PMU_MAKE_ALIGNED_UNION(nv_pmu_pmgr_pwr_channel_union,
170 sizeof(union nv_pmu_pmgr_pwr_channel_union));
171
172struct nv_pmu_pmgr_pwr_channel_desc {
173 union nv_pmu_pmgr_pwr_channel_header_aligned hdr;
174 union nv_pmu_pmgr_pwr_channel_union_aligned
175 channels[NV_PMU_PMGR_PWR_CHANNEL_MAX_CHANNELS];
176};
177
178struct nv_pmu_pmgr_pwr_chrelationship_desc {
179 union nv_pmu_pmgr_pwr_chrelationship_header_aligned hdr;
180 union nv_pmu_pmgr_pwr_chrelationship_union_aligned
181 ch_rels[NV_PMU_PMGR_PWR_CHANNEL_MAX_CHRELATIONSHIPS];
182};
183
184union nv_pmu_pmgr_pwr_monitor_dmem_size {
185 union nv_pmu_pmgr_pwr_channel_header_aligned channel_hdr;
186 union nv_pmu_pmgr_pwr_channel_union_aligned channel;
187 union nv_pmu_pmgr_pwr_chrelationship_header_aligned ch_rels_hdr;
188 union nv_pmu_pmgr_pwr_chrelationship_union_aligned ch_rels;
189};
190
191struct nv_pmu_pmgr_pwr_monitor_pack {
192 struct nv_pmu_pmgr_pwr_channel_desc channels;
193 struct nv_pmu_pmgr_pwr_chrelationship_desc ch_rels;
194};
195
196#define NV_PMU_PMGR_PWR_POLICY_MAX_POLICIES 32U
197
198#define NV_PMU_PMGR_PWR_POLICY_MAX_POLICY_RELATIONSHIPS 32U
199
200struct nv_pmu_pmgr_pwr_policy {
201 struct nv_pmu_boardobj super;
202 u8 ch_idx;
203 u8 num_limit_inputs;
204 u8 limit_unit;
205 u8 sample_mult;
206 u32 limit_curr;
207 u32 limit_min;
208 u32 limit_max;
209 struct ctrl_pmgr_pwr_policy_info_integral integral;
210 enum ctrl_pmgr_pwr_policy_filter_type filter_type;
211 union ctrl_pmgr_pwr_policy_filter_param filter_param;
212};
213
214struct nv_pmu_pmgr_pwr_policy_hw_threshold {
215 struct nv_pmu_pmgr_pwr_policy super;
216 u8 threshold_idx;
217 u8 low_threshold_idx;
218 bool b_use_low_threshold;
219 u16 low_threshold_value;
220};
221
222struct nv_pmu_pmgr_pwr_policy_sw_threshold {
223 struct nv_pmu_pmgr_pwr_policy super;
224 u8 threshold_idx;
225 u8 low_threshold_idx;
226 bool b_use_low_threshold;
227 u16 low_threshold_value;
228 u8 event_id;
229};
230
231struct nv_pmu_pmgr_pwr_policy_pmu_compactible {
232 u8 pmu_compactible_data[68];
233};
234
235union nv_pmu_pmgr_pwr_policy_union {
236 struct nv_pmu_boardobj board_obj;
237 struct nv_pmu_pmgr_pwr_policy pwr_policy;
238 struct nv_pmu_pmgr_pwr_policy_hw_threshold hw_threshold;
239 struct nv_pmu_pmgr_pwr_policy_sw_threshold sw_threshold;
240 struct nv_pmu_pmgr_pwr_policy_pmu_compactible pmu_pwr_policy;
241};
242
243struct nv_pmu_pmgr_pwr_policy_relationship_pmu_compactible {
244 u8 pmu_compactible_data[24];
245};
246
247union nv_pmu_pmgr_pwr_policy_relationship_union {
248 struct nv_pmu_boardobj board_obj;
249 struct nv_pmu_pmgr_pwr_policy_relationship_pmu_compactible pmu_pwr_relationship;
250};
251
252struct nv_pmu_pmgr_pwr_violation_pmu_compactible {
253 u8 pmu_compactible_data[16];
254};
255
256union nv_pmu_pmgr_pwr_violation_union {
257 struct nv_pmu_boardobj board_obj;
258 struct nv_pmu_pmgr_pwr_violation_pmu_compactible violation;
259};
260
261#define NV_PMU_PMGR_PWR_POLICY_DESC_TABLE_VERSION_3X 0x30U
262
263NV_PMU_MAKE_ALIGNED_UNION(nv_pmu_pmgr_pwr_policy_union,
264 sizeof(union nv_pmu_pmgr_pwr_policy_union));
265NV_PMU_MAKE_ALIGNED_UNION(nv_pmu_pmgr_pwr_policy_relationship_union,
266 sizeof(union nv_pmu_pmgr_pwr_policy_relationship_union));
267
268#define NV_PMU_PERF_DOMAIN_GROUP_MAX_GROUPS 2U
269
270struct nv_pmu_perf_domain_group_limits
271{
272 u32 values[NV_PMU_PERF_DOMAIN_GROUP_MAX_GROUPS];
273} ;
274
275#define NV_PMU_PMGR_RESERVED_PWR_POLICY_MASK_COUNT 0x6U
276
277struct nv_pmu_pmgr_pwr_policy_desc_header {
278 struct nv_pmu_boardobjgrp_e32 super;
279 u8 version;
280 bool b_enabled;
281 u8 low_sampling_mult;
282 u8 semantic_policy_tbl[CTRL_PMGR_PWR_POLICY_IDX_NUM_INDEXES];
283 u16 base_sample_period;
284 u16 min_client_sample_period;
285 u32 reserved_pmu_policy_mask[NV_PMU_PMGR_RESERVED_PWR_POLICY_MASK_COUNT];
286 struct nv_pmu_perf_domain_group_limits global_ceiling;
287};
288
289NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_pmgr_pwr_policy_desc_header ,
290 sizeof(struct nv_pmu_pmgr_pwr_policy_desc_header ));
291
292struct nv_pmu_pmgr_pwr_policyrel_desc_header {
293 struct nv_pmu_boardobjgrp_e32 super;
294};
295
296NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_pmgr_pwr_policyrel_desc_header,
297 sizeof(struct nv_pmu_pmgr_pwr_policyrel_desc_header));
298
299struct nv_pmu_pmgr_pwr_violation_desc_header {
300 struct nv_pmu_boardobjgrp_e32 super;
301};
302
303NV_PMU_MAKE_ALIGNED_STRUCT(nv_pmu_pmgr_pwr_violation_desc_header,
304 sizeof(struct nv_pmu_pmgr_pwr_violation_desc_header));
305NV_PMU_MAKE_ALIGNED_UNION(nv_pmu_pmgr_pwr_violation_union,
306 sizeof(union nv_pmu_pmgr_pwr_violation_union));
307
308struct nv_pmu_pmgr_pwr_policy_desc {
309 union nv_pmu_pmgr_pwr_policy_desc_header_aligned hdr;
310 union nv_pmu_pmgr_pwr_policy_union_aligned
311 policies[NV_PMU_PMGR_PWR_POLICY_MAX_POLICIES];
312};
313
314struct nv_pmu_pmgr_pwr_policyrel_desc {
315 union nv_pmu_pmgr_pwr_policyrel_desc_header_aligned hdr;
316 union nv_pmu_pmgr_pwr_policy_relationship_union_aligned
317 policy_rels[NV_PMU_PMGR_PWR_POLICY_MAX_POLICY_RELATIONSHIPS];
318};
319
320struct nv_pmu_pmgr_pwr_violation_desc {
321 union nv_pmu_pmgr_pwr_violation_desc_header_aligned hdr;
322 union nv_pmu_pmgr_pwr_violation_union_aligned
323 violations[CTRL_PMGR_PWR_VIOLATION_MAX];
324};
325
326union nv_pmu_pmgr_pwr_policy_dmem_size {
327 union nv_pmu_pmgr_pwr_policy_desc_header_aligned policy_hdr;
328 union nv_pmu_pmgr_pwr_policy_union_aligned policy;
329 union nv_pmu_pmgr_pwr_policyrel_desc_header_aligned policy_rels_hdr;
330 union nv_pmu_pmgr_pwr_policy_relationship_union_aligned policy_rels;
331 union nv_pmu_pmgr_pwr_violation_desc_header_aligned violation_hdr;
332 union nv_pmu_pmgr_pwr_violation_union_aligned violation;
333};
334
335struct nv_pmu_pmgr_pwr_policy_pack {
336 struct nv_pmu_pmgr_pwr_policy_desc policies;
337 struct nv_pmu_pmgr_pwr_policyrel_desc policy_rels;
338 struct nv_pmu_pmgr_pwr_violation_desc violations;
339};
340
341#define NV_PMU_PMGR_CMD_ID_SET_OBJECT (0x00000000U)
342
343#define NV_PMU_PMGR_MSG_ID_QUERY (0x00000002U)
344
345#define NV_PMU_PMGR_CMD_ID_PWR_DEVICES_QUERY (0x00000001U)
346
347#define NV_PMU_PMGR_CMD_ID_LOAD (0x00000006U)
348
349#define NV_PMU_PMGR_CMD_ID_UNLOAD (0x00000007U)
350
351struct nv_pmu_pmgr_cmd_set_object {
352 u8 cmd_type;
353 u8 pad[2];
354 u8 object_type;
355 struct nv_pmu_allocation object;
356};
357
358#define NV_PMU_PMGR_SET_OBJECT_ALLOC_OFFSET (0x04U)
359
360#define NV_PMU_PMGR_OBJECT_I2C_DEVICE_DESC_TABLE (0x00000000U)
361
362#define NV_PMU_PMGR_OBJECT_PWR_DEVICE_DESC_TABLE (0x00000001U)
363
364#define NV_PMU_PMGR_OBJECT_PWR_MONITOR (0x00000002U)
365
366#define NV_PMU_PMGR_OBJECT_PWR_POLICY (0x00000005U)
367
368struct nv_pmu_pmgr_pwr_devices_query_payload {
369 struct {
370 u32 powerm_w;
371 u32 voltageu_v;
372 u32 currentm_a;
373 } devices[CTRL_PMGR_PWR_DEVICES_MAX_DEVICES];
374};
375
376struct nv_pmu_pmgr_cmd_pwr_devices_query {
377 u8 cmd_type;
378 u8 pad[3];
379 u32 dev_mask;
380 struct nv_pmu_allocation payload;
381};
382
383#define NV_PMU_PMGR_PWR_DEVICES_QUERY_ALLOC_OFFSET (0x08U)
384
385struct nv_pmu_pmgr_cmd_load {
386 u8 cmd_type;
387};
388
389struct nv_pmu_pmgr_cmd_unload {
390 u8 cmd_type;
391};
392
393struct nv_pmu_pmgr_cmd {
394 union {
395 u8 cmd_type;
396 struct nv_pmu_pmgr_cmd_set_object set_object;
397 struct nv_pmu_pmgr_cmd_pwr_devices_query pwr_dev_query;
398 struct nv_pmu_pmgr_cmd_load load;
399 struct nv_pmu_pmgr_cmd_unload unload;
400 };
401};
402
403#define NV_PMU_PMGR_MSG_ID_SET_OBJECT (0x00000000U)
404
405#define NV_PMU_PMGR_MSG_ID_LOAD (0x00000004U)
406
407#define NV_PMU_PMGR_MSG_ID_UNLOAD (0x00000005U)
408
409struct nv_pmu_pmgr_msg_set_object {
410 u8 msg_type;
411 bool b_success;
412 flcn_status flcnstatus;
413 u8 object_type;
414};
415
416struct nv_pmu_pmgr_msg_query {
417 u8 msg_type;
418 bool b_success;
419 flcn_status flcnstatus;
420 u8 cmd_type;
421};
422
423struct nv_pmu_pmgr_msg_load {
424 u8 msg_type;
425 bool b_success;
426 flcn_status flcnstatus;
427};
428
429struct nv_pmu_pmgr_msg_unload {
430 u8 msg_type;
431};
432
433struct nv_pmu_pmgr_msg {
434 union {
435 u8 msg_type;
436 struct nv_pmu_pmgr_msg_set_object set_object;
437 struct nv_pmu_pmgr_msg_query query;
438 struct nv_pmu_pmgr_msg_load load;
439 struct nv_pmu_pmgr_msg_unload unload;
440 };
441};
442
443#endif /* NVGPU_PMUIF_GPMUIFPMGR_H */
diff --git a/include/nvgpu/pmuif/gpmuifseq.h b/include/nvgpu/pmuif/gpmuifseq.h
deleted file mode 100644
index af93a6e..0000000
--- a/include/nvgpu/pmuif/gpmuifseq.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3*
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21*/
22#ifndef NVGPU_PMUIF_GPMUIFSEQ_H
23#define NVGPU_PMUIF_GPMUIFSEQ_H
24
25#include <nvgpu/flcnif_cmn.h>
26
27#define PMU_UNIT_SEQ (0x02)
28
29/*!
30* @file gpmuifseq.h
31* @brief PMU Command/Message Interfaces - Sequencer
32*/
33
34/*!
35* Defines the identifiers various high-level types of sequencer commands.
36*
37* _RUN_SCRIPT @ref NV_PMU_SEQ_CMD_RUN_SCRIPT
38*/
39enum {
40 NV_PMU_SEQ_CMD_ID_RUN_SCRIPT = 0,
41};
42
43struct nv_pmu_seq_cmd_run_script {
44 u8 cmd_type;
45 u8 pad[3];
46 struct pmu_allocation_v3 script_alloc;
47 struct pmu_allocation_v3 reg_alloc;
48};
49
50#define NV_PMU_SEQ_CMD_ALLOC_OFFSET 4
51
52#define NV_PMU_SEQ_MSG_ALLOC_OFFSET \
53 (NV_PMU_SEQ_CMD_ALLOC_OFFSET + NV_PMU_CMD_ALLOC_SIZE)
54
55struct nv_pmu_seq_cmd {
56 struct pmu_hdr hdr;
57 union {
58 u8 cmd_type;
59 struct nv_pmu_seq_cmd_run_script run_script;
60 };
61};
62
63enum {
64 NV_PMU_SEQ_MSG_ID_RUN_SCRIPT = 0,
65};
66
67struct nv_pmu_seq_msg_run_script {
68 u8 msg_type;
69 u8 error_code;
70 u16 error_pc;
71 u32 timeout_stat;
72};
73
74struct nv_pmu_seq_msg {
75 struct pmu_hdr hdr;
76 union {
77 u8 msg_type;
78 struct nv_pmu_seq_msg_run_script run_script;
79 };
80};
81
82#endif /* NVGPU_PMUIF_GPMUIFSEQ_H */
diff --git a/include/nvgpu/pmuif/gpmuiftherm.h b/include/nvgpu/pmuif/gpmuiftherm.h
deleted file mode 100644
index 115e7ab..0000000
--- a/include/nvgpu/pmuif/gpmuiftherm.h
+++ /dev/null
@@ -1,102 +0,0 @@
1/*
2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3*
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21*/
22
23#ifndef NVGPU_PMUIF_GPMUIFTHERM_H
24#define NVGPU_PMUIF_GPMUIFTHERM_H
25
26#include <nvgpu/flcnif_cmn.h>
27
28#define NV_PMU_THERM_CMD_ID_RPC 0x00000002
29#define NV_PMU_THERM_MSG_ID_RPC 0x00000002
30#define NV_PMU_THERM_RPC_ID_SLCT 0x00000000
31#define NV_PMU_THERM_RPC_ID_SLCT_EVENT_TEMP_TH_SET 0x00000006
32#define NV_PMU_THERM_EVENT_THERMAL_1 0x00000004
33#define NV_PMU_THERM_CMD_ID_HW_SLOWDOWN_NOTIFICATION 0x00000001
34#define NV_RM_PMU_THERM_HW_SLOWDOWN_NOTIFICATION_REQUEST_ENABLE 0x00000001
35#define NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION 0x00000001
36
37struct nv_pmu_therm_rpc_slct_event_temp_th_set {
38 s32 temp_threshold;
39 u8 event_id;
40 flcn_status flcn_stat;
41};
42
43struct nv_pmu_therm_rpc_slct {
44 u32 mask_enabled;
45 flcn_status flcn_stat;
46};
47
48struct nv_pmu_therm_rpc {
49 u8 function;
50 bool b_supported;
51 union {
52 struct nv_pmu_therm_rpc_slct slct;
53 struct nv_pmu_therm_rpc_slct_event_temp_th_set slct_event_temp_th_set;
54 } params;
55};
56
57struct nv_pmu_therm_cmd_rpc {
58 u8 cmd_type;
59 u8 pad[3];
60 struct nv_pmu_allocation request;
61};
62
63struct nv_pmu_therm_cmd_hw_slowdown_notification {
64 u8 cmd_type;
65 u8 request;
66};
67
68#define NV_PMU_THERM_CMD_RPC_ALLOC_OFFSET \
69 offsetof(struct nv_pmu_therm_cmd_rpc, request)
70
71struct nv_pmu_therm_cmd {
72 union {
73 u8 cmd_type;
74 struct nv_pmu_therm_cmd_rpc rpc;
75 struct nv_pmu_therm_cmd_hw_slowdown_notification hw_slct_notification;
76 };
77};
78
79struct nv_pmu_therm_msg_rpc {
80 u8 msg_type;
81 u8 rsvd[3];
82 struct nv_pmu_allocation response;
83};
84
85struct nv_pmu_therm_msg_event_hw_slowdown_notification {
86 u8 msg_type;
87 u32 mask;
88};
89
90#define NV_PMU_THERM_MSG_RPC_ALLOC_OFFSET \
91 offsetof(struct nv_pmu_therm_msg_rpc, response)
92
93struct nv_pmu_therm_msg {
94 union {
95 u8 msg_type;
96 struct nv_pmu_therm_msg_rpc rpc;
97 struct nv_pmu_therm_msg_event_hw_slowdown_notification hw_slct_msg;
98 };
99};
100
101#endif /* NVGPU_PMUIF_GPMUIFTHERM_H */
102
diff --git a/include/nvgpu/pmuif/gpmuifthermsensor.h b/include/nvgpu/pmuif/gpmuifthermsensor.h
deleted file mode 100644
index 47d35da..0000000
--- a/include/nvgpu/pmuif/gpmuifthermsensor.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3*
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21*/
22
23#ifndef NVGPU_PMUIF_GPMUIFTHERMSENSOR_H
24#define NVGPU_PMUIF_GPMUIFTHERMSENSOR_H
25
26#include "ctrl/ctrltherm.h"
27#include "gpmuifboardobj.h"
28#include <nvgpu/flcnif_cmn.h>
29
30#define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_DEVICE 0x00
31#define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_CHANNEL 0x01
32
33#define NV_PMU_THERM_CMD_ID_BOARDOBJ_GRP_SET 0x0000000B
34#define NV_PMU_THERM_MSG_ID_BOARDOBJ_GRP_SET 0x00000008
35
36struct nv_pmu_therm_therm_device_boardobjgrp_set_header {
37 struct nv_pmu_boardobjgrp_e32 super;
38};
39
40struct nv_pmu_therm_therm_device_boardobj_set {
41 struct nv_pmu_boardobj super;
42};
43
44struct nv_pmu_therm_therm_device_gpu_gpc_tsosc_boardobj_set {
45 struct nv_pmu_therm_therm_device_boardobj_set super;
46 u8 gpc_tsosc_idx;
47};
48
49struct nv_pmu_therm_therm_device_gpu_sci_boardobj_set {
50 struct nv_pmu_therm_therm_device_boardobj_set super;
51};
52
53struct nv_pmu_therm_therm_device_i2c_boardobj_set {
54 struct nv_pmu_therm_therm_device_boardobj_set super;
55 u8 i2c_dev_idx;
56};
57
58struct nv_pmu_therm_therm_device_hbm2_site_boardobj_set {
59 struct nv_pmu_therm_therm_device_boardobj_set super;
60 u8 site_idx;
61};
62
63struct nv_pmu_therm_therm_device_hbm2_combined_boardobj_set {
64 struct nv_pmu_therm_therm_device_boardobj_set super;
65};
66
67union nv_pmu_therm_therm_device_boardobj_set_union {
68 struct nv_pmu_boardobj board_obj;
69 struct nv_pmu_therm_therm_device_boardobj_set therm_device;
70 struct nv_pmu_therm_therm_device_gpu_gpc_tsosc_boardobj_set gpu_gpc_tsosc;
71 struct nv_pmu_therm_therm_device_gpu_sci_boardobj_set gpu_sci;
72 struct nv_pmu_therm_therm_device_i2c_boardobj_set i2c;
73 struct nv_pmu_therm_therm_device_hbm2_site_boardobj_set hbm2_site;
74 struct nv_pmu_therm_therm_device_hbm2_combined_boardobj_set hbm2_combined;
75};
76
77NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_device);
78
79struct nv_pmu_therm_therm_channel_boardobjgrp_set_header {
80 struct nv_pmu_boardobjgrp_e32 super;
81};
82
83struct nv_pmu_therm_therm_channel_boardobj_set {
84 struct nv_pmu_boardobj super;
85 s16 scaling;
86 s16 offset;
87 s32 temp_min;
88 s32 temp_max;
89};
90
91struct nv_pmu_therm_therm_channel_device_boardobj_set {
92 struct nv_pmu_therm_therm_channel_boardobj_set super;
93 u8 therm_dev_idx;
94 u8 therm_dev_prov_idx;
95};
96
97union nv_pmu_therm_therm_channel_boardobj_set_union {
98 struct nv_pmu_boardobj board_obj;
99 struct nv_pmu_therm_therm_channel_boardobj_set therm_channel;
100 struct nv_pmu_therm_therm_channel_device_boardobj_set device;
101};
102
103NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_channel);
104
105#endif /* NVGPU_PMUIF_GPMUIFTHERMSENSOR_H */
diff --git a/include/nvgpu/pmuif/gpmuifvolt.h b/include/nvgpu/pmuif/gpmuifvolt.h
deleted file mode 100644
index 0161719..0000000
--- a/include/nvgpu/pmuif/gpmuifvolt.h
+++ /dev/null
@@ -1,402 +0,0 @@
1/*
2* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3*
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21*/
22#ifndef NVGPU_PMUIF_GPMUIFVOLT_H
23#define NVGPU_PMUIF_GPMUIFVOLT_H
24
25#include "gpmuifboardobj.h"
26#include <nvgpu/flcnif_cmn.h>
27#include "ctrl/ctrlvolt.h"
28
29#define NV_PMU_VOLT_VALUE_0V_IN_UV (0U)
30
31/* ------------- VOLT_RAIL's GRP_SET defines and structures ------------- */
32
33#define NV_PMU_VOLT_BOARDOBJGRP_CLASS_ID_VOLT_RAIL 0x00U
34#define NV_PMU_VOLT_BOARDOBJGRP_CLASS_ID_VOLT_DEVICE 0x01U
35#define NV_PMU_VOLT_BOARDOBJGRP_CLASS_ID_VOLT_POLICY 0x02U
36
37
38struct nv_pmu_volt_volt_rail_boardobjgrp_set_header {
39 struct nv_pmu_boardobjgrp_e32 super;
40};
41
42struct nv_pmu_volt_volt_rail_boardobj_set {
43
44 struct nv_pmu_boardobj super;
45 u8 rel_limit_vfe_equ_idx;
46 u8 alt_rel_limit_vfe_equ_idx;
47 u8 ov_limit_vfe_equ_idx;
48 u8 vmin_limit_vfe_equ_idx;
49 u8 volt_margin_limit_vfe_equ_idx;
50 u8 pwr_equ_idx;
51 u8 volt_dev_idx_default;
52 u8 volt_dev_idx_ipc_vmin;
53 u8 volt_scale_exp_pwr_equ_idx;
54 struct ctrl_boardobjgrp_mask_e32 volt_dev_mask;
55 s32 volt_delta_uv[CTRL_VOLT_RAIL_VOLT_DELTA_MAX_ENTRIES];
56};
57
58union nv_pmu_volt_volt_rail_boardobj_set_union {
59 struct nv_pmu_boardobj board_obj;
60 struct nv_pmu_volt_volt_rail_boardobj_set super;
61};
62
63NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(volt, volt_rail);
64
65/* ------------ VOLT_DEVICE's GRP_SET defines and structures ------------ */
66
67struct nv_pmu_volt_volt_device_boardobjgrp_set_header {
68 struct nv_pmu_boardobjgrp_e32 super;
69};
70
71struct nv_pmu_volt_volt_device_boardobj_set {
72 struct nv_pmu_boardobj super;
73 u32 switch_delay_us;
74 u32 voltage_min_uv;
75 u32 voltage_max_uv;
76 u32 volt_step_uv;
77};
78
79struct nv_pmu_volt_volt_device_vid_boardobj_set {
80 struct nv_pmu_volt_volt_device_boardobj_set super;
81 s32 voltage_base_uv;
82 s32 voltage_offset_scale_uv;
83 u8 gpio_pin[CTRL_VOLT_VOLT_DEV_VID_VSEL_MAX_ENTRIES];
84 u8 vsel_mask;
85};
86
87struct nv_pmu_volt_volt_device_pwm_boardobj_set {
88 struct nv_pmu_volt_volt_device_boardobj_set super;
89 u32 raw_period;
90 s32 voltage_base_uv;
91 s32 voltage_offset_scale_uv;
92 enum nv_pmu_pmgr_pwm_source pwm_source;
93};
94
95union nv_pmu_volt_volt_device_boardobj_set_union {
96 struct nv_pmu_boardobj board_obj;
97 struct nv_pmu_volt_volt_device_boardobj_set super;
98 struct nv_pmu_volt_volt_device_vid_boardobj_set vid;
99 struct nv_pmu_volt_volt_device_pwm_boardobj_set pwm;
100};
101
102NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(volt, volt_device);
103
104/* ------------ VOLT_POLICY's GRP_SET defines and structures ------------ */
105struct nv_pmu_volt_volt_policy_boardobjgrp_set_header {
106 struct nv_pmu_boardobjgrp_e32 super;
107 u8 perf_core_vf_seq_policy_idx;
108};
109
110struct nv_pmu_volt_volt_policy_boardobj_set {
111 struct nv_pmu_boardobj super;
112};
113struct nv_pmu_volt_volt_policy_sr_boardobj_set {
114 struct nv_pmu_volt_volt_policy_boardobj_set super;
115 u8 rail_idx;
116};
117
118struct nv_pmu_volt_volt_policy_sr_multi_step_boardobj_set {
119 struct nv_pmu_volt_volt_policy_sr_boardobj_set super;
120 u16 inter_switch_delay_us;
121 u32 ramp_up_step_size_uv;
122 u32 ramp_down_step_size_uv;
123};
124
125struct nv_pmu_volt_volt_policy_splt_r_boardobj_set {
126 struct nv_pmu_volt_volt_policy_boardobj_set super;
127 u8 rail_idx_master;
128 u8 rail_idx_slave;
129 u8 delta_min_vfe_equ_idx;
130 u8 delta_max_vfe_equ_idx;
131 s32 offset_delta_min_uv;
132 s32 offset_delta_max_uv;
133};
134
135struct nv_pmu_volt_volt_policy_srms_boardobj_set {
136 struct nv_pmu_volt_volt_policy_splt_r_boardobj_set super;
137 u16 inter_switch_delayus;
138};
139
140/* sr - > single_rail */
141struct nv_pmu_volt_volt_policy_srss_boardobj_set {
142 struct nv_pmu_volt_volt_policy_splt_r_boardobj_set super;
143};
144
145union nv_pmu_volt_volt_policy_boardobj_set_union {
146 struct nv_pmu_boardobj board_obj;
147 struct nv_pmu_volt_volt_policy_boardobj_set super;
148 struct nv_pmu_volt_volt_policy_sr_boardobj_set single_rail;
149 struct nv_pmu_volt_volt_policy_sr_multi_step_boardobj_set
150 single_rail_ms;
151 struct nv_pmu_volt_volt_policy_splt_r_boardobj_set split_rail;
152 struct nv_pmu_volt_volt_policy_srms_boardobj_set
153 split_rail_m_s;
154 struct nv_pmu_volt_volt_policy_srss_boardobj_set
155 split_rail_s_s;
156};
157
158NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(volt, volt_policy);
159
160/* ----------- VOLT_RAIL's GRP_GET_STATUS defines and structures ----------- */
161struct nv_pmu_volt_volt_rail_boardobjgrp_get_status_header {
162 struct nv_pmu_boardobjgrp_e32 super;
163};
164
165struct nv_pmu_volt_volt_rail_boardobj_get_status {
166 struct nv_pmu_boardobj_query super;
167 u32 curr_volt_defaultu_v;
168 u32 rel_limitu_v;
169 u32 alt_rel_limitu_v;
170 u32 ov_limitu_v;
171 u32 max_limitu_v;
172 u32 vmin_limitu_v;
173 s32 volt_margin_limitu_v;
174 u32 rsvd;
175};
176
177union nv_pmu_volt_volt_rail_boardobj_get_status_union {
178 struct nv_pmu_boardobj_query board_obj;
179 struct nv_pmu_volt_volt_rail_boardobj_get_status super;
180};
181
182NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(volt, volt_rail);
183
184/* ---------- VOLT_DEVICE's GRP_GET_STATUS defines and structures ---------- */
185struct nv_pmu_volt_volt_device_boardobjgrp_get_status_header {
186 struct nv_pmu_boardobjgrp_e32 super;
187};
188
189struct nv_pmu_volt_volt_device_boardobj_get_status {
190 struct nv_pmu_boardobj_query super;
191};
192
193union nv_pmu_volt_volt_device_boardobj_get_status_union {
194 struct nv_pmu_boardobj_query board_obj;
195 struct nv_pmu_volt_volt_device_boardobj_get_status super;
196};
197
198NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(volt, volt_device);
199
200/* ---------- VOLT_POLICY's GRP_GET_STATUS defines and structures ---------- */
201struct nv_pmu_volt_volt_policy_boardobjgrp_get_status_header {
202 struct nv_pmu_boardobjgrp_e32 super;
203};
204
205struct nv_pmu_volt_volt_policy_boardobj_get_status {
206 struct nv_pmu_boardobj_query super;
207 u32 offset_volt_requ_v;
208 u32 offset_volt_curru_v;
209};
210
211struct nv_pmu_volt_volt_policy_sr_boardobj_get_status {
212 struct nv_pmu_volt_volt_policy_boardobj_get_status super;
213 u32 curr_voltu_v;
214};
215
216struct nv_pmu_volt_volt_policy_splt_r_boardobj_get_status {
217 struct nv_pmu_volt_volt_policy_boardobj_get_status super;
218 s32 delta_minu_v;
219 s32 delta_maxu_v;
220 s32 orig_delta_minu_v;
221 s32 orig_delta_maxu_v;
222 u32 curr_volt_masteru_v;
223 u32 curr_volt_slaveu_v;
224 bool b_violation;
225};
226
227/* srms -> split_rail_multi_step */
228struct nv_pmu_volt_volt_policy_srms_boardobj_get_status {
229 struct nv_pmu_volt_volt_policy_splt_r_boardobj_get_status super;
230};
231
232/* srss -> split_rail_single_step */
233struct nv_pmu_volt_volt_policy_srss_boardobj_get_status {
234 struct nv_pmu_volt_volt_policy_splt_r_boardobj_get_status super;
235};
236
237union nv_pmu_volt_volt_policy_boardobj_get_status_union {
238 struct nv_pmu_boardobj_query board_obj;
239 struct nv_pmu_volt_volt_policy_boardobj_get_status super;
240 struct nv_pmu_volt_volt_policy_sr_boardobj_get_status single_rail;
241 struct nv_pmu_volt_volt_policy_splt_r_boardobj_get_status split_rail;
242 struct nv_pmu_volt_volt_policy_srms_boardobj_get_status
243 split_rail_m_s;
244 struct nv_pmu_volt_volt_policy_srss_boardobj_get_status
245 split_rail_s_s;
246};
247
248NV_PMU_BOARDOBJ_GRP_GET_STATUS_MAKE_E32(volt, volt_policy);
249
250struct nv_pmu_volt_policy_voltage_data {
251 u8 policy_idx;
252 struct ctrl_perf_volt_rail_list
253 rail_list;
254};
255
256struct nv_pmu_volt_rail_get_voltage {
257 u8 rail_idx;
258 u32 voltage_uv;
259};
260
261struct nv_pmu_volt_volt_rail_set_noise_unaware_vmin {
262 u8 num_rails;
263 struct ctrl_volt_volt_rail_list
264 rail_list;
265};
266
267#define NV_PMU_VOLT_CMD_ID_BOARDOBJ_GRP_SET (0x00000000U)
268#define NV_PMU_VOLT_CMD_ID_RPC (0x00000001U)
269#define NV_PMU_VOLT_CMD_ID_BOARDOBJ_GRP_GET_STATUS (0x00000002U)
270#define NV_PMU_VOLT_RPC_ID_VOLT_RAIL_SET_NOISE_UNAWARE_VMIN (0x00000004U)
271
272/*!
273* PMU VOLT RPC calls.
274*/
275#define NV_PMU_VOLT_RPC_ID_LOAD (0x00000000U)
276#define NV_PMU_VOLT_RPC_ID_VOLT_POLICY_SET_VOLTAGE (0x00000002U)
277#define NV_PMU_VOLT_RPC_ID_VOLT_RAIL_GET_VOLTAGE (0x00000003U)
278
279struct nv_pmu_volt_cmd_rpc {
280 u8 cmd_type;
281 u8 pad[3];
282 struct nv_pmu_allocation request;
283};
284
285#define NV_PMU_VOLT_CMD_RPC_ALLOC_OFFSET \
286 offsetof(struct nv_pmu_volt_cmd_rpc, request)
287
288struct nv_pmu_volt_cmd {
289 union {
290 u8 cmd_type;
291 struct nv_pmu_boardobj_cmd_grp grp_set;
292 struct nv_pmu_volt_cmd_rpc rpc;
293 struct nv_pmu_boardobj_cmd_grp grp_get_status;
294 };
295};
296
297struct nv_pmu_volt_rpc {
298 u8 function;
299 bool b_supported;
300 bool b_success;
301 flcn_status flcn_status;
302 union {
303 struct nv_pmu_volt_policy_voltage_data volt_policy_voltage_data;
304 struct nv_pmu_volt_rail_get_voltage volt_rail_get_voltage;
305 struct nv_pmu_volt_volt_rail_set_noise_unaware_vmin
306 volt_rail_set_noise_unaware_vmin;
307 } params;
308};
309
310/*!
311* VOLT MSG ID definitions
312*/
313#define NV_PMU_VOLT_MSG_ID_BOARDOBJ_GRP_SET (0x00000000U)
314#define NV_PMU_VOLT_MSG_ID_RPC (0x00000001U)
315#define NV_PMU_VOLT_MSG_ID_BOARDOBJ_GRP_GET_STATUS (0x00000002U)
316
317/*!
318* Message carrying the result of the VOLT RPC execution.
319*/
320struct nv_pmu_volt_msg_rpc {
321 u8 msg_type;
322 u8 rsvd[3];
323 struct nv_pmu_allocation response;
324};
325
326#define NV_PMU_VOLT_MSG_RPC_ALLOC_OFFSET \
327 offsetof(struct nv_pmu_volt_msg_rpc, response)
328
329struct nv_pmu_volt_msg {
330 union {
331 u8 msg_type;
332 struct nv_pmu_boardobj_msg_grp grp_set;
333 struct nv_pmu_volt_msg_rpc rpc;
334 struct nv_pmu_boardobj_msg_grp grp_get_status;
335 };
336};
337
338#define NV_PMU_VF_INJECT_MAX_VOLT_RAILS (2U)
339
340struct nv_pmu_volt_volt_rail_list {
341 u8 num_rails;
342 struct ctrl_perf_volt_rail_list_item
343 rails[NV_PMU_VF_INJECT_MAX_VOLT_RAILS];
344};
345
346struct nv_pmu_volt_volt_rail_list_v1 {
347 u8 num_rails;
348 struct ctrl_volt_volt_rail_list_item_v1
349 rails[NV_PMU_VF_INJECT_MAX_VOLT_RAILS];
350};
351
352/* VOLT RPC */
353#define NV_PMU_RPC_ID_VOLT_BOARD_OBJ_GRP_CMD 0x00U
354#define NV_PMU_RPC_ID_VOLT_VOLT_SET_VOLTAGE 0x01U
355#define NV_PMU_RPC_ID_VOLT_LOAD 0x02U
356#define NV_PMU_RPC_ID_VOLT_VOLT_RAIL_GET_VOLTAGE 0x03U
357#define NV_PMU_RPC_ID_VOLT_VOLT_POLICY_SANITY_CHECK 0x04U
358#define NV_PMU_RPC_ID_VOLT_TEST_EXECUTE 0x05U
359#define NV_PMU_RPC_ID_VOLT__COUNT 0x06U
360
361/*
362 * Defines the structure that holds data
363 * used to execute LOAD RPC.
364 */
365struct nv_pmu_rpc_struct_volt_load {
366 /*[IN/OUT] Must be first field in RPC structure */
367 struct nv_pmu_rpc_header hdr;
368 u32 scratch[1];
369};
370
371/*
372 * Defines the structure that holds data
373 * used to execute VOLT_SET_VOLTAGE RPC.
374 */
375struct nv_pmu_rpc_struct_volt_volt_set_voltage {
376 /*[IN/OUT] Must be first field in RPC structure */
377 struct nv_pmu_rpc_header hdr;
378 /*[IN] ID of the client that wants to set the voltage */
379 u8 client_id;
380 /*
381 * [IN] The list containing target voltage and
382 * noise-unaware Vmin value for the VOLT_RAILs.
383 */
384 struct ctrl_volt_volt_rail_list_v1 rail_list;
385 u32 scratch[1];
386};
387
388/*
389 * Defines the structure that holds data
390 * used to execute VOLT_RAIL_GET_VOLTAGE RPC.
391 */
392struct nv_pmu_rpc_struct_volt_volt_rail_get_voltage {
393 /*[IN/OUT] Must be first field in RPC structure */
394 struct nv_pmu_rpc_header hdr;
395 /* [OUT] Current voltage in uv */
396 u32 voltage_uv;
397 /* [IN] Voltage Rail Table Index */
398 u8 rail_idx;
399 u32 scratch[1];
400};
401
402#endif /* NVGPU_PMUIF_GPMUIFVOLT_H*/
diff --git a/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h b/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
deleted file mode 100644
index ce55f67..0000000
--- a/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PMUIF_NVGPU_GPMU_CMDIF_H
23#define NVGPU_PMUIF_NVGPU_GPMU_CMDIF_H
24
25#include <nvgpu/flcnif_cmn.h>
26#include "gpmuif_cmn.h"
27#include "gpmuif_pmu.h"
28#include "gpmuif_ap.h"
29#include "gpmuif_pg.h"
30#include "gpmuif_perfmon.h"
31#include "gpmuif_acr.h"
32#include "gpmuifboardobj.h"
33#include "gpmuifclk.h"
34#include "gpmuifperf.h"
35#include "gpmuifperfvfe.h"
36#include "gpmuifpmgr.h"
37#include "gpmuifvolt.h"
38#include "gpmuiftherm.h"
39#include "gpmuifthermsensor.h"
40#include "gpmuifseq.h"
41#include "gpmu_super_surf_if.h"
42
43/*
44 * Command requesting execution of the RPC (Remote Procedure Call)
45 */
46struct nv_pmu_rpc_cmd {
47 /* Must be set to @ref NV_PMU_RPC_CMD_ID */
48 u8 cmd_type;
49 /* RPC call flags (@see PMU_RPC_FLAGS) */
50 u8 flags;
51 /* Size of RPC structure allocated
52 * within NV managed DMEM heap
53 */
54 u16 rpc_dmem_size;
55 /*
56 * DMEM pointer of RPC structure allocated
57 * within RM managed DMEM heap.
58 */
59 u32 rpc_dmem_ptr;
60};
61
62#define NV_PMU_RPC_CMD_ID 0x80U
63
64/* Message carrying the result of the RPC execution */
65struct nv_pmu_rpc_msg {
66 /* Must be set to @ref NV_PMU_RPC_MSG_ID */
67 u8 msg_type;
68 /* RPC call flags (@see PMU_RPC_FLAGS)*/
69 u8 flags;
70 /*
71 * Size of RPC structure allocated
72 * within NV managed DMEM heap.
73 */
74 u16 rpc_dmem_size;
75 /*
76 * DMEM pointer of RPC structure allocated
77 * within NV managed DMEM heap.
78 */
79 u32 rpc_dmem_ptr;
80};
81
82#define NV_PMU_RPC_MSG_ID 0x80U
83
84struct pmu_cmd {
85 struct pmu_hdr hdr;
86 union {
87 struct pmu_perfmon_cmd perfmon;
88 struct pmu_pg_cmd pg;
89 struct pmu_zbc_cmd zbc;
90 struct pmu_acr_cmd acr;
91 struct nv_pmu_boardobj_cmd boardobj;
92 struct nv_pmu_perf_cmd perf;
93 struct nv_pmu_volt_cmd volt;
94 struct nv_pmu_clk_cmd clk;
95 struct nv_pmu_pmgr_cmd pmgr;
96 struct nv_pmu_therm_cmd therm;
97 struct nv_pmu_rpc_cmd rpc;
98 } cmd;
99};
100
101struct pmu_msg {
102 struct pmu_hdr hdr;
103 union {
104 struct pmu_init_msg init;
105 struct pmu_perfmon_msg perfmon;
106 struct pmu_pg_msg pg;
107 struct pmu_rc_msg rc;
108 struct pmu_acr_msg acr;
109 struct nv_pmu_boardobj_msg boardobj;
110 struct nv_pmu_perf_msg perf;
111 struct nv_pmu_volt_msg volt;
112 struct nv_pmu_clk_msg clk;
113 struct nv_pmu_pmgr_msg pmgr;
114 struct nv_pmu_therm_msg therm;
115 struct nv_pmu_rpc_msg rpc;
116 } msg;
117};
118
119#define PMU_UNIT_REWIND (0x00U)
120#define PMU_UNIT_PG (0x03U)
121#define PMU_UNIT_INIT (0x07U)
122#define PMU_UNIT_ACR (0x0AU)
123#define PMU_UNIT_PERFMON_T18X (0x11U)
124#define PMU_UNIT_PERFMON (0x12U)
125#define PMU_UNIT_PERF (0x13U)
126#define PMU_UNIT_RC (0x1FU)
127#define PMU_UNIT_FECS_MEM_OVERRIDE (0x1EU)
128#define PMU_UNIT_CLK (0x0DU)
129#define PMU_UNIT_THERM (0x14U)
130#define PMU_UNIT_PMGR (0x18U)
131#define PMU_UNIT_VOLT (0x0EU)
132
133#define PMU_UNIT_END (0x23U)
134#define PMU_UNIT_INVALID (0xFFU)
135
136#define PMU_UNIT_TEST_START (0xFEU)
137#define PMU_UNIT_END_SIM (0xFFU)
138#define PMU_UNIT_TEST_END (0xFFU)
139
140#define PMU_UNIT_ID_IS_VALID(id) \
141 (((id) < PMU_UNIT_END) || ((id) >= PMU_UNIT_TEST_START))
142
143#endif /* NVGPU_PMUIF_NVGPU_GPMU_CMDIF_H*/
diff --git a/include/nvgpu/posix/atomic.h b/include/nvgpu/posix/atomic.h
deleted file mode 100644
index c9d9212..0000000
--- a/include/nvgpu/posix/atomic.h
+++ /dev/null
@@ -1,191 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_ATOMIC_H__
24#define __NVGPU_POSIX_ATOMIC_H__
25
26#include <nvgpu/types.h>
27
28/*
29 * Note: this code uses the GCC builtins to implement atomics.
30 */
31
32#define __atomic_cmpxchg(p, v, c) __sync_val_compare_and_swap(p, v, c)
33#define __atomic_and(p, v) __sync_fetch_and_and(p, v)
34#define __atomic_or(p, v) __sync_fetch_and_or(p, v)
35
36#define cmpxchg __atomic_cmpxchg
37
38/*
39 * Place holders until real atomics can be implemented... Yay for GCC builtins!
40 * We can use those eventually to define all the Linux atomic ops.
41 *
42 * TODO: make these _actually_ atomic!
43 */
44typedef struct __nvgpu_posix_atomic {
45 int v;
46} nvgpu_atomic_t;
47
48typedef struct __nvgpu_posix_atomic64 {
49 long v;
50} nvgpu_atomic64_t;
51
52#define __nvgpu_atomic_init(i) { i }
53#define __nvgpu_atomic64_init(i) { i }
54
55static inline void __nvgpu_atomic_set(nvgpu_atomic_t *v, int i)
56{
57 v->v = i;
58}
59
60static inline int __nvgpu_atomic_read(nvgpu_atomic_t *v)
61{
62 return v->v;
63}
64
65static inline void __nvgpu_atomic_inc(nvgpu_atomic_t *v)
66{
67 v->v++;
68}
69
70static inline int __nvgpu_atomic_inc_return(nvgpu_atomic_t *v)
71{
72 v->v++;
73 return v->v;
74}
75
76static inline void __nvgpu_atomic_dec(nvgpu_atomic_t *v)
77{
78 v->v--;
79}
80
81static inline int __nvgpu_atomic_dec_return(nvgpu_atomic_t *v)
82{
83 v->v--;
84 return v->v;
85}
86
87static inline int __nvgpu_atomic_cmpxchg(nvgpu_atomic_t *v, int old, int new)
88{
89 if (v->v == old)
90 v->v = new;
91
92 return v->v;
93}
94
95static inline int __nvgpu_atomic_xchg(nvgpu_atomic_t *v, int new)
96{
97 v->v = new;
98 return new;
99}
100
101static inline bool __nvgpu_atomic_inc_and_test(nvgpu_atomic_t *v)
102{
103 v->v++;
104 return v->v ? true : false;
105}
106
107static inline bool __nvgpu_atomic_dec_and_test(nvgpu_atomic_t *v)
108{
109 v->v--;
110 return v->v ? true : false;
111}
112
113static inline bool __nvgpu_atomic_sub_and_test(int i, nvgpu_atomic_t *v)
114{
115 v->v -= i;
116 return v->v ? true : false;
117}
118
119static inline int __nvgpu_atomic_add_return(int i, nvgpu_atomic_t *v)
120{
121 v->v += i;
122 return v->v;
123}
124
125static inline int __nvgpu_atomic_add_unless(nvgpu_atomic_t *v, int a, int u)
126{
127 if (v->v != u)
128 v->v += a;
129
130 return v->v;
131}
132
133static inline void __nvgpu_atomic64_set(nvgpu_atomic64_t *v, long i)
134{
135 v->v = i;
136}
137
138static inline long __nvgpu_atomic64_read(nvgpu_atomic64_t *v)
139{
140 return v->v;
141}
142
143static inline void __nvgpu_atomic64_add(long x, nvgpu_atomic64_t *v)
144{
145 v->v += x;
146}
147
148static inline void __nvgpu_atomic64_inc(nvgpu_atomic64_t *v)
149{
150 v->v++;
151}
152
153static inline long __nvgpu_atomic64_inc_return(nvgpu_atomic64_t *v)
154{
155 v->v++;
156 return v->v;
157}
158
159static inline void __nvgpu_atomic64_dec(nvgpu_atomic64_t *v)
160{
161 v->v--;
162}
163
164static inline long __nvgpu_atomic64_dec_return(nvgpu_atomic64_t *v)
165{
166 v->v--;
167 return v->v;
168}
169
170static inline long __nvgpu_atomic64_cmpxchg(nvgpu_atomic64_t *v,
171 long old, long new)
172{
173
174 if (v->v == old)
175 v->v = new;
176
177 return v->v;
178}
179
180static inline void __nvgpu_atomic64_sub(long x, nvgpu_atomic64_t *v)
181{
182 v->v -= x;
183}
184
185static inline long __nvgpu_atomic64_sub_return(long x, nvgpu_atomic64_t *v)
186{
187 v->v -= x;
188 return v->v;
189}
190
191#endif
diff --git a/include/nvgpu/posix/barrier.h b/include/nvgpu/posix/barrier.h
deleted file mode 100644
index edc7b12..0000000
--- a/include/nvgpu/posix/barrier.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_BARRIER_H__
24#define __NVGPU_POSIX_BARRIER_H__
25
26#define ACCESS_ONCE(x) (*(volatile __typeof__(x) *)&x)
27
28/*
29 * TODO: implement all these!
30 */
31#define __nvgpu_mb()
32#define __nvgpu_rmb()
33#define __nvgpu_wmb()
34
35#define __nvgpu_smp_mb()
36#define __nvgpu_smp_rmb()
37#define __nvgpu_smp_wmb()
38
39#define __nvgpu_read_barrier_depends()
40#define __nvgpu_smp_read_barrier_depends()
41
42#define __NV_ACCESS_ONCE(x) ACCESS_ONCE(x)
43
44#endif
diff --git a/include/nvgpu/posix/bitops.h b/include/nvgpu/posix/bitops.h
deleted file mode 100644
index e8c663b..0000000
--- a/include/nvgpu/posix/bitops.h
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_BITOPS_H__
24#define __NVGPU_POSIX_BITOPS_H__
25
26#include <nvgpu/types.h>
27
28/*
29 * Assume an 8 bit byte, of course.
30 */
31#define BITS_PER_BYTE 8UL
32#define BITS_PER_LONG (__SIZEOF_LONG__ * BITS_PER_BYTE)
33#define BITS_TO_LONGS(bits) \
34 (bits + (BITS_PER_LONG - 1) / BITS_PER_LONG)
35
36/*
37 * Deprecated; use the explicit BITxx() macros instead.
38 */
39#define BIT(i) BIT64(i)
40
41#define GENMASK(h, l) \
42 (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
43
44#define DECLARE_BITMAP(bmap, bits) \
45 unsigned long bmap[BITS_TO_LONGS(bits)]
46
47#define for_each_set_bit(bit, addr, size) \
48 for ((bit) = find_first_bit((addr), (size)); \
49 (bit) < (size); \
50 (bit) = find_next_bit((addr), (size), (bit) + 1))
51
52#define ffs(word) __ffs(word)
53#define ffz(word) __ffs(~(word))
54#define fls(word) __fls(word)
55
56/*
57 * Clashes with symbols in libc it seems.
58 */
59#define __ffs(word) __nvgpu_posix_ffs(word)
60#define __fls(word) __nvgpu_posix_fls(word)
61
62unsigned long __nvgpu_posix_ffs(unsigned long word);
63unsigned long __nvgpu_posix_fls(unsigned long word);
64
65unsigned long find_first_bit(const unsigned long *addr, unsigned long size);
66unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
67 unsigned long offset);
68unsigned long find_first_zero_bit(const unsigned long *addr,
69 unsigned long size);
70
71bool test_bit(int nr, const volatile unsigned long *addr);
72bool test_and_set_bit(int nr, volatile unsigned long *addr);
73bool test_and_clear_bit(int nr, volatile unsigned long *addr);
74
75/*
76 * These two are atomic.
77 */
78void set_bit(int nr, volatile unsigned long *addr);
79void clear_bit(int nr, volatile unsigned long *addr);
80
81void bitmap_set(unsigned long *map, unsigned int start, int len);
82void bitmap_clear(unsigned long *map, unsigned int start, int len);
83unsigned long bitmap_find_next_zero_area_off(unsigned long *map,
84 unsigned long size,
85 unsigned long start,
86 unsigned int nr,
87 unsigned long align_mask,
88 unsigned long align_offset);
89unsigned long bitmap_find_next_zero_area(unsigned long *map,
90 unsigned long size,
91 unsigned long start,
92 unsigned int nr,
93 unsigned long align_mask);
94
95#endif
diff --git a/include/nvgpu/posix/bug.h b/include/nvgpu/posix/bug.h
deleted file mode 100644
index 04389a9..0000000
--- a/include/nvgpu/posix/bug.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_BUG_H__
24#define __NVGPU_POSIX_BUG_H__
25
26#include <nvgpu/types.h>
27
28/*
29 * TODO: make these actually useful!
30 */
31
32#define BUG() __bug("")
33#define BUG_ON(cond) \
34 do { \
35 if (cond) \
36 BUG(); \
37 } while (0)
38
39#define WARN(cond, msg, arg...) __warn(cond, msg, ##arg)
40#define WARN_ON(cond) __warn(cond, "")
41
42#define WARN_ONCE(cond, msg, arg...) \
43 ({static int __warned__ = 0; \
44 if (!__warned__) { \
45 WARN(cond, msg, ##arg); \
46 __warned__ = 1; \
47 } \
48 cond; })
49
50
51void dump_stack(void);
52
53void __bug(const char *fmt, ...) __attribute__ ((noreturn));
54bool __warn(bool cond, const char *fmt, ...);
55
56#endif
diff --git a/include/nvgpu/posix/circ_buf.h b/include/nvgpu/posix/circ_buf.h
deleted file mode 100644
index 8d9b5ea..0000000
--- a/include/nvgpu/posix/circ_buf.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_CIRC_BUF_H__
24#define __NVGPU_POSIX_CIRC_BUF_H__
25
26#include <nvgpu/bug.h>
27
28/* TODO: implement. */
29
30#define CIRC_CNT(head, tail, size) \
31 ({(void)head; \
32 (void)tail; \
33 (void)size; \
34 BUG(); \
35 1; })
36
37#define CIRC_SPACE(head, tail, size) \
38 ({(void)head; \
39 (void)tail; \
40 (void)size; \
41 BUG(); \
42 1; })
43
44#endif
diff --git a/include/nvgpu/posix/cond.h b/include/nvgpu/posix/cond.h
deleted file mode 100644
index 3528388..0000000
--- a/include/nvgpu/posix/cond.h
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_COND_H__
24#define __NVGPU_POSIX_COND_H__
25
26#include <nvgpu/bug.h>
27
28struct nvgpu_cond {
29 /* Place holder until this can be properly implemented. */
30};
31
32/**
33 * NVGPU_COND_WAIT - Wait for a condition to be true
34 *
35 * @c - The condition variable to sleep on
36 * @condition - The condition that needs to be true
37 * @timeout_ms - Timeout in milliseconds, or 0 for infinite wait
38 *
39 * Wait for a condition to become true. Returns -ETIMEOUT if
40 * the wait timed out with condition false.
41 */
42#define NVGPU_COND_WAIT(c, condition, timeout_ms) \
43 ({BUG(); 1; })
44
45/**
46 * NVGPU_COND_WAIT_INTERRUPTIBLE - Wait for a condition to be true
47 *
48 * @c - The condition variable to sleep on
49 * @condition - The condition that needs to be true
50 * @timeout_ms - Timeout in milliseconds, or 0 for infinite wait
51 *
52 * Wait for a condition to become true. Returns -ETIMEOUT if
53 * the wait timed out with condition false or -ERESTARTSYS on
54 * signal.
55 */
56#define NVGPU_COND_WAIT_INTERRUPTIBLE(c, condition, timeout_ms) \
57 ({BUG(); 1; })
58
59#endif
diff --git a/include/nvgpu/posix/io.h b/include/nvgpu/posix/io.h
deleted file mode 100644
index 98be4d0..0000000
--- a/include/nvgpu/posix/io.h
+++ /dev/null
@@ -1,114 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_POSIX_IO_H
24#define NVGPU_POSIX_IO_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/list.h>
28
29struct gk20a;
30
31/**
32 * Here lies the interface for a unit test module to interact with the nvgpu IO
33 * accessors. This interface provides the ability for a module to react to nvgpu
34 * calling nvgpu IO accessors so that nvgpu can handle various HW sequences even
35 * when run in unit testing mode.
36 *
37 * The primary interface is simply callbacks to the unit test module which the
38 * module can handle how ever it wishes.
39 */
40
41struct nvgpu_reg_access {
42 /*
43 * Address of the register write relative to the base of the register
44 * space. I.e you can compare this against values in the HW headers
45 * directly to check what register is being read/written to/from.
46 */
47 u32 addr;
48
49 /*
50 * Writes: this is the value being written.
51 * Reads: populate with the value to return.
52 */
53 u32 value;
54};
55
56struct nvgpu_posix_io_callbacks {
57 void (*writel)(struct gk20a *g, struct nvgpu_reg_access *access);
58 void (*writel_check)(struct gk20a *g, struct nvgpu_reg_access *access);
59 void (*__readl)(struct gk20a *g, struct nvgpu_reg_access *access);
60 void (*readl)(struct gk20a *g, struct nvgpu_reg_access *access);
61 void (*bar1_writel)(struct gk20a *g, struct nvgpu_reg_access *access);
62 void (*bar1_readl)(struct gk20a *g, struct nvgpu_reg_access *access);
63 void (*usermode_writel)(struct gk20a *g,
64 struct nvgpu_reg_access *access);
65};
66
67struct nvgpu_posix_io_callbacks *nvgpu_posix_register_io(
68 struct gk20a *g,
69 struct nvgpu_posix_io_callbacks *io_callbacks);
70
71struct nvgpu_posix_io_reg_space {
72 u32 base;
73 u32 size;
74 u32 *data;
75 struct nvgpu_list_node link;
76};
77
78static inline struct nvgpu_posix_io_reg_space *
79nvgpu_posix_io_reg_space_from_link(struct nvgpu_list_node *node)
80{
81 return (struct nvgpu_posix_io_reg_space *)
82 ((uintptr_t)node - offsetof(struct nvgpu_posix_io_reg_space, link));
83};
84
85void nvgpu_posix_io_init_reg_space(struct gk20a *g);
86int nvgpu_posix_io_get_error_code(struct gk20a *g);
87void nvgpu_posix_io_reset_error_code(struct gk20a *g);
88int nvgpu_posix_io_add_reg_space(struct gk20a *g, u32 base, u32 size);
89struct nvgpu_posix_io_reg_space *nvgpu_posix_io_get_reg_space(struct gk20a *g,
90 u32 addr);
91void nvgpu_posix_io_delete_reg_space(struct gk20a *g, u32 base);
92void nvgpu_posix_io_writel_reg_space(struct gk20a *g, u32 addr, u32 data);
93u32 nvgpu_posix_io_readl_reg_space(struct gk20a *g, u32 addr);
94
95struct nvgpu_posix_io_reg_access {
96 struct nvgpu_reg_access access;
97 struct nvgpu_list_node link;
98};
99
100static inline struct nvgpu_posix_io_reg_access *
101nvgpu_posix_io_reg_access_from_link(struct nvgpu_list_node *node)
102{
103 return (struct nvgpu_posix_io_reg_access *)
104 ((uintptr_t)node - offsetof(struct nvgpu_posix_io_reg_access, link));
105};
106
107void nvgpu_posix_io_start_recorder(struct gk20a *g);
108void nvgpu_posix_io_reset_recorder(struct gk20a *g);
109void nvgpu_posix_io_record_access(struct gk20a *g,
110 struct nvgpu_reg_access *access);
111bool nvgpu_posix_io_check_sequence(struct gk20a *g,
112 struct nvgpu_reg_access *sequence, u32 size, bool strict);
113
114#endif
diff --git a/include/nvgpu/posix/kmem.h b/include/nvgpu/posix/kmem.h
deleted file mode 100644
index efcdd3d..0000000
--- a/include/nvgpu/posix/kmem.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_KMEM_H__
24#define __NVGPU_POSIX_KMEM_H__
25
26#include <nvgpu/types.h>
27
28void *__nvgpu_kmalloc(struct gk20a *g, size_t size, void *ip);
29void *__nvgpu_kzalloc(struct gk20a *g, size_t size, void *ip);
30void *__nvgpu_kcalloc(struct gk20a *g, size_t n, size_t size, void *ip);
31void *__nvgpu_vmalloc(struct gk20a *g, unsigned long size, void *ip);
32void *__nvgpu_vzalloc(struct gk20a *g, unsigned long size, void *ip);
33void __nvgpu_kfree(struct gk20a *g, void *addr);
34void __nvgpu_vfree(struct gk20a *g, void *addr);
35
36#endif
diff --git a/include/nvgpu/posix/lock.h b/include/nvgpu/posix/lock.h
deleted file mode 100644
index 82eddd0..0000000
--- a/include/nvgpu/posix/lock.h
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_LOCK_H__
24#define __NVGPU_POSIX_LOCK_H__
25
26#include <stdlib.h>
27
28#include <pthread.h>
29
30/*
31 * All locks for posix nvgpu are just pthread locks. There's not a lot of reason
32 * to have real spinlocks in userspace since we aren't using real HW or running
33 * perf critical code where a sleep could be devestating.
34 *
35 * This could be revisited later, though.
36 */
37struct __nvgpu_posix_lock {
38 pthread_mutex_t mutex;
39};
40
41static inline void __nvgpu_posix_lock_acquire(struct __nvgpu_posix_lock *lock)
42{
43 pthread_mutex_lock(&lock->mutex);
44}
45
46static inline int __nvgpu_posix_lock_try_acquire(
47 struct __nvgpu_posix_lock *lock)
48{
49 return pthread_mutex_trylock(&lock->mutex);
50}
51
52static inline void __nvgpu_posix_lock_release(struct __nvgpu_posix_lock *lock)
53{
54 pthread_mutex_unlock(&lock->mutex);
55}
56
57struct nvgpu_mutex {
58 struct __nvgpu_posix_lock lock;
59};
60
61struct nvgpu_spinlock {
62 struct __nvgpu_posix_lock lock;
63};
64
65struct nvgpu_raw_spinlock {
66 struct __nvgpu_posix_lock lock;
67};
68
69#endif /* NVGPU_LOCK_LINUX_H */
diff --git a/include/nvgpu/posix/log2.h b/include/nvgpu/posix/log2.h
deleted file mode 100644
index ca95c10..0000000
--- a/include/nvgpu/posix/log2.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_LOG2_H__
24#define __NVGPU_POSIX_LOG2_H__
25
26#define ilog2(x) (fls(x) - 1)
27
28#define roundup_pow_of_two(x) (1UL << fls((x) - 1))
29#define rounddown_pow_of_two(x) (1UL << (fls(x) - 1))
30
31#define is_power_of_2(x) \
32 ({ \
33 typeof(x) __x__ = (x); \
34 (__x__ != 0 && ((__x__ & (__x__ - 1)) == 0)); \
35 })
36
37#endif
diff --git a/include/nvgpu/posix/nvgpu_mem.h b/include/nvgpu/posix/nvgpu_mem.h
deleted file mode 100644
index 30cdf60..0000000
--- a/include/nvgpu/posix/nvgpu_mem.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_NVGPU_MEM_H__
24#define __NVGPU_POSIX_NVGPU_MEM_H__
25
26struct nvgpu_mem_priv {
27 /*
28 * Eventually this will require an implementation using nvmap.
29 */
30};
31
32#endif
diff --git a/include/nvgpu/posix/nvlink.h b/include/nvgpu/posix/nvlink.h
deleted file mode 100644
index 99cf837..0000000
--- a/include/nvgpu/posix/nvlink.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_POSIX_NVLINK_H__
18#define __NVGPU_POSIX_NVLINK_H__
19
20/*
21 * Empty...
22 */
23
24#endif
diff --git a/include/nvgpu/posix/pci.h b/include/nvgpu/posix/pci.h
deleted file mode 100644
index cd9fc14..0000000
--- a/include/nvgpu/posix/pci.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_PCI_H__
24#define __NVGPU_POSIX_PCI_H__
25
26#define PCI_VENDOR_ID_NVIDIA 0x10de
27
28#endif
diff --git a/include/nvgpu/posix/probe.h b/include/nvgpu/posix/probe.h
deleted file mode 100644
index a9763aa..0000000
--- a/include/nvgpu/posix/probe.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_PROBE_H__
24#define __NVGPU_POSIX_PROBE_H__
25
26struct gk20a;
27
28struct gk20a *nvgpu_posix_probe(void);
29void nvgpu_posix_cleanup(struct gk20a *g);
30
31#endif
diff --git a/include/nvgpu/posix/rwsem.h b/include/nvgpu/posix/rwsem.h
deleted file mode 100644
index 65aa931..0000000
--- a/include/nvgpu/posix/rwsem.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_RWSEM_H__
24#define __NVGPU_POSIX_RWSEM_H__
25
26#include <nvgpu/lock.h>
27
28struct nvgpu_rwsem {
29 struct nvgpu_spinlock lock;
30
31 int readers;
32 int writers;
33};
34
35#endif
diff --git a/include/nvgpu/posix/sizes.h b/include/nvgpu/posix/sizes.h
deleted file mode 100644
index 3fda757..0000000
--- a/include/nvgpu/posix/sizes.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_SIZES_H__
24#define __NVGPU_POSIX_SIZES_H__
25
26#define SZ_1K (1UL << 10)
27#define SZ_4K (SZ_1K << 2)
28#define SZ_64K (SZ_1K << 6)
29#define SZ_128K (SZ_1K << 7)
30
31#define SZ_1M (1UL << 20)
32#define SZ_16M (SZ_1M << 4)
33#define SZ_256M (SZ_1M << 8)
34
35#define SZ_1G (1UL << 30)
36#define SZ_4G (SZ_1G << 2)
37
38#endif
diff --git a/include/nvgpu/posix/sort.h b/include/nvgpu/posix/sort.h
deleted file mode 100644
index 6a6920e..0000000
--- a/include/nvgpu/posix/sort.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_SORT_H__
24#define __NVGPU_POSIX_SORT_H__
25
26#include <nvgpu/bug.h>
27
28static void sort(void *base, size_t num, size_t size,
29 int (*cmp)(const void *, const void *),
30 void (*swap)(void *, void *, int))
31{
32 __bug("sort() not implemented yet!");
33}
34
35#endif
diff --git a/include/nvgpu/posix/thread.h b/include/nvgpu/posix/thread.h
deleted file mode 100644
index a312cc1..0000000
--- a/include/nvgpu/posix/thread.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_THREAD_H__
24#define __NVGPU_POSIX_THREAD_H__
25
26#include <pthread.h>
27
28#include <nvgpu/types.h>
29
30/*
31 * Handles passing an nvgpu thread function into a posix thread.
32 */
33struct nvgpu_posix_thread_data {
34 int (*fn)(void *data);
35 void *data;
36};
37
38/*
39 * For some reason POSIX only allows 16 bytes of name length.
40 */
41#define NVGPU_THREAD_POSIX_MAX_NAMELEN 16
42
43struct nvgpu_thread {
44 bool running;
45 bool should_stop;
46 pthread_t thread;
47 struct nvgpu_posix_thread_data nvgpu;
48 char tname[16];
49};
50
51#endif
diff --git a/include/nvgpu/posix/types.h b/include/nvgpu/posix/types.h
deleted file mode 100644
index 12078b9..0000000
--- a/include/nvgpu/posix/types.h
+++ /dev/null
@@ -1,221 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_TYPES_H__
24#define __NVGPU_POSIX_TYPES_H__
25
26#include <stdbool.h>
27#include <stdint.h>
28#include <stddef.h>
29#include <errno.h>
30#include <limits.h>
31#include <string.h>
32#include <strings.h>
33#include <stdio.h>
34#include <stdarg.h>
35
36/*
37 * For endianness functions.
38 */
39#include <netinet/in.h>
40
41typedef unsigned char u8;
42typedef unsigned short u16;
43typedef unsigned int u32;
44typedef unsigned long long u64;
45
46typedef signed char s8;
47typedef signed short s16;
48typedef signed int s32;
49typedef signed long long s64;
50
51#define min_t(type, a, b) \
52 ({ \
53 type __a = (a); \
54 type __b = (b); \
55 __a < __b ? __a : __b; \
56 })
57
58#if defined(min)
59#undef min
60#endif
61#if defined(max)
62#undef max
63#endif
64
65#define min(a, b) \
66 ({ \
67 (a) < (b) ? a : b; \
68 })
69#define max(a, b) \
70 ({ \
71 (a) > (b) ? a : b; \
72 })
73#define min3(a, b, c) min(min(a, b), c)
74
75#define PAGE_SIZE 4096U
76
77#define ARRAY_SIZE(array) \
78 (sizeof(array) / sizeof((array)[0]))
79
80#define MAX_SCHEDULE_TIMEOUT LONG_MAX
81
82#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
83
84/*
85 * Only used in clk_gm20b.c which we will never unit test. Don't use!
86 */
87#define DIV_ROUND_CLOSEST(x, divisor) ({BUG(); 0; })
88
89/*
90 * Joys of userspace: usually division just works since the compiler can link
91 * against external division functions implicitly.
92 */
93#define do_div(a, b) ((a) /= (b))
94#define div64_u64(a, b) ((a) / (b))
95
96#define __round_mask(x, y) ((__typeof__(x))((y) - 1))
97#define round_up(x, y) ((((x) - 1) | __round_mask(x, y)) + 1)
98#define roundup(x, y) round_up(x, y)
99#define round_down(x, y) ((x) & ~__round_mask(x, y))
100
101#define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
102#define ALIGN(x, a) ALIGN_MASK(x, (typeof(x))(a) - 1)
103#define PAGE_ALIGN(x) ALIGN(x, PAGE_SIZE)
104
105/*
106 * Caps return at the size of the buffer not what would have been written if buf
107 * were arbitrarily sized.
108 */
109static inline int scnprintf(char *buf, size_t size, const char *format, ...)
110{
111 size_t ret;
112 va_list args;
113
114 va_start(args, format);
115 ret = vsnprintf(buf, size, format, args);
116 va_end(args);
117
118 return ret <= size ? ret : size;
119}
120
121static inline u32 be32_to_cpu(u32 x)
122{
123 /*
124 * Conveniently big-endian happens to be network byte order as well so
125 * we can use ntohl() for this.
126 */
127 return ntohl(x);
128}
129
130/*
131 * Hamming weights.
132 */
133static inline unsigned long __hweight8(uint8_t x)
134{
135 return (unsigned long)(!!(x & (1 << 0)) +
136 !!(x & (1 << 1)) +
137 !!(x & (1 << 2)) +
138 !!(x & (1 << 3)) +
139 !!(x & (1 << 4)) +
140 !!(x & (1 << 5)) +
141 !!(x & (1 << 6)) +
142 !!(x & (1 << 7)));
143}
144
145static inline unsigned long __hweight16(uint16_t x)
146{
147 return __hweight8((uint8_t)x) +
148 __hweight8((uint8_t)((x & 0xff00) >> 8));
149}
150
151static inline unsigned long __hweight32(uint32_t x)
152{
153 return __hweight16((uint16_t)x) +
154 __hweight16((uint16_t)((x & 0xffff0000) >> 16));
155}
156
157static inline unsigned long __hweight64(uint64_t x)
158{
159 return __hweight32((uint32_t)x) +
160 __hweight32((uint32_t)((x & 0xffffffff00000000) >> 32));
161}
162
163#define hweight32 __hweight32
164#define hweight_long __hweight64
165
166/*
167 * Better suited under a compiler.h type header file, but for now these can live
168 * here.
169 */
170#define __must_check
171#define __maybe_unused __attribute__((unused))
172#define __iomem
173#define __user
174#define unlikely
175#define likely
176
177#define __stringify(x) #x
178
179/*
180 * Prevent compiler optimizations from mangling writes. But likely most uses of
181 * this in nvgpu are incorrect (i.e unnecessary).
182 */
183#define WRITE_ONCE(p, v) \
184 ({ \
185 volatile typeof(p) *__p__ = &(p); \
186 *__p__ = v; \
187 })
188
189#define container_of(ptr, type, member) ({ \
190 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
191 (type *)( (char *)__mptr - offsetof(type,member) );})
192
193#define __packed __attribute__((packed))
194
195#define IS_ENABLED(config) 0
196
197#define MAX_ERRNO 4095
198
199#define IS_ERR_VALUE(x) ((x) >= (unsigned long)-MAX_ERRNO)
200
201static inline void *ERR_PTR(long error)
202{
203 return (void *) error;
204}
205
206static inline long PTR_ERR(void *error)
207{
208 return (long)(uintptr_t)error;
209}
210
211static inline bool IS_ERR(const void *ptr)
212{
213 return IS_ERR_VALUE((unsigned long)ptr);
214}
215
216static inline bool IS_ERR_OR_NULL(const void *ptr)
217{
218 return (ptr == NULL) || IS_ERR_VALUE((unsigned long)ptr);
219}
220
221#endif
diff --git a/include/nvgpu/posix/vm.h b/include/nvgpu/posix/vm.h
deleted file mode 100644
index ae997d3..0000000
--- a/include/nvgpu/posix/vm.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __NVGPU_POSIX_VM_H__
24#define __NVGPU_POSIX_VM_H__
25
26#include <nvgpu/types.h>
27
28struct nvgpu_os_buffer {
29 /*
30 * We just use malloc() buffers in userspace.
31 */
32 void *buf;
33 size_t size;
34};
35
36struct nvgpu_mapped_buf_priv {
37 void *buf;
38 size_t size;
39};
40
41#endif
diff --git a/include/nvgpu/power_features/cg.h b/include/nvgpu/power_features/cg.h
deleted file mode 100644
index d447d9b..0000000
--- a/include/nvgpu/power_features/cg.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23
24#ifndef NVGPU_POWER_FEATURES_CG_H
25#define NVGPU_POWER_FEATURES_CG_H
26
27#include <nvgpu/types.h>
28
29struct gk20a;
30struct fifo_gk20a;
31
32void nvgpu_cg_init_gr_load_gating_prod(struct gk20a *g);
33void nvgpu_cg_elcg_enable(struct gk20a *g);
34void nvgpu_cg_elcg_disable(struct gk20a *g);
35void nvgpu_cg_elcg_enable_no_wait(struct gk20a *g);
36void nvgpu_cg_elcg_disable_no_wait(struct gk20a *g);
37void nvgpu_cg_elcg_set_elcg_enabled(struct gk20a *g, bool enable);
38
39void nvgpu_cg_blcg_mode_enable(struct gk20a *g);
40void nvgpu_cg_blcg_mode_disable(struct gk20a *g);
41void nvgpu_cg_blcg_fb_ltc_load_enable(struct gk20a *g);
42void nvgpu_cg_blcg_fifo_load_enable(struct gk20a *g);
43void nvgpu_cg_blcg_pmu_load_enable(struct gk20a *g);
44void nvgpu_cg_blcg_ce_load_enable(struct gk20a *g);
45void nvgpu_cg_blcg_gr_load_enable(struct gk20a *g);
46void nvgpu_cg_blcg_set_blcg_enabled(struct gk20a *g, bool enable);
47
48void nvgpu_cg_slcg_gr_perf_ltc_load_enable(struct gk20a *g);
49void nvgpu_cg_slcg_gr_perf_ltc_load_disable(struct gk20a *g);
50void nvgpu_cg_slcg_fb_ltc_load_enable(struct gk20a *g);
51void nvgpu_cg_slcg_priring_load_enable(struct gk20a *g);
52void nvgpu_cg_slcg_fifo_load_enable(struct gk20a *g);
53void nvgpu_cg_slcg_pmu_load_enable(struct gk20a *g);
54void nvgpu_cg_slcg_ce2_load_enable(struct gk20a *g);
55void nvgpu_cg_slcg_set_slcg_enabled(struct gk20a *g, bool enable);
56
57#endif /*NVGPU_POWER_FEATURES_CG_H*/
diff --git a/include/nvgpu/power_features/pg.h b/include/nvgpu/power_features/pg.h
deleted file mode 100644
index d735780..0000000
--- a/include/nvgpu/power_features/pg.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23
24#ifndef NVGPU_POWER_FEATURES_PG_H
25#define NVGPU_POWER_FEATURES_PG_H
26
27#include <nvgpu/types.h>
28
29struct gk20a;
30
31int nvgpu_pg_elpg_disable(struct gk20a *g);
32int nvgpu_pg_elpg_enable(struct gk20a *g);
33bool nvgpu_pg_elpg_is_enabled(struct gk20a *g);
34int nvgpu_pg_elpg_set_elpg_enabled(struct gk20a *g, bool enable);
35
36#endif /*NVGPU_POWER_FEATURES_PG_H*/
diff --git a/include/nvgpu/power_features/power_features.h b/include/nvgpu/power_features/power_features.h
deleted file mode 100644
index f6ffccf..0000000
--- a/include/nvgpu/power_features/power_features.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23
24#ifndef NVGPU_POWER_FEATURES_H
25#define NVGPU_POWER_FEATURES_H
26
27#include <nvgpu/types.h>
28
29struct gk20a;
30
31int nvgpu_cg_pg_disable(struct gk20a *g);
32int nvgpu_cg_pg_enable(struct gk20a *g);
33
34#endif /*NVGPU_POWER_FEATURES_H*/
diff --git a/include/nvgpu/pramin.h b/include/nvgpu/pramin.h
deleted file mode 100644
index b0914bc..0000000
--- a/include/nvgpu/pramin.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_PRAMIN_H
24#define NVGPU_PRAMIN_H
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29struct mm_gk20a;
30struct nvgpu_mem;
31
32
33void nvgpu_pramin_rd_n(struct gk20a *g, struct nvgpu_mem *mem, u32 start, u32 words, void *dest);
34void nvgpu_pramin_wr_n(struct gk20a *g, struct nvgpu_mem *mem, u32 start, u32 words, void *src);
35void nvgpu_pramin_memset(struct gk20a *g, struct nvgpu_mem *mem, u32 start, u32 words, u32 w);
36
37void nvgpu_init_pramin(struct mm_gk20a *mm);
38
39#endif /* NVGPU_PRAMIN_H */
diff --git a/include/nvgpu/ptimer.h b/include/nvgpu/ptimer.h
deleted file mode 100644
index 3369eb2..0000000
--- a/include/nvgpu/ptimer.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_PTIMER_H
23#define NVGPU_PTIMER_H
24
25#include <nvgpu/types.h>
26
27struct gk20a;
28
29struct nvgpu_cpu_time_correlation_sample {
30 u64 cpu_timestamp;
31 u64 gpu_timestamp;
32};
33
34/* PTIMER_REF_FREQ_HZ corresponds to a period of 32 nanoseconds.
35 32 ns is the resolution of ptimer. */
36#define PTIMER_REF_FREQ_HZ 31250000
37
38static inline u32 ptimer_scalingfactor10x(u32 ptimer_src_freq)
39{
40 return (u32)(((u64)(PTIMER_REF_FREQ_HZ * 10)) / ptimer_src_freq);
41}
42
43static inline u32 scale_ptimer(u32 timeout , u32 scale10x)
44{
45 if (((timeout*10) % scale10x) >= (scale10x/2)) {
46 return ((timeout * 10) / scale10x) + 1;
47 } else {
48 return (timeout * 10) / scale10x;
49 }
50}
51
52int nvgpu_get_timestamps_zipper(struct gk20a *g,
53 u32 source_id, u32 count,
54 struct nvgpu_cpu_time_correlation_sample *samples);
55#endif
diff --git a/include/nvgpu/rbtree.h b/include/nvgpu/rbtree.h
deleted file mode 100644
index bcbbabb..0000000
--- a/include/nvgpu/rbtree.h
+++ /dev/null
@@ -1,130 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_RBTREE_H
24#define NVGPU_RBTREE_H
25
26#include <nvgpu/types.h>
27
28struct nvgpu_rbtree_node {
29 u64 key_start;
30 u64 key_end;
31
32 bool is_red; /* !IsRed == IsBlack */
33
34 struct nvgpu_rbtree_node *parent;
35 struct nvgpu_rbtree_node *left;
36 struct nvgpu_rbtree_node *right;
37};
38
39/**
40 * nvgpu_rbtree_insert - insert a new node into rbtree
41 *
42 * @new_node Pointer to new node.
43 * @root Pointer to root of tree
44 *
45 * Nodes with duplicate key_start and overlapping ranges
46 * are not allowed
47 */
48void nvgpu_rbtree_insert(struct nvgpu_rbtree_node *new_node,
49 struct nvgpu_rbtree_node **root);
50
51/**
52 * nvgpu_rbtree_unlink - delete a node from rbtree
53 *
54 * @node Pointer to node to be deleted
55 * @root Pointer to root of tree
56 */
57void nvgpu_rbtree_unlink(struct nvgpu_rbtree_node *node,
58 struct nvgpu_rbtree_node **root);
59
60/**
61 * nvgpu_rbtree_search - search a given key in rbtree
62 *
63 * @key_start Key to be searched in rbtree
64 * @node Node pointer to be returned
65 * @root Pointer to root of tree
66 *
67 * This API will match given key against key_start of each node
68 * In case of a hit, node points to a node with given key
69 * In case of a miss, node is NULL
70 */
71void nvgpu_rbtree_search(u64 key_start, struct nvgpu_rbtree_node **node,
72 struct nvgpu_rbtree_node *root);
73
74/**
75 * nvgpu_rbtree_range_search - search a node with key falling in range
76 *
77 * @key Key to be searched in rbtree
78 * @node Node pointer to be returned
79 * @root Pointer to root of tree
80 *
81 * This API will match given key and find a node where key value
82 * falls within range of {start, end} keys
83 * In case of a hit, node points to a node with given key
84 * In case of a miss, node is NULL
85 */
86void nvgpu_rbtree_range_search(u64 key,
87 struct nvgpu_rbtree_node **node,
88 struct nvgpu_rbtree_node *root);
89
90/**
91 * nvgpu_rbtree_less_than_search - search a node with key lesser than given key
92 *
93 * @key_start Key to be searched in rbtree
94 * @node Node pointer to be returned
95 * @root Pointer to root of tree
96 *
97 * This API will match given key and find a node with highest
98 * key value lesser than given key
99 * In case of a hit, node points to a node with given key
100 * In case of a miss, node is NULL
101 */
102void nvgpu_rbtree_less_than_search(u64 key_start,
103 struct nvgpu_rbtree_node **node,
104 struct nvgpu_rbtree_node *root);
105
106/**
107 * nvgpu_rbtree_enum_start - enumerate tree starting at the node with specified value
108 *
109 * @key_start Key value to begin enumeration from
110 * @node Pointer to first node in the tree
111 * @root Pointer to root of tree
112 *
113 * This API returns node pointer pointing to first node in the rbtree
114 */
115void nvgpu_rbtree_enum_start(u64 key_start,
116 struct nvgpu_rbtree_node **node,
117 struct nvgpu_rbtree_node *root);
118
119/**
120 * nvgpu_rbtree_enum_next - find next node in enumeration
121 *
122 * @node Pointer to next node in the tree
123 * @root Pointer to root of tree
124 *
125 * This API returns node pointer pointing to next node in the rbtree
126 */
127void nvgpu_rbtree_enum_next(struct nvgpu_rbtree_node **node,
128 struct nvgpu_rbtree_node *root);
129
130#endif /* NVGPU_RBTREE_H */
diff --git a/include/nvgpu/rwsem.h b/include/nvgpu/rwsem.h
deleted file mode 100644
index 3cca9c5..0000000
--- a/include/nvgpu/rwsem.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_RWSEM_H
23#define NVGPU_RWSEM_H
24
25#ifdef __KERNEL__
26#include <nvgpu/linux/rwsem.h>
27#elif defined(__NVGPU_POSIX__)
28#include <nvgpu/posix/rwsem.h>
29#else
30#include <nvgpu_rmos/include/rwsem.h>
31#endif
32
33/*
34 * struct nvgpu_rwsem
35 *
36 * Should be implemented per-OS in a separate library
37 * But implementation should adhere to rw_semaphore implementation
38 * as specified in Linux Documentation
39 */
40struct nvgpu_rwsem;
41
42void nvgpu_rwsem_init(struct nvgpu_rwsem *rwsem);
43void nvgpu_rwsem_up_read(struct nvgpu_rwsem *rwsem);
44void nvgpu_rwsem_down_read(struct nvgpu_rwsem *rwsem);
45void nvgpu_rwsem_up_write(struct nvgpu_rwsem *rwsem);
46void nvgpu_rwsem_down_write(struct nvgpu_rwsem *rwsem);
47
48#endif /* NVGPU_RWSEM_H */
diff --git a/include/nvgpu/sched.h b/include/nvgpu/sched.h
deleted file mode 100644
index c49b7d1..0000000
--- a/include/nvgpu/sched.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef __NVGPU_SCHED_COMMON_H
23#define __NVGPU_SCHED_COMMON_H
24
25struct nvgpu_sched_ctrl {
26 struct nvgpu_mutex control_lock;
27 bool control_locked;
28 bool sw_ready;
29 struct nvgpu_mutex status_lock;
30 struct nvgpu_mutex busy_lock;
31
32 u64 status;
33
34 size_t bitmap_size;
35 u64 *active_tsg_bitmap;
36 u64 *recent_tsg_bitmap;
37 u64 *ref_tsg_bitmap;
38
39 struct nvgpu_cond readout_wq;
40};
41
42#endif /* __NVGPU_SCHED_COMMON_H */
diff --git a/include/nvgpu/sec2.h b/include/nvgpu/sec2.h
deleted file mode 100644
index 7c75584..0000000
--- a/include/nvgpu/sec2.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_SEC2_H
24#define NVGPU_SEC2_H
25
26#include <nvgpu/kmem.h>
27#include <nvgpu/dma.h>
28#include <nvgpu/nvgpu_mem.h>
29#include <nvgpu/allocator.h>
30#include <nvgpu/lock.h>
31#include <nvgpu/flcnif_cmn.h>
32#include <nvgpu/falcon.h>
33
34#include <nvgpu/sec2if/sec2_cmd_if.h>
35#include <nvgpu/sec2if/sec2_if_sec2.h>
36
37#define NVGPU_SEC2_TRACE_BUFSIZE (32U*1024U)
38
39#define SEC2_MAX_NUM_SEQUENCES (256U)
40#define SEC2_SEQ_BIT_SHIFT (5U)
41#define SEC2_SEQ_TBL_SIZE \
42 (SEC2_MAX_NUM_SEQUENCES >> SEC2_SEQ_BIT_SHIFT)
43
44#define SEC2_INVALID_SEQ_DESC (~0U)
45
46enum {
47 SEC2_SEQ_STATE_FREE = 0U,
48 SEC2_SEQ_STATE_PENDING,
49 SEC2_SEQ_STATE_USED,
50 SEC2_SEQ_STATE_CANCELLED
51};
52
53typedef void (*sec2_callback)(struct gk20a *, struct nv_flcn_msg_sec2 *,
54 void *, u32, u32);
55
56struct sec2_sequence {
57 u8 id;
58 u32 state;
59 u32 desc;
60 struct nv_flcn_msg_sec2 *msg;
61 u8 *out_payload;
62 sec2_callback callback;
63 void *cb_params;
64};
65
66struct nvgpu_sec2 {
67 struct gk20a *g;
68 struct nvgpu_falcon *flcn;
69 u32 falcon_id;
70
71 struct nvgpu_falcon_queue queue[SEC2_QUEUE_NUM];
72
73 struct sec2_sequence *seq;
74 unsigned long sec2_seq_tbl[SEC2_SEQ_TBL_SIZE];
75 u32 next_seq_desc;
76 struct nvgpu_mutex sec2_seq_lock;
77
78 bool isr_enabled;
79 struct nvgpu_mutex isr_mutex;
80
81 struct nvgpu_allocator dmem;
82
83 /* set to true once init received */
84 bool sec2_ready;
85
86 struct nvgpu_mem trace_buf;
87
88 void (*remove_support)(struct nvgpu_sec2 *sec2);
89
90 u32 command_ack;
91};
92
93/* sec2 init */
94int nvgpu_init_sec2_support(struct gk20a *g);
95int nvgpu_sec2_destroy(struct gk20a *g);
96
97#endif /* NVGPU_SEC2_H */
diff --git a/include/nvgpu/sec2if/sec2_cmd_if.h b/include/nvgpu/sec2if/sec2_cmd_if.h
deleted file mode 100644
index 839743f..0000000
--- a/include/nvgpu/sec2if/sec2_cmd_if.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_SEC2_CMD_IF_H
24#define NVGPU_SEC2_CMD_IF_H
25
26#include <nvgpu/sec2if/sec2_if_sec2.h>
27#include <nvgpu/sec2if/sec2_if_acr.h>
28
29struct nv_flcn_cmd_sec2 {
30 struct pmu_hdr hdr;
31 union {
32 union nv_sec2_acr_cmd acr;
33 } cmd;
34};
35
36struct nv_flcn_msg_sec2 {
37 struct pmu_hdr hdr;
38
39 union {
40 union nv_flcn_msg_sec2_init init;
41 union nv_sec2_acr_msg acr;
42 } msg;
43};
44
45#define NV_SEC2_UNIT_REWIND NV_FLCN_UNIT_ID_REWIND
46#define NV_SEC2_UNIT_INIT (0x01U)
47#define NV_SEC2_UNIT_ACR (0x07U)
48#define NV_SEC2_UNIT_END (0x0AU)
49
50#endif /* NVGPU_SEC2_CMD_IF_H */
diff --git a/include/nvgpu/sec2if/sec2_if_acr.h b/include/nvgpu/sec2if/sec2_if_acr.h
deleted file mode 100644
index 5b41958..0000000
--- a/include/nvgpu/sec2if/sec2_if_acr.h
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_SEC2_IF_ACR_H
24#define NVGPU_SEC2_IF_ACR_H
25
26#include <nvgpu/types.h>
27
28/*
29 * ACR Command Types
30 * _BOOT_FALCON
31 * NVGPU sends a Falcon ID and LSB offset to SEC2 to boot
32 * the falcon in LS mode.
33 * SEC2 needs to hanlde the case since UCODE of falcons are
34 * stored in secured location on FB.
35 */
36#define NV_SEC2_ACR_CMD_ID_BOOTSTRAP_FALCON 0U
37
38/* nvgpu provides the Falcon ID to bootstrap */
39struct nv_sec2_acr_cmd_bootstrap_falcon {
40 /* Command must be first as this struct is the part of union */
41 u8 cmd_type;
42
43 /* Additional bootstrapping flags */
44 u32 flags;
45
46 /* ID to identify Falcon, ref LSF_FALCON_ID_<XYZ> */
47 u32 falcon_id;
48};
49
50#define NV_SEC2_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET 0U
51#define NV_SEC2_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_NO 1U
52#define NV_SEC2_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_YES 0U
53
54/* A union of all ACR Commands */
55union nv_sec2_acr_cmd {
56 /* Command type */
57 u8 cmd_type;
58
59 /* Bootstrap Falcon */
60 struct nv_sec2_acr_cmd_bootstrap_falcon bootstrap_falcon;
61};
62
63/* ACR Message Status */
64
65/* Returns the Bootstrapped falcon ID to RM */
66#define NV_SEC2_ACR_MSG_ID_BOOTSTRAP_FALCON 0U
67
68/* Returns the Error Status for Invalid Command */
69#define NV_SEC2_ACR_MSG_ID_INVALID_COMMAND 2U
70
71/*
72 * SEC2 notifies nvgpu about bootstrap status of falcon
73 */
74struct nv_sec2_acr_msg_bootstrap_falcon {
75 /* Message must be at start */
76 u8 msg_type;
77
78 /* Falcon Error Code returned by message */
79 u32 error_code;
80
81 /* Bootstrapped falcon ID by ACR */
82 u32 falcon_id;
83} ;
84
85/*
86 * A union of all ACR Messages.
87 */
88union nv_sec2_acr_msg {
89 /* Message type */
90 u8 msg_type;
91
92 /* Bootstrap details of falcon and status code */
93 struct nv_sec2_acr_msg_bootstrap_falcon msg_flcn;
94};
95
96#endif /* NVGPU_SEC2_IF_ACR_H */
diff --git a/include/nvgpu/sec2if/sec2_if_cmn.h b/include/nvgpu/sec2if/sec2_if_cmn.h
deleted file mode 100644
index a40f8f9..0000000
--- a/include/nvgpu/sec2if/sec2_if_cmn.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_SEC2_IF_CMN_H
24#define NVGPU_SEC2_IF_CMN_H
25
26/*
27 * Define the maximum number of command sequences that can be in flight at
28 * any given time. This is dictated by the width of the sequence number
29 * id ('seqNumId') stored in each sequence packet (currently 8-bits).
30 */
31#define NV_SEC2_MAX_NUM_SEQUENCES 256U
32
33/*
34 * Compares an unit id against the values in the unit_id enumeration and
35 * verifies that the id is valid. It is expected that the id is specified
36 * as an unsigned integer.
37 */
38#define NV_SEC2_UNITID_IS_VALID(id) (((id) < NV_SEC2_UNIT_END))
39
40/*
41 * Defines the size of the surface/buffer that will be allocated to store
42 * debug spew from the SEC2 ucode application when falcon-trace is enabled.
43 */
44#define NV_SEC2_DEBUG_SURFACE_SIZE (32U*1024U)
45
46/*
47 * SEC2's frame-buffer interface block has several slots/indices which can
48 * be bound to support DMA to various surfaces in memory. This is an
49 * enumeration that gives name to each index based on type of memory-aperture
50 * the index is used to access.
51 *
52 * Pre-Turing, NV_SEC2_DMAIDX_PHYS_VID_FN0 == NV_SEC2_DMAIDX_GUEST_PHYS_VID_BOUND.
53 * From Turing, engine context is stored in GPA, requiring a separate aperture.
54 *
55 * Traditionally, video falcons have used the 6th index for ucode, and we will
56 * continue to use that to allow legacy ucode to work seamlessly.
57 *
58 * Note: DO NOT CHANGE THE VALUE OF NV_SEC2_DMAIDX_UCODE. That value is used by
59 * both the legacy SEC2 ucode, which assumes that it will use index 6, and by
60 * SEC2 RTOS. Changing it will break legacy SEC2 ucode, unless it is updated to
61 * reflect the new value.
62 */
63
64#define NV_SEC2_DMAIDX_GUEST_PHYS_VID_BOUND 0U
65#define NV_SEC2_DMAIDX_VIRT 1U
66#define NV_SEC2_DMAIDX_PHYS_VID_FN0 2U
67#define NV_SEC2_DMAIDX_PHYS_SYS_COH_FN0 3U
68#define NV_SEC2_DMAIDX_PHYS_SYS_NCOH_FN0 4U
69#define NV_SEC2_DMAIDX_GUEST_PHYS_SYS_COH_BOUND 5U
70#define NV_SEC2_DMAIDX_UCODE 6U
71#define NV_SEC2_DMAIDX_GUEST_PHYS_SYS_NCOH_BOUND 7U
72
73#endif /* NVGPU_SEC2_IF_CMN_H */
diff --git a/include/nvgpu/sec2if/sec2_if_sec2.h b/include/nvgpu/sec2if/sec2_if_sec2.h
deleted file mode 100644
index c895c41..0000000
--- a/include/nvgpu/sec2if/sec2_if_sec2.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_SEC2_IF_SEC2_H
24#define NVGPU_SEC2_IF_SEC2_H
25
26/*
27 * SEC2 Command/Message Interfaces - SEC2 Management
28 */
29
30/*
31 * Defines the identifiers various high-level types of sequencer commands and
32 * messages.
33 * _SEC2_INIT - sec2_init_msg_sec2_init
34 */
35enum
36{
37 NV_SEC2_INIT_MSG_ID_SEC2_INIT = 0U,
38};
39
40/*
41 * Defines the logical queue IDs that must be used when submitting commands
42 * to or reading messages from SEC2. The identifiers must begin with zero and
43 * should increment sequentially. _CMDQ_LOG_ID__LAST must always be set to the
44 * last command queue identifier. _NUM must always be set to the last
45 * identifier plus one.
46 */
47#define SEC2_NV_CMDQ_LOG_ID 0U
48#define SEC2_NV_CMDQ_LOG_ID__LAST 0U
49#define SEC2_NV_MSGQ_LOG_ID 1U
50#define SEC2_QUEUE_NUM 2U
51
52struct sec2_init_msg_sec2_init {
53 u8 msg_type;
54 u8 num_queues;
55
56 u16 os_debug_entry_point;
57
58 struct
59 {
60 u32 queue_offset;
61 u16 queue_size;
62 u8 queue_phy_id;
63 u8 queue_log_id;
64 } q_info[SEC2_QUEUE_NUM];
65
66 u32 nv_managed_area_offset;
67 u16 nv_managed_area_size;
68};
69
70union nv_flcn_msg_sec2_init {
71 u8 msg_type;
72 struct sec2_init_msg_sec2_init sec2_init;
73};
74
75#endif /* NVGPU_SEC2_IF_SEC2_H */
diff --git a/include/nvgpu/semaphore.h b/include/nvgpu/semaphore.h
deleted file mode 100644
index 94e3be0..0000000
--- a/include/nvgpu/semaphore.h
+++ /dev/null
@@ -1,206 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef SEMAPHORE_GK20A_H
24#define SEMAPHORE_GK20A_H
25
26#include <nvgpu/log.h>
27#include <nvgpu/atomic.h>
28#include <nvgpu/kref.h>
29#include <nvgpu/list.h>
30#include <nvgpu/nvgpu_mem.h>
31
32#include "gk20a/mm_gk20a.h"
33
34struct gk20a;
35
36#define gpu_sema_dbg(g, fmt, args...) \
37 nvgpu_log(g, gpu_dbg_sema, fmt, ##args)
38#define gpu_sema_verbose_dbg(g, fmt, args...) \
39 nvgpu_log(g, gpu_dbg_sema_v, fmt, ##args)
40
41/*
42 * Max number of channels that can be used is 512. This of course needs to be
43 * fixed to be dynamic but still fast.
44 */
45#define SEMAPHORE_POOL_COUNT 512U
46#define SEMAPHORE_SIZE 16U
47#define SEMAPHORE_SEA_GROWTH_RATE 32U
48
49struct nvgpu_semaphore_sea;
50
51struct nvgpu_semaphore_loc {
52 struct nvgpu_semaphore_pool *pool; /* Pool that owns this sema. */
53 u32 offset; /* Byte offset into the pool. */
54};
55
56/*
57 * Underlying semaphore data structure. This semaphore can be shared amongst
58 * other semaphore instances.
59 */
60struct nvgpu_semaphore_int {
61 struct nvgpu_semaphore_loc location;
62 nvgpu_atomic_t next_value; /* Next available value. */
63 struct channel_gk20a *ch; /* Channel that owns this sema. */
64};
65
66/*
67 * A semaphore which the rest of the driver actually uses. This consists of a
68 * pointer to a real semaphore and a value to wait for. This allows one physical
69 * semaphore to be shared among an essentially infinite number of submits.
70 */
71struct nvgpu_semaphore {
72 struct gk20a *g;
73 struct nvgpu_semaphore_loc location;
74
75 nvgpu_atomic_t value;
76 bool incremented;
77
78 struct nvgpu_ref ref;
79};
80
81/*
82 * A semaphore pool. Each address space will own exactly one of these.
83 */
84struct nvgpu_semaphore_pool {
85 struct nvgpu_list_node pool_list_entry; /* Node for list of pools. */
86 u64 gpu_va; /* GPU access to the pool. */
87 u64 gpu_va_ro; /* GPU access to the pool. */
88 u64 page_idx; /* Index into sea bitmap. */
89
90 DECLARE_BITMAP(semas_alloced, PAGE_SIZE / SEMAPHORE_SIZE);
91
92 struct nvgpu_semaphore_sea *sema_sea; /* Sea that owns this pool. */
93
94 struct nvgpu_mutex pool_lock;
95
96 /*
97 * This is the address spaces's personal RW table. Other channels will
98 * ultimately map this page as RO. This is a sub-nvgpu_mem from the
99 * sea's mem.
100 */
101 struct nvgpu_mem rw_mem;
102
103 bool mapped;
104
105 /*
106 * Sometimes a channel can be released before other channels are
107 * done waiting on it. This ref count ensures that the pool doesn't
108 * go away until all semaphores using this pool are cleaned up first.
109 */
110 struct nvgpu_ref ref;
111};
112
113static inline struct nvgpu_semaphore_pool *
114nvgpu_semaphore_pool_from_pool_list_entry(struct nvgpu_list_node *node)
115{
116 return (struct nvgpu_semaphore_pool *)
117 ((uintptr_t)node -
118 offsetof(struct nvgpu_semaphore_pool, pool_list_entry));
119};
120
121/*
122 * A sea of semaphores pools. Each pool is owned by a single VM. Since multiple
123 * channels can share a VM each channel gets it's own HW semaphore from the
124 * pool. Channels then allocate regular semaphores - basically just a value that
125 * signifies when a particular job is done.
126 */
127struct nvgpu_semaphore_sea {
128 struct nvgpu_list_node pool_list; /* List of pools in this sea. */
129 struct gk20a *gk20a;
130
131 size_t size; /* Number of pages available. */
132 u64 gpu_va; /* GPU virtual address of sema sea. */
133 u64 map_size; /* Size of the mapping. */
134
135 /*
136 * TODO:
137 * List of pages that we use to back the pools. The number of pages
138 * can grow dynamically since allocating 512 pages for all channels at
139 * once would be a tremendous waste.
140 */
141 int page_count; /* Pages allocated to pools. */
142
143 /*
144 * The read-only memory for the entire semaphore sea. Each semaphore
145 * pool needs a sub-nvgpu_mem that will be mapped as RW in its address
146 * space. This sea_mem cannot be freed until all semaphore_pools have
147 * been freed.
148 */
149 struct nvgpu_mem sea_mem;
150
151 /*
152 * Can't use a regular allocator here since the full range of pools are
153 * not always allocated. Instead just use a bitmap.
154 */
155 DECLARE_BITMAP(pools_alloced, SEMAPHORE_POOL_COUNT);
156
157 struct nvgpu_mutex sea_lock; /* Lock alloc/free calls. */
158};
159
160/*
161 * Semaphore sea functions.
162 */
163struct nvgpu_semaphore_sea *nvgpu_semaphore_sea_create(struct gk20a *gk20a);
164void nvgpu_semaphore_sea_destroy(struct gk20a *g);
165int nvgpu_semaphore_sea_map(struct nvgpu_semaphore_pool *sea,
166 struct vm_gk20a *vm);
167void nvgpu_semaphore_sea_unmap(struct nvgpu_semaphore_pool *sea,
168 struct vm_gk20a *vm);
169struct nvgpu_semaphore_sea *nvgpu_semaphore_get_sea(struct gk20a *g);
170
171/*
172 * Semaphore pool functions.
173 */
174int nvgpu_semaphore_pool_alloc(struct nvgpu_semaphore_sea *sea,
175 struct nvgpu_semaphore_pool **pool);
176int nvgpu_semaphore_pool_map(struct nvgpu_semaphore_pool *pool,
177 struct vm_gk20a *vm);
178void nvgpu_semaphore_pool_unmap(struct nvgpu_semaphore_pool *pool,
179 struct vm_gk20a *vm);
180u64 __nvgpu_semaphore_pool_gpu_va(struct nvgpu_semaphore_pool *p, bool global);
181void nvgpu_semaphore_pool_get(struct nvgpu_semaphore_pool *p);
182void nvgpu_semaphore_pool_put(struct nvgpu_semaphore_pool *p);
183
184/*
185 * Semaphore functions.
186 */
187struct nvgpu_semaphore *nvgpu_semaphore_alloc(struct channel_gk20a *ch);
188void nvgpu_semaphore_put(struct nvgpu_semaphore *s);
189void nvgpu_semaphore_get(struct nvgpu_semaphore *s);
190void nvgpu_semaphore_free_hw_sema(struct channel_gk20a *ch);
191
192u64 nvgpu_semaphore_gpu_rw_va(struct nvgpu_semaphore *s);
193u64 nvgpu_semaphore_gpu_ro_va(struct nvgpu_semaphore *s);
194u64 nvgpu_hw_sema_addr(struct nvgpu_semaphore_int *hw_sema);
195
196u32 __nvgpu_semaphore_read(struct nvgpu_semaphore_int *hw_sema);
197u32 nvgpu_semaphore_read(struct nvgpu_semaphore *s);
198u32 nvgpu_semaphore_get_value(struct nvgpu_semaphore *s);
199bool nvgpu_semaphore_is_released(struct nvgpu_semaphore *s);
200bool nvgpu_semaphore_is_acquired(struct nvgpu_semaphore *s);
201
202bool nvgpu_semaphore_reset(struct nvgpu_semaphore_int *hw_sema);
203void nvgpu_semaphore_prepare(struct nvgpu_semaphore *s,
204 struct nvgpu_semaphore_int *hw_sema);
205
206#endif
diff --git a/include/nvgpu/sim.h b/include/nvgpu/sim.h
deleted file mode 100644
index 1d6b15d..0000000
--- a/include/nvgpu/sim.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_SIM_H
23#define NVGPU_SIM_H
24
25#include <nvgpu/nvgpu_mem.h>
26
27struct gk20a;
28struct sim_nvgpu {
29 struct gk20a *g;
30 u32 send_ring_put;
31 u32 recv_ring_get;
32 u32 recv_ring_put;
33 u32 sequence_base;
34 struct nvgpu_mem send_bfr;
35 struct nvgpu_mem recv_bfr;
36 struct nvgpu_mem msg_bfr;
37 void (*sim_init_late)(struct gk20a *);
38 void (*remove_support)(struct gk20a *);
39 void (*esc_readl)(
40 struct gk20a *g, char *path, u32 index, u32 *data);
41};
42#ifdef __KERNEL__
43#include "linux/sim.h"
44#include "linux/sim_pci.h"
45#elif defined(__NVGPU_POSIX__)
46/* Nothing for POSIX-nvgpu. */
47#else
48#include <nvgpu_rmos/include/sim.h>
49#include <nvgpu_rmos/include/sim_pci.h>
50#endif
51int nvgpu_init_sim_support(struct gk20a *g);
52int nvgpu_init_sim_support_pci(struct gk20a *g);
53int nvgpu_alloc_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem);
54void nvgpu_free_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem);
55void nvgpu_free_sim_support(struct gk20a *g);
56void nvgpu_remove_sim_support(struct gk20a *g);
57
58#endif /* NVGPU_SIM_H */
diff --git a/include/nvgpu/sizes.h b/include/nvgpu/sizes.h
deleted file mode 100644
index af5e4b2..0000000
--- a/include/nvgpu/sizes.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_SIZES_H
23#define NVGPU_SIZES_H
24
25#ifdef __KERNEL__
26#include <linux/sizes.h>
27#elif defined(__NVGPU_POSIX__)
28#include <nvgpu/posix/sizes.h>
29#else
30#include <nvgpu_rmos/include/sizes.h>
31#endif
32
33#endif /* NVGPU_SIZES_H */
diff --git a/include/nvgpu/soc.h b/include/nvgpu/soc.h
deleted file mode 100644
index 729d8af..0000000
--- a/include/nvgpu/soc.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_SOC_H
23#define NVGPU_SOC_H
24
25#include <nvgpu/types.h>
26
27struct gk20a;
28
29bool nvgpu_platform_is_silicon(struct gk20a *g);
30bool nvgpu_platform_is_simulation(struct gk20a *g);
31bool nvgpu_platform_is_fpga(struct gk20a *g);
32bool nvgpu_is_hypervisor_mode(struct gk20a *g);
33bool nvgpu_is_bpmp_running(struct gk20a *g);
34bool nvgpu_is_soc_t194_a01(struct gk20a *g);
35int nvgpu_init_soc_vars(struct gk20a *g);
36
37#endif /* NVGPU_SOC_H */
diff --git a/include/nvgpu/sort.h b/include/nvgpu/sort.h
deleted file mode 100644
index 80bae4b..0000000
--- a/include/nvgpu/sort.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_SORT_H
23#define NVGPU_SORT_H
24
25#ifdef __KERNEL__
26#include <linux/sort.h>
27#elif defined(__NVGPU_POSIX__)
28#include <nvgpu/posix/sort.h>
29#else
30#include <nvgpu_rmos/include/sort.h>
31#endif
32
33#endif /* NVGPU_SORT_H */
diff --git a/include/nvgpu/therm.h b/include/nvgpu/therm.h
deleted file mode 100644
index 41808de..0000000
--- a/include/nvgpu/therm.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_THERM_H
23#define NVGPU_THERM_H
24
25struct gk20a;
26
27int nvgpu_init_therm_support(struct gk20a *g);
28
29#endif
diff --git a/include/nvgpu/thread.h b/include/nvgpu/thread.h
deleted file mode 100644
index eac06ef..0000000
--- a/include/nvgpu/thread.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_THREAD_H
24#define NVGPU_THREAD_H
25
26#ifdef __KERNEL__
27#include <nvgpu/linux/thread.h>
28#elif defined(__NVGPU_POSIX__)
29#include <nvgpu/posix/thread.h>
30#else
31#include <nvgpu_rmos/include/thread.h>
32#endif
33
34#include <nvgpu/types.h>
35
36/**
37 * nvgpu_thread_create - Create and run a new thread.
38 *
39 * @thread - thread structure to use
40 * @data - data to pass to threadfn
41 * @threadfn - Thread function
42 * @name - name of the thread
43 *
44 * Create a thread and run threadfn in it. The thread stays alive as long as
45 * threadfn is running. As soon as threadfn returns the thread is destroyed.
46 *
47 * threadfn needs to continuously poll nvgpu_thread_should_stop() to determine
48 * if it should exit.
49 */
50int nvgpu_thread_create(struct nvgpu_thread *thread,
51 void *data,
52 int (*threadfn)(void *data), const char *name);
53
54/**
55 * nvgpu_thread_stop - Destroy or request to destroy a thread
56 *
57 * @thread - thread to stop
58 *
59 * Request a thread to stop by setting nvgpu_thread_should_stop() to
60 * true and wait for thread to exit.
61 */
62void nvgpu_thread_stop(struct nvgpu_thread *thread);
63
64/**
65 * nvgpu_thread_should_stop - Query if thread should stop
66 *
67 * @thread
68 *
69 * Return true if thread should exit. Can be run only in the thread's own
70 * context and with the thread as parameter.
71 */
72bool nvgpu_thread_should_stop(struct nvgpu_thread *thread);
73
74/**
75 * nvgpu_thread_is_running - Query if thread is running
76 *
77 * @thread
78 *
79 * Return true if thread is started.
80 */
81bool nvgpu_thread_is_running(struct nvgpu_thread *thread);
82
83/**
84 * nvgpu_thread_join - join a thread to reclaim resources
85 * after it has exited
86 *
87 * @thread - thread to join
88 *
89 */
90void nvgpu_thread_join(struct nvgpu_thread *thread);
91
92#endif /* NVGPU_THREAD_H */
diff --git a/include/nvgpu/timers.h b/include/nvgpu/timers.h
deleted file mode 100644
index f69e234..0000000
--- a/include/nvgpu/timers.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_TIMERS_H
24#define NVGPU_TIMERS_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/utils.h>
28
29struct gk20a;
30
31/*
32 * struct nvgpu_timeout - define a timeout.
33 *
34 * There are two types of timer suported:
35 *
36 * o NVGPU_TIMER_CPU_TIMER
37 * Timer uses the CPU to measure the timeout.
38 *
39 * o NVGPU_TIMER_RETRY_TIMER
40 * Instead of measuring a time limit keep track of the number of times
41 * something has been attempted. After said limit, "expire" the timer.
42 *
43 * Available flags:
44 *
45 * o NVGPU_TIMER_NO_PRE_SI
46 * By default when the system is not running on silicon the timeout
47 * code will ignore the requested timeout. Specifying this flag will
48 * override that behavior and honor the timeout regardless of platform.
49 *
50 * o NVGPU_TIMER_SILENT_TIMEOUT
51 * Do not print any messages on timeout. Normally a simple message is
52 * printed that specifies where the timeout occurred.
53 */
54struct nvgpu_timeout {
55 struct gk20a *g;
56
57 unsigned int flags;
58
59 union {
60 s64 time;
61 struct {
62 u32 max;
63 u32 attempted;
64 } retries;
65 };
66};
67
68/*
69 * Bit 0 specifies the type of timer: CPU or retry.
70 */
71#define NVGPU_TIMER_CPU_TIMER (0x0)
72#define NVGPU_TIMER_RETRY_TIMER (0x1)
73
74/*
75 * Bits 1 through 7 are reserved; bits 8 and up are flags:
76 */
77#define NVGPU_TIMER_NO_PRE_SI (0x1 << 8)
78#define NVGPU_TIMER_SILENT_TIMEOUT (0x1 << 9)
79
80#define NVGPU_TIMER_FLAG_MASK (NVGPU_TIMER_RETRY_TIMER | \
81 NVGPU_TIMER_NO_PRE_SI | \
82 NVGPU_TIMER_SILENT_TIMEOUT)
83
84int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout,
85 u32 duration, unsigned long flags);
86int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout);
87
88#define nvgpu_timeout_expired(__timeout) \
89 __nvgpu_timeout_expired_msg(__timeout, _NVGPU_GET_IP_, "")
90
91#define nvgpu_timeout_expired_msg(__timeout, fmt, args...) \
92 __nvgpu_timeout_expired_msg(__timeout, _NVGPU_GET_IP_, \
93 fmt, ##args)
94
95/*
96 * Don't use this directly.
97 */
98int __nvgpu_timeout_expired_msg(struct nvgpu_timeout *timeout,
99 void *caller, const char *fmt, ...);
100
101
102/*
103 * Waits and delays.
104 */
105void nvgpu_msleep(unsigned int msecs);
106void nvgpu_usleep_range(unsigned int min_us, unsigned int max_us);
107void nvgpu_udelay(unsigned int usecs);
108
109/*
110 * Timekeeping.
111 */
112s64 nvgpu_current_time_ms(void);
113s64 nvgpu_current_time_ns(void);
114u64 nvgpu_hr_timestamp(void);
115
116#endif /* NVGPU_TIMERS_H */
diff --git a/include/nvgpu/tsg.h b/include/nvgpu/tsg.h
deleted file mode 100644
index f5391e7..0000000
--- a/include/nvgpu/tsg.h
+++ /dev/null
@@ -1,132 +0,0 @@
1/*
2 * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef TSG_GK20A_H
23#define TSG_GK20A_H
24
25#include <nvgpu/lock.h>
26#include <nvgpu/kref.h>
27#include <nvgpu/rwsem.h>
28
29#include "gk20a/gr_gk20a.h"
30
31#define NVGPU_INVALID_TSG_ID (U32_MAX)
32
33struct channel_gk20a;
34
35struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g, pid_t pid);
36void gk20a_tsg_release(struct nvgpu_ref *ref);
37
38int gk20a_init_tsg_support(struct gk20a *g, u32 tsgid);
39struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch);
40
41struct nvgpu_tsg_sm_error_state {
42 u32 hww_global_esr;
43 u32 hww_warp_esr;
44 u64 hww_warp_esr_pc;
45 u32 hww_global_esr_report_mask;
46 u32 hww_warp_esr_report_mask;
47};
48
49struct tsg_gk20a {
50 struct gk20a *g;
51
52 struct vm_gk20a *vm;
53 struct nvgpu_mem *eng_method_buffers;
54
55
56 struct nvgpu_gr_ctx gr_ctx;
57 struct nvgpu_ref refcount;
58
59 struct nvgpu_list_node ch_list;
60 struct nvgpu_list_node event_id_list;
61 struct nvgpu_rwsem ch_list_lock;
62 struct nvgpu_mutex event_id_list_lock;
63 int num_active_channels;
64
65 unsigned int timeslice_us;
66 unsigned int timeslice_timeout;
67 unsigned int timeslice_scale;
68
69 u32 interleave_level;
70 u32 tsgid;
71
72 u32 runlist_id;
73 pid_t tgid;
74 u32 num_active_tpcs;
75 u8 tpc_pg_enabled;
76 bool tpc_num_initialized;
77 bool in_use;
78
79 /* MMU debug mode enabled if mmu_debug_mode_refcnt > 0 */
80 u32 mmu_debug_mode_refcnt;
81
82 struct nvgpu_tsg_sm_error_state *sm_error_states;
83
84#define NVGPU_SM_EXCEPTION_TYPE_MASK_NONE (0x0U)
85#define NVGPU_SM_EXCEPTION_TYPE_MASK_FATAL (0x1U << 0)
86 u32 sm_exception_mask_type;
87};
88
89int gk20a_enable_tsg(struct tsg_gk20a *tsg);
90int gk20a_disable_tsg(struct tsg_gk20a *tsg);
91int gk20a_tsg_bind_channel(struct tsg_gk20a *tsg,
92 struct channel_gk20a *ch);
93int gk20a_tsg_unbind_channel(struct channel_gk20a *ch, bool force);
94
95void gk20a_tsg_event_id_post_event(struct tsg_gk20a *tsg,
96 int event_id);
97int gk20a_tsg_set_runlist_interleave(struct tsg_gk20a *tsg, u32 level);
98int gk20a_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice);
99u32 gk20a_tsg_get_timeslice(struct tsg_gk20a *tsg);
100int gk20a_tsg_set_priority(struct gk20a *g, struct tsg_gk20a *tsg,
101 u32 priority);
102int gk20a_tsg_alloc_sm_error_states_mem(struct gk20a *g,
103 struct tsg_gk20a *tsg,
104 u32 num_sm);
105void gk20a_tsg_update_sm_error_state_locked(struct tsg_gk20a *tsg,
106 u32 sm_id,
107 struct nvgpu_tsg_sm_error_state *sm_error_state);
108
109struct gk20a_event_id_data {
110 struct gk20a *g;
111
112 int id; /* ch or tsg */
113 int pid;
114 u32 event_id;
115
116 bool event_posted;
117
118 struct nvgpu_cond event_id_wq;
119 struct nvgpu_mutex lock;
120 struct nvgpu_list_node event_id_node;
121};
122
123static inline struct gk20a_event_id_data *
124gk20a_event_id_data_from_event_id_node(struct nvgpu_list_node *node)
125{
126 return (struct gk20a_event_id_data *)
127 ((uintptr_t)node - offsetof(struct gk20a_event_id_data, event_id_node));
128};
129
130int nvgpu_tsg_set_mmu_debug_mode(struct channel_gk20a *ch, bool enable);
131
132#endif /* TSG_GK20A_H */
diff --git a/include/nvgpu/types.h b/include/nvgpu/types.h
deleted file mode 100644
index 0cb847b..0000000
--- a/include/nvgpu/types.h
+++ /dev/null
@@ -1,71 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_TYPES_H
23#define NVGPU_TYPES_H
24
25#ifdef __KERNEL__
26#include <linux/types.h>
27#elif defined(__NVGPU_POSIX__)
28#include <nvgpu/posix/types.h>
29#else
30#include <nvgpu_rmos/include/types.h>
31#endif
32
33/*
34 * These macros exist to make integer literals used in certain arithmetic
35 * operations explicitly large enough to hold the results of that operation.
36 * The following is an example of this.
37 *
38 * In MISRA the destination for a bitwise shift must be able to hold the number
39 * of bits shifted. Otherwise the results are undefined. For example:
40 *
41 * 256U << 20U
42 *
43 * This is valid C code but the results of this _may_ be undefined if the size
44 * of an unsigned by default is less than 24 bits (i.e 16 bits). The MISRA
45 * checker sees the 256U and determines that the 256U fits in a 16 bit data type
46 * (i.e a u16). Since a u16 has 16 bits, which is less than 20, this is an
47 * issue.
48 *
49 * Of course most compilers these days use 32 bits for the default unsigned type
50 * this is not a requirement. Moreover this same problem could exist like so:
51 *
52 * 0xfffffU << 40U
53 *
54 * The 0xfffffU is a 32 bit unsigned type; but we are shifting 40 bits which
55 * overflows the 32 bit data type. So in this case we need an explicit cast to
56 * 64 bits in order to prevent undefined behavior.
57 */
58#define U8(x) ((u8)(x))
59#define U16(x) ((u16)(x))
60#define U32(x) ((u32)(x))
61#define U64(x) ((u64)(x))
62
63/* Linux uses U8_MAX instead of UCHAR_MAX. We define it here for non-Linux
64 * OSes
65 */
66#if !defined(__KERNEL__) && !defined(U8_MAX)
67#define U8_MAX ((u8)255)
68#define U32_MAX ((u32)~0U)
69#endif
70
71#endif /* NVGPU_TYPES_H */
diff --git a/include/nvgpu/unit.h b/include/nvgpu/unit.h
deleted file mode 100644
index 11df652..0000000
--- a/include/nvgpu/unit.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_UNIT_H
24#define NVGPU_UNIT_H
25
26/*
27 * Enumeration of all units intended to be used by any HAL that requires
28 * unit as parameter.
29 *
30 * Units are added to the enumeration as needed, so it is not complete.
31 */
32enum nvgpu_unit {
33 NVGPU_UNIT_FIFO,
34 NVGPU_UNIT_PERFMON,
35 NVGPU_UNIT_GRAPH,
36 NVGPU_UNIT_BLG,
37 NVGPU_UNIT_PWR,
38 NVGPU_UNIT_NVDEC,
39};
40
41#endif /* NVGPU_UNIT_H */
diff --git a/include/nvgpu/utils.h b/include/nvgpu/utils.h
deleted file mode 100644
index 6184608..0000000
--- a/include/nvgpu/utils.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_UTILS_H
24#define NVGPU_UTILS_H
25
26#include <nvgpu/types.h>
27
28static inline u32 u64_hi32(u64 n)
29{
30 return (u32)((n >> 32) & ~(u32)0);
31}
32
33static inline u32 u64_lo32(u64 n)
34{
35 return (u32)(n & ~(u32)0);
36}
37
38static inline u64 hi32_lo32_to_u64(u32 hi, u32 lo)
39{
40 return (((u64)hi) << 32) | (u64)lo;
41}
42
43static inline u32 set_field(u32 val, u32 mask, u32 field)
44{
45 return ((val & ~mask) | field);
46}
47
48static inline u32 get_field(u32 reg, u32 mask)
49{
50 return (reg & mask);
51}
52
53/*
54 * MISRA Rule 11.6 compliant IP address generator.
55 */
56#define _NVGPU_GET_IP_ ({ __label__ __here; __here: &&__here; })
57
58#endif /* NVGPU_UTILS_H */
diff --git a/include/nvgpu/vgpu/tegra_vgpu.h b/include/nvgpu/vgpu/tegra_vgpu.h
deleted file mode 100644
index e33dce9..0000000
--- a/include/nvgpu/vgpu/tegra_vgpu.h
+++ /dev/null
@@ -1,817 +0,0 @@
1/*
2 * Tegra GPU Virtualization Interfaces to Server
3 *
4 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef TEGRA_VGPU_H
26#define TEGRA_VGPU_H
27
28#include <nvgpu/types.h>
29#include <nvgpu/ecc.h> /* For NVGPU_ECC_STAT_NAME_MAX_SIZE */
30
31enum {
32 TEGRA_VGPU_MODULE_GPU = 0,
33};
34
35enum {
36 /* Needs to follow last entry in TEGRA_VHOST_QUEUE_* list,
37 * in tegra_vhost.h
38 */
39 TEGRA_VGPU_QUEUE_CMD = 3,
40 TEGRA_VGPU_QUEUE_INTR
41};
42
43enum {
44 TEGRA_VGPU_CMD_CONNECT = 0,
45 TEGRA_VGPU_CMD_DISCONNECT = 1,
46 TEGRA_VGPU_CMD_ABORT = 2,
47 TEGRA_VGPU_CMD_CHANNEL_ALLOC_HWCTX = 3,
48 TEGRA_VGPU_CMD_CHANNEL_FREE_HWCTX = 4,
49 TEGRA_VGPU_CMD_GET_ATTRIBUTE = 5,
50 TEGRA_VGPU_CMD_MAP_BAR1 = 6,
51 TEGRA_VGPU_CMD_AS_ALLOC_SHARE = 7,
52 TEGRA_VGPU_CMD_AS_BIND_SHARE = 8,
53 TEGRA_VGPU_CMD_AS_FREE_SHARE = 9,
54 TEGRA_VGPU_CMD_AS_UNMAP = 11,
55 TEGRA_VGPU_CMD_CHANNEL_BIND = 13,
56 TEGRA_VGPU_CMD_CHANNEL_UNBIND = 14,
57 TEGRA_VGPU_CMD_CHANNEL_DISABLE = 15,
58 TEGRA_VGPU_CMD_CHANNEL_PREEMPT = 16,
59 TEGRA_VGPU_CMD_CHANNEL_SETUP_RAMFC = 17,
60 TEGRA_VGPU_CMD_CHANNEL_COMMIT_GR_CTX = 20,
61 TEGRA_VGPU_CMD_CHANNEL_ALLOC_GR_PATCH_CTX = 21,
62 TEGRA_VGPU_CMD_CHANNEL_FREE_GR_PATCH_CTX = 22,
63 TEGRA_VGPU_CMD_CHANNEL_MAP_GR_GLOBAL_CTX = 23,
64 TEGRA_VGPU_CMD_CHANNEL_UNMAP_GR_GLOBAL_CTX = 24,
65 TEGRA_VGPU_CMD_CHANNEL_COMMIT_GR_GLOBAL_CTX = 25,
66 TEGRA_VGPU_CMD_CHANNEL_LOAD_GR_GOLDEN_CTX = 26,
67 TEGRA_VGPU_CMD_CHANNEL_BIND_ZCULL = 27,
68 TEGRA_VGPU_CMD_CACHE_MAINT = 28,
69 TEGRA_VGPU_CMD_SUBMIT_RUNLIST = 29,
70 TEGRA_VGPU_CMD_GET_ZCULL_INFO = 30,
71 TEGRA_VGPU_CMD_ZBC_SET_TABLE = 31,
72 TEGRA_VGPU_CMD_ZBC_QUERY_TABLE = 32,
73 TEGRA_VGPU_CMD_AS_MAP_EX = 33,
74 TEGRA_VGPU_CMD_CHANNEL_BIND_GR_CTXSW_BUFFERS = 34,
75 TEGRA_VGPU_CMD_SET_MMU_DEBUG_MODE = 35,
76 TEGRA_VGPU_CMD_SET_SM_DEBUG_MODE = 36,
77 TEGRA_VGPU_CMD_REG_OPS = 37,
78 TEGRA_VGPU_CMD_CHANNEL_SET_PRIORITY = 38,
79 TEGRA_VGPU_CMD_CHANNEL_SET_RUNLIST_INTERLEAVE = 39,
80 TEGRA_VGPU_CMD_CHANNEL_SET_TIMESLICE = 40,
81 TEGRA_VGPU_CMD_FECS_TRACE_ENABLE = 41,
82 TEGRA_VGPU_CMD_FECS_TRACE_DISABLE = 42,
83 TEGRA_VGPU_CMD_FECS_TRACE_POLL = 43,
84 TEGRA_VGPU_CMD_FECS_TRACE_SET_FILTER = 44,
85 TEGRA_VGPU_CMD_CHANNEL_SET_SMPC_CTXSW_MODE = 45,
86 TEGRA_VGPU_CMD_CHANNEL_SET_HWPM_CTXSW_MODE = 46,
87 TEGRA_VGPU_CMD_CHANNEL_FREE_HWPM_CTX = 47,
88 TEGRA_VGPU_CMD_GR_CTX_ALLOC = 48,
89 TEGRA_VGPU_CMD_GR_CTX_FREE = 49,
90 TEGRA_VGPU_CMD_CHANNEL_BIND_GR_CTX = 50,
91 TEGRA_VGPU_CMD_TSG_BIND_GR_CTX = 51,
92 TEGRA_VGPU_CMD_TSG_BIND_CHANNEL = 52,
93 TEGRA_VGPU_CMD_TSG_UNBIND_CHANNEL = 53,
94 TEGRA_VGPU_CMD_TSG_PREEMPT = 54,
95 TEGRA_VGPU_CMD_TSG_SET_TIMESLICE = 55,
96 TEGRA_VGPU_CMD_TSG_SET_RUNLIST_INTERLEAVE = 56,
97 TEGRA_VGPU_CMD_CHANNEL_FORCE_RESET = 57,
98 TEGRA_VGPU_CMD_CHANNEL_ENABLE = 58,
99 TEGRA_VGPU_CMD_READ_PTIMER = 59,
100 TEGRA_VGPU_CMD_SET_POWERGATE = 60,
101 TEGRA_VGPU_CMD_SET_GPU_CLK_RATE = 61,
102 TEGRA_VGPU_CMD_GET_CONSTANTS = 62,
103 TEGRA_VGPU_CMD_CHANNEL_CYCLESTATS_SNAPSHOT = 63,
104 TEGRA_VGPU_CMD_TSG_OPEN = 64,
105 TEGRA_VGPU_CMD_GET_GPU_LOAD = 65,
106 TEGRA_VGPU_CMD_SUSPEND_CONTEXTS = 66,
107 TEGRA_VGPU_CMD_RESUME_CONTEXTS = 67,
108 TEGRA_VGPU_CMD_CLEAR_SM_ERROR_STATE = 68,
109 TEGRA_VGPU_CMD_GET_GPU_CLK_RATE = 69,
110 TEGRA_VGPU_CMD_GET_GPU_FREQ_TABLE = 70,
111 TEGRA_VGPU_CMD_CAP_GPU_CLK_RATE = 71,
112 TEGRA_VGPU_CMD_PROF_MGT = 72,
113 TEGRA_VGPU_CMD_PERFBUF_MGT = 73,
114 TEGRA_VGPU_CMD_GET_TIMESTAMPS_ZIPPER = 74,
115 TEGRA_VGPU_CMD_TSG_RELEASE = 75,
116 TEGRA_VGPU_CMD_GET_VSMS_MAPPING = 76,
117 TEGRA_VGPU_CMD_ALLOC_CTX_HEADER = 77,
118 TEGRA_VGPU_CMD_FREE_CTX_HEADER = 78,
119 TEGRA_VGPU_CMD_MAP_SYNCPT = 79,
120 TEGRA_VGPU_CMD_TSG_BIND_CHANNEL_EX = 80,
121 TEGRA_VGPU_CMD_UPDATE_PC_SAMPLING = 81,
122 TEGRA_VGPU_CMD_SUSPEND = 82,
123 TEGRA_VGPU_CMD_RESUME = 83,
124 TEGRA_VGPU_CMD_GET_ECC_INFO = 84,
125 TEGRA_VGPU_CMD_GET_ECC_COUNTER_VALUE = 85,
126 TEGRA_VGPU_CMD_FB_SET_MMU_DEBUG_MODE = 88,
127 TEGRA_VGPU_CMD_GR_SET_MMU_DEBUG_MODE = 89,
128};
129
130struct tegra_vgpu_connect_params {
131 u32 module;
132 u64 handle;
133};
134
135struct tegra_vgpu_channel_hwctx_params {
136 u32 id;
137 u64 pid;
138 u64 handle;
139};
140
141struct tegra_vgpu_attrib_params {
142 u32 attrib;
143 u32 value;
144};
145
146struct tegra_vgpu_as_share_params {
147 u64 size;
148 u64 handle;
149 u32 big_page_size;
150};
151
152struct tegra_vgpu_as_bind_share_params {
153 u64 as_handle;
154 u64 chan_handle;
155};
156
157enum {
158 TEGRA_VGPU_MAP_PROT_NONE = 0,
159 TEGRA_VGPU_MAP_PROT_READ_ONLY,
160 TEGRA_VGPU_MAP_PROT_WRITE_ONLY
161};
162
163struct tegra_vgpu_as_map_params {
164 u64 handle;
165 u64 addr;
166 u64 gpu_va;
167 u64 size;
168 u8 pgsz_idx;
169 u8 iova;
170 u8 kind;
171 u8 cacheable;
172 u8 clear_ctags;
173 u8 prot;
174 u32 ctag_offset;
175};
176
177#define TEGRA_VGPU_MAP_CACHEABLE (1 << 0)
178#define TEGRA_VGPU_MAP_IO_COHERENT (1 << 1)
179#define TEGRA_VGPU_MAP_L3_ALLOC (1 << 2)
180#define TEGRA_VGPU_MAP_PLATFORM_ATOMIC (1 << 3)
181
182struct tegra_vgpu_as_map_ex_params {
183 u64 handle;
184 u64 gpu_va;
185 u64 size;
186 u32 mem_desc_count;
187 u8 pgsz_idx;
188 u8 iova;
189 u8 kind;
190 u32 flags;
191 u8 clear_ctags;
192 u8 prot;
193 u32 ctag_offset;
194};
195
196struct tegra_vgpu_mem_desc {
197 u64 addr;
198 u64 length;
199};
200
201struct tegra_vgpu_channel_config_params {
202 u64 handle;
203};
204
205struct tegra_vgpu_ramfc_params {
206 u64 handle;
207 u64 gpfifo_va;
208 u32 num_entries;
209 u64 userd_addr;
210 u8 iova;
211};
212
213struct tegra_vgpu_ch_ctx_params {
214 u64 handle;
215 u64 gr_ctx_va;
216 u64 patch_ctx_va;
217 u64 cb_va;
218 u64 attr_va;
219 u64 page_pool_va;
220 u64 priv_access_map_va;
221 u64 fecs_trace_va;
222 u32 class_num;
223};
224
225struct tegra_vgpu_zcull_bind_params {
226 u64 handle;
227 u64 zcull_va;
228 u32 mode;
229};
230
231enum {
232 TEGRA_VGPU_L2_MAINT_FLUSH = 0,
233 TEGRA_VGPU_L2_MAINT_INV,
234 TEGRA_VGPU_L2_MAINT_FLUSH_INV,
235 TEGRA_VGPU_FB_FLUSH
236};
237
238struct tegra_vgpu_cache_maint_params {
239 u8 op;
240};
241
242struct tegra_vgpu_runlist_params {
243 u8 runlist_id;
244 u32 num_entries;
245};
246
247struct tegra_vgpu_golden_ctx_params {
248 u32 size;
249};
250
251struct tegra_vgpu_zcull_info_params {
252 u32 width_align_pixels;
253 u32 height_align_pixels;
254 u32 pixel_squares_by_aliquots;
255 u32 aliquot_total;
256 u32 region_byte_multiplier;
257 u32 region_header_size;
258 u32 subregion_header_size;
259 u32 subregion_width_align_pixels;
260 u32 subregion_height_align_pixels;
261 u32 subregion_count;
262};
263
264#define TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE 4
265#define TEGRA_VGPU_ZBC_TYPE_INVALID 0
266#define TEGRA_VGPU_ZBC_TYPE_COLOR 1
267#define TEGRA_VGPU_ZBC_TYPE_DEPTH 2
268
269struct tegra_vgpu_zbc_set_table_params {
270 u32 color_ds[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE];
271 u32 color_l2[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE];
272 u32 depth;
273 u32 format;
274 u32 type; /* color or depth */
275};
276
277struct tegra_vgpu_zbc_query_table_params {
278 u32 color_ds[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE];
279 u32 color_l2[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE];
280 u32 depth;
281 u32 ref_cnt;
282 u32 format;
283 u32 type; /* color or depth */
284 u32 index_size; /* [out] size, [in] index */
285};
286
287enum {
288 TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_MAIN,
289 TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_SPILL,
290 TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_PAGEPOOL,
291 TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_BETACB,
292 TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST
293};
294
295enum {
296 TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_WFI,
297 TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_GFX_GFXP,
298 TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_COMPUTE_CTA,
299 TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_COMPUTE_CILP,
300 TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_LAST
301};
302
303struct tegra_vgpu_gr_bind_ctxsw_buffers_params {
304 u64 handle; /* deprecated */
305 u64 gpu_va[TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST];
306 u64 size[TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST];
307 u32 mode;
308 u64 gr_ctx_handle;
309};
310
311struct tegra_vgpu_mmu_debug_mode {
312 u32 enable;
313};
314
315struct tegra_vgpu_sm_debug_mode {
316 u64 handle;
317 u64 sms;
318 u32 enable;
319};
320
321struct tegra_vgpu_reg_op {
322 u8 op;
323 u8 type;
324 u8 status;
325 u8 quad;
326 u32 group_mask;
327 u32 sub_group_mask;
328 u32 offset;
329 u32 value_lo;
330 u32 value_hi;
331 u32 and_n_mask_lo;
332 u32 and_n_mask_hi;
333};
334
335struct tegra_vgpu_reg_ops_params {
336 u64 handle;
337 u64 num_ops;
338 u32 is_profiler;
339};
340
341struct tegra_vgpu_channel_priority_params {
342 u64 handle;
343 u32 priority;
344};
345
346/* level follows nvgpu.h definitions */
347struct tegra_vgpu_channel_runlist_interleave_params {
348 u64 handle;
349 u32 level;
350};
351
352struct tegra_vgpu_channel_timeslice_params {
353 u64 handle;
354 u32 timeslice_us;
355};
356
357#define TEGRA_VGPU_FECS_TRACE_FILTER_SIZE 256
358struct tegra_vgpu_fecs_trace_filter {
359 u64 tag_bits[(TEGRA_VGPU_FECS_TRACE_FILTER_SIZE + 63) / 64];
360};
361
362enum {
363 TEGRA_VGPU_CTXSW_MODE_NO_CTXSW = 0,
364 TEGRA_VGPU_CTXSW_MODE_CTXSW,
365 TEGRA_VGPU_CTXSW_MODE_STREAM_OUT_CTXSW,
366};
367
368enum {
369 TEGRA_VGPU_DISABLE_SAMPLING = 0,
370 TEGRA_VGPU_ENABLE_SAMPLING,
371};
372struct tegra_vgpu_channel_set_ctxsw_mode {
373 u64 handle;
374 u64 gpu_va;
375 u32 mode;
376};
377
378struct tegra_vgpu_channel_update_pc_sampling {
379 u64 handle;
380 u32 mode;
381};
382
383struct tegra_vgpu_channel_free_hwpm_ctx {
384 u64 handle;
385};
386
387struct tegra_vgpu_ecc_info_params {
388 u32 ecc_stats_count;
389};
390
391struct tegra_vgpu_ecc_info_entry {
392 u32 ecc_id;
393 char name[NVGPU_ECC_STAT_NAME_MAX_SIZE];
394};
395
396struct tegra_vgpu_ecc_counter_params {
397 u32 ecc_id;
398 u32 value;
399};
400
401struct tegra_vgpu_gr_ctx_params {
402 u64 gr_ctx_handle;
403 u64 as_handle;
404 u64 gr_ctx_va;
405 u32 class_num;
406 u32 tsg_id;
407};
408
409struct tegra_vgpu_channel_bind_gr_ctx_params {
410 u64 ch_handle;
411 u64 gr_ctx_handle;
412};
413
414struct tegra_vgpu_tsg_bind_gr_ctx_params {
415 u32 tsg_id;
416 u64 gr_ctx_handle;
417};
418
419struct tegra_vgpu_tsg_bind_unbind_channel_params {
420 u32 tsg_id;
421 u64 ch_handle;
422};
423
424struct tegra_vgpu_tsg_preempt_params {
425 u32 tsg_id;
426};
427
428struct tegra_vgpu_tsg_timeslice_params {
429 u32 tsg_id;
430 u32 timeslice_us;
431};
432
433struct tegra_vgpu_tsg_open_rel_params {
434 u32 tsg_id;
435};
436
437/* level follows nvgpu.h definitions */
438struct tegra_vgpu_tsg_runlist_interleave_params {
439 u32 tsg_id;
440 u32 level;
441};
442
443struct tegra_vgpu_read_ptimer_params {
444 u64 time;
445};
446
447#define TEGRA_VGPU_GET_TIMESTAMPS_ZIPPER_MAX_COUNT 16
448#define TEGRA_VGPU_GET_TIMESTAMPS_ZIPPER_SRC_ID_TSC 1
449struct tegra_vgpu_get_timestamps_zipper_params {
450 /* timestamp pairs */
451 struct {
452 /* gpu timestamp value */
453 u64 cpu_timestamp;
454 /* raw GPU counter (PTIMER) value */
455 u64 gpu_timestamp;
456 } samples[TEGRA_VGPU_GET_TIMESTAMPS_ZIPPER_MAX_COUNT];
457 /* number of pairs to read */
458 u32 count;
459 /* cpu clock source id */
460 u32 source_id;
461};
462
463#define TEGRA_VGPU_POWERGATE_MODE_ENABLE 1
464#define TEGRA_VGPU_POWERGATE_MODE_DISABLE 2
465struct tegra_vgpu_set_powergate_params {
466 u32 mode;
467};
468
469struct tegra_vgpu_gpu_clk_rate_params {
470 u32 rate; /* in kHz */
471};
472
473/* TEGRA_VGPU_MAX_ENGINES must be equal or greater than num_engines */
474#define TEGRA_VGPU_MAX_ENGINES 4
475struct tegra_vgpu_engines_info {
476 u32 num_engines;
477 struct engineinfo {
478 u32 engine_id;
479 u32 intr_mask;
480 u32 reset_mask;
481 u32 runlist_id;
482 u32 pbdma_id;
483 u32 inst_id;
484 u32 pri_base;
485 u32 engine_enum;
486 u32 fault_id;
487 } info[TEGRA_VGPU_MAX_ENGINES];
488};
489
490#define TEGRA_VGPU_MAX_GPC_COUNT 16
491#define TEGRA_VGPU_MAX_TPC_COUNT_PER_GPC 16
492#define TEGRA_VGPU_L2_EN_MASK 32
493
494struct tegra_vgpu_constants_params {
495 u32 arch;
496 u32 impl;
497 u32 rev;
498 u32 max_freq;
499 u32 num_channels;
500 u32 golden_ctx_size;
501 u32 zcull_ctx_size;
502 u32 l2_size;
503 u32 ltc_count;
504 u32 cacheline_size;
505 u32 slices_per_ltc;
506 u32 comptags_per_cacheline;
507 u32 comptag_lines;
508 u32 sm_arch_sm_version;
509 u32 sm_arch_spa_version;
510 u32 sm_arch_warp_count;
511 u32 max_gpc_count;
512 u32 gpc_count;
513 u32 max_tpc_per_gpc_count;
514 u32 num_fbps;
515 u32 fbp_en_mask;
516 u32 ltc_per_fbp;
517 u32 max_lts_per_ltc;
518 u8 gpc_tpc_count[TEGRA_VGPU_MAX_GPC_COUNT];
519 /* mask bits should be equal or larger than
520 * TEGRA_VGPU_MAX_TPC_COUNT_PER_GPC
521 */
522 u16 gpc_tpc_mask[TEGRA_VGPU_MAX_GPC_COUNT];
523 u32 hwpm_ctx_size;
524 u8 force_preempt_mode;
525 u8 can_set_clkrate;
526 u32 default_timeslice_us;
527 u32 preempt_ctx_size;
528 u32 channel_base;
529 struct tegra_vgpu_engines_info engines_info;
530 u32 num_pce;
531 u32 sm_per_tpc;
532 u32 max_subctx_count;
533 u32 l2_en_mask[TEGRA_VGPU_L2_EN_MASK];
534};
535
536enum {
537 TEGRA_VGPU_CYCLE_STATS_SNAPSHOT_CMD_FLUSH = 0,
538 TEGRA_VGPU_CYCLE_STATS_SNAPSHOT_CMD_ATTACH = 1,
539 TEGRA_VGPU_CYCLE_STATS_SNAPSHOT_CMD_DETACH = 2,
540};
541
542struct tegra_vgpu_channel_cyclestats_snapshot_params {
543 u64 handle;
544 u32 perfmon_start;
545 u32 perfmon_count;
546 u32 buf_info; /* client->srvr: get ptr; srvr->client: num pending */
547 u8 subcmd;
548 u8 hw_overflow;
549};
550
551struct tegra_vgpu_gpu_load_params {
552 u32 load;
553};
554
555struct tegra_vgpu_suspend_resume_contexts {
556 u32 num_channels;
557 u16 resident_chid;
558};
559
560struct tegra_vgpu_clear_sm_error_state {
561 u64 handle;
562 u32 sm_id;
563};
564
565enum {
566 TEGRA_VGPU_PROF_GET_GLOBAL = 0,
567 TEGRA_VGPU_PROF_GET_CONTEXT,
568 TEGRA_VGPU_PROF_RELEASE
569};
570
571struct tegra_vgpu_prof_mgt_params {
572 u32 mode;
573};
574
575struct tegra_vgpu_perfbuf_mgt_params {
576 u64 vm_handle;
577 u64 offset;
578 u32 size;
579};
580
581#define TEGRA_VGPU_GPU_FREQ_TABLE_SIZE 25
582
583struct tegra_vgpu_get_gpu_freq_table_params {
584 u32 num_freqs;
585};
586
587struct tegra_vgpu_vsms_mapping_params {
588 u32 num_sm;
589};
590
591struct tegra_vgpu_vsms_mapping_entry {
592 u32 gpc_index;
593 u32 tpc_index;
594 u32 sm_index;
595 u32 global_tpc_index;
596};
597
598struct tegra_vgpu_alloc_ctx_header_params {
599 u64 ch_handle;
600 u64 ctx_header_va;
601};
602
603struct tegra_vgpu_free_ctx_header_params {
604 u64 ch_handle;
605};
606
607struct tegra_vgpu_map_syncpt_params {
608 u64 as_handle;
609 u64 gpu_va;
610 u64 len;
611 u64 offset;
612 u8 prot;
613};
614
615struct tegra_vgpu_tsg_bind_channel_ex_params {
616 u32 tsg_id;
617 u64 ch_handle;
618 u32 subctx_id;
619 u32 runqueue_sel;
620};
621
622struct tegra_vgpu_fb_set_mmu_debug_mode_params {
623 u8 enable;
624};
625
626struct tegra_vgpu_gr_set_mmu_debug_mode_params {
627 u64 ch_handle;
628 u8 enable;
629};
630
631struct tegra_vgpu_cmd_msg {
632 u32 cmd;
633 int ret;
634 u64 handle;
635 union {
636 struct tegra_vgpu_connect_params connect;
637 struct tegra_vgpu_channel_hwctx_params channel_hwctx;
638 struct tegra_vgpu_attrib_params attrib;
639 struct tegra_vgpu_as_share_params as_share;
640 struct tegra_vgpu_as_bind_share_params as_bind_share;
641 struct tegra_vgpu_as_map_params as_map;
642 struct tegra_vgpu_as_map_ex_params as_map_ex;
643 struct tegra_vgpu_channel_config_params channel_config;
644 struct tegra_vgpu_ramfc_params ramfc;
645 struct tegra_vgpu_ch_ctx_params ch_ctx;
646 struct tegra_vgpu_zcull_bind_params zcull_bind;
647 struct tegra_vgpu_cache_maint_params cache_maint;
648 struct tegra_vgpu_runlist_params runlist;
649 struct tegra_vgpu_golden_ctx_params golden_ctx;
650 struct tegra_vgpu_zcull_info_params zcull_info;
651 struct tegra_vgpu_zbc_set_table_params zbc_set_table;
652 struct tegra_vgpu_zbc_query_table_params zbc_query_table;
653 struct tegra_vgpu_gr_bind_ctxsw_buffers_params gr_bind_ctxsw_buffers;
654 struct tegra_vgpu_mmu_debug_mode mmu_debug_mode;
655 struct tegra_vgpu_sm_debug_mode sm_debug_mode;
656 struct tegra_vgpu_reg_ops_params reg_ops;
657 struct tegra_vgpu_channel_priority_params channel_priority;
658 struct tegra_vgpu_channel_runlist_interleave_params channel_interleave;
659 struct tegra_vgpu_channel_timeslice_params channel_timeslice;
660 struct tegra_vgpu_fecs_trace_filter fecs_trace_filter;
661 struct tegra_vgpu_channel_set_ctxsw_mode set_ctxsw_mode;
662 struct tegra_vgpu_channel_free_hwpm_ctx free_hwpm_ctx;
663 struct tegra_vgpu_gr_ctx_params gr_ctx;
664 struct tegra_vgpu_channel_bind_gr_ctx_params ch_bind_gr_ctx;
665 struct tegra_vgpu_tsg_bind_gr_ctx_params tsg_bind_gr_ctx;
666 struct tegra_vgpu_tsg_bind_unbind_channel_params tsg_bind_unbind_channel;
667 struct tegra_vgpu_tsg_open_rel_params tsg_open;
668 struct tegra_vgpu_tsg_open_rel_params tsg_release;
669 struct tegra_vgpu_tsg_preempt_params tsg_preempt;
670 struct tegra_vgpu_tsg_timeslice_params tsg_timeslice;
671 struct tegra_vgpu_tsg_runlist_interleave_params tsg_interleave;
672 struct tegra_vgpu_read_ptimer_params read_ptimer;
673 struct tegra_vgpu_set_powergate_params set_powergate;
674 struct tegra_vgpu_gpu_clk_rate_params gpu_clk_rate;
675 struct tegra_vgpu_constants_params constants;
676 struct tegra_vgpu_channel_cyclestats_snapshot_params cyclestats_snapshot;
677 struct tegra_vgpu_gpu_load_params gpu_load;
678 struct tegra_vgpu_suspend_resume_contexts suspend_contexts;
679 struct tegra_vgpu_suspend_resume_contexts resume_contexts;
680 struct tegra_vgpu_clear_sm_error_state clear_sm_error_state;
681 struct tegra_vgpu_prof_mgt_params prof_management;
682 struct tegra_vgpu_perfbuf_mgt_params perfbuf_management;
683 struct tegra_vgpu_get_timestamps_zipper_params get_timestamps_zipper;
684 struct tegra_vgpu_get_gpu_freq_table_params get_gpu_freq_table;
685 struct tegra_vgpu_vsms_mapping_params vsms_mapping;
686 struct tegra_vgpu_alloc_ctx_header_params alloc_ctx_header;
687 struct tegra_vgpu_free_ctx_header_params free_ctx_header;
688 struct tegra_vgpu_map_syncpt_params map_syncpt;
689 struct tegra_vgpu_tsg_bind_channel_ex_params tsg_bind_channel_ex;
690 struct tegra_vgpu_channel_update_pc_sampling update_pc_sampling;
691 struct tegra_vgpu_ecc_info_params ecc_info;
692 struct tegra_vgpu_ecc_counter_params ecc_counter;
693 struct tegra_vgpu_fb_set_mmu_debug_mode_params fb_set_mmu_debug_mode;
694 struct tegra_vgpu_gr_set_mmu_debug_mode_params gr_set_mmu_debug_mode;
695 char padding[192];
696 } params;
697};
698
699enum {
700 TEGRA_VGPU_GR_INTR_NOTIFY = 0,
701 TEGRA_VGPU_GR_INTR_SEMAPHORE_TIMEOUT = 1,
702 TEGRA_VGPU_GR_INTR_ILLEGAL_NOTIFY = 2,
703 TEGRA_VGPU_GR_INTR_ILLEGAL_METHOD = 3,
704 TEGRA_VGPU_GR_INTR_ILLEGAL_CLASS = 4,
705 TEGRA_VGPU_GR_INTR_FECS_ERROR = 5,
706 TEGRA_VGPU_GR_INTR_CLASS_ERROR = 6,
707 TEGRA_VGPU_GR_INTR_FIRMWARE_METHOD = 7,
708 TEGRA_VGPU_GR_INTR_EXCEPTION = 8,
709 TEGRA_VGPU_GR_INTR_SEMAPHORE = 9,
710 TEGRA_VGPU_FIFO_INTR_PBDMA = 10,
711 TEGRA_VGPU_FIFO_INTR_CTXSW_TIMEOUT = 11,
712 TEGRA_VGPU_FIFO_INTR_MMU_FAULT = 12,
713 TEGRA_VGPU_GR_INTR_SM_EXCEPTION = 16,
714};
715
716struct tegra_vgpu_gr_intr_info {
717 u32 type;
718 u32 chid;
719};
720
721struct tegra_vgpu_gr_nonstall_intr_info {
722 u32 type;
723};
724
725struct tegra_vgpu_fifo_intr_info {
726 u32 type;
727 u32 chid;
728};
729
730struct tegra_vgpu_fifo_nonstall_intr_info {
731 u32 type;
732};
733
734struct tegra_vgpu_ce2_nonstall_intr_info {
735 u32 type;
736};
737
738enum {
739 TEGRA_VGPU_FECS_TRACE_DATA_UPDATE = 0
740};
741
742struct tegra_vgpu_fecs_trace_event_info {
743 u32 type;
744};
745
746#define TEGRA_VGPU_CHANNEL_EVENT_ID_MAX 6
747struct tegra_vgpu_channel_event_info {
748 u32 event_id;
749 u32 is_tsg;
750 u32 id; /* channel id or tsg id */
751};
752
753struct tegra_vgpu_sm_esr_info {
754 u32 tsg_id;
755 u32 sm_id;
756 u32 hww_global_esr;
757 u32 hww_warp_esr;
758 u64 hww_warp_esr_pc;
759 u32 hww_global_esr_report_mask;
760 u32 hww_warp_esr_report_mask;
761};
762
763struct tegra_vgpu_semaphore_wakeup {
764 u32 post_events;
765};
766
767struct tegra_vgpu_channel_cleanup {
768 u32 chid;
769};
770
771struct tegra_vgpu_channel_set_error_notifier {
772 u32 chid;
773 u32 error;
774};
775
776enum {
777
778 TEGRA_VGPU_INTR_GR = 0,
779 TEGRA_VGPU_INTR_FIFO = 1,
780 TEGRA_VGPU_INTR_CE2 = 2,
781};
782
783enum {
784 TEGRA_VGPU_EVENT_INTR = 0,
785 TEGRA_VGPU_EVENT_ABORT = 1,
786 TEGRA_VGPU_EVENT_FECS_TRACE = 2,
787 TEGRA_VGPU_EVENT_CHANNEL = 3,
788 TEGRA_VGPU_EVENT_SM_ESR = 4,
789 TEGRA_VGPU_EVENT_SEMAPHORE_WAKEUP = 5,
790 TEGRA_VGPU_EVENT_CHANNEL_CLEANUP = 6,
791 TEGRA_VGPU_EVENT_SET_ERROR_NOTIFIER = 7,
792};
793
794struct tegra_vgpu_intr_msg {
795 unsigned int event;
796 u32 unit;
797 union {
798 struct tegra_vgpu_gr_intr_info gr_intr;
799 struct tegra_vgpu_gr_nonstall_intr_info gr_nonstall_intr;
800 struct tegra_vgpu_fifo_intr_info fifo_intr;
801 struct tegra_vgpu_fifo_nonstall_intr_info fifo_nonstall_intr;
802 struct tegra_vgpu_ce2_nonstall_intr_info ce2_nonstall_intr;
803 struct tegra_vgpu_fecs_trace_event_info fecs_trace;
804 struct tegra_vgpu_channel_event_info channel_event;
805 struct tegra_vgpu_sm_esr_info sm_esr;
806 struct tegra_vgpu_semaphore_wakeup sem_wakeup;
807 struct tegra_vgpu_channel_cleanup ch_cleanup;
808 struct tegra_vgpu_channel_set_error_notifier set_error_notifier;
809 char padding[32];
810 } info;
811};
812
813#define TEGRA_VGPU_QUEUE_SIZES \
814 512, \
815 sizeof(struct tegra_vgpu_intr_msg)
816
817#endif
diff --git a/include/nvgpu/vgpu/vgpu.h b/include/nvgpu/vgpu/vgpu.h
deleted file mode 100644
index ecdb896..0000000
--- a/include/nvgpu/vgpu/vgpu.h
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2 * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __VGPU_COMMON_H__
24#define __VGPU_COMMON_H__
25
26#include <nvgpu/types.h>
27#include <nvgpu/thread.h>
28#include <nvgpu/log.h>
29#include <nvgpu/lock.h>
30#include <nvgpu/vgpu/tegra_vgpu.h>
31
32struct device;
33struct tegra_vgpu_gr_intr_info;
34struct tegra_vgpu_fifo_intr_info;
35struct tegra_vgpu_cmd_msg;
36struct nvgpu_mem;
37struct gk20a;
38struct vm_gk20a;
39struct nvgpu_gr_ctx;
40struct nvgpu_cpu_time_correlation_sample;
41struct vgpu_ecc_stat;
42struct channel_gk20a;
43
44struct vgpu_priv_data {
45 u64 virt_handle;
46 struct nvgpu_thread intr_handler;
47 struct tegra_vgpu_constants_params constants;
48 struct vgpu_ecc_stat *ecc_stats;
49 int ecc_stats_count;
50 u32 num_freqs;
51 unsigned long *freqs;
52 struct nvgpu_mutex vgpu_clk_get_freq_lock;
53};
54
55struct vgpu_priv_data *vgpu_get_priv_data(struct gk20a *g);
56
57static inline u64 vgpu_get_handle(struct gk20a *g)
58{
59 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
60
61 if (unlikely(!priv)) {
62 nvgpu_err(g, "invalid vgpu_priv_data in %s", __func__);
63 return INT_MAX;
64 }
65
66 return priv->virt_handle;
67}
68
69int vgpu_comm_init(struct gk20a *g);
70void vgpu_comm_deinit(void);
71int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in,
72 size_t size_out);
73u64 vgpu_connect(void);
74int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value);
75int vgpu_intr_thread(void *dev_id);
76void vgpu_remove_support_common(struct gk20a *g);
77void vgpu_detect_chip(struct gk20a *g);
78int vgpu_init_gpu_characteristics(struct gk20a *g);
79int vgpu_read_ptimer(struct gk20a *g, u64 *value);
80int vgpu_get_timestamps_zipper(struct gk20a *g,
81 u32 source_id, u32 count,
82 struct nvgpu_cpu_time_correlation_sample *samples);
83int vgpu_init_hal(struct gk20a *g);
84int vgpu_get_constants(struct gk20a *g);
85u64 vgpu_bar1_map(struct gk20a *g, struct nvgpu_mem *mem);
86int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info);
87int vgpu_gr_alloc_gr_ctx(struct gk20a *g,
88 struct nvgpu_gr_ctx *gr_ctx,
89 struct vm_gk20a *vm,
90 u32 class,
91 u32 flags);
92void vgpu_gr_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm,
93 struct nvgpu_gr_ctx *gr_ctx);
94void vgpu_gr_handle_sm_esr_event(struct gk20a *g,
95 struct tegra_vgpu_sm_esr_info *info);
96int vgpu_gr_init_ctx_state(struct gk20a *g);
97int vgpu_fifo_isr(struct gk20a *g, struct tegra_vgpu_fifo_intr_info *info);
98u32 vgpu_ce_get_num_pce(struct gk20a *g);
99int vgpu_init_mm_support(struct gk20a *g);
100int vgpu_init_gr_support(struct gk20a *g);
101int vgpu_init_fifo_support(struct gk20a *g);
102
103int vgpu_gp10b_init_hal(struct gk20a *g);
104int vgpu_gv11b_init_hal(struct gk20a *g);
105
106bool vgpu_is_reduced_bar1(struct gk20a *g);
107
108int vgpu_gr_set_mmu_debug_mode(struct gk20a *g,
109 struct channel_gk20a *ch, bool enable);
110#endif
diff --git a/include/nvgpu/vgpu/vgpu_ivc.h b/include/nvgpu/vgpu/vgpu_ivc.h
deleted file mode 100644
index e7e4026..0000000
--- a/include/nvgpu/vgpu/vgpu_ivc.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __VGPU_IVC_H__
24#define __VGPU_IVC_H__
25
26#include <nvgpu/types.h>
27
28struct gk20a;
29
30int vgpu_ivc_init(struct gk20a *g, u32 elems,
31 const size_t *queue_sizes, u32 queue_start, u32 num_queues);
32void vgpu_ivc_deinit(u32 queue_start, u32 num_queues);
33void vgpu_ivc_release(void *handle);
34u32 vgpu_ivc_get_server_vmid(void);
35int vgpu_ivc_recv(u32 index, void **handle, void **data,
36 size_t *size, u32 *sender);
37int vgpu_ivc_send(u32 peer, u32 index, void *data, size_t size);
38int vgpu_ivc_sendrecv(u32 peer, u32 index, void **handle,
39 void **data, size_t *size);
40u32 vgpu_ivc_get_peer_self(void);
41void *vgpu_ivc_oob_get_ptr(u32 peer, u32 index, void **ptr,
42 size_t *size);
43void vgpu_ivc_oob_put_ptr(void *handle);
44
45#endif
diff --git a/include/nvgpu/vgpu/vgpu_ivm.h b/include/nvgpu/vgpu/vgpu_ivm.h
deleted file mode 100644
index cecdd51..0000000
--- a/include/nvgpu/vgpu/vgpu_ivm.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef __VGPU_IVM_H__
24#define __VGPU_IVM_H__
25
26#include <nvgpu/types.h>
27
28struct tegra_hv_ivm_cookie;
29
30struct tegra_hv_ivm_cookie *vgpu_ivm_mempool_reserve(unsigned int id);
31int vgpu_ivm_mempool_unreserve(struct tegra_hv_ivm_cookie *cookie);
32u64 vgpu_ivm_get_ipa(struct tegra_hv_ivm_cookie *cookie);
33u64 vgpu_ivm_get_size(struct tegra_hv_ivm_cookie *cookie);
34void *vgpu_ivm_mempool_map(struct tegra_hv_ivm_cookie *cookie);
35void vgpu_ivm_mempool_unmap(struct tegra_hv_ivm_cookie *cookie,
36 void *addr);
37#endif
diff --git a/include/nvgpu/vgpu/vm.h b/include/nvgpu/vgpu/vm.h
deleted file mode 100644
index fc0078d..0000000
--- a/include/nvgpu/vgpu/vm.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_VGPU_VM_H
24#define NVGPU_VGPU_VM_H
25
26#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
27int vgpu_vm_init(struct gk20a *g, struct vm_gk20a *vm);
28void vgpu_vm_remove(struct vm_gk20a *vm);
29#endif
30
31#endif /* NVGPU_VGPU_VM_H */
diff --git a/include/nvgpu/vidmem.h b/include/nvgpu/vidmem.h
deleted file mode 100644
index 4470232..0000000
--- a/include/nvgpu/vidmem.h
+++ /dev/null
@@ -1,148 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_VIDMEM_H
24#define NVGPU_VIDMEM_H
25
26#include <nvgpu/types.h>
27#include <nvgpu/errno.h>
28
29struct gk20a;
30struct mm_gk20a;
31struct nvgpu_mem;
32
33struct nvgpu_vidmem_buf {
34 /*
35 * Must be a pointer since control of this mem is passed over to the
36 * vidmem background clearing thread when the vidmem buf is freed.
37 */
38 struct nvgpu_mem *mem;
39
40 struct gk20a *g;
41
42 /*
43 * Filled in by each OS - this holds the necessary data to export this
44 * buffer to userspace. This will eventually be replaced by a struct
45 * which shall be defined in the OS specific vidmem.h header file.
46 */
47 void *priv;
48};
49
50#if defined(CONFIG_GK20A_VIDMEM)
51
52/**
53 * nvgpu_vidmem_user_alloc - Allocates a vidmem buffer for userspace
54 *
55 * @g - The GPU.
56 * @bytes - Size of the buffer in bytes.
57 *
58 * Allocate a generic (OS agnostic) vidmem buffer. This does not allocate the OS
59 * specific interfacing for userspace sharing. Instead is is expected that the
60 * OS specific code will allocate that OS specific data and add it to this
61 * buffer.
62 *
63 * The buffer allocated here is intended to use used by userspace, hence the
64 * extra struct over nvgpu_mem. If a vidmem buffer is needed by the kernel
65 * driver only then a simple nvgpu_dma_alloc_vid() or the like is sufficient.
66 *
67 * Returns a pointer to a vidmem buffer on success, 0 otherwise.
68 */
69struct nvgpu_vidmem_buf *nvgpu_vidmem_user_alloc(struct gk20a *g, size_t bytes);
70
71void nvgpu_vidmem_buf_free(struct gk20a *g, struct nvgpu_vidmem_buf *buf);
72
73int nvgpu_vidmem_clear_list_enqueue(struct gk20a *g, struct nvgpu_mem *mem);
74
75bool nvgpu_addr_is_vidmem_page_alloc(u64 addr);
76int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space);
77
78void nvgpu_vidmem_destroy(struct gk20a *g);
79int nvgpu_vidmem_init(struct mm_gk20a *mm);
80
81int nvgpu_vidmem_clear(struct gk20a *g, struct nvgpu_mem *mem);
82
83void nvgpu_vidmem_thread_pause_sync(struct mm_gk20a *mm);
84void nvgpu_vidmem_thread_unpause(struct mm_gk20a *mm);
85
86#else /* !defined(CONFIG_GK20A_VIDMEM) */
87
88/*
89 * When VIDMEM support is not present this interface is used.
90 */
91
92static inline bool nvgpu_addr_is_vidmem_page_alloc(u64 addr)
93{
94 return false;
95}
96
97static inline int nvgpu_vidmem_buf_alloc(struct gk20a *g, size_t bytes)
98{
99 return -ENOSYS;
100}
101
102static inline void nvgpu_vidmem_buf_free(struct gk20a *g,
103 struct nvgpu_vidmem_buf *buf)
104{
105}
106
107static inline int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space)
108{
109 return -ENOSYS;
110}
111
112static inline void nvgpu_vidmem_destroy(struct gk20a *g)
113{
114}
115
116static inline int nvgpu_vidmem_init(struct mm_gk20a *mm)
117{
118 return 0;
119}
120
121static inline int nvgpu_vidmem_clear_all(struct gk20a *g)
122{
123 return -ENOSYS;
124}
125
126static inline int nvgpu_vidmem_clear(struct gk20a *g,
127 struct nvgpu_mem *mem)
128{
129 return -ENOSYS;
130}
131
132static inline void nvgpu_vidmem_thread_pause_sync(struct mm_gk20a *mm)
133{
134}
135
136static inline void nvgpu_vidmem_thread_unpause(struct mm_gk20a *mm)
137{
138}
139
140#endif /* !defined(CONFIG_GK20A_VIDMEM) */
141
142/*
143 * Simple macro for VIDMEM debugging.
144 */
145#define vidmem_dbg(g, fmt, args...) \
146 nvgpu_log(g, gpu_dbg_vidmem, fmt, ##args); \
147
148#endif /* NVGPU_VIDMEM_H */
diff --git a/include/nvgpu/vm.h b/include/nvgpu/vm.h
deleted file mode 100644
index 3867c74..0000000
--- a/include/nvgpu/vm.h
+++ /dev/null
@@ -1,330 +0,0 @@
1/*
2 * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_VM_H
24#define NVGPU_VM_H
25
26#include <nvgpu/kref.h>
27#include <nvgpu/list.h>
28#include <nvgpu/rbtree.h>
29#include <nvgpu/types.h>
30#include <nvgpu/gmmu.h>
31#include <nvgpu/nvgpu_mem.h>
32#include <nvgpu/allocator.h>
33
34struct vm_gk20a;
35struct nvgpu_vm_area;
36struct gk20a_comptag_allocator;
37
38/*
39 * Defined by each OS. Allows the common VM code do things to the OS specific
40 * buffer structures.
41 */
42struct nvgpu_os_buffer;
43
44#ifdef __KERNEL__
45#include <nvgpu/linux/vm.h>
46#elif defined(__NVGPU_POSIX__)
47#include <nvgpu/posix/vm.h>
48#else
49/* QNX include goes here. */
50#include <nvgpu_rmos/include/vm.h>
51#endif
52
53/**
54 * This header contains the OS agnostic APIs for dealing with VMs. Most of the
55 * VM implementation is system specific - it must translate from a platform's
56 * representation of DMA'able memory to our nvgpu_mem notion.
57 *
58 * However, some stuff is platform agnostic. VM ref-counting and the VM struct
59 * itself are platform agnostic. Also, the initialization and destruction of
60 * VMs is the same across all platforms (for now).
61 *
62 * VM Architecture:
63 * ----------------
64 *
65 * The VM managment in nvgpu is split up as follows: a vm_gk20a struct which
66 * defines an address space. Each address space is a set of page tables and a
67 * GPU Virtual Address (GVA) allocator. Any number of channels may bind to a VM.
68 *
69 * +----+ +----+ +----+ +-----+ +-----+
70 * | C1 | | C2 | ... | Cn | | VM1 | ... | VMn |
71 * +-+--+ +-+--+ +-+--+ +--+--+ +--+--+
72 * | | | | |
73 * | | +----->-----+ |
74 * | +---------------->-----+ |
75 * +------------------------>-----------------+
76 *
77 * Each VM also manages a set of mapped buffers (struct nvgpu_mapped_buf)
78 * which corresponds to _user space_ buffers which have been mapped into this VM.
79 * Kernel space mappings (created by nvgpu_gmmu_map()) are not tracked by VMs.
80 * This may be an architectural bug, but for now it seems to be OK. VMs can be
81 * closed in various ways - refs counts hitting zero, direct calls to the remove
82 * routine, etc. Note: this is going to change. VM cleanup is going to be
83 * homogonized around ref-counts. When a VM is closed all mapped buffers in the
84 * VM are unmapped from the GMMU. This means that those mappings will no longer
85 * be valid and any subsequent access by the GPU will fault. That means one must
86 * ensure the VM is not in use before closing it.
87 *
88 * VMs may also contain VM areas (struct nvgpu_vm_area) which are created for
89 * the purpose of sparse and/or fixed mappings. If userspace wishes to create a
90 * fixed mapping it must first create a VM area - either with a fixed address or
91 * not. VM areas are reserved - other mapping operations will not use the space.
92 * Userspace may then create fixed mappings within that VM area.
93 */
94
95/* map/unmap batch state */
96struct vm_gk20a_mapping_batch {
97 bool gpu_l2_flushed;
98 bool need_tlb_invalidate;
99};
100
101struct nvgpu_mapped_buf {
102 struct vm_gk20a *vm;
103 struct nvgpu_vm_area *vm_area;
104
105 struct nvgpu_ref ref;
106
107 struct nvgpu_rbtree_node node;
108 struct nvgpu_list_node buffer_list;
109 u64 addr;
110 u64 size;
111
112 u32 pgsz_idx;
113
114 u32 flags;
115 u32 kind;
116 bool va_allocated;
117
118 /*
119 * Separate from the nvgpu_os_buffer struct to clearly distinguish
120 * lifetime. A nvgpu_mapped_buf_priv will _always_ be wrapped by a
121 * struct nvgpu_mapped_buf; however, there are times when a struct
122 * nvgpu_os_buffer would be separate. This aims to prevent dangerous
123 * usage of container_of() or the like in OS code.
124 */
125 struct nvgpu_mapped_buf_priv os_priv;
126};
127
128static inline struct nvgpu_mapped_buf *
129nvgpu_mapped_buf_from_buffer_list(struct nvgpu_list_node *node)
130{
131 return (struct nvgpu_mapped_buf *)
132 ((uintptr_t)node - offsetof(struct nvgpu_mapped_buf,
133 buffer_list));
134}
135
136static inline struct nvgpu_mapped_buf *
137mapped_buffer_from_rbtree_node(struct nvgpu_rbtree_node *node)
138{
139 return (struct nvgpu_mapped_buf *)
140 ((uintptr_t)node - offsetof(struct nvgpu_mapped_buf, node));
141}
142
143struct vm_gk20a {
144 struct mm_gk20a *mm;
145 struct gk20a_as_share *as_share; /* as_share this represents */
146 char name[20];
147
148 u64 va_start;
149 u64 va_limit;
150
151 int num_user_mapped_buffers;
152
153 bool big_pages; /* enable large page support */
154 bool enable_ctag;
155 bool guest_managed; /* whether the vm addr space is managed by guest */
156
157 u32 big_page_size;
158
159 bool userspace_managed;
160
161 const struct gk20a_mmu_level *mmu_levels;
162
163 struct nvgpu_ref ref;
164
165 struct nvgpu_mutex update_gmmu_lock;
166
167 struct nvgpu_gmmu_pd pdb;
168
169 /*
170 * These structs define the address spaces. In some cases it's possible
171 * to merge address spaces (user and user_lp) and in other cases it's
172 * not. vma[] allows the code to be agnostic to this by always using
173 * address spaces through this pointer array.
174 */
175 struct nvgpu_allocator *vma[GMMU_NR_PAGE_SIZES];
176 struct nvgpu_allocator kernel;
177 struct nvgpu_allocator user;
178 struct nvgpu_allocator user_lp;
179
180 struct nvgpu_rbtree_node *mapped_buffers;
181
182 struct nvgpu_list_node vm_area_list;
183
184#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
185 u64 handle;
186#endif
187 u32 gmmu_page_sizes[GMMU_NR_PAGE_SIZES];
188
189 /* if non-NULL, kref_put will use this batch when
190 unmapping. Must hold vm->update_gmmu_lock. */
191 struct vm_gk20a_mapping_batch *kref_put_batch;
192
193 /*
194 * Each address space needs to have a semaphore pool.
195 */
196 struct nvgpu_semaphore_pool *sema_pool;
197
198 /*
199 * Create sync point read only map for sync point range.
200 * Channels sharing same vm will also share same sync point ro map
201 */
202 u64 syncpt_ro_map_gpu_va;
203 /* Protect allocation of sync point map */
204 struct nvgpu_mutex syncpt_ro_map_lock;
205};
206
207/*
208 * Mapping flags.
209 */
210#define NVGPU_VM_MAP_FIXED_OFFSET BIT32(0)
211#define NVGPU_VM_MAP_CACHEABLE BIT32(1)
212#define NVGPU_VM_MAP_IO_COHERENT BIT32(2)
213#define NVGPU_VM_MAP_UNMAPPED_PTE BIT32(3)
214#define NVGPU_VM_MAP_DIRECT_KIND_CTRL BIT32(4)
215#define NVGPU_VM_MAP_L3_ALLOC BIT32(5)
216#define NVGPU_VM_MAP_PLATFORM_ATOMIC BIT32(6)
217
218#define NVGPU_KIND_INVALID -1
219
220void nvgpu_vm_get(struct vm_gk20a *vm);
221void nvgpu_vm_put(struct vm_gk20a *vm);
222
223int vm_aspace_id(struct vm_gk20a *vm);
224bool nvgpu_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size);
225
226int nvgpu_vm_pde_coverage_bit_count(struct vm_gk20a *vm);
227
228/* batching eliminates redundant cache flushes and invalidates */
229void nvgpu_vm_mapping_batch_start(struct vm_gk20a_mapping_batch *batch);
230void nvgpu_vm_mapping_batch_finish(
231 struct vm_gk20a *vm, struct vm_gk20a_mapping_batch *batch);
232/* called when holding vm->update_gmmu_lock */
233void nvgpu_vm_mapping_batch_finish_locked(
234 struct vm_gk20a *vm, struct vm_gk20a_mapping_batch *batch);
235
236/* get reference to all currently mapped buffers */
237int nvgpu_vm_get_buffers(struct vm_gk20a *vm,
238 struct nvgpu_mapped_buf ***mapped_buffers,
239 int *num_buffers);
240/* put references on the given buffers */
241void nvgpu_vm_put_buffers(struct vm_gk20a *vm,
242 struct nvgpu_mapped_buf **mapped_buffers,
243 int num_buffers);
244
245struct nvgpu_mapped_buf *nvgpu_vm_find_mapping(struct vm_gk20a *vm,
246 struct nvgpu_os_buffer *os_buf,
247 u64 map_addr,
248 u32 flags,
249 int kind);
250
251struct nvgpu_mapped_buf *nvgpu_vm_map(struct vm_gk20a *vm,
252 struct nvgpu_os_buffer *os_buf,
253 struct nvgpu_sgt *sgt,
254 u64 map_addr,
255 u64 map_size,
256 u64 phys_offset,
257 int rw,
258 u32 flags,
259 s16 compr_kind,
260 s16 incompr_kind,
261 struct vm_gk20a_mapping_batch *batch,
262 enum nvgpu_aperture aperture);
263
264void nvgpu_vm_unmap(struct vm_gk20a *vm, u64 offset,
265 struct vm_gk20a_mapping_batch *batch);
266
267/*
268 * Implemented by each OS. Called from within the core VM code to handle OS
269 * specific components of an nvgpu_mapped_buf.
270 */
271void nvgpu_vm_unmap_system(struct nvgpu_mapped_buf *mapped_buffer);
272
273/*
274 * Don't use this outside of the core VM code!
275 */
276void __nvgpu_vm_unmap_ref(struct nvgpu_ref *ref);
277
278u64 nvgpu_os_buf_get_size(struct nvgpu_os_buffer *os_buf);
279
280/*
281 * These all require the VM update lock to be held.
282 */
283struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf(
284 struct vm_gk20a *vm, u64 addr);
285struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_range(
286 struct vm_gk20a *vm, u64 addr);
287struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_less_than(
288 struct vm_gk20a *vm, u64 addr);
289
290int nvgpu_insert_mapped_buf(struct vm_gk20a *vm,
291 struct nvgpu_mapped_buf *mapped_buffer);
292void nvgpu_remove_mapped_buf(struct vm_gk20a *vm,
293 struct nvgpu_mapped_buf *mapped_buffer);
294
295/*
296 * Initialize a preallocated vm
297 */
298int __nvgpu_vm_init(struct mm_gk20a *mm,
299 struct vm_gk20a *vm,
300 u32 big_page_size,
301 u64 low_hole,
302 u64 kernel_reserved,
303 u64 aperture_size,
304 bool big_pages,
305 bool userspace_managed,
306 char *name);
307
308struct vm_gk20a *nvgpu_vm_init(struct gk20a *g,
309 u32 big_page_size,
310 u64 low_hole,
311 u64 kernel_reserved,
312 u64 aperture_size,
313 bool big_pages,
314 bool userspace_managed,
315 char *name);
316
317/*
318 * These are private to the VM code but are unfortunately used by the vgpu code.
319 * It appears to be used for an optimization in reducing the number of server
320 * requests to the vgpu server. Basically the vgpu implementation of
321 * map_global_ctx_buffers() sends a bunch of VA ranges over to the RM server.
322 * Ideally the RM server can just batch mappings but until such a time this
323 * will be used by the vgpu code.
324 */
325u64 __nvgpu_vm_alloc_va(struct vm_gk20a *vm, u64 size,
326 u32 pgsz_idx);
327int __nvgpu_vm_free_va(struct vm_gk20a *vm, u64 addr,
328 u32 pgsz_idx);
329
330#endif /* NVGPU_VM_H */
diff --git a/include/nvgpu/vm_area.h b/include/nvgpu/vm_area.h
deleted file mode 100644
index 8778e42..0000000
--- a/include/nvgpu/vm_area.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_VM_AREA_H
24#define NVGPU_VM_AREA_H
25
26#include <nvgpu/list.h>
27#include <nvgpu/types.h>
28
29struct vm_gk20a;
30struct gk20a_as_share;
31struct nvgpu_as_alloc_space_args;
32struct nvgpu_as_free_space_args;
33
34struct nvgpu_vm_area {
35 /*
36 * Entry into the list of VM areas owned by a VM.
37 */
38 struct nvgpu_list_node vm_area_list;
39
40 /*
41 * List of buffers mapped into this vm_area.
42 */
43 struct nvgpu_list_node buffer_list_head;
44
45 u32 flags;
46 u32 pgsz_idx;
47 u64 addr;
48 u64 size;
49 bool sparse;
50};
51
52static inline struct nvgpu_vm_area *
53nvgpu_vm_area_from_vm_area_list(struct nvgpu_list_node *node)
54{
55 return (struct nvgpu_vm_area *)
56 ((uintptr_t)node - offsetof(struct nvgpu_vm_area,
57 vm_area_list));
58};
59
60/*
61 * Alloc space flags.
62 */
63#define NVGPU_VM_AREA_ALLOC_FIXED_OFFSET BIT(0)
64#define NVGPU_VM_AREA_ALLOC_SPARSE BIT(1)
65
66int nvgpu_vm_area_alloc(struct vm_gk20a *vm, u32 pages, u32 page_size,
67 u64 *addr, u32 flags);
68int nvgpu_vm_area_free(struct vm_gk20a *vm, u64 addr);
69
70struct nvgpu_vm_area *nvgpu_vm_area_find(struct vm_gk20a *vm, u64 addr);
71int nvgpu_vm_area_validate_buffer(struct vm_gk20a *vm,
72 u64 map_offset, u64 map_size, u32 pgsz_idx,
73 struct nvgpu_vm_area **pvm_area);
74
75#endif /* NVGPU_VM_AREA_H */
diff --git a/include/nvgpu/vpr.h b/include/nvgpu/vpr.h
deleted file mode 100644
index ae0ac1b..0000000
--- a/include/nvgpu/vpr.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#ifndef NVGPU_VPR_H
24#define NVGPU_VPR_H
25
26#include <nvgpu/types.h>
27
28bool nvgpu_is_vpr_resize_enabled(void);
29
30#endif /* NVGPU_VPR_H */
diff --git a/include/nvgpu/xve.h b/include/nvgpu/xve.h
deleted file mode 100644
index 2d0d698..0000000
--- a/include/nvgpu/xve.h
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22#ifndef NVGPU_XVE_H
23#define NVGPU_XVE_H
24
25#include <nvgpu/types.h>
26#include <nvgpu/log2.h>
27
28/*
29 * For the available speeds bitmap.
30 */
31#define GPU_XVE_SPEED_2P5 (1 << 0)
32#define GPU_XVE_SPEED_5P0 (1 << 1)
33#define GPU_XVE_SPEED_8P0 (1 << 2)
34#define GPU_XVE_NR_SPEEDS 3
35
36#define GPU_XVE_SPEED_MASK (GPU_XVE_SPEED_2P5 | \
37 GPU_XVE_SPEED_5P0 | \
38 GPU_XVE_SPEED_8P0)
39
40/*
41 * The HW uses a 2 bit field where speed is defined by a number:
42 *
43 * NV_XVE_LINK_CONTROL_STATUS_LINK_SPEED_2P5 = 1
44 * NV_XVE_LINK_CONTROL_STATUS_LINK_SPEED_5P0 = 2
45 * NV_XVE_LINK_CONTROL_STATUS_LINK_SPEED_8P0 = 3
46 *
47 * This isn't ideal for a bitmap with available speeds. So the external
48 * APIs think about speeds as a bit in a bitmap and this function converts
49 * from those bits to the actual HW speed setting.
50 *
51 * @speed_bit must have only 1 bit set and must be one of the 3 available
52 * HW speeds. Not all chips support all speeds so use available_speeds() to
53 * determine what a given chip supports.
54 */
55static inline const char *xve_speed_to_str(u32 speed)
56{
57 if (!speed || !is_power_of_2(speed) ||
58 !(speed & GPU_XVE_SPEED_MASK)) {
59 return "Unknown ???";
60 }
61
62 return speed & GPU_XVE_SPEED_2P5 ? "Gen1" :
63 speed & GPU_XVE_SPEED_5P0 ? "Gen2" :
64 speed & GPU_XVE_SPEED_8P0 ? "Gen3" :
65 "Unknown ???";
66}
67
68#endif /* NVGPU_XVE_H */