2006-05-24 01:37:46 +00:00
|
|
|
#ifndef _MEMMAP_H
|
|
|
|
#define _MEMMAP_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Memory mapping
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** A usable memory region */
|
|
|
|
struct memory_region {
|
|
|
|
/** Physical start address */
|
|
|
|
uint64_t start;
|
|
|
|
/** Physical end address */
|
|
|
|
uint64_t end;
|
|
|
|
};
|
|
|
|
|
2006-05-24 14:41:27 +00:00
|
|
|
/** Maximum number of memory regions we expect to encounter */
|
|
|
|
#define MAX_MEMORY_REGIONS 8
|
|
|
|
|
|
|
|
/** A memory map */
|
|
|
|
struct memory_map {
|
2006-05-25 00:00:30 +00:00
|
|
|
/** Memory regions */
|
2006-05-24 14:41:27 +00:00
|
|
|
struct memory_region regions[MAX_MEMORY_REGIONS];
|
2006-05-25 00:00:30 +00:00
|
|
|
/** Number of used regions */
|
|
|
|
unsigned int count;
|
2006-05-24 14:41:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern void get_memmap ( struct memory_map *memmap );
|
2006-05-24 01:37:46 +00:00
|
|
|
|
|
|
|
#endif /* _MEMMAP_H */
|