diff options
-rw-r--r-- | include/sys/schedule.h | 2 | ||||
-rw-r--r-- | src/lib/mmu.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/sys/schedule.h b/include/sys/schedule.h index f32044c..d0d938c 100644 --- a/include/sys/schedule.h +++ b/include/sys/schedule.h @@ -1,7 +1,7 @@ #ifndef SYS_SCHEDULE_H #define SYS_SCHEDULE_H -#define TQUEUE_MAX 0x100 +#define TQUEUE_MAX 0x800 #define STACK_SIZE 0x4000 #define TQUEUE_CNT 3 #define PRIORITIES 8 diff --git a/src/lib/mmu.c b/src/lib/mmu.c index 6a947c5..0a2f892 100644 --- a/src/lib/mmu.c +++ b/src/lib/mmu.c @@ -15,11 +15,15 @@ void mmu_section(unsigned long virtual, unsigned long physical, unsigned long fl *entry = physval; } +extern unsigned long __bss_end; void mmu_init(void) { - mmu_section(0x00000000, 0x00000000, CACHABLE | BUFFERABLE); - for (unsigned long addr = 0x00100000;; addr += 0x00100000) { - mmu_section(addr, addr, NO_PERMISSIONS_REQUIRED); + for (unsigned long addr = 0x00000000;; addr += 0x00100000) { + if (addr < (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) |