mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2025-10-13 21:25:07 -07:00
fixing minor bugs with single unit compilation in gcc with flags on
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
#include "memmap.h"
|
||||
|
||||
uint32_t get_memory_map(memory_map_entry_t *map, uint32_t max_entries) {
|
||||
// Fill with dummy values for now
|
||||
map[0].base_addr = 0x00000000;
|
||||
map[0].length = 0x0009FC00;
|
||||
map[0].type = 1;
|
||||
uint32_t count = 0;
|
||||
|
||||
map[1].base_addr = 0x00100000;
|
||||
map[1].length = 0x1FF00000;
|
||||
map[1].type = 1;
|
||||
if (max_entries >= 1) {
|
||||
map[count].base_addr = 0x00000000;
|
||||
map[count].length = 0x0009FC00;
|
||||
map[count].type = 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
return 2; // 2 regions
|
||||
}
|
||||
if (max_entries >= 2) {
|
||||
map[count].base_addr = 0x00100000;
|
||||
map[count].length = 0x1FF00000;
|
||||
map[count].type = 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
Reference in New Issue
Block a user