| 476abf9f | 30-Sep-2026 |
John Hubbard <jhubbard@nvidia.com> |
gpu: nova-core: service GSP events from the SWGEN0 interrupt
The GSP posts each message for the CPU to the GSP-to-CPU queue and then raises SWGEN0, a software-generated interrupt cause of its falcon
gpu: nova-core: service GSP events from the SWGEN0 interrupt
The GSP posts each message for the CPU to the GSP-to-CPU queue and then raises SWGEN0, a software-generated interrupt cause of its falcon. GIN delivers SWGEN0 to the CPU on vector 155.
A thread waiting for a command reply was the only reader of the queue, so an event posted between commands stayed unread until the next command was sent.
Register a threaded handler on the GSP vector. Draining the queue takes the command-queue mutex, which can sleep, so the top half reads and writes only registers and wakes the IRQ thread to drain the queue. Every existing read of the queue asks for one message type and waits on a deadline, so add a drain that logs and consumes whatever the GSP has already posted and returns at once.
When a falcon cause other than SWGEN0 stays set after its latch is cleared, as the Blackwell fault-containment and ECC causes do, disable the GSP vector rather than retrigger the falcon. A retrigger would re-emit the cause at once, and the CPU would take the same interrupt again and again.
Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-14-jhubbard@nvidia.com [acourbot: trim comment leaking unneeded implementation details.] [acourbot: make Subtree crate-visible here instead of in earlier patch.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| e727d1c3 | 30-Sep-2026 |
John Hubbard <jhubbard@nvidia.com> |
gpu: nova-core: add the falcon interrupt registers and HAL methods
A falcon latches each interrupt cause that is raised in its IRQSTAT register. On a RISC-V falcon, each cause is routed either to th
gpu: nova-core: add the falcon interrupt registers and HAL methods
A falcon latches each interrupt cause that is raised in its IRQSTAT register. On a RISC-V falcon, each cause is routed either to the host, meaning the CPU, or to the falcon's own core, and two routing registers hold that routing. The falcon signals the interrupt tree only when its set of host-routed causes goes from empty to non-empty, so a handler that clears the tree leaf while a cause is still latched has to write INTR_RETRIGGER, which makes the falcon re-emit its causes. Turing falcons have no INTR_RETRIGGER, and the routing registers have different offsets from GA102 on.
Add IRQSTAT, INTR_RETRIGGER, and the two routing registers, the last at both sets of offsets, and add two falcon HAL methods: one intersects an IRQSTAT value with the routing registers, and one retriggers the falcon, or does nothing on Turing. GA100 keeps the Turing HAL, as it does for boot, and the retrigger register is a property of that HAL's instance.
The two methods have no user yet.
Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-13-jhubbard@nvidia.com [acourbot: remove implementation-specific comments on interface doc.] [acourbot: make constructor take boolean instead of having two methods.] [acourbot: add NVIDIA copyright headers to modified files.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| 38f7e545 | 25-Mar-2026 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: convert falcon registers to kernel register macro
Convert all PFALCON, PFALCON2 and PRISCV registers to use the kernel's register macro and update the code accordingly.
Because they
gpu: nova-core: convert falcon registers to kernel register macro
Convert all PFALCON, PFALCON2 and PRISCV registers to use the kernel's register macro and update the code accordingly.
Because they rely on the same types to implement relative registers, they need to be updated in lockstep.
nova-core's local register macro is now unused, so remove it.
Reviewed-by: Gary Guo <gary@garyguo.net> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260325-b4-nova-register-v4-8-bdf172f0f6ca@nvidia.com [acourbot@nvidia.com: remove unused import.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| ab2aad25 | 22-Jan-2026 |
Timur Tabi <ttabi@nvidia.com> |
gpu: nova-core: add Falcon HAL method load_method()
Some GPUs do not support using DMA to transfer code/data from system memory to Falcon memory, and instead must use programmed I/O (PIO). Add a fun
gpu: nova-core: add Falcon HAL method load_method()
Some GPUs do not support using DMA to transfer code/data from system memory to Falcon memory, and instead must use programmed I/O (PIO). Add a function to the Falcon HAL to indicate whether a given GPU's Falcons support DMA for this purpose.
Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260122222848.2555890-10-ttabi@nvidia.com [acourbot@nvidia.com: add short code to call into the HAL.] [acourbot@nvidia.com: make `dma_load` private as per feedback.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| a75718af | 22-Jan-2026 |
Timur Tabi <ttabi@nvidia.com> |
gpu: nova-core: add NV_PFALCON_FALCON_ENGINE::reset_engine()
Add a method for the NV_PFALCON_FALCON_ENGINE register that reset the Falcon, and update the reset_eng() HAL functions to use it.
Signed
gpu: nova-core: add NV_PFALCON_FALCON_ENGINE::reset_engine()
Add a method for the NV_PFALCON_FALCON_ENGINE register that reset the Falcon, and update the reset_eng() HAL functions to use it.
Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260122222848.2555890-9-ttabi@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| 954b38fd | 22-Jan-2026 |
Timur Tabi <ttabi@nvidia.com> |
gpu: nova-core: Add basic Turing HAL
Add the basic HAL for recognizing Turing GPUs. This isn't enough to support booting GSP-RM on Turing, but it's a start.
Note that GA100, which boots using the
gpu: nova-core: Add basic Turing HAL
Add the basic HAL for recognizing Turing GPUs. This isn't enough to support booting GSP-RM on Turing, but it's a start.
Note that GA100, which boots using the same method as Turing, is not supported yet.
Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260122222848.2555890-8-ttabi@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| 173c99b8 | 07-Nov-2025 |
John Hubbard <jhubbard@nvidia.com> |
gpu: nova-core: apply the one "use" item per line policy
As per [1], we need one "use" item per line, in order to reduce merge conflicts. Furthermore, we need a trailing ", //" in order to tell rust
gpu: nova-core: apply the one "use" item per line policy
As per [1], we need one "use" item per line, in order to reduce merge conflicts. Furthermore, we need a trailing ", //" in order to tell rustfmt(1) to leave it alone.
This does that for the entire nova-core driver.
[1] https://docs.kernel.org/rust/coding-guidelines.html#imports
Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: John Hubbard <jhubbard@nvidia.com> [acourbot@nvidia.com: remove imports already in prelude as pointed out by Danilo.] [acourbot@nvidia.com: remove a few unneeded trailing `//`.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251107021006.434109-1-jhubbard@nvidia.com>
show more ...
|
| 9a3c2f8a | 29-Oct-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: replace `as` with `from` conversions where possible
The `as` operator is best avoided as it silently drops bits if the destination type is smaller that the source.
For data types wh
gpu: nova-core: replace `as` with `from` conversions where possible
The `as` operator is best avoided as it silently drops bits if the destination type is smaller that the source.
For data types where this is clearly not the case, use `from` to unambiguously signal that these conversions are lossless.
Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251029-nova-as-v3-1-6a30c7333ad9@nvidia.com>
show more ...
|
| 09880996 | 18-Jul-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: register: add support for relative array registers
Add support for declaring arrays of registers available from a variable base. This is effectively a combination of the relative and
gpu: nova-core: register: add support for relative array registers
Add support for declaring arrays of registers available from a variable base. This is effectively a combination of the relative and array registers features.
nova-core does not make much use of this yet, but it will become helpful to have for GSP boot.
Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://lore.kernel.org/r/20250718-nova-regs-v2-19-7b6a762aa1cd@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| 4092e1b4 | 24-Jun-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: replace `Duration` with `Delta`
The kernel's `Delta` type was not available when the `wait_on` function was introduced. Now that it is, switch to it as it is more compact than `Durat
gpu: nova-core: replace `Duration` with `Delta`
The kernel's `Delta` type was not available when the `wait_on` function was introduced. Now that it is, switch to it as it is more compact than `Duration` and cannot panic.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250624-nova-delta-v1-1-b37d75a593ac@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
show more ...
|
| 43ad65ec | 24-Jun-2025 |
Danilo Krummrich <dakr@kernel.org> |
gpu: nova-core: consider `clippy::cast_lossless`
Fix all warnings caused by `clippy::cast_lossless`, which is going to be enabled by [1].
Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Miguel Ojed
gpu: nova-core: consider `clippy::cast_lossless`
Fix all warnings caused by `clippy::cast_lossless`, which is going to be enabled by [1].
Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20250615-ptr-as-ptr-v12-5-f43b024581e8@gmail.com [1] Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250624132337.2242-2-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
show more ...
|
| 3606620b | 19-Jun-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: update and annotate TODO list
A few new dependencies are required to remove some of the TODO items:
- A way to safely convert from byte slices to types implementing `FromBytes`, -
gpu: nova-core: update and annotate TODO list
A few new dependencies are required to remove some of the TODO items:
- A way to safely convert from byte slices to types implementing `FromBytes`, - A way to obtain slices and write into a `CoherentAllocation`, - Several improvements to the `register!()` macro, - Alignment operations to powers of two, and an equivalent to the C `fls`, - Support for `xa_alloc` in the XAlloc bindings.
Some items have also become obsolete:
- The auxiliary bus abstractions have been implemented and are in use, - The ELF utilities are not considered for being part of the core kernel bindings anymore. - VBIOS, falcon and GPU timer have been completed.
We now have quite a few TODO entries in the code, so annotate them with a 4 letter code representing the corresponding task in `todo.rst`. This allows to easily find which part of the code corresponds to a given entry (and conversely).
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250619-nova-frts-v6-24-ecf41ef99252@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
show more ...
|