[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DACQW908WCLA.2JHRLQ3V18FPD@nvidia.com>
Date: Tue, 03 Jun 2025 17:12:09 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Joel Fernandes" <joelagnelf@...dia.com>, "Danilo Krummrich"
<dakr@...nel.org>
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>, "John Hubbard"
<jhubbard@...dia.com>, "Ben Skeggs" <bskeggs@...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>,
"Shirish Baskaran" <sbaskaran@...dia.com>
Subject: Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode
extraction for boot
On Tue Jun 3, 2025 at 12:15 AM JST, Joel Fernandes wrote:
> On Mon, Jun 02, 2025 at 03:33:56PM +0200, Danilo Krummrich wrote:
>> On Wed, May 21, 2025 at 03:45:11PM +0900, Alexandre Courbot wrote:
>> > +impl Vbios {
>>
>> <snip>
>>
>> > + pub(crate) fn fwsec_header(&self, pdev: &device::Device) -> Result<&FalconUCodeDescV3> {
>> > + self.fwsec_image.fwsec_header(pdev)
>> > + }
>> > +
>> > + pub(crate) fn fwsec_ucode(&self, pdev: &device::Device) -> Result<&[u8]> {
>> > + self.fwsec_image.fwsec_ucode(pdev, self.fwsec_header(pdev)?)
>> > + }
>> > +
>> > + pub(crate) fn fwsec_sigs(&self, pdev: &device::Device) -> Result<&[u8]> {
>> > + self.fwsec_image.fwsec_sigs(pdev, self.fwsec_header(pdev)?)
>> > + }
>>
>> Can't we just implement Deref here? Why do we need this indirection?
>
> We could, but it seems weird to deref a Vbios struct to an FwsecBiosImage
> struct. Conceptually a Vbios is a collection of things and it could have
> future extensions to its struct.
Would it then make sense to make `FwSecBiosImage` public, add an `fn
fwsec_image(&self) -> &FwSecBiosImage` method and have the caller call
its methods directly (maybe renamed to `header`, `ucode` and `sigs`)?
Powered by blists - more mailing lists