From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Alexandre Courbot <acourbot@nvidia.com>,
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>
Subject: Re: [PATCH v3 5/7] Documentation: gpu: nova-core: Document devinit process
Date: Thu, 3 Jul 2025 07:22:38 +0700 [thread overview]
Message-ID: <aGXNTjw-VPTNYrH2@archie.me> (raw)
In-Reply-To: <20250702-nova-docs-v3-5-f362260813e2@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 3769 bytes --]
On Wed, Jul 02, 2025 at 08:00:42PM +0900, Alexandre Courbot wrote:
> diff --git a/Documentation/gpu/nova/core/devinit.rst b/Documentation/gpu/nova/core/devinit.rst
> new file mode 100644
> index 0000000000000000000000000000000000000000..70c819a96a00a0a27846e7e96525470d07721a10
> --- /dev/null
> +++ b/Documentation/gpu/nova/core/devinit.rst
> @@ -0,0 +1,61 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +==================================
> +Device Initialization (devinit)
> +==================================
> +The devinit process is complex and subject to change. This document provides a high-level
> +overview using the Ampere GPU family as an example. The goal is to provide a conceptual
> +overview of the process to aid in understanding the corresponding kernel code.
> +
> +Device initialization (devinit) is a crucial sequence of register read/write operations
> +that occur after a GPU reset. The devinit sequence is essential for properly configuring
> +the GPU hardware before it can be used.
> +
> +The devinit engine is an interpreter program that typically runs on the PMU (Power Management
> +Unit) microcontroller of the GPU. This interpreter executes a "script" of initialization
> +commands. The devinit engine itself is part of the VBIOS ROM in the same ROM image as the
> +FWSEC (Firmware Security) image (see fwsec.rst and vbios.rst) and it runs before the
> +nova-core driver is even loaded. On an Ampere GPU, the devinit ucode is separate from the
> +FWSEC ucode. It is launched by FWSEC, which runs on the GSP in 'heavy-secure' mode, while
> +devinit runs on the PMU in 'light-secure' mode.
> +
> +Key Functions of devinit
> +------------------------
> +devinit performs several critical tasks:
> +
> +1. Programming VRAM memory controller timings
> +2. Power sequencing
> +3. Clock and PLL (Phase-Locked Loop) configuration
> +4. Thermal management
> +
> +Low-level Firmware Initialization Flow
> +--------------------------------------
> +Upon reset, several microcontrollers on the GPU (such as PMU, SEC2, GSP, etc.) run GPU
> +firmware (gfw) code to set up the GPU and its core parameters. Most of the GPU is
> +considered unusable until this initialization process completes.
> +
> +These low-level GPU firmware components are typically:
> +
> +1. Located in the VBIOS ROM in the same ROM partition (see vbios.rst and fwsec.rst).
> +2. Executed in sequence on different microcontrollers:
> +
> + - The devinit engine typically but not necessarily runs on the PMU.
> + - On an Ampere GPU, the FWSEC typically runs on the GSP (GPU System Processor) in
> + heavy-secure mode.
> +
> +Before the driver can proceed with further initialization, it must wait for a signal
> +indicating that core initialization is complete (known as GFW_BOOT). This signal is
> +asserted by the FWSEC running on the GSP in heavy-secure mode.
> +
> +Runtime Considerations
> +----------------------
> +It's important to note that the devinit sequence also needs to run during suspend/resume
> +operations at runtime, not just during initial boot, as it is critical to power management.
> +
> +Security and Access Control
> +---------------------------
> +The initialization process involves careful privilege management. For example, before
> +accessing certain completion status registers, the driver must check privilege level
> +masks. Some registers are only accessible after secure firmware (FWSEC) lowers the
> +privilege level to allow CPU (LS/low-secure) access. This is the case, for example,
> +when receiving the GFW_BOOT signal.
The wording LGTM, thanks!
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-07-03 0:22 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 ` [PATCH v3 3/7] gpu: nova-core: Clarify falcon code Alexandre Courbot
2025-07-06 13:48 ` 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 [this message]
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=aGXNTjw-VPTNYrH2@archie.me \
--to=bagasdotme@gmail.com \
--cc=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
all inboxes | Powered by JetHome®