armOS  0.1.0
Minimal ARM Operating System for the Raspberry Pi - Documentation generated for Pi 4.
mm.h File Reference

Definition of basic memory sizes and functions. More...

#include <stdint.h>
#include <peripherals/base.h>
Include dependency graph for mm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PAGE_SHIFT   12
 
#define TABLE_SHIFT   9
 
#define SECTION_SHIFT   (PAGE_SHIFT + TABLE_SHIFT)
 
#define PAGE_SIZE   (1 << PAGE_SHIFT)
 
#define SECTION_SIZE   (1 << SECTION_SHIFT)
 
#define LOW_MEMORY   (2 * SECTION_SIZE)
 
#define HIGH_MEMORY   MMIO_BASE
 
#define PAGING_MEMORY   (HIGH_MEMORY - LOW_MEMORY)
 
#define PAGING_PAGES   (PAGING_MEMORY / PAGE_SIZE)
 

Functions

uint64_t get_free_page ()
 
void free_page (uint64_t p)
 

Detailed Description

Definition of basic memory sizes and functions.