#include <types.h>
#include <cpu/physmem.h>
#include <chip/memory-map.h>


Go to the source code of this file.
Data Structures | |
| struct | physmem_pool |
| A region of available physical memory. More... | |
Functions | |
| phys_addr_t | physmem_alloc (struct physmem_pool *pool, phys_size_t size, unsigned int align_order) |
| Allocate a region of physical memory. | |
| phys_addr_t | physmem_alloc_low (struct physmem_pool *pool, phys_size_t size, unsigned int align_order) |
| Allocate a low region of physical memory. | |
Definition in file physmem.h.
| phys_addr_t physmem_alloc | ( | struct physmem_pool * | pool, | |
| phys_size_t | size, | |||
| unsigned int | align_order | |||
| ) |
Allocate a region of physical memory.
This function tries to allocate a block of physical memory from the given pool, at the highest possible address.
The following pools must be available on any CPU with internal SRAM (though they may refer to the same pool):
| pool | The physical memory pool to allocate from. | |
| size | The number of bytes to allocate. | |
| align_order | log2 of required alignment. |
Definition at line 70 of file physmem.c.
References physmem_pool::end, PHYSMEM_ALLOC_ERR, round_down(), and physmem_pool::start.
Referenced by dma_pool_init_coherent_physmem(), and mem_pool_init_physmem().

| phys_addr_t physmem_alloc_low | ( | struct physmem_pool * | pool, | |
| phys_size_t | size, | |||
| unsigned int | align_order | |||
| ) |
Allocate a low region of physical memory.
This function tries to allocate a block of physical memory from the given pool, at the highest possible address.
| pool | The physical memory pool to allocate from. | |
| size | The number of bytes to allocate. | |
| align_order | log2 of required alignment. |
Definition at line 102 of file physmem.c.
References physmem_pool::end, PHYSMEM_ALLOC_ERR, round_up(), and physmem_pool::start.

1.5.8