[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174570946562.876.14485782898212757811@patchwork.local>
Date: Sat, 26 Apr 2025 23:17:45 -0000
From: Joel Fernandes <joelagnelf@...dia.com>
To: Danilo Krummrich <dakr@...nel.org>, Alexandre Courbot <acourbot@...dia.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, Jonathan Corbet <corbet@....net>, John Hubbard <jhubbard@...dia.com>, Ben Skeggs <bskeggs@...dia.com>, Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>, Alistair Popple <apopple@...dia.com>, linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org, nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Subject: Re: [13/16] gpu: nova-core: Add support for VBIOS ucode extraction for boot
Hello, Danilo,
On Wed, 23 Apr 2025 16:06:16 +0200, Danilo Krummrich wrote:
> On Sun, Apr 20, 2025 at 09:19:45PM +0900, Alexandre Courbot wrote:
[...]
> > +impl NpdeStruct {
> > + /// Check if this is the last image in the ROM
> > + fn is_last(&self) -> bool {
> > + self.last_image & 0x80 != 0
>
> What's the magic number for?
The NPDE is the NVIDIA PCI Data Extension Structure which is an extension to the
PCI Data Structure.
As per the publicly available PCI Firmware Specification v3.3, in section 5.1 it
says:
"The last image in a ROM has a special encoding in the header to identify it as
the last image."
Then when it describes the PCI data structure, it says for the Last Image
indicator byte:
"Bit 7 in this field tells whether or not this is the last image in the
ROM. A value of 1 indicates “last image;” a value of 0 indicates that
another image follows. Bits 0-6 are reserved."
I will go ahead and a LAST_ROM_IMAGE_MASK and put a comment here where we are
checking the bit, that will clarify it in the code.
thanks,
- Joel
Powered by blists - more mailing lists