Enable the MMU even if the kernel is not loaded in physical memory at
the same place it was linked against.
This commit is contained in:
@ -7,8 +7,6 @@
|
||||
#include <framebuffer.h>
|
||||
#include <console.h>
|
||||
|
||||
extern const unsigned int kernel_end;
|
||||
|
||||
struct fb myfb;
|
||||
|
||||
void video(void) {
|
||||
@ -64,7 +62,8 @@ int main(void) {
|
||||
//setup memory
|
||||
mm_init();
|
||||
mm_add_free_region((void*)0x60000000, (void*)0x7FFFFFFF);
|
||||
lower = (char*) &kernel_end;
|
||||
mm_add_free_region((void*)0x80000000, (void*)0x800FFFFF);
|
||||
lower = (char*) &kernel_end_virt;
|
||||
if ((unsigned int)lower % MM_PAGE_SIZE != 0)
|
||||
lower += (MM_PAGE_SIZE - ((unsigned int)lower % MM_PAGE_SIZE));
|
||||
mm_add_free_region((void*)lower, (void*)0x9FFFFFFF); //subtract the memory used by the kernel
|
||||
|
Reference in New Issue
Block a user