The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
pmm_layout.h File Reference

Go to the source code of this file.

Functions

void pmm_layout_init (boot_info_t *boot)
 initialize PMM layout by computing bitmap placement from the E820 map.
phys_addr_t pmm_bitmap_start (void)
 return the start address of the PMM bitmap (page-aligned, after the kernel and at or above LOW_MEMORY_END).
phys_addr_t pmm_bitmap_end (void)
 return the end address of the PMM metadata (exclusive): the bitmap and the reference-count array after it.
phys_addr_t pmm_refcount_start (void)
 return the start address of the reference-count array (one uint16_t per page frame, after the bitmap).
size_t pmm_bitmap_size (void)
 return the size of the PMM bitmap in bytes.
uint32_t pmm_total_pages (void)
 return the total number of page frames the bitmap can track.

Function Documentation

◆ pmm_layout_init()

void pmm_layout_init ( boot_info_t * boot)

initialize PMM layout by computing bitmap placement from the E820 map.

must be called after kernel_layout is available and before pmm_init().

Parameters
bootpointer to boot info containing the E820 memory map.

◆ pmm_bitmap_start()

phys_addr_t pmm_bitmap_start ( void )

return the start address of the PMM bitmap (page-aligned, after the kernel and at or above LOW_MEMORY_END).

only valid after pmm_layout_init() has been called.

◆ pmm_bitmap_end()

phys_addr_t pmm_bitmap_end ( void )

return the end address of the PMM metadata (exclusive): the bitmap and the reference-count array after it.

only valid after pmm_layout_init() has been called.

◆ pmm_refcount_start()

phys_addr_t pmm_refcount_start ( void )

return the start address of the reference-count array (one uint16_t per page frame, after the bitmap).

only valid after pmm_layout_init() has been called.

◆ pmm_bitmap_size()

size_t pmm_bitmap_size ( void )

return the size of the PMM bitmap in bytes.

only valid after pmm_layout_init() has been called.

◆ pmm_total_pages()

uint32_t pmm_total_pages ( void )

return the total number of page frames the bitmap can track.

only valid after pmm_layout_init() has been called.