fixed mm bug, now crashing because IDT isn't mapped via paging
git-svn-id: svn://anubis/hos/trunk@97 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
parent
1027b8c346
commit
5ac343a2e8
@ -11,8 +11,8 @@ export HOS_TOPLEVEL := $(shell pwd)
|
|||||||
LDSCRIPT := link.ld
|
LDSCRIPT := link.ld
|
||||||
KERNEL := hos
|
KERNEL := hos
|
||||||
export CPPFLAGS := -I$(HOS_TOPLEVEL) -I$(HOS_TOPLEVEL)/include
|
export CPPFLAGS := -I$(HOS_TOPLEVEL) -I$(HOS_TOPLEVEL)/include
|
||||||
export CFLAGS := -Wall -O2
|
export CFLAGS := -Wall -O2 -g
|
||||||
export CXXFLAGS := -Wall -O2 -fno-rtti -fno-exceptions
|
export CXXFLAGS := -Wall -O2 -fno-rtti -fno-exceptions -g
|
||||||
export LDFLAGS := -T $(LDSCRIPT) -Map $(KERNEL).map
|
export LDFLAGS := -T $(LDSCRIPT) -Map $(KERNEL).map
|
||||||
export LDLIBS := `$(CC) -print-libgcc-file-name`
|
export LDLIBS := `$(CC) -print-libgcc-file-name`
|
||||||
|
|
||||||
|
@ -192,10 +192,11 @@ void mm_bootstrap()
|
|||||||
/* set the page directory base register */
|
/* set the page directory base register */
|
||||||
write_cr3(page_directory_phys);
|
write_cr3(page_directory_phys);
|
||||||
|
|
||||||
|
/* set up permanent stack before enabling paging */
|
||||||
|
stack_bootstrap();
|
||||||
|
|
||||||
/* turn on paging */
|
/* turn on paging */
|
||||||
write_cr0(read_cr0() | (1 << 31));
|
write_cr0(read_cr0() | (1 << 31));
|
||||||
|
|
||||||
stack_bootstrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@ -210,6 +211,7 @@ static void record_phys_page(u32_t base_address)
|
|||||||
last_page_alloc_page++;
|
last_page_alloc_page++;
|
||||||
page_alloc_pages_index++;
|
page_alloc_pages_index++;
|
||||||
page_alloc_page_numbers[last_page_alloc_page] = base_address;
|
page_alloc_page_numbers[last_page_alloc_page] = base_address;
|
||||||
|
page_alloc_page_index = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user