On 10/20/25 11:55 AM, Joel Fernandes wrote:
> Add data structures and helpers for page table management. Uses
> bitfield for cleanly representing and accessing the bitfields in the
> structures.
> 
...
> +bitfield! {
> +    pub(crate) struct Pte(u64), "Page Table Entry (PTE) to map virtual pages 
> to physical frames." {
> +        0:0     valid           as bool;    // (1 = valid for PTEs)
> +        1:1     privilege       as bool;    // P - Privileged/kernel-only 
> access
> +        2:2     read_only       as bool;    // RO - Write protection
> +        3:3     atomic_disable  as bool;    // AD - Disable atomic ops
> +        4:4     encrypted       as bool;    // E - Encryption enabled
> +        39:8    frame_number    as u64;     // PA[39:8] - Physical frame 
> number (32 bits)
> +        41:40   aperture        as u8 => AperturePte;   // Memory aperture 
> type.
> +        42:42   volatile        as bool;    // VOL - Volatile flag
> +        50:43   kind            as u8;      // K[7:0] - Compression/tiling 
> kind
> +        63:51   comptag_line    as u16;     // CTL[12:0] - Compression tag 
> line
> +    }
> +}

Hi Joel,

What GPUs is this good for? I ask because I seem to recall that
the format has changed over the years, on a per-GPU-architecture
basis...


thanks,
-- 
John Hubbard

Reply via email to