Skip to content

Commit df1c9a3

Browse files
committed
595.45.04
1 parent 2ccbad2 commit df1c9a3

File tree

1,210 files changed

+434482
-435125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,210 files changed

+434482
-435125
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NVIDIA Linux Open GPU Kernel Module Source
22

33
This is the source release of the NVIDIA Linux open GPU kernel modules,
4-
version 590.48.01.
4+
version 595.45.04.
55

66

77
## How to Build
@@ -17,7 +17,7 @@ as root:
1717

1818
Note that the kernel modules built here must be used with GSP
1919
firmware and user-space NVIDIA GPU driver components from a corresponding
20-
590.48.01 driver release. This can be achieved by installing
20+
595.45.04 driver release. This can be achieved by installing
2121
the NVIDIA GPU driver from the .run file using the `--no-kernel-modules`
2222
option. E.g.,
2323

@@ -185,7 +185,7 @@ table below).
185185
For details on feature support and limitations, see the NVIDIA GPU driver
186186
end user README here:
187187

188-
https://us.download.nvidia.com/XFree86/Linux-x86_64/590.48.01/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/595.45.04/README/kernel_open.html
189189

190190
For vGPU support, please refer to the README.vgpu packaged in the vGPU Host
191191
Package for more details.
@@ -845,6 +845,7 @@ Subsystem Device ID.
845845
| NVIDIA RTX A400 | 25B2 1028 1879 |
846846
| NVIDIA RTX A400 | 25B2 103C 1879 |
847847
| NVIDIA RTX A400 | 25B2 103C 8D95 |
848+
| NVIDIA RTX A400 | 25B2 103C 8F5B |
848849
| NVIDIA RTX A400 | 25B2 10DE 1879 |
849850
| NVIDIA RTX A400 | 25B2 17AA 1879 |
850851
| NVIDIA A16 | 25B6 10DE 14A9 |
@@ -971,6 +972,7 @@ Subsystem Device ID.
971972
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 2BB4 10DE 204C |
972973
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 2BB4 17AA 204C |
973974
| NVIDIA RTX PRO 6000 Blackwell Server Edition | 2BB5 10DE 204E |
975+
| NVIDIA RTX PRO 6000 Blackwell Server Edition | 2BB5 10DE 220B |
974976
| NVIDIA RTX 6000D | 2BB9 10DE 2091 |
975977
| NVIDIA GeForce RTX 5080 | 2C02 |
976978
| NVIDIA GeForce RTX 5070 Ti | 2C05 |

kernel-open/Kbuild

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ ccflags-y += -I$(src)/common/inc
7979
ccflags-y += -I$(src)
8080
ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
8181
ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
82-
ccflags-y += -DNV_VERSION_STRING=\"590.48.01\"
82+
ccflags-y += -DNV_VERSION_STRING=\"595.45.04\"
8383

8484
# Include and link Tegra out-of-tree modules.
85-
ifneq ($(wildcard /usr/src/nvidia/nvidia-oot),)
86-
SYSSRCNVOOT ?= /usr/src/nvidia/nvidia-oot
85+
ifneq ($(wildcard /usr/src/nvidia/nvidia-public),)
86+
SYSSRCNVOOT ?= /usr/src/nvidia/nvidia-public
8787
endif
8888

8989
ifneq ($(SYSSRCHOST1X),)

kernel-open/common/inc/cpuopsys.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2018-2018 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2018-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: MIT
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -28,7 +28,7 @@
2828
*
2929
* cpuopsys.h
3030
*
31-
* Copyright (c) 2001, Nvidia Corporation. All rights reserved.
31+
* Copyright (c) 2001-2025, Nvidia Corporation. All rights reserved.
3232
*/
3333

3434
/*!
@@ -134,7 +134,6 @@
134134
#endif
135135

136136
/* ***** Processor type variations */
137-
/* Note: The prefix NV_CPU_* is taken by Nvcm.h */
138137

139138
#if ((defined(_M_IX86) || defined(__i386__) || defined(__i386)) && !defined(NVCPU_X86)) /* XXX until removed from Makefiles */
140139
/* _M_IX86 for windows, __i386__ for Linux (or any x86 using gcc) */

kernel-open/common/inc/nv-firmware-registry.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: MIT
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -59,8 +59,9 @@
5959
#define NV_REG_ENABLE_GPU_FIRMWARE_MODE_ENABLED 0x00000001
6060
#define NV_REG_ENABLE_GPU_FIRMWARE_MODE_DEFAULT 0x00000002
6161

62-
#define NV_REG_ENABLE_GPU_FIRMWARE_POLICY_MASK 0x000000F0
63-
#define NV_REG_ENABLE_GPU_FIRMWARE_POLICY_ALLOW_FALLBACK 0x00000010
62+
#define NV_REG_ENABLE_GPU_FIRMWARE_POLICY_MASK 0x000000F0
63+
#define NV_REG_ENABLE_GPU_FIRMWARE_POLICY_ALLOW_FALLBACK 0x00000010
64+
#define NV_REG_ENABLE_GPU_FIRMWARE_POLICY_DEFAULT_ON_WS_SERVER 0x00000020
6465

