summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-10-01 21:29:50 +0000
committerphk <phk@FreeBSD.org>1994-10-01 21:29:50 +0000
commit8fedfb1241efba219f2887159351df4ee47b9189 (patch)
treecf85586c883e1dd5a571c1c1d68e15715de56571 /sys/i386
parent1fbb6a0bd3e6e04d06da0e677533f54ef628dbde (diff)
downloadFreeBSD-src-8fedfb1241efba219f2887159351df4ee47b9189.zip
FreeBSD-src-8fedfb1241efba219f2887159351df4ee47b9189.tar.gz
On my GW2K Handbook486 this code would reset when called from locore.s
I think I have narrowed this down to the stack being overflown. I have taken the push/pop of %fs out, it shouldn't be needed anyway, but the real & correct solution might to save the registers on the stack in locore.s before calling this stuff.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/apm/apm_init/apm_init.S6
-rw-r--r--sys/i386/apm/apm_init/apm_init.inc64
-rw-r--r--sys/i386/bios/apm_init/apm_init.S6
-rw-r--r--sys/i386/bios/apm_init/apm_init.inc64
4 files changed, 68 insertions, 72 deletions
diff --git a/sys/i386/apm/apm_init/apm_init.S b/sys/i386/apm/apm_init/apm_init.S
index f3e6815..5276947 100644
--- a/sys/i386/apm/apm_init/apm_init.S
+++ b/sys/i386/apm/apm_init/apm_init.S
@@ -12,7 +12,7 @@
*
* Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id$
+ * $Id: apm_init.S,v 1.2 1994/10/01 05:12:29 davidg Exp $
*/
/*
@@ -67,12 +67,11 @@
.text
ENTRY(apm_init)
cli /* disable interrupt */
- push %ebp /* save original base pointer */
+ pushl %ebp /* save original base pointer */
/* ebp is used as a register variable */
/*
* save old data segments: We assume that %ds == %es && %ds == %ss
*/
- push %fs
movw %ds, %ax
movw %ax, %fs
movw $(APM_INIT_DS_SEL), %ax /* initializer data segment */
@@ -185,7 +184,6 @@ finish:
movw %ax, %es
movw %ax, %ds
movl %ebp, %eax
- pop %fs
popl %ebp /* restore old base pointer */
lret /* restore old code segment */
diff --git a/sys/i386/apm/apm_init/apm_init.inc b/sys/i386/apm/apm_init/apm_init.inc
index d241334..d88a888 100644
--- a/sys/i386/apm/apm_init/apm_init.inc
+++ b/sys/i386/apm/apm_init/apm_init.inc
@@ -1,40 +1,40 @@
/* This file is automatically generated by bin2asm */
/* Original file is 'apm_init' */
- .byte 0xfa, 0x55, 0x0f, 0xa0, 0x66, 0x8c, 0xd8, 0x66
- .byte 0x8e, 0xe0, 0x66, 0xb8, 0xf0, 0x00, 0x66, 0x8e
- .byte 0xd8, 0x66, 0x8e, 0xc0, 0x66, 0x8e, 0xd0, 0x89
- .byte 0x25, 0x84, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00
- .byte 0x01, 0x00, 0x0f, 0x01, 0x0d, 0xa0, 0x01, 0x00
- .byte 0x00, 0xe8, 0x12, 0x01, 0x00, 0x00, 0xb4, 0x53
- .byte 0xb0, 0x00, 0x66, 0xbb, 0x00, 0x00, 0x00, 0x00
- .byte 0xfb, 0xcd, 0x15, 0xfa, 0x73, 0x15, 0x66, 0xe8
- .byte 0xcc, 0x00, 0x00, 0x00, 0xc7, 0x05, 0x88, 0x01
- .byte 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe9, 0x8c
- .byte 0x00, 0x00, 0x00, 0x89, 0xc2, 0x66, 0xe8, 0xb5
- .byte 0x00, 0x00, 0x00, 0x80, 0xff, 0x50, 0x75, 0x05
- .byte 0x80, 0xfb, 0x4d, 0x74, 0x0c, 0xc7, 0x05, 0x88
- .byte 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xeb
- .byte 0x6e, 0xf7, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x75
- .byte 0x0c, 0xc7, 0x05, 0x88, 0x01, 0x00, 0x00, 0xfe
- .byte 0xff, 0xff, 0xff, 0xeb, 0x5a, 0x89, 0x15, 0x88
- .byte 0x01, 0x00, 0x00, 0x81, 0xe1, 0xff, 0xff, 0x00
- .byte 0x00, 0x89, 0x0d, 0x8c, 0x01, 0x00, 0x00, 0xe8
- .byte 0xa4, 0x00, 0x00, 0x00, 0xb4, 0x53, 0xb0, 0x03
+ .byte 0xfa, 0x55, 0x66, 0x8c, 0xd8, 0x66, 0x8e, 0xe0
+ .byte 0x66, 0xb8, 0xf0, 0x00, 0x66, 0x8e, 0xd8, 0x66
+ .byte 0x8e, 0xc0, 0x66, 0x8e, 0xd0, 0x89, 0x25, 0x84
+ .byte 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x01, 0x00
+ .byte 0x0f, 0x01, 0x0d, 0xa0, 0x01, 0x00, 0x00, 0xe8
+ .byte 0x14, 0x01, 0x00, 0x00, 0xb4, 0x53, 0xb0, 0x00
.byte 0x66, 0xbb, 0x00, 0x00, 0x00, 0x00, 0xfb, 0xcd
- .byte 0x15, 0xfa, 0x73, 0x12, 0x66, 0xe8, 0x5e, 0x00
+ .byte 0x15, 0xfa, 0x73, 0x15, 0x66, 0xe8, 0xce, 0x00
.byte 0x00, 0x00, 0xc7, 0x05, 0x88, 0x01, 0x00, 0x00
- .byte 0xfd, 0xff, 0xff, 0xff, 0xeb, 0x21, 0x89, 0xc5
- .byte 0x66, 0xe8, 0x4a, 0x00, 0x00, 0x00, 0xb8, 0xff
- .byte 0xff, 0x00, 0x00, 0x21, 0xc5, 0x21, 0xc1, 0x21
- .byte 0xc2, 0x21, 0xc6, 0x21, 0xc7, 0xc1, 0xe5, 0x10
- .byte 0x09, 0xe9, 0xc1, 0xe7, 0x10, 0x09, 0xfe, 0xfa
- .byte 0x0f, 0x01, 0x1d, 0xa0, 0x01, 0x00, 0x00, 0x8b
- .byte 0x25, 0x84, 0x01, 0x00, 0x00, 0x8b, 0x2d, 0x88
- .byte 0x01, 0x00, 0x00, 0x8b, 0x3d, 0x8c, 0x01, 0x00
- .byte 0x00, 0x66, 0x8c, 0xe0, 0x66, 0x8e, 0xd0, 0x66
- .byte 0x8e, 0xc0, 0x66, 0x8e, 0xd8, 0x89, 0xe8, 0x0f
- .byte 0xa1, 0x5d, 0xcb, 0x00, 0x00, 0x00, 0x00, 0x00
+ .byte 0xff, 0xff, 0xff, 0xff, 0xe9, 0x8c, 0x00, 0x00
+ .byte 0x00, 0x89, 0xc2, 0x66, 0xe8, 0xb7, 0x00, 0x00
+ .byte 0x00, 0x80, 0xff, 0x50, 0x75, 0x05, 0x80, 0xfb
+ .byte 0x4d, 0x74, 0x0c, 0xc7, 0x05, 0x88, 0x01, 0x00
+ .byte 0x00, 0xff, 0xff, 0xff, 0xff, 0xeb, 0x6e, 0xf7
+ .byte 0xc1, 0x02, 0x00, 0x00, 0x00, 0x75, 0x0c, 0xc7
+ .byte 0x05, 0x88, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff
+ .byte 0xff, 0xeb, 0x5a, 0x89, 0x15, 0x88, 0x01, 0x00
+ .byte 0x00, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x89
+ .byte 0x0d, 0x8c, 0x01, 0x00, 0x00, 0xe8, 0xa6, 0x00
+ .byte 0x00, 0x00, 0xb4, 0x53, 0xb0, 0x03, 0x66, 0xbb
+ .byte 0x00, 0x00, 0x00, 0x00, 0xfb, 0xcd, 0x15, 0xfa
+ .byte 0x73, 0x12, 0x66, 0xe8, 0x60, 0x00, 0x00, 0x00
+ .byte 0xc7, 0x05, 0x88, 0x01, 0x00, 0x00, 0xfd, 0xff
+ .byte 0xff, 0xff, 0xeb, 0x21, 0x89, 0xc5, 0x66, 0xe8
+ .byte 0x4c, 0x00, 0x00, 0x00, 0xb8, 0xff, 0xff, 0x00
+ .byte 0x00, 0x21, 0xc5, 0x21, 0xc1, 0x21, 0xc2, 0x21
+ .byte 0xc6, 0x21, 0xc7, 0xc1, 0xe5, 0x10, 0x09, 0xe9
+ .byte 0xc1, 0xe7, 0x10, 0x09, 0xfe, 0xfa, 0x0f, 0x01
+ .byte 0x1d, 0xa0, 0x01, 0x00, 0x00, 0x8b, 0x25, 0x84
+ .byte 0x01, 0x00, 0x00, 0x8b, 0x2d, 0x88, 0x01, 0x00
+ .byte 0x00, 0x8b, 0x3d, 0x8c, 0x01, 0x00, 0x00, 0x66
+ .byte 0x8c, 0xe0, 0x66, 0x8e, 0xd0, 0x66, 0x8e, 0xc0
+ .byte 0x66, 0x8e, 0xd8, 0x89, 0xe8, 0x5d, 0xcb, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xfa, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01
.byte 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x23, 0x01, 0x00
.byte 0x00, 0xe8, 0x00, 0xb8, 0xf0, 0x00, 0x00, 0x00
diff --git a/sys/i386/bios/apm_init/apm_init.S b/sys/i386/bios/apm_init/apm_init.S
index f3e6815..5276947 100644
--- a/sys/i386/bios/apm_init/apm_init.S
+++ b/sys/i386/bios/apm_init/apm_init.S
@@ -12,7 +12,7 @@
*
* Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id$
+ * $Id: apm_init.S,v 1.2 1994/10/01 05:12:29 davidg Exp $
*/
/*
@@ -67,12 +67,11 @@
.text
ENTRY(apm_init)
cli /* disable interrupt */
- push %ebp /* save original base pointer */
+ pushl %ebp /* save original base pointer */
/* ebp is used as a register variable */
/*
* save old data segments: We assume that %ds == %es && %ds == %ss
*/
- push %fs
movw %ds, %ax
movw %ax, %fs
movw $(APM_INIT_DS_SEL), %ax /* initializer data segment */
@@ -185,7 +184,6 @@ finish:
movw %ax, %es
movw %ax, %ds
movl %ebp, %eax
- pop %fs
popl %ebp /* restore old base pointer */
lret /* restore old code segment */
diff --git a/sys/i386/bios/apm_init/apm_init.inc b/sys/i386/bios/apm_init/apm_init.inc
index d241334..d88a888 100644
--- a/sys/i386/bios/apm_init/apm_init.inc
+++ b/sys/i386/bios/apm_init/apm_init.inc
@@ -1,40 +1,40 @@
/* This file is automatically generated by bin2asm */
/* Original file is 'apm_init' */
- .byte 0xfa, 0x55, 0x0f, 0xa0, 0x66, 0x8c, 0xd8, 0x66
- .byte 0x8e, 0xe0, 0x66, 0xb8, 0xf0, 0x00, 0x66, 0x8e
- .byte 0xd8, 0x66, 0x8e, 0xc0, 0x66, 0x8e, 0xd0, 0x89
- .byte 0x25, 0x84, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00
- .byte 0x01, 0x00, 0x0f, 0x01, 0x0d, 0xa0, 0x01, 0x00
- .byte 0x00, 0xe8, 0x12, 0x01, 0x00, 0x00, 0xb4, 0x53
- .byte 0xb0, 0x00, 0x66, 0xbb, 0x00, 0x00, 0x00, 0x00
- .byte 0xfb, 0xcd, 0x15, 0xfa, 0x73, 0x15, 0x66, 0xe8
- .byte 0xcc, 0x00, 0x00, 0x00, 0xc7, 0x05, 0x88, 0x01
- .byte 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe9, 0x8c
- .byte 0x00, 0x00, 0x00, 0x89, 0xc2, 0x66, 0xe8, 0xb5
- .byte 0x00, 0x00, 0x00, 0x80, 0xff, 0x50, 0x75, 0x05
- .byte 0x80, 0xfb, 0x4d, 0x74, 0x0c, 0xc7, 0x05, 0x88
- .byte 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xeb
- .byte 0x6e, 0xf7, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x75
- .byte 0x0c, 0xc7, 0x05, 0x88, 0x01, 0x00, 0x00, 0xfe
- .byte 0xff, 0xff, 0xff, 0xeb, 0x5a, 0x89, 0x15, 0x88
- .byte 0x01, 0x00, 0x00, 0x81, 0xe1, 0xff, 0xff, 0x00
- .byte 0x00, 0x89, 0x0d, 0x8c, 0x01, 0x00, 0x00, 0xe8
- .byte 0xa4, 0x00, 0x00, 0x00, 0xb4, 0x53, 0xb0, 0x03
+ .byte 0xfa, 0x55, 0x66, 0x8c, 0xd8, 0x66, 0x8e, 0xe0
+ .byte 0x66, 0xb8, 0xf0, 0x00, 0x66, 0x8e, 0xd8, 0x66
+ .byte 0x8e, 0xc0, 0x66, 0x8e, 0xd0, 0x89, 0x25, 0x84
+ .byte 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x01, 0x00
+ .byte 0x0f, 0x01, 0x0d, 0xa0, 0x01, 0x00, 0x00, 0xe8
+ .byte 0x14, 0x01, 0x00, 0x00, 0xb4, 0x53, 0xb0, 0x00
.byte 0x66, 0xbb, 0x00, 0x00, 0x00, 0x00, 0xfb, 0xcd
- .byte 0x15, 0xfa, 0x73, 0x12, 0x66, 0xe8, 0x5e, 0x00
+ .byte 0x15, 0xfa, 0x73, 0x15, 0x66, 0xe8, 0xce, 0x00
.byte 0x00, 0x00, 0xc7, 0x05, 0x88, 0x01, 0x00, 0x00
- .byte 0xfd, 0xff, 0xff, 0xff, 0xeb, 0x21, 0x89, 0xc5
- .byte 0x66, 0xe8, 0x4a, 0x00, 0x00, 0x00, 0xb8, 0xff
- .byte 0xff, 0x00, 0x00, 0x21, 0xc5, 0x21, 0xc1, 0x21
- .byte 0xc2, 0x21, 0xc6, 0x21, 0xc7, 0xc1, 0xe5, 0x10
- .byte 0x09, 0xe9, 0xc1, 0xe7, 0x10, 0x09, 0xfe, 0xfa
- .byte 0x0f, 0x01, 0x1d, 0xa0, 0x01, 0x00, 0x00, 0x8b
- .byte 0x25, 0x84, 0x01, 0x00, 0x00, 0x8b, 0x2d, 0x88
- .byte 0x01, 0x00, 0x00, 0x8b, 0x3d, 0x8c, 0x01, 0x00
- .byte 0x00, 0x66, 0x8c, 0xe0, 0x66, 0x8e, 0xd0, 0x66
- .byte 0x8e, 0xc0, 0x66, 0x8e, 0xd8, 0x89, 0xe8, 0x0f
- .byte 0xa1, 0x5d, 0xcb, 0x00, 0x00, 0x00, 0x00, 0x00
+ .byte 0xff, 0xff, 0xff, 0xff, 0xe9, 0x8c, 0x00, 0x00
+ .byte 0x00, 0x89, 0xc2, 0x66, 0xe8, 0xb7, 0x00, 0x00
+ .byte 0x00, 0x80, 0xff, 0x50, 0x75, 0x05, 0x80, 0xfb
+ .byte 0x4d, 0x74, 0x0c, 0xc7, 0x05, 0x88, 0x01, 0x00
+ .byte 0x00, 0xff, 0xff, 0xff, 0xff, 0xeb, 0x6e, 0xf7
+ .byte 0xc1, 0x02, 0x00, 0x00, 0x00, 0x75, 0x0c, 0xc7
+ .byte 0x05, 0x88, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff
+ .byte 0xff, 0xeb, 0x5a, 0x89, 0x15, 0x88, 0x01, 0x00
+ .byte 0x00, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x89
+ .byte 0x0d, 0x8c, 0x01, 0x00, 0x00, 0xe8, 0xa6, 0x00
+ .byte 0x00, 0x00, 0xb4, 0x53, 0xb0, 0x03, 0x66, 0xbb
+ .byte 0x00, 0x00, 0x00, 0x00, 0xfb, 0xcd, 0x15, 0xfa
+ .byte 0x73, 0x12, 0x66, 0xe8, 0x60, 0x00, 0x00, 0x00
+ .byte 0xc7, 0x05, 0x88, 0x01, 0x00, 0x00, 0xfd, 0xff
+ .byte 0xff, 0xff, 0xeb, 0x21, 0x89, 0xc5, 0x66, 0xe8
+ .byte 0x4c, 0x00, 0x00, 0x00, 0xb8, 0xff, 0xff, 0x00
+ .byte 0x00, 0x21, 0xc5, 0x21, 0xc1, 0x21, 0xc2, 0x21
+ .byte 0xc6, 0x21, 0xc7, 0xc1, 0xe5, 0x10, 0x09, 0xe9
+ .byte 0xc1, 0xe7, 0x10, 0x09, 0xfe, 0xfa, 0x0f, 0x01
+ .byte 0x1d, 0xa0, 0x01, 0x00, 0x00, 0x8b, 0x25, 0x84
+ .byte 0x01, 0x00, 0x00, 0x8b, 0x2d, 0x88, 0x01, 0x00
+ .byte 0x00, 0x8b, 0x3d, 0x8c, 0x01, 0x00, 0x00, 0x66
+ .byte 0x8c, 0xe0, 0x66, 0x8e, 0xd0, 0x66, 0x8e, 0xc0
+ .byte 0x66, 0x8e, 0xd8, 0x89, 0xe8, 0x5d, 0xcb, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xfa, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01
.byte 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x23, 0x01, 0x00
.byte 0x00, 0xe8, 0x00, 0xb8, 0xf0, 0x00, 0x00, 0x00
OpenPOWER on IntegriCloud