From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Eliot Courtney" <ecourtney@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>, "Gary Guo" <gary@garyguo.net>,
"John Hubbard" <jhubbard@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>, "Zhi Wang" <zhiw@nvidia.com>,
<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>,
"dri-devel" <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v4 09/13] gpu: nova-core: introduce GspBootMethod
Date: Tue, 07 Jul 2026 14:43:25 +0900 [thread overview]
Message-ID: <DJS3LQASSSI5.2CW373BX9SNXI@nvidia.com> (raw)
In-Reply-To: <DJRY1GRYSM2D.38JVTWHGNBXJ3@nvidia.com>
On Tue Jul 7, 2026 at 10:21 AM JST, Alexandre Courbot wrote:
> On Thu Jul 2, 2026 at 11:28 AM JST, Eliot Courtney wrote:
>> On Mon Jun 29, 2026 at 11:09 PM JST, Alexandre Courbot wrote:
>>> The GSP boot method is currently determined by two ad-hoc methods of
>>> `Chipset`: `uses_fsp` (a boolean telling whether to use the FSP boot
>>> path or the Sec2 Booter one) and `needs_fwsec_bootloader` (another
>>> boolean valid only for the Sec2 Booter method that tells whether the
>>> FWSEC bootloader must be used).
>>>
>>> This is neither extensible nor sound: the combination `uses_fsp &&
>>> needs_fwsec_bootloader` is invalid, but can still be expressed.
>>>
>>> Thus, unify these two predicates into a single `gsp_boot_method` method
>>> that returns an enum type unambiguously describing the boot method to
>>> use. This ensures that no invalid combination can be expressed, which
>>> makes matching sounder.
>>>
>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>> ---
>>
>> Ideally we would not need to expose bootloader details (needs fwsec
>> bootloader, mapping of architecture to GspBootMethod) outside of the
>> HAL, and also not have to duplicate the logic for determining
>> `needs_fwsec_bootloader` in both the HAL and Chipset. One thing
>> preventing keeping all this in the HALs is that we need to know the set
>> of firmware files in a const context, which can't go through the &dyn
>> for HALs. I also find it a bit odd to go Chipset->GspBootMethod->HAL
>> which relies on the GSP HAL being entirely determined by the boot method
>> which doesn't feel generally correct to me.
>
> So far it is a good mapping though - the only thing abstracted by the
> GSP HAL is how we boot and stop the GSP, which is entirely determined by
> the boot method used.
>
> While I agree that not exposing these details outside of the HAL would
> be nice, at least for the time being we need to - the creation of the
> `Fsp` happens at the `Gpu` level, and is now conditional on the boot
> method. Thus the introduction of `GspBootMethod`. I would be happy to
> remove this in the future if we can, but that doesn't look possible
> without more refactoring, and this series is already doing quite a bit
> of it just to move the `Fsp` instance up. I think going further should
> be a separate effort.
Need to give myself a self-rebuke here. :)
The only thing that still required the boot method leaking out of the
HAL was the instantiation of `Fsp`, and that can also be taken care of
by adding a constructor that returns an `Option<Fsp>`. It integrates
nicely with the already-existing `Fsp` HAL, and combining that with
Eliot's idea of providing the firmware files from the GSP HAL we can
remove the `Chipset` ad-hoc boolean method entirely, without needing to
introduce `GspBootMethod`.
This makes things look cleaner overall, so I'll use this approach for
v5.
next prev parent reply other threads:[~2026-07-07 5:43 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 14:09 [PATCH v4 00/13] gpu: nova-core: consolidate and streamline GSP boot process Alexandre Courbot
2026-06-29 14:09 ` [PATCH v4 01/13] gpu: nova-core: gsp: sequencer: use GspBootContext Alexandre Courbot
2026-06-29 14:22 ` sashiko-bot
2026-06-29 14:09 ` [PATCH v4 02/13] gpu: nova-core: gsp: sequencer: do not store sequence into GspSequencer Alexandre Courbot
2026-06-29 14:19 ` sashiko-bot
2026-06-29 14:09 ` [PATCH v4 03/13] gpu: nova-core: gsp: replace BootUnloadGuard with local handlers Alexandre Courbot
2026-06-29 14:21 ` sashiko-bot
2026-07-01 2:54 ` Eliot Courtney
2026-07-06 10:00 ` Alexandre Courbot
2026-06-29 14:09 ` [PATCH v4 04/13] gpu: nova-core: gsp: pass GspBootContext to unload methods Alexandre Courbot
2026-07-01 3:57 ` Eliot Courtney
2026-06-29 14:09 ` [PATCH v4 05/13] gpu: nova-core: gsp: centralize missing unload bundle warnings Alexandre Courbot
2026-06-29 14:20 ` sashiko-bot
2026-07-01 4:06 ` Eliot Courtney
2026-06-29 14:09 ` [PATCH v4 06/13] gpu: nova-core: gsp: fold TU102 unload bundle construction into HAL method Alexandre Courbot
2026-07-01 4:15 ` Eliot Courtney
2026-06-29 14:09 ` [PATCH v4 07/13] gpu: nova-core: gsp: turn FWSEC execution " Alexandre Courbot
2026-07-01 4:16 ` Eliot Courtney
2026-06-29 14:09 ` [PATCH v4 08/13] gpu: nova-core: gsp: make use of FWSEC bootloader a property of the TU102 HAL Alexandre Courbot
2026-06-29 14:09 ` [PATCH v4 09/13] gpu: nova-core: introduce GspBootMethod Alexandre Courbot
2026-07-02 2:28 ` Eliot Courtney
2026-07-07 1:21 ` Alexandre Courbot
2026-07-07 5:43 ` Alexandre Courbot [this message]
2026-06-29 14:09 ` [PATCH v4 10/13] gpu: nova-core: avoid repeated calls to pci::Device::as_ref Alexandre Courbot
2026-06-29 14:17 ` sashiko-bot
2026-07-01 6:38 ` Eliot Courtney
2026-06-29 14:09 ` [PATCH v4 11/13] gpu: nova-core: gsp: pass GspBootContext mutably Alexandre Courbot
2026-07-01 6:40 ` Eliot Courtney
2026-06-29 14:09 ` [PATCH v4 12/13] gpu: nova-core: gsp: separate context and GPU lifetimes in GspBootContext Alexandre Courbot
2026-06-29 14:22 ` sashiko-bot
2026-07-01 6:52 ` Eliot Courtney
2026-06-29 14:09 ` [PATCH v4 13/13] gpu: nova-core: store Fsp instance in Gpu Alexandre Courbot
2026-06-29 14:27 ` sashiko-bot
2026-07-01 6:46 ` Eliot Courtney
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=DJS3LQASSSI5.2CW373BX9SNXI@nvidia.com \
--to=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
--cc=zhiw@nvidia.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.