6566
#define NV_REG_ENABLE_GPU_FIRMWARE_DEFAULT_VALUE 0x00000012
6667

kernel-open/common/inc/nv-gpu-info.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ typedef struct {
3333
} pci_info;
3434

3535
NvBool needs_numa_setup;
36+
NvBool is_soc_disp;
3637

3738
/*
3839
* opaque OS-specific pointer; on Linux, this is a pointer to the

kernel-open/common/inc/nv-ioctl-numbers.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: MIT
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -26,6 +26,10 @@
2626
#define NV_IOCTL_NUMBERS_H
2727

2828
/* NOTE: using an ioctl() number > 55 will overflow! */
29+
/*
30+
* NOTE: Any new ioctls added here should also be added to nv_validate_ioctls() in nv.c or
31+
* rm_validate_ioctls() in osapi.c
32+
*/
2933
#define NV_IOCTL_MAGIC 'F'
3034
#define NV_IOCTL_BASE 200
3135
#define NV_ESC_CARD_INFO (NV_IOCTL_BASE + 0)

kernel-open/common/inc/nv-linux.h

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
#include <asm/pgtable.h> /* pte bit definitions */
130130
#include <asm/bitops.h> /* __set_bit() */
131131
#include <linux/time.h> /* FD_SET() */
132+
#include <linux/memremap.h>
132133

