From: Alexandre Courbot <acourbot@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Jonathan Corbet <corbet@lwn.net>
Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
rust-for-linux@vger.kernel.org,
Joel Fernandes <joelagnelf@nvidia.com>,
Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH v3 3/7] gpu: nova-core: Clarify falcon code
Date: Wed, 02 Jul 2025 20:00:40 +0900 [thread overview]
Message-ID: <20250702-nova-docs-v3-3-f362260813e2@nvidia.com> (raw)
In-Reply-To: <20250702-nova-docs-v3-0-f362260813e2@nvidia.com>
From: Joel Fernandes <joelagnelf@nvidia.com>
Add documentation strings, comments and AES mode for completeness
to the Falcon signatures.
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/gpu/nova-core/falcon.rs | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs
index c2c6f9eb380ab390befe5af1b3c5df260ccd7595..6ded4a37a08deb71db668f389efad84ff17b317b 100644
--- a/drivers/gpu/nova-core/falcon.rs
+++ b/drivers/gpu/nova-core/falcon.rs
@@ -105,14 +105,22 @@ fn try_from(value: u8) -> Result<Self> {
/// register.
#[repr(u8)]
#[derive(Debug, Default, Copy, Clone)]
+/// Security mode of the Falcon microprocessor.
+/// See falcon.rst for more details.
pub(crate) enum FalconSecurityModel {
/// Non-Secure: runs unsigned code without privileges.
#[default]
None = 0,
- /// Low-Secure: runs code with some privileges. Can only be entered from `Heavy` mode, which
- /// will typically validate the LS code through some signature.
+ /// Light-Secured (LS): Runs signed code with some privileges.
+ /// Entry into this mode is only possible from 'Heavy-secure' mode, which verifies the code's
+ /// signature.
+ ///
+ /// Also known as Low-Secure, Privilege Level 2 or PL2.
Light = 2,
- /// High-Secure: runs signed code with full privileges. Signature is validated by boot ROM.
+ /// Heavy-Secured (HS): Runs signed code with full privileges.
+ /// The code's signature is verified by the Falcon Boot ROM (BROM).
+ ///
+ /// Also known as High-Secure, Privilege Level 3 or PL3.
Heavy = 3,
}
impl_from_enum_to_u32!(FalconSecurityModel);
@@ -136,10 +144,13 @@ fn try_from(value: u8) -> Result<Self> {
}
/// Signing algorithm for a given firmware, used in the [`crate::regs::NV_PFALCON2_FALCON_MOD_SEL`]
-/// register.
+/// register. It is passed to the Falcon Boot ROM (BROM) as a parameter.
#[repr(u8)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
pub(crate) enum FalconModSelAlgo {
+ /// AES.
+ #[expect(dead_code)]
+ Aes = 0,
/// RSA3K.
#[default]
Rsa3k = 1,
@@ -209,15 +220,18 @@ pub(crate) enum FalconMem {
Dmem,
}
-/// Target/source of a DMA transfer to/from falcon memory.
+/// Defines the Framebuffer Interface (FBIF) aperture type.
+/// This determines the memory type for external memory access during a DMA transfer, which is
+/// performed by the Falcon's Framebuffer DMA (FBDMA) engine. See falcon.rst for more details.
#[derive(Debug, Clone, Default)]
pub(crate) enum FalconFbifTarget {
/// VRAM.
#[default]
+ /// Local Framebuffer (GPU's VRAM memory)
LocalFb = 0,
- /// Coherent system memory.
+ /// Coherent system memory (System DRAM).
CoherentSysmem = 1,
- /// Non-coherent system memory.
+ /// Non-coherent system memory (System DRAM).
NoncoherentSysmem = 2,
}
impl_from_enum_to_u32!(FalconFbifTarget);
@@ -571,3 +585,4 @@ pub(crate) fn signature_reg_fuse_version(
.signature_reg_fuse_version(self, bar, engine_id_mask, ucode_id)
}
}
+
--
2.50.0
next prev parent reply other threads:[~2025-07-02 11:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 11:00 [PATCH v3 0/7] Documentation for nova-core Alexandre Courbot
2025-07-02 11:00 ` [PATCH v3 1/7] gpu: nova-core: Add code comments related to devinit Alexandre Courbot
2025-07-06 13:42 ` Miguel Ojeda
2025-07-07 12:09 ` Alexandre Courbot
2025-07-02 11:00 ` [PATCH v3 2/7] gpu: nova-core: Clarify sysmembar operations Alexandre Courbot
2025-07-06 13:46 ` Miguel Ojeda
2025-07-10 19:06 ` Miguel Ojeda
2025-07-02 11:00 ` Alexandre Courbot [this message]
2025-07-06 13:48 ` [PATCH v3 3/7] gpu: nova-core: Clarify falcon code Miguel Ojeda
2025-07-02 11:00 ` [PATCH v3 4/7] Documentation: gpu: nova-core: Document vbios layout Alexandre Courbot
2025-07-03 0:20 ` Bagas Sanjaya
2025-07-03 15:49 ` Joel Fernandes
2025-07-02 11:00 ` [PATCH v3 5/7] Documentation: gpu: nova-core: Document devinit process Alexandre Courbot
2025-07-03 0:22 ` Bagas Sanjaya
2025-07-02 11:00 ` [PATCH v3 6/7] Documentation: gpu: nova-core: Document fwsec operation and layout Alexandre Courbot
2025-07-03 0:25 ` Bagas Sanjaya
2025-07-03 15:50 ` Joel Fernandes
2025-07-02 11:00 ` [PATCH v3 7/7] Documentation: gpu: nova-core: Document basics of the Falcon Alexandre Courbot
2025-07-03 0:29 ` Bagas Sanjaya
2025-07-02 11:06 ` [PATCH v3 0/7] Documentation for nova-core Joel Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250702-nova-docs-v3-3-f362260813e2@nvidia.com \
--to=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=joelagnelf@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).