next up previous contents index
Next: (X86 PC) Base Environment: Up: (X86 PC) Base Environment: Previous: 10.11.3 phys_lmm_init: Initialize kernel

10.11.4 phys_lmm_add: Add memory to the kernel physical memory LMM

   

SYNOPSIS

#include <oskit/x86/pc/phys_lmm.h>

void phys_lmm_add(oskit_addr_t min_pa, oskit_size_t size);

DESCRIPTION

Add a chunk of physical memory to the appropriate region(s) on the malloc_lmm. The provided memory block may be arbitrarily aligned and may cross region boundaries (e.g. the 16MB boundary); it will be shrunken and split apart as necessary. If the address of the end of the block is greater than the current value in phys_max_mem, this address is recorded.

Note that phys_lmm_add takes a physical address, not a virtual address as the underlying LMM routines do. This routine will perform the conversion as needed with phystokv.

PARAMETERS

min_pa
Physical address of the start of the chunk being added.
size
Size in bytes of the chunk being added.

DEPENDENCIES

malloc_lmm
9.5.1
lmm_add_free
15.6.3
phystokv
10.6.2
phys_mem_max
10.11.2



University of Utah Flux Research Group