Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/i386/i386/locore.S,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/i386/i386/locore.S,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.37.6.1 retrieving revision 1.43.6.1 diff -u -p -r1.37.6.1 -r1.43.6.1 --- src/sys/arch/i386/i386/locore.S 2006/04/19 02:32:45 1.37.6.1 +++ src/sys/arch/i386/i386/locore.S 2006/12/10 07:16:06 1.43.6.1 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.37.6.1 2006/04/19 02:32:45 elad Exp $ */ +/* $NetBSD: locore.S,v 1.43.6.1 2006/12/10 07:16:06 yamt Exp $ */ /*- * Copyright (c) 1998, 2000, 2004 The NetBSD Foundation, Inc. @@ -83,7 +83,6 @@ #include "npx.h" #include "assym.h" -#include "apm.h" #include "lapic.h" #include "ioapic.h" #include "ksyms.h" @@ -159,7 +158,7 @@ .globl _C_LABEL(cpu) .globl _C_LABEL(esym) .globl _C_LABEL(atdevbase) - .globl _C_LABEL(proc0paddr),_C_LABEL(PDPpaddr) + .globl _C_LABEL(proc0uarea),_C_LABEL(PDPpaddr) .globl _C_LABEL(gdt) #ifdef I586_CPU .globl _C_LABEL(idt) @@ -193,7 +192,7 @@ _C_LABEL(lapic_tpr): _C_LABEL(cpu): .long 0 # are we 386, 386sx, or 486, # or Pentium, or.. _C_LABEL(atdevbase): .long 0 # location of start of iomem in virtual -_C_LABEL(proc0paddr): .long 0 +_C_LABEL(proc0uarea): .long 0 _C_LABEL(PDPpaddr): .long 0 # paddr of PDP, for libkvm .space 512 @@ -216,16 +215,10 @@ start: movw $0x1234,0x472 # warm boot .align 4 .globl Multiboot_Header _C_LABEL(Multiboot_Header): -#define MULTIBOOT_HEADER_FLAGS (MULTIBOOT_HEADER_WANT_MEMORY | \ - MULTIBOOT_HEADER_HAS_ADDR) +#define MULTIBOOT_HEADER_FLAGS (MULTIBOOT_HEADER_WANT_MEMORY) .long MULTIBOOT_HEADER_MAGIC .long MULTIBOOT_HEADER_FLAGS .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) - .long RELOC(Multiboot_Header) - .long RELOC(start) - .long RELOC(_edata) - .long RELOC(_end) + MULTIBOOT_SYMTAB_SPACE - .long RELOC(start) 1: /* Check if we are being executed by a Multiboot-compliant boot @@ -233,10 +226,12 @@ _C_LABEL(Multiboot_Header): cmpl $MULTIBOOT_INFO_MAGIC,%eax jne 1f - /* Indeed, a multiboot-compliat boot loader executed us. We copy + /* + * Indeed, a multiboot-compliant boot loader executed us. We copy * the received Multiboot information structure into kernel's data * space to process it later -- after we are relocated. It will - * be safer to run complex C code than doing it at this point. */ + * be safer to run complex C code than doing it at this point. + */ pushl %ebx # Address of Multiboot information call _C_LABEL(multiboot_pre_reloc) addl $4,%esp @@ -247,7 +242,7 @@ _C_LABEL(Multiboot_Header): /* * At this point, we know that a NetBSD-specific boot loader * booted this kernel. The stack carries the following parameters: - * (boothowto, [bootdev], bootinfo, esym, biosbasemem, biosextmem), + * (boothowto, [bootdev], bootinfo, esym, biosextmem, biosbasemem), * 4 bytes each. */ addl $4,%esp # Discard return address to boot loader @@ -599,9 +594,9 @@ begin: /* Set up bootstrap stack. */ leal (PROC0STACK+KERNBASE)(%esi),%eax - movl %eax,_C_LABEL(proc0paddr) - leal (USPACE-FRAMESIZE)(%eax),%esp - movl %esi,PCB_CR3(%eax) # pcb->pcb_cr3 + movl %eax,_C_LABEL(proc0uarea) + leal (KSTACK_SIZE-FRAMESIZE)(%eax),%esp + movl %esi,(KSTACK_SIZE+PCB_CR3)(%eax) # pcb->pcb_cr3 xorl %ebp,%ebp # mark end of frames #if defined(MULTIBOOT) @@ -773,8 +768,8 @@ NENTRY(switch_error) /* * void cpu_switch(struct lwp *) - * Find a runnable process and switch to it. Wait if necessary. If the new - * process is the same as the old one, we short-circuit the context save and + * Find a runnable lwp and switch to it. Wait if necessary. If the new + * lwp is the same as the old one, we short-circuit the context save and * restore. * * Note that the stack frame layout is known to "struct switchframe"