diff options
| author | Michael Brown | 2007-01-12 04:13:04 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-12 04:13:04 +0100 |
| commit | 859da6bd3287917467d64046bca6182c9c866f98 (patch) | |
| tree | 01998a4b57e217007c8b4d5f0cda809cfb640e50 /src/include/gpxe | |
| parent | Nothing (not even hidemem.c) uses this file! (diff) | |
| download | ipxe-859da6bd3287917467d64046bca6182c9c866f98.tar.gz ipxe-859da6bd3287917467d64046bca6182c9c866f98.tar.xz ipxe-859da6bd3287917467d64046bca6182c9c866f98.zip | |
Allow external code to update hidden memory regions.
Diffstat (limited to 'src/include/gpxe')
| -rw-r--r-- | src/include/gpxe/hidemem.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/include/gpxe/hidemem.h b/src/include/gpxe/hidemem.h new file mode 100644 index 000000000..89109004c --- /dev/null +++ b/src/include/gpxe/hidemem.h @@ -0,0 +1,45 @@ +#ifndef _GPXE_HIDEMEM_H +#define _GPXE_HIDEMEM_H + +/** + * @file + * + * Hidden memory regions + * + */ + +/** + * A hidden region of Etherboot + * + * This represents a region that will be edited out of the system's + * memory map. + * + * This structure is accessed by assembly code, so must not be + * changed. + */ +struct hidden_region { + /* Physical start address */ + physaddr_t start; + /* Physical end address */ + physaddr_t end; +}; + +/** + * Unique IDs for hidden regions + */ +enum { + TEXT = 0, + BASEMEM, + EXTMEM, +}; + +extern struct hidden_region __data16_array ( hidden_regions, [] ); +#define hidden_regions __use_data16 ( hidden_regions ) + +static inline void hide_region ( unsigned int region, + physaddr_t start, physaddr_t end ) { + hidden_regions[region].start = start; + hidden_regions[region].end = end; +} + +#endif /* _GPXE_HIDEMEM_H */ |
