From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Timur Tabi" <ttabi@nvidia.com>
Cc: <driver-core@lists.linux.dev>, <nova-gpu@lists.linux.dev>,
<rust-for-linux@vger.kernel.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
"Luis Chamberlain" <mcgrof@kernel.org>,
"Russ Weight" <russ.weight@linux.dev>,
"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>
Subject: Re: [PATCH v3 5/7] gpu: nova-core: transition gen_bootloader to TLV images
Date: Mon, 06 Jul 2026 15:31:36 +0900 [thread overview]
Message-ID: <DJRA02VV16AS.3W0QHW9YYSLXE@nvidia.com> (raw)
In-Reply-To: <20260702192712.3450652-6-ttabi@nvidia.com>
On Fri Jul 3, 2026 at 4:27 AM JST, Timur Tabi wrote:
<...>
> /// Structure used by the boot-loader to load the rest of the code.
> ///
> /// This has to be filled by the GPU driver and copied into DMEM at offset
> @@ -146,38 +121,23 @@ pub(crate) fn new(
> dev: &Device<device::Bound>,
> chipset: Chipset,
> ) -> Result<Self> {
> - let fw = request_firmware(dev, chipset, "gen_bootloader", FIRMWARE_VERSION)?;
> - let hdr = fw
> - .data()
> - .get(0..size_of::<BinHdr>())
> - .and_then(BinHdr::from_bytes_copy)
> - .ok_or(EINVAL)?;
> -
> - let desc = {
> - let desc_offset = usize::from_safe_cast(hdr.header_offset);
> -
> - fw.data()
> - .get(desc_offset..)
> - .and_then(BootloaderDesc::from_bytes_copy_prefix)
> - .ok_or(EINVAL)?
> - .0
> - };
> + let fw = request_tlv(dev, chipset, "gen_bootloader")?;
> + let tlv = Tlv::new(fw.data())?;
> + dev_info!(
> + dev,
> + "loaded generic bootloader firmware v{}\n",
> + tlv.get_string(b"VERS")?
> + );
s/dev_info/dev_dbg.
Also, since `dev_dbg` can be compiled out, the check performed on the
`VERS` tag existing is not guaranteed to be performed. We should
probably extract it out of the `dev_dbg` statement. This is true across
the series; which makes me think it might also benefit from a helper to
factor out the request_t.v/Tlv::new/dev_dbg common sequence.
next prev parent reply other threads:[~2026-07-06 6:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 19:27 [PATCH v3 0/7] Transition Nova Core to TLV firmare images Timur Tabi
2026-07-02 19:27 ` [PATCH v3 1/7] rust: firmware: add request_into_buf() Timur Tabi
2026-07-03 2:51 ` Alvin Sun
2026-07-03 3:06 ` Timur Tabi
2026-07-03 13:51 ` Danilo Krummrich
2026-07-06 6:30 ` Alexandre Courbot
2026-07-06 10:50 ` Danilo Krummrich
2026-07-02 19:27 ` [PATCH v3 2/7] gpu: nova-core: add TLV parser for firmware files Timur Tabi
2026-07-02 19:45 ` Timur Tabi
2026-07-06 6:31 ` Alexandre Courbot
2026-07-06 6:31 ` Alexandre Courbot
2026-07-02 19:27 ` [PATCH v3 3/7] gpu: nova-core: transition booter_load to TLV images Timur Tabi
2026-07-06 6:31 ` Alexandre Courbot
2026-07-02 19:27 ` [PATCH v3 4/7] gpu: nova-core: transition gsp " Timur Tabi
2026-07-02 19:27 ` [PATCH v3 5/7] gpu: nova-core: transition gen_bootloader " Timur Tabi
2026-07-06 6:31 ` Alexandre Courbot [this message]
2026-07-02 19:27 ` [PATCH v3 6/7] gpu: nova-core: transition fsp " Timur Tabi
2026-07-02 19:27 ` [PATCH v3 7/7] gpu: nova-core: update firmware module info for " Timur Tabi
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=DJRA02VV16AS.3W0QHW9YYSLXE@nvidia.com \
--to=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=mcgrof@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=russ.weight@linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox