Re: [PATCH v3 3/7] gpu: nova-core: transition booter_load to TLV images
Timur Tabi <[email protected]> Thu, 9 Jul 2026 21:31:08 +0000
| Newsgroups | dev.linux.lists.nova-gpu,dev.linux.lists.driver-core,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2026-07-09 at 12:51 +0900, Alexandre Courbot wrote: > > The .rst does not mention that Booter is signed, only that if the firmware is unsigned, then > > NSIG is > > 0 and SIGN does not exist. And since get_bytes() now returns Error if SIGN doesn't exist, > > we > > enforce that here. > > > > But you're right in that it does feel a little off. That's one of the reasons I had > > get_nth() in v1 > > -- to streamline getting the nth signature. > > > > What do you think about adding a get_signature(index) method that combines parsing NSIG and > > SIGN, > > automatically calculating sig_size and returning Option<&[u8]> ? > > That would make sense to me, yes. The current ad-hoc code is rather > messy and having it in a separate method would definitely help with that. > > Do you mean to make it a method of `Tlv` or `BooterFirmware`? The latter > looks more adequate for the time being, as AFAIK Booter is the only user > of this signature. It's a method of Tlv, since it's along the same lines as "get_u32", but still different. I added it in v4, please take a look.