summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-05-29 05:32:08 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-05-29 05:32:08 +0000
commit5d5a1341b34e8e53abf3690a8a50d6e4a95312df (patch)
treeac38d832d89a29f85f617da425f3aa779ce45a33 /sys/arch/i386
parente014d55ae0d8bb00a4caf40208563605e05bebd2 (diff)
better style, move pmm init code completely into gidt.S
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/stand/boot/srt0.S28
-rw-r--r--sys/arch/i386/stand/libsa/gidt.S32
2 files changed, 30 insertions, 30 deletions
diff --git a/sys/arch/i386/stand/boot/srt0.S b/sys/arch/i386/stand/boot/srt0.S
index 531bcaa2557..db739633244 100644
--- a/sys/arch/i386/stand/boot/srt0.S
+++ b/sys/arch/i386/stand/boot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.7 1997/04/18 01:30:03 mickey Exp $ */
+/* $OpenBSD: srt0.S,v 1.8 1997/05/29 05:32:06 mickey Exp $ */
/* $NetBSD: srt0.c,v 1.3 1994/10/27 04:21:59 cgd Exp $ */
/*-
@@ -49,10 +49,6 @@
.globl _edata
.globl _boot
.globl __rtt
- .globl _Gdtr
- .globl _Idtr_prot
- .globl _Idtr_reset
- .globl idt_init
.text
.globl start_boot
@@ -61,20 +57,7 @@ start_boot:
movl $0xb80a0, %ebx
movl $0x07420742, (%ebx)
#endif
- /* reload new gdt */
- lgdt _Gdtr
- ljmp $8, $1f
-1:
- movw $0x10, %ax
- movl %ax, %ds
- movl %ax, %ss
- movl %ax, %es
- movl %ax, %fs
- movl %ax, %gs
- /* init idt */
- call idt_init
- /* load idtr for interrupts */
- lidt _Idtr_prot
+ call pmm_init /* init protected moded memory management */
#ifdef DEBUG
movl $0xb80a4, %ebx
@@ -99,6 +82,13 @@ start_boot:
call _boot
+ .data
+ .align 3
+_Idtr_reset:
+ .word 0
+ .long 0
+
+ .text
__rtt:
#ifdef DEBUG
movl $0xb8000, %ebx
diff --git a/sys/arch/i386/stand/libsa/gidt.S b/sys/arch/i386/stand/libsa/gidt.S
index 56fc268e84b..3f449d1e830 100644
--- a/sys/arch/i386/stand/libsa/gidt.S
+++ b/sys/arch/i386/stand/libsa/gidt.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: gidt.S,v 1.4 1997/04/18 01:28:02 mickey Exp $ */
+/* $OpenBSD: gidt.S,v 1.5 1997/05/29 05:32:07 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -46,8 +46,27 @@
#define addr32 .byte 0x67
#define data32 .byte 0x66
+ .text
+ .globl pmm_init
+
+pmm_init:
+ /* reload new gdt */
+ lgdt _Gdtr
+ ljmp $8, $1f
+1:
+ movw $0x10, %ax
+ movl %ax, %ds
+ movl %ax, %ss
+ movl %ax, %es
+ movl %ax, %fs
+ movl %ax, %gs
+ /* init idt */
+ call idt_init
+ /* load idtr for interrupts */
+ lidt _Idtr_prot
+ ret
+
.data
- .globl _Gdtr
.align 3
gdt:
@@ -86,19 +105,11 @@ _Gdtr: .word . - gdt - 1
.long gdt
.word 0
- .globl _Idtr_real
.align 3
_Idtr_real:
.word 1023
.long 0
- .globl _Idtr_reset
- .align 3
-_Idtr_reset:
- .word 0
- .long 0
-
- .globl _Idtr_prot
.align 3
idt:
.space 32*8, 0 /* internal (0-31) */
@@ -115,7 +126,6 @@ _Idtr_prot:
#define IBIOS(n) IPROC(bios/**/n)
#define IDOS(n) IPROC(dos/**/n)
- .globl idt_init
idt_init:
pushl %edi