Detecting Memory (x86): Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
m (rename the grub mmap to explicitly say "entry", since it's an entry rather than a whole map.)
mNo edit summary
Line 348: Line 348:


<source lang="c">
<source lang="c">
typedef struct mmap_entry {
typedef struct multiboot_memory_map {
unsigned int size;
unsigned int size;
unsigned int base_addr_low,base_addr_high;
unsigned int base_addr_low,base_addr_high;
Line 355: Line 355:
// You can also use: unsigned long long int length; if supported.
// You can also use: unsigned long long int length; if supported.
unsigned int type;
unsigned int type;
} multiboot_memory_map_t;
} mmap_entry_t;

// this is really an entry, not the entire map.
typedef multiboot_memory_map_t mmap_entry_t;


int main(multiboot_info* mbt, unsigned int magic) {
int main(multiboot_info* mbt, unsigned int magic) {