From e04329aae8ceff7816569ab663237faedd3e5351 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Thu, 1 Sep 2011 12:18:43 -0400 Subject: [PATCH 1/2] Have one definition of kernel stack size --- entry.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/entry.S b/entry.S index 4fd85c6..3fe4eb5 100644 --- a/entry.S +++ b/entry.S @@ -17,8 +17,7 @@ #include "asm.h" #include "memlayout.h" #include "mmu.h" - -#define STACK 4096 +#include "param.h" # Multiboot header. Data to direct multiboot loader. .p2align 2 @@ -52,7 +51,7 @@ entry: movl %eax, %cr0 # Set up the stack pointer. - movl $(stack + STACK), %esp + movl $(stack + KSTACKSIZE), %esp # Jump to main(), and switch to executing at # high addresses. The indirect call is needed because @@ -61,4 +60,4 @@ entry: mov $main, %eax jmp *%eax -.comm stack, STACK +.comm stack, KSTACKSIZE From 6bb9221395b3bde9af6f5a2c3ccc118c0da2aab8 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Thu, 1 Sep 2011 13:18:02 -0400 Subject: [PATCH 2/2] Fix layout --- x86.h | 1 - 1 file changed, 1 deletion(-) diff --git a/x86.h b/x86.h index 0c3feae..503afdb 100644 --- a/x86.h +++ b/x86.h @@ -170,7 +170,6 @@ xchg(volatile uint *addr, uint newval) return result; } -//PAGEBREAK! static inline void lcr0(uint val) {