diff --git a/kernel/mm/mm.cc b/kernel/mm/mm.cc index b319d21..2079ae3 100644 --- a/kernel/mm/mm.cc +++ b/kernel/mm/mm.cc @@ -56,13 +56,12 @@ void mm_bootstrap() for (int mmap_idx = 0; mmap_idx < mm_mmap_num_entries; mmap_idx++) { u32_t base_address = mm_mmap_entries[mmap_idx].base; + u32_t address_limit = base_address + mm_mmap_entries[mmap_idx].length; if (base_address & PAGE_LOW_MASK) { /* start of this mmap range is not page-aligned */ base_address = (base_address & PAGE_HIGH_MASK) + PAGE_SIZE; } - u32_t address_limit = mm_mmap_entries[mmap_idx].base + - mm_mmap_entries[mmap_idx].length; if (address_limit & PAGE_LOW_MASK) { /* end of this mmap range is not page-aligned */