mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-16 00:01:34 +00:00
35 lines
590 B
C
35 lines
590 B
C
#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;
|
|
};
|
|
|
|
/** Maximum number of memory regions we expect to encounter */
|
|
#define MAX_MEMORY_REGIONS 8
|
|
|
|
/** A memory map */
|
|
struct memory_map {
|
|
/** Memory regions */
|
|
struct memory_region regions[MAX_MEMORY_REGIONS];
|
|
/** Number of used regions */
|
|
unsigned int count;
|
|
};
|
|
|
|
extern void get_memmap ( struct memory_map *memmap );
|
|
|
|
#endif /* _MEMMAP_H */
|