diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-20 17:48:58 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-20 17:48:58 +0100 |
commit | 2f58373a59815b46a19355f18227f2304bd651ef (patch) | |
tree | 78a30ecd7ff244470d8759c94efe695bc879a7e0 | |
parent | e13b42aeee93f1662da5f5e83f93304972a3fa6d (diff) |
Better estimate avail_remaining
* i386/i386at/model_dep.c (mem_size_init): Move avail_remaining computation to
after all phys_last_addr corrections.
-rw-r--r-- | i386/i386at/model_dep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index b98a4d8..975f60a 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -225,10 +225,9 @@ mem_size_init(void) phys_last_kb = 0x400000 - 1; } + /* TODO: support mmap */ + phys_last_addr = phys_last_kb * 0x400; - avail_remaining - = phys_last_addr - (0x100000 - (boot_info.mem_lower * 0x400) - - 0x1000); printf("AT386 boot: physical memory from 0x%x to 0x%x\n", phys_first_addr, phys_last_addr); @@ -242,6 +241,10 @@ mem_size_init(void) phys_first_addr = round_page(phys_first_addr); phys_last_addr = trunc_page(phys_last_addr); + + avail_remaining + = phys_last_addr - (0x100000 - (boot_info.mem_lower * 0x400) + - 0x1000); } /* |