Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the getmemsize() prototype available in memsizes.h, for code that
doesn't want to go to the hassle of processing a full memory map.
- Loading branch information
Michael Brown
committed
Jan 14, 2007
1 parent
c1fd6e8
commit b9f9985
Showing
3 changed files
with
17 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,17 @@ | ||
#ifndef MEMSIZES_H | ||
#define MEMSIZES_H | ||
#ifndef _MEMSIZES_H | ||
#define _MEMSIZES_H | ||
|
||
#warning "This header is no longer functional; use memmap.h instead" | ||
#include <basemem.h> | ||
|
||
/* | ||
* These structures seem to be very i386 (and, in fact, PCBIOS) | ||
* specific, so I've moved them out of etherboot.h. | ||
/** | ||
* Get size of base memory from BIOS free base memory counter | ||
* | ||
* @ret basemem Base memory size, in kB | ||
*/ | ||
static inline unsigned int basememsize ( void ) { | ||
return get_fbms(); | ||
} | ||
|
||
struct e820entry { | ||
uint64_t addr; | ||
uint64_t size; | ||
uint32_t type; | ||
#define E820_RAM 1 | ||
#define E820_RESERVED 2 | ||
#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */ | ||
#define E820_NVS 4 | ||
} __attribute__ (( packed )); | ||
#define E820ENTRY_SIZE 20 | ||
#define E820MAX 32 | ||
extern unsigned int extmemsize ( void ); | ||
|
||
struct meminfo { | ||
uint16_t basememsize; | ||
uint16_t pad; | ||
uint32_t memsize; | ||
uint32_t map_count; | ||
struct e820entry map[E820MAX]; | ||
} __attribute__ (( packed )); | ||
|
||
extern struct meminfo meminfo; | ||
|
||
extern void get_memsizes ( void ); | ||
|
||
#endif /* MEMSIZES_H */ | ||
#endif /* _MEMSIZES_H */ |