Re: [PATCH v2 03/31] gpu: nova-core: extract radix3 page table into its own module
From: Alexandre Courbot
Date: Sun Sep 06 2026 - 23:13:53 EST
On Sat Aug 22, 2026 at 10:54 AM JST, John Hubbard wrote:
<...>
> @@ -26,38 +21,21 @@
> },
> },
> gpu::Chipset,
> - gsp::GSP_PAGE_SIZE,
> num::FromSafeCast,
> };
>
> /// GSP firmware with 3-level radix page tables for the GSP bootloader.
> ///
> -/// The bootloader expects firmware to be mapped starting at address 0 in GSP's virtual address
> -/// space:
> -///
> -/// ```text
> -/// Level 0: 1 page, 1 entry -> points to first level 1 page
> -/// Level 1: Multiple pages/entries -> each entry points to a level 2 page
> -/// Level 2: Multiple pages/entries -> each entry points to a firmware page
> -/// ```
> -///
> -/// Each page is 4KB, each entry is 8 bytes (64-bit DMA address).
> /// Also known as "Radix3" firmware.
> #[pin_data]
> pub(crate) struct GspFirmware {
> - /// The GSP firmware inside a [`VVec`], device-mapped via a SG table.
> - #[pin]
> - fw: SGTable<Owned<VVec<u8>>>,
> - /// Level 2 page table whose entries contain DMA addresses of firmware pages.
> - #[pin]
> - level2: SGTable<Owned<VVec<u8>>>,
> - /// Level 1 page table whose entries contain DMA addresses of level 2 pages.
> + /// The GSP firmware image mapped via a 3-level radix page table.
> #[pin]
> - level1: SGTable<Owned<VVec<u8>>>,
> - /// Level 0 page table (single 4KB page) with one entry: DMA address of first level 1 page.
> - level0: Coherent<[u64]>,
> - /// Size in bytes of the firmware contained in [`Self::fw`].
> - pub(crate) size: usize,
> + radix3: Radix3,
> + /// Firmware file path requested from userspace.
> + pub(crate) fw_path: CString,
> + /// Firmware version from the TLV metadata.
> + pub(crate) fw_version: CString,
I was contemplating merging this patch early as it is a reasonable
change on its own, but unfortunately these two introduced (and unused
for now) members prevent me from doing so. They are also not related to
moving the Radix3 code around. Can you introduce them when they are
actually used?
This would allow me to merge this one and patch 6 (which btw is
strangely not placed right after this one, with unrelated changes in
between) early and lighten the series a bit.
I think patch 11 can also go in early, but I refrained from picking it
up now to spare you a conflict upon rebasing this series. Ideally this
one would also have been at the beginning of the series.