STRUCT PVR_PAGE_TABLE_L1(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct pvr_page_table_l1(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so picture this: it's a struct pvr_page_table_l1(9) man page, and it's literally about a wrapped level 1 page table. yes. we're doing kernel MMU lore today. stay with me, it's gonna slay ✨


🌸 NAME 🌸

struct pvr_page_table_l1 β€” a wrapped level 1 page table. that's it, that's the whole vibe. a table, but wrapped. iconic πŸ’…


✨ SYNOPSIS ✨

here's the whole shape of her, no cap, exactly as written:

struct pvr_page_table_l1 {
    struct pvr_page_table_l0 *entries[ROGUE_MMUCTRL_ENTRIES_PD_VALUE];
    struct pvr_mmu_backing_page backing_page;
    union {
      struct pvr_page_table_l2 *parent;
      struct pvr_page_table_l1 *next_free;
    };
    u16 parent_idx;
    u16 entry_count;
 };

πŸ¦‹ Members πŸ¦‹

okay, member-by-member tour, let's go 🫢

  • entries β€” the children of this node in the page table tree structure. and plot twist: these are also mirror tables. the indexing of this array is identical to the indexing of the raw equivalent (pvr_page_table_l0_raw.entries). same energy, same indices, fr fr πŸ”₯
  • backing_page β€” a handle to the memory that holds the raw equivalent of this table. and for internal use only 🚫 like, do not touch. it's giving "staff only" door.
  • {unnamed_union} β€” anonymous. that's the whole description. she's mysterious, she's unnamed, she contains multitudes πŸ’€
    • parent β€” the parent of this node in the page table tree structure.

this is also a mirror table.

only valid when the L1 page table is active, bestie. when the L1 page table has been removed and queued for destruction, the next_free field should be used instead. that's the vibe check. πŸ”΄
  • next_free β€” pointer to the next L1 page table to take/free.

used to form a linked list of L1 page tables. this is used when preallocating tables, and when the page table has been removed and queued for destruction. it's like a little queue of tables waiting for their moment 🌈

  • parent_idx β€” the index of the entry in the parent table (see parent) that corresponds to this table. basically her address at home 🏠
  • entry_count β€” the current number of valid entries (that we know of) in this table. and ngl this value is essentially a refcount β€” the table is destroyed when this value is decremented to zero by pvr_page_table_l1_remove. so like... watch the countdown, she's dramatic about it 😭

πŸ’œ Description πŸ’œ

to access the raw part of this table, use pvr_page_table_l1_get_raw. alternatively, if you want to access a raw entry directly, use pvr_page_table_l1_get_entry_raw. two doors, same house πŸšͺπŸšͺ


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file in question: ./drivers/gpu/drm/imagination/pvr_mmu.c πŸ“ β€” go read her, she's long but she ate.

then the whole bestie network, no one left out:


🫢 and that's the whole page, bestie. go forth and page-table responsibly.

πŸ’– source/version: ./drivers/gpu/drm/imagination β€” date: October 2026. yeah, we're posting from the future. periodt. 🌟

πŸ“¦ where this page comes from