mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 20:40:25 +03:00
Some operating systems get a nasty shock if a region of the E820 map seems
to start on a non-page boundary. Make life safer by rounding out our edited regions.
This commit is contained in:
@@ -8,38 +8,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
enum hidemem_region_id {
|
||||
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;
|
||||
}
|
||||
extern void hide_region ( unsigned int region_id, physaddr_t start,
|
||||
physaddr_t end );
|
||||
|
||||
#endif /* _GPXE_HIDEMEM_H */
|
||||
|
||||
Reference in New Issue
Block a user