summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2006-01-13 16:44:23 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2006-01-13 16:44:23 +0000
commit2a9bf3e3aa36f83719944c8aa8cdce2825119c3d (patch)
tree491a47a740fd93496f3dedfa143a32c27adeb458 /sys/arch
parent4766c36ded8cac683f5f5ec72fb72b60f5d3b1af (diff)
white space vs tabs; no binary change
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/mptramp.s114
1 files changed, 57 insertions, 57 deletions
diff --git a/sys/arch/i386/i386/mptramp.s b/sys/arch/i386/i386/mptramp.s
index 82ca28023f5..1449bc3c81b 100644
--- a/sys/arch/i386/i386/mptramp.s
+++ b/sys/arch/i386/i386/mptramp.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: mptramp.s,v 1.3 2005/05/26 04:29:06 mickey Exp $ */
+/* $OpenBSD: mptramp.s,v 1.4 2006/01/13 16:44:22 mickey Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -51,11 +51,11 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -71,15 +71,15 @@
*/
/*
* MP startup ...
- * the stuff from cpu_spinup_trampoline to mp_startup
+ * the stuff from cpu_spinup_trampoline to mp_startup
* is copied into the first 640 KB
*
* We startup the processors now when the kthreads become ready.
* The steps are:
- * 1) Get the processors running kernel-code from a special
- * page-table and stack page, do chip identification.
- * 2) halt the processors waiting for them to be enabled
- * by a idle-thread
+ * 1) Get the processors running kernel-code from a special
+ * page-table and stack page, do chip identification.
+ * 2) halt the processors waiting for them to be enabled
+ * by a idle-thread
*/
#include "assym.h"
@@ -91,9 +91,9 @@
#include <machine/mpbiosvar.h>
#include <machine/i82489reg.h>
-#define GDTE(a,b) .byte 0xff,0xff,0x0,0x0,0x0,a,b,0x0
-#define _RELOC(x) ((x) - KERNBASE)
-#define RELOC(x) _RELOC(_C_LABEL(x))
+#define GDTE(a,b) .byte 0xff,0xff,0x0,0x0,0x0,a,b,0x0
+#define _RELOC(x) ((x) - KERNBASE)
+#define RELOC(x) _RELOC(_C_LABEL(x))
#define _TRMP_LABEL(a) a = . - _C_LABEL(cpu_spinup_trampoline) + MP_TRAMPOLINE
@@ -115,8 +115,8 @@
#define HALTT(x,y) /**/
#endif
- .globl _C_LABEL(cpu),_C_LABEL(cpu_id),_C_LABEL(cpu_vendor)
- .globl _C_LABEL(cpuid_level),_C_LABEL(cpu_feature)
+ .globl _C_LABEL(cpu),_C_LABEL(cpu_id),_C_LABEL(cpu_vendor)
+ .globl _C_LABEL(cpuid_level),_C_LABEL(cpu_feature)
.global _C_LABEL(cpu_spinup_trampoline)
.global _C_LABEL(cpu_spinup_trampoline_end)
@@ -129,30 +129,30 @@
.code16
_C_LABEL(cpu_spinup_trampoline):
cli
- xorw %ax, %ax
- movw %ax, %ds
- movw %ax, %es
- movw %ax, %ss
- data32 addr32 lgdt (gdt_desc) # load flat descriptor table
- movl %cr0, %eax # get cr0
- orl $0x1, %eax # enable protected mode
- movl %eax, %cr0 # doit
- ljmp $0x8, $mp_startup
+ xorw %ax, %ax
+ movw %ax, %ds
+ movw %ax, %es
+ movw %ax, %ss
+ data32 addr32 lgdt (gdt_desc) # load flat descriptor table
+ movl %cr0, %eax # get cr0
+ orl $0x1, %eax # enable protected mode
+ movl %eax, %cr0 # doit
+ ljmp $0x8, $mp_startup
_TRMP_LABEL(mp_startup)
.code32
- movl $0x10, %eax # data segment
- movw %ax, %ds
- movw %ax, %ss
- movw %ax, %es
- movw %ax, %fs
- movw %ax, %gs
- movl $(MP_TRAMPOLINE+NBPG-16),%esp # bootstrap stack end,
+ movl $0x10, %eax # data segment
+ movw %ax, %ds
+ movw %ax, %ss
+ movw %ax, %es
+ movw %ax, %fs
+ movw %ax, %gs
+ movl $(MP_TRAMPOLINE+NBPG-16),%esp # bootstrap stack end,
# with scratch space..
#ifdef MPDEBUG
- leal RELOC(cpu_trace),%edi
+ leal RELOC(cpu_trace),%edi
#endif
HALT(0x1)
@@ -165,13 +165,13 @@ _TRMP_LABEL(mp_startup)
/* Load base of page directory and enable mapping. */
movl %ecx,%cr3 # load ptd addr into mmu
- movl %cr0,%eax # get control word
- # enable paging & NPX emulation
- orl $(CR0_PE|CR0_PG|CR0_NE|CR0_TS|CR0_EM|CR0_MP|CR0_WP),%eax
- movl %eax,%cr0 # and let's page NOW!
+ movl %cr0,%eax # get control word
+ # enable paging & NPX emulation
+ orl $(CR0_PE|CR0_PG|CR0_NE|CR0_TS|CR0_EM|CR0_MP|CR0_WP),%eax
+ movl %eax,%cr0 # and let's page NOW!
#ifdef MPDEBUG
- leal _C_LABEL(cpu_trace),%edi
+ leal _C_LABEL(cpu_trace),%edi
#endif
HALT(0x6)
@@ -187,9 +187,9 @@ _TRMP_LABEL(mp_startup)
# %ecx points at our cpu_info structure..
- movw $((MAXGDTSIZ*8) - 1), 6(%esp) # prepare segment descriptor
- movl CPU_INFO_GDT(%ecx), %eax # for real gdt
- movl %eax, 8(%esp)
+ movw $((MAXGDTSIZ*8) - 1), 6(%esp) # prepare segment descriptor
+ movl CPU_INFO_GDT(%ecx), %eax # for real gdt
+ movl %eax, 8(%esp)
HALTT(0x8, %eax)
lgdt 6(%esp)
HALT(0x9)
@@ -197,26 +197,26 @@ _TRMP_LABEL(mp_startup)
nop
1:
HALT(0xa)
- movl $GSEL(GDATA_SEL, SEL_KPL),%eax #switch to new segment
+ movl $GSEL(GDATA_SEL, SEL_KPL),%eax #switch to new segment
HALTT(0x10, %eax)
- movw %ax,%ds
+ movw %ax,%ds
HALT(0x11)
- movw %ax,%es
+ movw %ax,%es
HALT(0x12)
- movw %ax,%ss
+ movw %ax,%ss
HALT(0x13)
- pushl $GSEL(GCODE_SEL, SEL_KPL)
+ pushl $GSEL(GCODE_SEL, SEL_KPL)
pushl $mp_cont
HALT(0x14)
lret
.align 4,0x0
-_TRMP_LABEL(gdt_table)
- .word 0x0,0x0,0x0,0x0 # null GDTE
- GDTE(0x9f,0xcf) # Kernel text
- GDTE(0x93,0xcf) # Kernel data
+_TRMP_LABEL(gdt_table)
+ .word 0x0,0x0,0x0,0x0 # null GDTE
+ GDTE(0x9f,0xcf) # Kernel text
+ GDTE(0x93,0xcf) # Kernel data
_TRMP_LABEL(gdt_desc)
- .word 0x17 # limit 3 entries
- .long gdt_table # where is is gdt
+ .word 0x17 # limit 3 entries
+ .long gdt_table # where is is gdt
_C_LABEL(cpu_spinup_trampoline_end): #end of code copied to MP_TRAMPOLINE
mp_cont:
@@ -243,9 +243,9 @@ mp_cont:
xorl %eax,%eax
HALTT(0x27,%eax)
movl %eax,%gs
- movl PCB_CR0(%esi),%eax
+ movl PCB_CR0(%esi),%eax
HALTT(0x28,%eax)
- movl %eax,%cr0
+ movl %eax,%cr0
HALTT(0x30,%ecx)
pushl %ecx
call _C_LABEL(cpu_hatch)
@@ -259,7 +259,7 @@ _C_LABEL(mp_pdirpa):
#ifdef MPDEBUG
.global _C_LABEL(cpu_trace)
_C_LABEL(cpu_trace):
- .long 0x40
- .long 0xff
- .long 0xff
+ .long 0x40
+ .long 0xff
+ .long 0xff
#endif