moved call to stack_bootstrap() into mm_bootstrap() since stack_bootstrap() relies on calling mm_map() and mm_use_virtual_offset was getting unset at the end of mm_bootstrap(); calling k_main() now works!
git-svn-id: svn://anubis/hos/trunk@54 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
parent
118021a0f6
commit
1dd8250048
@ -109,8 +109,8 @@ segmentation_disabled:
|
|||||||
mov cx, 0x0700 + 'f'
|
mov cx, 0x0700 + 'f'
|
||||||
mov [CONSOLE_MEMORY+160*8+5*2], cx
|
mov [CONSOLE_MEMORY+160*8+5*2], cx
|
||||||
|
|
||||||
; mov esp, KERNEL_STACK_TOP
|
mov esp, KERNEL_STACK_TOP
|
||||||
; call k_main
|
call k_main
|
||||||
|
|
||||||
idle_loop:
|
idle_loop:
|
||||||
hlt
|
hlt
|
||||||
|
@ -47,7 +47,6 @@ u32_t k_bootstrap(mb_info_t * mb_info, u32_t mb_magic)
|
|||||||
* before calling them.
|
* before calling them.
|
||||||
*/
|
*/
|
||||||
mm_bootstrap();
|
mm_bootstrap();
|
||||||
stack_bootstrap(); /* after mm */
|
|
||||||
kio_bootstrap();
|
kio_bootstrap();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "mm.h"
|
#include "mm.h"
|
||||||
|
#include "stack.h"
|
||||||
#include "boot/k_early_panic.h"
|
#include "boot/k_early_panic.h"
|
||||||
#include "lang/string.h"
|
#include "lang/string.h"
|
||||||
|
|
||||||
@ -156,6 +157,8 @@ void mm_bootstrap()
|
|||||||
/* set the page directory base register */
|
/* set the page directory base register */
|
||||||
set_cr3(page_directory);
|
set_cr3(page_directory);
|
||||||
|
|
||||||
|
stack_bootstrap();
|
||||||
|
|
||||||
mm_use_virtual_offset = false;
|
mm_use_virtual_offset = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user