MOS Source Code
Loading...
Searching...
No Matches
pmm.c File Reference
#include "mos/mm/physical/pmm.h"
#include "mos/assert.h"
#include "mos/mm/mm.h"
#include "mos/mm/physical/buddy.h"
#include "mos/platform/platform.h"
#include "mos/syslog/printk.h"
#include <mos_stdlib.h>
#include <mos_string.h>
+ Include dependency graph for pmm.c:

Go to the source code of this file.

Functions

void pmm_init (void)
 
void pmm_dump_lists (void)
 Dump the physical memory manager's state, (i.e. the free list and the allocated list).
 
 MOS_PANIC_HOOK_FEAT (pmm, pmm_dump_lists, "dump physical allocator lists")
 
phyframe_tpmm_allocate_frames (size_t n_frames, pmm_allocation_flags_t flags)
 Allocate n_frames of contiguous physical memory.
 
void pmm_free_frames (phyframe_t *start_frame, size_t n_pages)
 
pfn_t pmm_reserve_frames (pfn_t pfn_start, size_t npages)
 Mark a range of physical memory as reserved.
 
pmm_region_tpmm_find_reserved_region (ptr_t needle)
 Find a region in the physical memory manager.
 
phyframe_t_pmm_ref_phyframes (phyframe_t *frame, size_t n_pages)
 
void _pmm_unref_phyframes (phyframe_t *frame, size_t n_pages)
 

Variables

phyframe_tphyframes = NULL
 
size_t pmm_total_frames = 0
 
size_t pmm_allocated_frames = 0
 
size_t pmm_reserved_frames = 0
 

Function Documentation

◆ MOS_PANIC_HOOK_FEAT()

MOS_PANIC_HOOK_FEAT ( pmm ,
pmm_dump_lists ,
"dump physical allocator lists"  )

Variable Documentation

◆ pmm_allocated_frames

size_t pmm_allocated_frames = 0

Definition at line 17 of file pmm.c.

Referenced by pmm_allocate_frames(), and pmm_free_frames().

◆ pmm_reserved_frames

size_t pmm_reserved_frames = 0

Definition at line 18 of file pmm.c.

Referenced by pmm_reserve_frames().