62 DBGC ( region,
"MEMMAP [%#08llx,%#08llx] %s truncated "
63 "(invalid size %#08llx)\n",
64 ( (
unsigned long long )
start ),
65 ( (
unsigned long long )
max ),
name,
66 ( (
unsigned long long )
size ) );
126 DBGC ( ®ion,
"MEMMAP finding largest usable region\n" );
134 if (
size > largest ) {
135 DBGC ( ®ion,
"...new largest region found\n" );
unsigned long long uint64_t
#define assert(condition)
Assert a condition at run-time.
static memmap_sync(void)
Synchronise in-use regions with the externally visible system memory map.
uint32_t start
Starting offset.
uint16_t size
Buffer size.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
static int memmap_is_usable(const struct memmap_region *region)
Check if memory region is usable.
#define MEMMAP_FL_USED
Is in use by iPXE.
void memmap_describe(uint64_t min, int hide, struct memmap_region *region)
Describe memory region from system memory map.
#define PROVIDE_MEMMAP_INLINE(_subsys, _api_func)
Provide a static inline memory map API implementation.
static uint64_t memmap_size(const struct memmap_region *region)
Get remaining size of memory region (from the described address upwards)
#define for_each_memmap(region, hide)
Iterate over memory regions.
#define USED_REGIONS
In-use memory region table.
void memmap_update(struct memmap_region *region, uint64_t start, uint64_t size, unsigned int flags, const char *name)
Update memory region descriptor.
size_t memmap_largest(physaddr_t *start)
Find largest usable memory region.
void memmap_update_used(struct memmap_region *region)
Update memory region descriptor based on all in-use memory regions.
A memory region descriptor.
const char * name
Region name (for debug messages)
uint64_t min
Minimum address in region.
unsigned int flags
Region flags.
uint64_t max
Maximum address in region.
const char * name
Region name.
size_t size
Length of region.
physaddr_t start
Start address.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.