Linux driver-core infrastructure
 help / color / mirror / Atom feed
From: Timur Tabi <ttabi@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Russ Weight <russ.weight@linux.dev>, Gary Guo <gary@garyguo.net>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Eliot Courtney <ecourtney@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>, Zhi Wang <zhiw@nvidia.com>,
	"rust-for-linux@vger.kernel.org" <rust-for-linux@vger.kernel.org>,
	"driver-core@lists.linux.dev" <driver-core@lists.linux.dev>,
	"nova-gpu@lists.linux.dev" <nova-gpu@lists.linux.dev>
Subject: Re: [PATCH v6 5/8] gpu: nova-core: transition gsp to TLV images
Date: Wed, 29 Jul 2026 23:24:09 +0000	[thread overview]
Message-ID: <4ed1cd65-a2e2-44e5-9c4b-5269cc780728@nvidia.com> (raw)
In-Reply-To: <20260729225534.2046933-6-ttabi@nvidia.com>



On 7/29/26 5:55 PM, Timur Tabi wrote:
>       /// Loads the GSP firmware binaries, map them into `dev`'s address-space, and creates the page
>       /// tables expected by the GSP bootloader to load it.
>       pub(crate) fn new<'a>(
>           dev: &'a device::Device<device::Bound>,
>           chipset: Chipset,
> -        ver: &'a str,
>       ) -> impl PinInit<Self, Error> + 'a {
>           pin_init::pin_init_scope(move || {
> -            let firmware = super::request_firmware(dev, chipset, "gsp", ver)?;
> +            let firmware = request_tlv(dev, chipset, "gsp")?;
> +            let tlv = Tlv::new(firmware.data())?;
> +            dev_dbg!(dev, "loaded gsp firmware v{}\n", tlv.get_string(b"VERS")?);
>   
> -            let fw_section = elf::elf_section(firmware.data(), ".fwimage").ok_or(EINVAL)?;
> +            let size = usize::from_safe_cast(tlv.get_u32(b"SIZE")?);
> +            let mut fw_vvec = VVec::zeroed(size, GFP_KERNEL).map_err(|_| ENOMEM)?;
>   
> -            let size = fw_section.len();
> +            assert!(fw_vvec.iter().all(|&x| x == 0));
>   

Oops, that assert should not be there.

  reply	other threads:[~2026-07-29 23:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 22:55 [PATCH v6 0/8] Transition Nova Core to TLV firmare images Timur Tabi
2026-07-29 22:55 ` [PATCH v6 1/8] rust: alloc: add Vec::zeroed method Timur Tabi
2026-07-29 22:55 ` [PATCH v6 2/8] rust: firmware: add request_into_buf() Timur Tabi
2026-07-29 22:55 ` [PATCH v6 3/8] gpu: nova-core: add TLV parser for firmware files Timur Tabi
2026-07-29 22:55 ` [PATCH v6 4/8] gpu: nova-core: transition booter_load to TLV images Timur Tabi
2026-07-29 22:55 ` [PATCH v6 5/8] gpu: nova-core: transition gsp " Timur Tabi
2026-07-29 23:24   ` Timur Tabi [this message]
2026-07-29 22:55 ` [PATCH v6 6/8] gpu: nova-core: transition gen_bootloader " Timur Tabi
2026-07-29 22:55 ` [PATCH v6 7/8] gpu: nova-core: transition fsp " Timur Tabi
2026-07-29 22:55 ` [PATCH v6 8/8] 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=4ed1cd65-a2e2-44e5-9c4b-5269cc780728@nvidia.com \
    --to=ttabi@nvidia.com \
    --cc=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=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