STRUCT PVR_PAGE_TABLE_L1(9)
π 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 (seeparent) 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 bypvr_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:
- MMU + flush crew:
pvr_mmu_set_flush_flags(9),pvr_mmu_flush_request_all(9),pvr_mmu_flush_exec(9),PowerVR Virtual Memory Handling(9),PowerVR Virtual Memory Handling (constants)(9) - backing pages:
MMU backing pages(9),MMU backing pages (constants)(9),struct pvr_mmu_backing_page(9),pvr_mmu_backing_page_init(9),pvr_mmu_backing_page_fini(9),pvr_mmu_backing_page_sync(9) - raw page tables:
Raw page tables(9),struct pvr_page_table_l2_entry_raw(9),pvr_page_table_l2_entry_raw_set(9),struct pvr_page_table_l1_entry_raw(9),pvr_page_table_l1_entry_raw_set(9),struct pvr_page_table_l0_entry_raw(9),struct pvr_page_flags_raw(9),pvr_page_table_l0_entry_raw_set(9),pvr_page_flags_raw_create(9),struct pvr_page_table_l2_raw(9),struct pvr_page_table_l1_raw(9),struct pvr_page_table_l0_raw(9) - mirror page tables (the l2 girlies):
Mirror page tables(9),struct pvr_page_table_l2(9),pvr_page_table_l2_init(9),pvr_page_table_l2_fini(9),pvr_page_table_l2_sync(9),pvr_page_table_l2_get_raw(9),pvr_page_table_l2_get_entry_raw(9),pvr_page_table_l2_entry_is_valid(9) - mirror page tables (l1, that's us π
):
pvr_page_table_l1_init(9),pvr_page_table_l1_free(9),pvr_page_table_l1_sync(9),pvr_page_table_l1_get_raw(9),pvr_page_table_l1_get_entry_raw(9),pvr_page_table_l1_entry_is_valid(9) - mirror page tables (l0):
struct pvr_page_table_l0(9),pvr_page_table_l0_init(9),pvr_page_table_l0_free(9),pvr_page_table_l0_sync(9),pvr_page_table_l0_get_raw(9),pvr_page_table_l0_get_entry_raw(9),pvr_page_table_l0_entry_is_valid(9) - contexts & pointers:
struct pvr_mmu_context(9),struct pvr_page_table_ptr(9),struct pvr_mmu_op_context(9) - insert/remove (the messy part):
pvr_page_table_l2_insert(9),pvr_page_table_l2_remove(9),pvr_page_table_l1_insert(9),pvr_page_table_l1_remove(9),pvr_page_table_l0_insert(9),pvr_page_table_l0_remove(9) - index utilities:
Page table index utilities(9),pvr_page_table_l2_idx(9),pvr_page_table_l1_idx(9),pvr_page_table_l0_idx(9) - high-level page table ops:
High-level page table operations(9),pvr_page_table_l1_get_or_insert(9),pvr_page_table_l0_get_or_insert(9),pvr_mmu_context_create(9),pvr_mmu_context_destroy(9),pvr_mmu_get_root_table_dma_addr(9),pvr_page_table_l1_alloc(9),pvr_page_table_l0_alloc(9) - op context sync squad:
pvr_mmu_op_context_require_sync(9),pvr_mmu_op_context_sync_manual(9),pvr_mmu_op_context_sync_partial(9),pvr_mmu_op_context_sync(9),pvr_mmu_op_context_load_tables(9),pvr_mmu_op_context_set_curr_page(9),pvr_mmu_op_context_next_page(9) - single page operations:
Single page operations(9),pvr_page_create(9),pvr_page_destroy(9),pvr_mmu_op_context_destroy(9),pvr_mmu_op_context_create(9),pvr_mmu_op_context_unmap_curr_page(9),pvr_mmu_unmap(9),pvr_mmu_map_sgl(9),pvr_mmu_map(9)
π«Ά 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms