Sat Jan 11 17:05:17 2014 UTC ()
fix a comment (cpu_switch() -> cpu_switchto()) (Richard Hansen)


(christos)
diff -r1.108 -r1.109 src/sys/arch/i386/i386/locore.S

cvs diff -r1.108 -r1.109 src/sys/arch/i386/i386/locore.S (expand / switch to unified diff)

--- src/sys/arch/i386/i386/locore.S 2013/12/01 01:05:16 1.108
+++ src/sys/arch/i386/i386/locore.S 2014/01/11 17:05:17 1.109
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: locore.S,v 1.108 2013/12/01 01:05:16 christos Exp $ */ 1/* $NetBSD: locore.S,v 1.109 2014/01/11 17:05:17 christos Exp $ */
2 2
3/* 3/*
4 * Copyright-o-rama! 4 * Copyright-o-rama!
5 */ 5 */
6 6
7/* 7/*
8 * Copyright (c) 2006 Manuel Bouyer. 8 * Copyright (c) 2006 Manuel Bouyer.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -119,27 +119,27 @@ @@ -119,27 +119,27 @@
119 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 119 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
120 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 120 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
121 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 121 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
122 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 122 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
123 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 123 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
124 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 124 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
125 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 125 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
126 * SUCH DAMAGE. 126 * SUCH DAMAGE.
127 * 127 *
128 * @(#)locore.s 7.3 (Berkeley) 5/13/91 128 * @(#)locore.s 7.3 (Berkeley) 5/13/91
129 */ 129 */
130 130
131#include <machine/asm.h> 131#include <machine/asm.h>
132__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.108 2013/12/01 01:05:16 christos Exp $"); 132__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.109 2014/01/11 17:05:17 christos Exp $");
133 133
134#include "opt_compat_oldboot.h" 134#include "opt_compat_oldboot.h"
135#include "opt_ddb.h" 135#include "opt_ddb.h"
136#include "opt_modular.h" 136#include "opt_modular.h"
137#include "opt_multiboot.h" 137#include "opt_multiboot.h"
138#include "opt_realmem.h" 138#include "opt_realmem.h"
139#include "opt_vm86.h" 139#include "opt_vm86.h"
140#include "opt_xen.h" 140#include "opt_xen.h"
141 141
142#include "npx.h" 142#include "npx.h"
143#include "assym.h" 143#include "assym.h"
144#include "lapic.h" 144#include "lapic.h"
145#include "ioapic.h" 145#include "ioapic.h"
@@ -871,28 +871,29 @@ NENTRY(lgdt_finish) @@ -871,28 +871,29 @@ NENTRY(lgdt_finish)
871 popl %eax 871 popl %eax
872 pushl $GSEL(GCODE_SEL, SEL_KPL) 872 pushl $GSEL(GCODE_SEL, SEL_KPL)
873 pushl %eax 873 pushl %eax
874 lret 874 lret
875END(lgdt_finish) 875END(lgdt_finish)
876 876
877#endif /* XEN */ 877#endif /* XEN */
878 878
879/* 879/*
880 * void lwp_trampoline(void); 880 * void lwp_trampoline(void);
881 * 881 *
882 * This is a trampoline function pushed onto the stack of a newly created 882 * This is a trampoline function pushed onto the stack of a newly created
883 * process in order to do some additional setup. The trampoline is entered by 883 * process in order to do some additional setup. The trampoline is entered by
884 * cpu_switch()ing to the process, so we abuse the callee-saved registers used 884 * cpu_switchto()ing to the process, so we abuse the callee-saved
885 * by cpu_switch() to store the information about the stub to call. 885 * registers used by cpu_switchto() to store the information about the
 886 * stub to call.
886 * NOTE: This function does not have a normal calling sequence! 887 * NOTE: This function does not have a normal calling sequence!
887 */ 888 */
888NENTRY(lwp_trampoline) 889NENTRY(lwp_trampoline)
889 movl %ebp,%edi /* for .Lsyscall_checkast */ 890 movl %ebp,%edi /* for .Lsyscall_checkast */
890 xorl %ebp,%ebp 891 xorl %ebp,%ebp
891 pushl %edi 892 pushl %edi
892 pushl %eax 893 pushl %eax
893 call _C_LABEL(lwp_startup) 894 call _C_LABEL(lwp_startup)
894 addl $8,%esp 895 addl $8,%esp
895 pushl %ebx 896 pushl %ebx
896 call *%esi 897 call *%esi
897 addl $4,%esp 898 addl $4,%esp
898 jmp .Lsyscall_checkast 899 jmp .Lsyscall_checkast