diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:07:40 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:10:52 -0400 |
| commit | 2c5337a24f7f2d02989dfb733c55d6d8c7e90493 (patch) | |
| tree | b9f1028cb443b03190b710c0d7ee640bf5958631 /include/nvgpu | |
| parent | aa06f84f03cba7ad1aae5cd527355bb3d8c152a6 (diff) | |
Update includes to L4T r32.7.4 and drop nvgpu/gk20a.h dependency
Also add instructions for updating `include/`. These files are now
only needed to build on Linux 4.9-based Tegra platforms.
Diffstat (limited to 'include/nvgpu')
| -rw-r--r-- | include/nvgpu/acr/nvgpu_acr.h | 6 | ||||
| -rw-r--r-- | include/nvgpu/bug.h | 20 | ||||
| -rw-r--r-- | include/nvgpu/enabled.h | 9 | ||||
| -rw-r--r-- | include/nvgpu/gk20a.h | 8 | ||||
| -rw-r--r-- | include/nvgpu/hw/gk20a/hw_gr_gk20a.h | 61 | ||||
| -rw-r--r-- | include/nvgpu/hw/gm20b/hw_gr_gm20b.h | 14 | ||||
| -rw-r--r-- | include/nvgpu/hw/gp106/hw_gr_gp106.h | 4 | ||||
| -rw-r--r-- | include/nvgpu/hw/gp10b/hw_gr_gp10b.h | 4 | ||||
| -rw-r--r-- | include/nvgpu/hw/gv100/hw_gr_gv100.h | 4 | ||||
| -rw-r--r-- | include/nvgpu/hw/gv11b/hw_gr_gv11b.h | 4 | ||||
| -rw-r--r-- | include/nvgpu/log.h | 3 | ||||
| -rw-r--r-- | include/nvgpu/nvgpu_err.h | 359 | ||||
| -rw-r--r-- | include/nvgpu/nvlink.h | 2 | ||||
| -rw-r--r-- | include/nvgpu/pmu.h | 20 | ||||
| -rw-r--r-- | include/nvgpu/pmuif/gpmuif_pg.h | 14 | ||||
| -rw-r--r-- | include/nvgpu/tsg.h | 4 |
16 files changed, 523 insertions, 13 deletions
diff --git a/include/nvgpu/acr/nvgpu_acr.h b/include/nvgpu/acr/nvgpu_acr.h index 7a0143e..cdb7bb8 100644 --- a/include/nvgpu/acr/nvgpu_acr.h +++ b/include/nvgpu/acr/nvgpu_acr.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2021, NVIDIA CORPORATION. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
| @@ -39,7 +39,11 @@ struct hs_acr; | |||
| 39 | struct nvgpu_acr; | 39 | struct nvgpu_acr; |
| 40 | 40 | ||
| 41 | #define HSBIN_ACR_BL_UCODE_IMAGE "pmu_bl.bin" | 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" | ||
| 42 | #define HSBIN_ACR_UCODE_IMAGE "acr_ucode.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" | ||
| 43 | #define HSBIN_ACR_AHESASC_PROD_UCODE "acr_ahesasc_prod_ucode.bin" | 47 | #define HSBIN_ACR_AHESASC_PROD_UCODE "acr_ahesasc_prod_ucode.bin" |
| 44 | #define HSBIN_ACR_ASB_PROD_UCODE "acr_asb_prod_ucode.bin" | 48 | #define HSBIN_ACR_ASB_PROD_UCODE "acr_asb_prod_ucode.bin" |
| 45 | #define HSBIN_ACR_AHESASC_DBG_UCODE "acr_ahesasc_dbg_ucode.bin" | 49 | #define HSBIN_ACR_AHESASC_DBG_UCODE "acr_ahesasc_dbg_ucode.bin" |
diff --git a/include/nvgpu/bug.h b/include/nvgpu/bug.h index 3d139b7..82d641b 100644 --- a/include/nvgpu/bug.h +++ b/include/nvgpu/bug.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
| @@ -24,6 +24,24 @@ | |||
| 24 | 24 | ||
| 25 | #ifdef __KERNEL__ | 25 | #ifdef __KERNEL__ |
| 26 | #include <linux/bug.h> | 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) | ||
| 27 | #elif defined(__NVGPU_POSIX__) | 45 | #elif defined(__NVGPU_POSIX__) |
| 28 | #include <nvgpu/posix/bug.h> | 46 | #include <nvgpu/posix/bug.h> |
| 29 | #else | 47 | #else |
diff --git a/include/nvgpu/enabled.h b/include/nvgpu/enabled.h index ef55dad..51e9358 100644 --- a/include/nvgpu/enabled.h +++ b/include/nvgpu/enabled.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
| @@ -85,7 +85,12 @@ struct gk20a; | |||
| 85 | #define NVGPU_MM_USE_PHYSICAL_SG 27 | 85 | #define NVGPU_MM_USE_PHYSICAL_SG 27 |
| 86 | /* WAR for gm20b chips. */ | 86 | /* WAR for gm20b chips. */ |
| 87 | #define NVGPU_MM_FORCE_128K_PMU_VM 28 | 87 | #define NVGPU_MM_FORCE_128K_PMU_VM 28 |
| 88 | 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 | ||
| 89 | /* | 94 | /* |
| 90 | * Host flags | 95 | * Host flags |
| 91 | */ | 96 | */ |
diff --git a/include/nvgpu/gk20a.h b/include/nvgpu/gk20a.h index aa95969..19bfaee 100644 --- a/include/nvgpu/gk20a.h +++ b/include/nvgpu/gk20a.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * GK20A Graphics | 4 | * GK20A Graphics |
| 5 | * | 5 | * |
| @@ -517,6 +517,7 @@ struct gpu_ops { | |||
| 517 | u32 *priv_addr_table, | 517 | u32 *priv_addr_table, |
| 518 | u32 *priv_addr_table_index); | 518 | u32 *priv_addr_table_index); |
| 519 | u32 (*fecs_ctxsw_mailbox_size)(void); | 519 | u32 (*fecs_ctxsw_mailbox_size)(void); |
| 520 | u32 (*gpc0_gpccs_ctxsw_mailbox_size)(void); | ||
| 520 | int (*init_sw_bundle64)(struct gk20a *g); | 521 | int (*init_sw_bundle64)(struct gk20a *g); |
| 521 | int (*alloc_global_ctx_buffers)(struct gk20a *g); | 522 | int (*alloc_global_ctx_buffers)(struct gk20a *g); |
| 522 | int (*map_global_ctx_buffers)(struct gk20a *g, | 523 | int (*map_global_ctx_buffers)(struct gk20a *g, |
| @@ -719,7 +720,7 @@ struct gpu_ops { | |||
| 719 | struct ch_state *ch_state); | 720 | struct ch_state *ch_state); |
| 720 | u32 (*intr_0_error_mask)(struct gk20a *g); | 721 | u32 (*intr_0_error_mask)(struct gk20a *g); |
| 721 | int (*is_preempt_pending)(struct gk20a *g, u32 id, | 722 | int (*is_preempt_pending)(struct gk20a *g, u32 id, |
| 722 | unsigned int id_type); | 723 | unsigned int id_type, bool preempt_retries_left); |
| 723 | void (*init_pbdma_intr_descs)(struct fifo_gk20a *f); | 724 | void (*init_pbdma_intr_descs)(struct fifo_gk20a *f); |
| 724 | int (*reset_enable_hw)(struct gk20a *g); | 725 | int (*reset_enable_hw)(struct gk20a *g); |
| 725 | int (*setup_userd)(struct channel_gk20a *c); | 726 | int (*setup_userd)(struct channel_gk20a *c); |
| @@ -1079,6 +1080,7 @@ struct gpu_ops { | |||
| 1079 | u32 (*pmu_pg_supported_engines_list)(struct gk20a *g); | 1080 | u32 (*pmu_pg_supported_engines_list)(struct gk20a *g); |
| 1080 | u32 (*pmu_pg_engines_feature_list)(struct gk20a *g, | 1081 | u32 (*pmu_pg_engines_feature_list)(struct gk20a *g, |
| 1081 | u32 pg_engine_id); | 1082 | u32 pg_engine_id); |
| 1083 | int (*pmu_process_pg_event)(struct gk20a *g, void *pmumsg); | ||
| 1082 | bool (*pmu_is_lpwr_feature_supported)(struct gk20a *g, | 1084 | bool (*pmu_is_lpwr_feature_supported)(struct gk20a *g, |
| 1083 | u32 feature_id); | 1085 | u32 feature_id); |
| 1084 | int (*pmu_lpwr_enable_pg)(struct gk20a *g, bool pstate_lock); | 1086 | int (*pmu_lpwr_enable_pg)(struct gk20a *g, bool pstate_lock); |
| @@ -1793,6 +1795,8 @@ bool gk20a_check_poweron(struct gk20a *g); | |||
| 1793 | int gk20a_prepare_poweroff(struct gk20a *g); | 1795 | int gk20a_prepare_poweroff(struct gk20a *g); |
| 1794 | int gk20a_finalize_poweron(struct gk20a *g); | 1796 | int gk20a_finalize_poweron(struct gk20a *g); |
| 1795 | 1797 | ||
| 1798 | int nvgpu_wait_for_stall_interrupts(struct gk20a *g, u32 timeout); | ||
| 1799 | int nvgpu_wait_for_nonstall_interrupts(struct gk20a *g, u32 timeout); | ||
| 1796 | void nvgpu_wait_for_deferred_interrupts(struct gk20a *g); | 1800 | void nvgpu_wait_for_deferred_interrupts(struct gk20a *g); |
| 1797 | 1801 | ||
| 1798 | struct gk20a * __must_check gk20a_get(struct gk20a *g); | 1802 | struct gk20a * __must_check gk20a_get(struct gk20a *g); |
diff --git a/include/nvgpu/hw/gk20a/hw_gr_gk20a.h b/include/nvgpu/hw/gk20a/hw_gr_gk20a.h index 826108f..376cc8f 100644 --- a/include/nvgpu/hw/gk20a/hw_gr_gk20a.h +++ b/include/nvgpu/hw/gk20a/hw_gr_gk20a.h | |||
| @@ -1380,6 +1380,10 @@ static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void) | |||
| 1380 | { | 1380 | { |
| 1381 | return 0x00502400U; | 1381 | return 0x00502400U; |
| 1382 | } | 1382 | } |
| 1383 | static inline u32 gr_gpc0_gpccs_ctxsw_mailbox__size_1_v(void) | ||
| 1384 | { | ||
| 1385 | return 0x00000010U; | ||
| 1386 | } | ||
| 1383 | static inline u32 gr_fecs_ctxsw_idlestate_r(void) | 1387 | static inline u32 gr_fecs_ctxsw_idlestate_r(void) |
| 1384 | { | 1388 | { |
| 1385 | return 0x00409420U; | 1389 | return 0x00409420U; |
| @@ -3804,4 +3808,61 @@ static inline u32 gr_gpcs_tpcs_sm_dbgr_control0_run_trigger_task_f(void) | |||
| 3804 | { | 3808 | { |
| 3805 | return 0x40000000U; | 3809 | return 0x40000000U; |
| 3806 | } | 3810 | } |
| 3811 | |||
| 3812 | static inline u32 gr_gpc0_gpccs_falcon_irqstat_r(void) | ||
| 3813 | { | ||
| 3814 | return 0x00502008U; | ||
| 3815 | } | ||
| 3816 | static inline u32 gr_gpc0_gpccs_falcon_irqmode_r(void) | ||
| 3817 | { | ||
| 3818 | return 0x0050200cU; | ||
| 3819 | } | ||
| 3820 | static inline u32 gr_gpc0_gpccs_falcon_irqmask_r(void) | ||
| 3821 | { | ||
| 3822 | return 0x00502018U; | ||
| 3823 | } | ||
| 3824 | static inline u32 gr_gpc0_gpccs_falcon_irqdest_r(void) | ||
| 3825 | { | ||
| 3826 | return 0x0050201cU; | ||
| 3827 | } | ||
| 3828 | static inline u32 gr_gpc0_gpccs_falcon_debug1_r(void) | ||
| 3829 | { | ||
| 3830 | return 0x00502090U; | ||
| 3831 | } | ||
| 3832 | static inline u32 gr_gpc0_gpccs_falcon_debuginfo_r(void) | ||
| 3833 | { | ||
