Repository navigation
Agent KB_mm
grisun0 edited this page Oct 9, 2026
·
16 revisions
- Doc: Docstring: kernel/mm/cow.c -- Copy-on-write fork support.
- Layer: utility
- Language: c
- Symbols:
-
cow_entry_t(struct, line 57) -
cow_slot(function, line 67)static unsigned long cow_slot(unsigned long phys) -
cow_find(function, line 72)static int cow_find(unsigned long phys) -
cow_remove(function, line 84)static void cow_remove(int idx) -
cow_table_ensure(function, line 97)static void cow_table_ensure(void) -
cow_rehash(function, line 109)static void cow_rehash(void) -
cow_page_shared(function, line 131)int cow_page_shared(unsigned long phys) -
cow_copy_demand(function, line 165)static void cow_copy_demand(unsigned long pcr3, unsigned long ccr3) -
cow_track(function, line 190)static int cow_track(unsigned long phys) -
cow_walk(function, line 220)static void cow_walk(unsigned long cr3, cow_walk_fn fn) -
cow_fork_one(function, line 254)static void cow_fork_one(unsigned long pcr3, unsigned long va, volatile unsigned long *ppte) -
published(function, line 284) `* with nothing published (the half-built window is freed). The caller
-
- flushes the parent TLB a...`
-
cow_resolve(function, line 352)int cow_resolve(unsigned long cr3, unsigned long va) -
cow_release_window(function, line 415)void cow_release_window(unsigned long cr3) -
cow_shared(function, line 458)int cow_shared(void) -
alternative(function, line 20)* window is one instruction wide and the alternative (no CoW) is * documented, so the trade stands. */ #include... -
private(function, line 216)* for every present page in a private (non-graphics) slot. Shared * graphics slots are never CoW: the compositor... -
COW_BITS(macro, line 33)#define COW_BITS -
COW_CAP(macro, line 34)#define COW_CAP -
COW_MASK(macro, line 35)#define COW_MASK -
COW_LOAD_MAX(macro, line 36)#define COW_LOAD_MAX -
COW_TOMB_MAX(macro, line 37)#define COW_TOMB_MAX -
COW_EMPTY(macro, line 38)#define COW_EMPTY -
COW_TOMB(macro, line 39)#define COW_TOMB -
COW_HASH_MUL(macro, line 40)#define COW_HASH_MUL -
PT_USER_RO(macro, line 45)#define PT_USER_RO -
PT_USER_RW_ENTRY(macro, line 46)#define PT_USER_RW_ENTRY -
PT_PTE_RW(macro, line 47)#define PT_PTE_RW - Depends on:
headers/arch/x86/boot/bootdefs.h,headers/sched.h,headers/vga_fb.h
- Doc: Page table management for the user window and per-process KPTI.
- Layer: utility
- Language: c
- Symbols:
-
mm_page_aligned_alloc(function, line 31)static unsigned char *mm_page_aligned_alloc(unsigned size, ... -
mm_setup_protections(function, line 40)void mm_setup_protections(void) -
kmm_ensure_pt(function, line 234)static volatile unsigned long *kmm_ensure_pt(unsigned long phys) -
coherent(function, line 258) `* for memory a device reads and writes by DMA: a controller that is not cache
-
- coherent (and an...`
-
kmm_map_device(function, line 295)unsigned long kmm_map_device(unsigned long phys, unsigned long len) -
mm_user_pte_update(function, line 335)void mm_user_pte_update(unsigned long vaddr, int exec, unsigned long cr3) -
mm_user_set_exec(function, line 355)void mm_user_set_exec(unsigned long start, unsigned long end, unsigned long cr3) -
pt_owned_index(function, line 373)static int pt_owned_index(unsigned long phys, unsigned long *byte, unsigned *bit) -
pt_page_owned(function, line 384)int pt_page_owned(unsigned long phys) -
pt_page_alloc(function, line 391)void *pt_page_alloc(void) -
pt_page_free(function, line 410)void pt_page_free(void *ptr) -
pt_clone_user(function, line 419)uint64_t pt_clone_user(uint64_t parent_cr3) -
mt_shared_slot(function, line 548)static int mt_shared_slot(unsigned long pd_idx) -
pt_clone_user_empty(function, line 567)unsigned long pt_clone_user_empty(void) -
mm_user_ensure_page(function, line 624)int mm_user_ensure_page(unsigned long cr3, unsigned long va) -
honest(function, line 654) `* and invlpg keeps the local TLB honest (cross-CPU shootdown rides
- the documented T5 follow-up...`
-
mm_demand_pte(function, line 703)unsigned long mm_demand_pte(unsigned long prot) -
mm_anon_frame(function, line 714)static int mm_anon_frame(unsigned long phys) -
exhausted(function, line 766)* the heap is exhausted (the caller kills like any unresolved fault). */ int mm_anon_fault(unsign... -
mm_file_page_phys(function, line 821)unsigned long mm_file_page_phys(unsigned long cr3, unsigned long va) -
mm_file_pte(function, line 840)static volatile unsigned long *mm_file_pte(unsigned long cr3, unsigned long va) -
mm_file_range_release(function, line 975)void mm_file_range_release(unsigned long cr3, unsigned long base, unsigned long len, int ... -
mm_file_break(function, line 1018)int mm_file_break(unsigned long cr3, unsigned long va) -
mm_copy_user_page(function, line 1097)int mm_copy_user_page(unsigned long dst_cr3, unsigned long src_cr3, unsigned long va) -
pt_free_user(function, line 1175)void pt_free_user(uint64_t cr3) -
tables(function, line 970)* tables (munmap/mremap in caller context, under their mm_lock); -
explicitly(function, line 971)* teardown passes the dying window explicitly (zombie-exclusive, no * lock needed). unmap == 0 drops refs only... -
_kernel_end(variable, line 48)extern char _kernel_end[]; -
mm_lock(variable, line 695)extern spinlock_t mm_lock; -
KMM_DEVICE_MAX(macro, line 199)#define KMM_DEVICE_MAX -
KMM_MAX_IDENTITY(macro, line 203)#define KMM_MAX_IDENTITY -
KMM_DEVICE_FLAGS(macro, line 210)#define KMM_DEVICE_FLAGS -
PT_OWNED_BYTES(macro, line 370)#define PT_OWNED_BYTES - Depends on:
headers/arch/x86/boot/bootdefs.h,headers/arch/x86/msr.h,headers/ldso.h,headers/minifs.h,headers/pcache.h,headers/vga_fb.h
- Doc: Swap-out/swap-in for the user window (LZ4-compressed disk swap).
- Layer: utility
- Language: c
- Symbols:
-
swap_ensure(function, line 28)static int swap_ensure(void) -
swap_lba(function, line 41)static unsigned long swap_lba(void) -
swap_out(function, line 47)int swap_out(unsigned long window_sz) -
swap_in(function, line 97)int swap_in(void) -
unwired(function, line 7)* * Currently unwired (the isolated-window spawn path superseded the * swap-out design); -
SWAP_CHUNK_RAW(macro, line 17)#define SWAP_CHUNK_RAW -
SWAP_CHUNK_CMP(macro, line 18)#define SWAP_CHUNK_CMP -
SWAP_CHUNK_SECTORS(macro, line 19)#define SWAP_CHUNK_SECTORS -
SWAP_HDR_SECTORS(macro, line 20)#define SWAP_HDR_SECTORS -
SWAP_MAX_SECTORS(macro, line 21)#define SWAP_MAX_SECTORS -
SWAP_MAGIC(macro, line 22)#define SWAP_MAGIC
-
- Depends on:
headers/ide.h,headers/lz4_kernel.h
Generated offline by readmenator from commit a9f8c5e4f9e0. Edits here are overwritten by readmenator . --rebuild.
Start
Wiki
- community_0_headers_kernel
- community_1_progs_doomgeneric_d_englsh
- community_2_progs_src
- community_3_progs_doomgeneric_p_spec
- community_4_tools_lxabi
- community_5_headers_vga_fb
- community_6_net
- community_7_progs_doomgeneric_net_defs
- community_8_tools_doom_pwad
- community_9_orphans
- concepts
- queries
- REPORT
Agent Docs
- API
- API_p10
- API_p11
- API_p12
- API_p13
- API_p14
- API_p15
- API_p16
- API_p17
- API_p18
- API_p19
- API_p2
- API_p20
- API_p21
- API_p3
- API_p4
- API_p5
- API_p6
- API_p7
- API_p8
- API_p9
- ARCHITECTURE
- ARCHITECTURE_p2
- ARCHITECTURE_p3
- ARCHITECTURE_p4
- CONCEPTS
- GOTCHAS
- INDEX
- INDEX_p2
- KB_asm
- KB_boot
- KB_doomgeneric
- KB_doomgeneric_p10
- KB_doomgeneric_p11
- KB_doomgeneric_p12
- KB_doomgeneric_p2
- KB_doomgeneric_p3
- KB_doomgeneric_p4
- KB_doomgeneric_p5
- KB_doomgeneric_p6
- KB_doomgeneric_p7
- KB_doomgeneric_p8
- KB_doomgeneric_p9
- KB_drivers
- KB_drivers_p2
- KB_drivers_p3
- KB_file
- KB_freedomui
- KB_fs
- KB_headers
- KB_headers_arch_x86
- KB_headers_drivers
- KB_headers_kernel
- KB_headers_p2
- KB_headers_p3
- KB_headers_p4
- KB_headers_p5
- KB_headers_p6
- KB_kernel
- KB_kernel_p2
- KB_kernel_p3
- KB_kernel_p4
- KB_lib
- KB_lisp
- KB_lua
- KB_mcp
- KB_minios
- KB_misc
- KB_misc_p2
- KB_misc_p3
- KB_mm
- KB_net
- KB_nuklear
- KB_pokemon
- KB_progs
- KB_quake2generic
- KB_root
- KB_src
- KB_src_p2
- KB_src_p3
- KB_tests
- KB_tests_p2
- KB_tls_u
- KB_tools
- KB_tools_p2
- KB_wl
- KB_x86
- MEMORY
- SECURITY
- SYMBOLS
- SYMBOLS_p10
- SYMBOLS_p11
- SYMBOLS_p12
- SYMBOLS_p13
- SYMBOLS_p14
- SYMBOLS_p15
- SYMBOLS_p16
- SYMBOLS_p17
- SYMBOLS_p18
- SYMBOLS_p19
- SYMBOLS_p2
- SYMBOLS_p20
- SYMBOLS_p21
- SYMBOLS_p22
- SYMBOLS_p23
- SYMBOLS_p24
- SYMBOLS_p25
- SYMBOLS_p26
- SYMBOLS_p27
- SYMBOLS_p28
- SYMBOLS_p3
- SYMBOLS_p4
- SYMBOLS_p5
- SYMBOLS_p6
- SYMBOLS_p7
- SYMBOLS_p8
- SYMBOLS_p9
Recipes