From 39ea3f231ba1d2caff641dd1689402dadafe825c Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 1 Jul 2009 01:53:43 +0000 Subject: [PATCH] added bootstrap_stack so the temporary stack is not in the same place as the page directory git-svn-id: svn://anubis/hos/trunk@29 5b3e749e-e535-0410-8002-a9bb6afbdfca --- kernel/boot/boot.asm | 4 ++-- kernel/boot/k_bootstrap.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/boot/boot.asm b/kernel/boot/boot.asm index 864e4ff..33b86e8 100644 --- a/kernel/boot/boot.asm +++ b/kernel/boot/boot.asm @@ -16,7 +16,7 @@ extern _end, _bss ; Symbols from C -extern k_bootstrap, page_directory +extern k_bootstrap, bootstrap_stack ;------------------------------------------------------- [section .text] @@ -64,7 +64,7 @@ segmented_start: mov es, cx mov gs, cx mov fs, cx - mov esp, page_directory+PAGE_SIZE-4 ; set up temporary stack space + mov esp, bootstrap_stack+4096-4 ; set up temporary stack space mov cx, 0x0700 + 'b' mov [CONSOLE_MEMORY+160*8+1*2], cx diff --git a/kernel/boot/k_bootstrap.c b/kernel/boot/k_bootstrap.c index 8848732..9c7ad6c 100644 --- a/kernel/boot/k_bootstrap.c +++ b/kernel/boot/k_bootstrap.c @@ -8,6 +8,8 @@ #define DEBUG_LETTER(col,chr) *(u16_t *)(CONSOLE_MEMORY + 160 * 8 + (col) * 2) \ = 0x0700 | (chr) +u8_t bootstrap_stack[4096]; + /************************************************************************** * This function is invoked before paging is enabled. Segmentation is * * utilized to map virtual address 0xE000_0000 to physical address 0x0. *