133134
/*
134135
* Use current->cred->euid, instead of calling current_euid().
@@ -503,7 +504,7 @@ static inline pgprot_t nv_adjust_pgprot(pgprot_t vm_prot)
503504

504505
#define NV_HAVE_MEMORY_ENCRYPT_DECRYPT 0
505506

506-
#if defined(NVCPU_X86_64) && \
507+
#if (defined(NVCPU_X86_64) || defined(NVCPU_AARCH64)) && \
507508
NV_IS_EXPORT_SYMBOL_GPL_set_memory_encrypted && \
508509
NV_IS_EXPORT_SYMBOL_GPL_set_memory_decrypted
509510
#undef NV_HAVE_MEMORY_ENCRYPT_DECRYPT
@@ -553,7 +554,7 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
553554
#endif
554555
}
555556

556-
#define NV_GET_PAGE_STRUCT(phys_page) virt_to_page(__va(phys_page))
557+
#define NV_GET_PAGE_STRUCT(phys_page) pfn_to_page(phys_page >> PAGE_SHIFT)
557558
#define NV_VMA_PGOFF(vma) ((vma)->vm_pgoff)
558559
#define NV_VMA_SIZE(vma) ((vma)->vm_end - (vma)->vm_start)
559560
#define NV_VMA_OFFSET(vma) (((NvU64)(vma)->vm_pgoff) << PAGE_SHIFT)
@@ -562,6 +563,12 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
562563

563564
#define NV_DEVICE_MINOR_NUMBER(x) minor((x)->i_rdev)
564565

566+
#if defined(NV_GET_DEV_PAGEMAP_HAS_PGMAP_ARG)
567+
#define NV_GET_DEV_PAGEMAP(pfn) get_dev_pagemap(pfn, NULL)
568+
#else
569+
#define NV_GET_DEV_PAGEMAP get_dev_pagemap
570+
#endif
571+
565572
#define NV_PCI_DISABLE_DEVICE(pci_dev) \
566573
{ \
567574
NvU16 __cmd[2]; \
@@ -671,18 +678,6 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
671678
#define PCI_CAP_ID_EXP 0x10
672679
#endif
673680

674-
/*
675-
* If the host OS has page sizes larger than 4KB, we may have a security
676-
* problem. Registers are typically grouped in 4KB pages, but if there are
677-
* larger pages, then the smallest userspace mapping possible (e.g., a page)
678-
* may give more access than intended to the user.
679-
*/
680-
#define NV_4K_PAGE_ISOLATION_REQUIRED(addr, size) \
681-
((PAGE_SIZE > NV_RM_PAGE_SIZE) && \
682-
((size) <= NV_RM_PAGE_SIZE) && \
683-
(((addr) >> NV_RM_PAGE_SHIFT) == \
684-
(((addr) + (size) - 1) >> NV_RM_PAGE_SHIFT)))
685-
686681
static inline int nv_remap_page_range(struct vm_area_struct *vma,
687682
unsigned long virt_addr, NvU64 phys_addr, NvU64 size, pgprot_t prot)
688683
{
@@ -1212,6 +1207,10 @@ typedef struct coherent_link_info_s {
12121207
* of virutalized OS environment it is Intermediate Physical Address(IPA) */
12131208
NvU64 gpu_mem_pa;
12141209

1210+
/* Size of the GPU memory mappable through coherent link. It is possible
1211+
that less than whole FB is mapped to CPU. */
1212+
NvU64 gpu_mem_size;
1213+
12151214
/* Physical address of the reserved portion of the GPU memory, applicable
12161215
* only in Grace Hopper self hosted passthrough virtualizatioan platform. */
12171216
NvU64 rsvd_mem_pa;
@@ -1374,6 +1373,13 @@ typedef struct nv_linux_state_s {
13741373

13751374
/* Lock serializing ISRs for different SOC vectors */
13761375
nv_spinlock_t soc_isr_lock;
1376+
1377+
/*
1378+
* Lock serializing access to the soc_isr_info struct across top and
1379+
* bottom halves for SOC vectors.
1380+
*/
1381+
nv_spinlock_t soc_isr_info_lock;
1382+
13771383
void *soc_bh_mutex;
13781384

13791385
struct nv_timer snapshot_timer;
@@ -1428,6 +1434,9 @@ typedef struct nv_linux_state_s {
14281434
int (*devfreq_enable_boost)(struct device *dev, unsigned int duration);
14291435
int (*devfreq_disable_boost)(struct device *dev);
14301436
#endif
1437+
1438+
/* Per-device GPU init on probe setting, initialized from global NVreg_GpuInitOnProbe */
1439+
NvBool init_on_probe;
14311440
} nv_linux_state_t;
14321441

14331442
extern nv_linux_state_t *nv_linux_devices;
@@ -1485,9 +1494,11 @@ typedef struct
14851494
nv_kthread_q_item_t deferred_close_q_item;
14861495
NvU32 *attached_gpus;
14871496
size_t num_attached_gpus;
1488-
nv_alloc_mapping_context_t mmap_context;
14891497
struct address_space mapping;
14901498

1499+
struct rw_semaphore fileVaLock;
1500+
nv_alloc_mapping_list_node_t *file_mapping_list;
1501+
14911502
nv_kthread_q_item_t open_q_item;
14921503
struct completion open_complete;
14931504
nv_linux_state_t *deferred_open_nvl;
@@ -1599,6 +1610,8 @@ extern NvU32 NVreg_RegisterPlatformDeviceDriver;
15991610
extern NvU32 NVreg_EnableResizableBar;
16001611
extern NvU32 NVreg_TegraGpuPgMask;
16011612
extern NvU32 NVreg_EnableNonblockingOpen;
1613+
extern NvU32 NVreg_UseKernelSuspendNotifiers;
1614+
extern NvU32 NVreg_GpuInitOnProbe;
16021615

16031616
extern NvU32 num_probed_nv_devices;
16041617
extern NvU32 num_nv_devices;

kernel-open/common/inc/nv-modeset-interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ typedef struct {
114114
* specified GPU. This is equivalent to opening and closing a
115115
* /dev/nvidiaN device file from user-space.
116116
*/
117-
int (*open_gpu)(NvU32 gpu_id, nvidia_modeset_stack_ptr sp);
118-
void (*close_gpu)(NvU32 gpu_id, nvidia_modeset_stack_ptr sp);
117+
int (*open_gpu)(NvU32 gpu_id, nvidia_modeset_stack_ptr sp, NvBool reset_aware);
118+
void (*close_gpu)(NvU32 gpu_id, nvidia_modeset_stack_ptr sp, NvBool reset_aware);
119119

120120
void (*op)(nvidia_modeset_stack_ptr sp, void *ops_cmd);
121121

kernel-open/common/inc/nv-pci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ int nvidia_dev_get_pci_info(const NvU8 *, struct pci_dev **, NvU64 *, NvU64 *);
3838
nv_linux_state_t * find_pci(NvU32, NvU8, NvU8, NvU8);
3939
NvBool nv_pci_is_valid_topology_for_direct_pci(nv_state_t *, struct pci_dev *);
4040
NvBool nv_pci_has_common_pci_switch(nv_state_t *nv, struct pci_dev *);
41+
void nv_pci_tegra_boost_clocks(struct device *dev);
4142
#endif

kernel-open/common/inc/nv-platform.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,16 @@ void nv_soc_free_irqs(nv_state_t *nv);
4545

4646
#define NV_SUPPORTS_PLATFORM_DISPLAY_DEVICE (NV_SUPPORTS_PLATFORM_DEVICE && NV_SUPPORTS_DCE_CLIENT_IPC)
4747

48+
#if defined(CONFIG_OF)
49+
NV_STATUS nv_platform_get_screen_info_dt(
50+
NvU64 *pPhysicalAddress,
51+
NvU32 *pFbWidth,
52+
NvU32 *pFbHeight,
53+
NvU32 *pFbDepth,
54+
NvU32 *pFbPitch,
55+
NvU64 *pFbSize
56+
);
57+
58+
#endif // CONFIG_OF
59+
4860
#endif

0 commit comments

Comments
 (0)