diff options
author | Christian Cunningham <cc@localhost> | 2022-03-19 17:20:25 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-19 17:20:25 -0700 |
commit | 1c7402284d03c106705bd954295123958625c631 (patch) | |
tree | 78027a4deed88dceeba3c604b10a1b52ab58069c /src/lib | |
parent | ea820c7c7b67125c2d378b1c2c995f931c87e4d8 (diff) |
Fixed MMU entry covering memory map
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/mmu.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/mmu.c b/src/lib/mmu.c index 0a2f892..3543143 100644 --- a/src/lib/mmu.c +++ b/src/lib/mmu.c @@ -19,16 +19,13 @@ extern unsigned long __bss_end; void mmu_init(void) { for (unsigned long addr = 0x00000000;; addr += 0x00100000) { - if (addr < (unsigned long)&__bss_end) { + if ((addr+0x00100000) < (unsigned long)&__bss_end) { mmu_section(addr, addr, CACHABLE | BUFFERABLE); } else { mmu_section(addr, addr, NO_PERMISSIONS_REQUIRED); } if (addr == 0x02000000) mmu_section(addr, addr, CACHABLE | BUFFERABLE | NO_PERMISSIONS_REQUIRED); - //else if (addr == 0x3F000000) - //else - // mmu_section(addr, addr, NO_PERMISSIONS_REQUIRED); if (addr == 0xFFF00000) break; } |