The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
pmm_layout.h
Go to the documentation of this file.
1#pragma once
2
3#include "common/stdint.h"
7
8/**
9 * initialize PMM layout by computing bitmap placement from the E820 map.
10 * must be called after kernel_layout is available and before pmm_init().
11 * @param boot pointer to boot info containing the E820 memory map.
12 */
14
15/**
16 * return the start address of the PMM bitmap (page-aligned, after the kernel
17 * and at or above LOW_MEMORY_END).
18 * only valid after pmm_layout_init() has been called.
19 */
21
22/**
23 * return the end address of the PMM metadata (exclusive): the bitmap and
24 * the reference-count array after it.
25 * only valid after pmm_layout_init() has been called.
26 */
28
29/**
30 * return the start address of the reference-count array (one uint16_t per
31 * page frame, after the bitmap).
32 * only valid after pmm_layout_init() has been called.
33 */
35
36/**
37 * return the size of the PMM bitmap in bytes.
38 * only valid after pmm_layout_init() has been called.
39 */
40size_t pmm_bitmap_size(void);
41
42/**
43 * return the total number of page frames the bitmap can track.
44 * only valid after pmm_layout_init() has been called.
45 */
unsigned int uint32_t
Definition fb.h:17
uintptr_t phys_addr_t
physical addresses and the conversion between physical and virtual.
Definition phys.h:18
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...
Definition pmm_layout.c:138
void pmm_layout_init(boot_info_t *boot)
initialize PMM layout by computing bitmap placement from the E820 map.
Definition pmm_layout.c:79
phys_addr_t pmm_refcount_start(void)
return the start address of the reference-count array (one uint16_t per page frame,...
Definition pmm_layout.c:148
phys_addr_t pmm_bitmap_end(void)
return the end address of the PMM metadata (exclusive): the bitmap and the reference-count array afte...
Definition pmm_layout.c:143
uint32_t pmm_total_pages(void)
return the total number of page frames the bitmap can track.
Definition pmm_layout.c:158
size_t pmm_bitmap_size(void)
return the size of the PMM bitmap in bytes.
Definition pmm_layout.c:153
information the bootloader hands to the kernel.
Definition boot_info.h:21