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.2.2 retrieving revision 1.43.4.6 diff -u -p -r1.37.2.2 -r1.43.4.6 --- src/sys/arch/i386/i386/locore.S 2006/06/01 22:34:50 1.37.2.2 +++ src/sys/arch/i386/i386/locore.S 2007/01/19 19:35:22 1.43.4.6 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.37.2.2 2006/06/01 22:34:50 kardel Exp $ */ +/* $NetBSD: locore.S,v 1.43.4.6 2007/01/19 19:35:22 ad 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" @@ -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 @@ -884,7 +879,7 @@ ENTRY(cpu_switch) xorl %esi,%esi sti idle_unlock: -#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) +#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) || defined(DIAGNOSTIC) call _C_LABEL(sched_unlock_idle) #endif /* Interrupts are okay again. */ @@ -913,7 +908,7 @@ idle_start: idle_exit: movl $IPL_HIGH,CPUVAR(ILEVEL) # splhigh sti -#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) +#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) || defined(DIAGNOSTIC) call _C_LABEL(sched_lock_idle) #endif movl _C_LABEL(sched_whichqs),%ecx @@ -1067,7 +1062,7 @@ switch_restored: movl $1,%ebx switch_return: -#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) +#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) || defined(DIAGNOSTIC) call _C_LABEL(sched_unlock_idle) #endif cmpl $0,CPUVAR(IPENDING) @@ -1160,12 +1155,13 @@ ENTRY(cpu_exit) movl CPUVAR(IDLE_PCB),%esi movl CPUVAR(IDLE_TSS_SEL),%edx #endif - /* In case we fault... */ - movl $0,CPUVAR(CURLWP) /* Restore the idle context. */ cli + /* In case we fault... */ + movl $0,CPUVAR(CURLWP) + /* Restore stack pointers. */ movl PCB_ESP(%esi),%esp movl PCB_EBP(%esi),%ebp @@ -1195,13 +1191,6 @@ ENTRY(cpu_exit) /* Interrupts are okay again. */ sti - /* - * Schedule the dead LWP's stack to be freed. - */ - pushl %edi - call _C_LABEL(lwp_exit2) - addl $4,%esp - /* Jump into cpu_switch() with the right state. */ xorl %esi,%esi movl %esi,CPUVAR(CURLWP)