aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1994-11-06 22:18:45 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1994-11-06 22:18:45 +0000
commit89c8eae117543bbfb0cec6ebbbd72dc2b51c7925 (patch)
tree37873b1a91aadcb57a47078df77341f3dc2ef093
parentf0e1ab7bc7073f7a0a0562e68e9a35dcef7120de (diff)
downloadsrc-89c8eae117543bbfb0cec6ebbbd72dc2b51c7925.tar.gz
src-89c8eae117543bbfb0cec6ebbbd72dc2b51c7925.zip
Initialize %fs and %gs from %ds.
This seems to stabilize the APM-bios on my Gateway Handbook, and it makes sense in general too.
Notes
Notes: svn path=/head/; revision=4217
-rw-r--r--sys/amd64/amd64/locore.S7
-rw-r--r--sys/amd64/amd64/locore.s7
-rw-r--r--sys/i386/i386/locore.s7
3 files changed, 18 insertions, 3 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 4d6ca1fccff1..3e08b22471aa 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.42 1994/10/30 20:09:12 bde Exp $
+ * $Id: locore.s,v 1.43 1994/10/31 17:20:15 joerg Exp $
*/
/*
@@ -178,6 +178,11 @@ NON_GPROF_ENTRY(btext)
pushl $PSL_MBO
popfl
+ /* Don't trust what the BIOS gives for %fs and %gs. */
+ mov %ds, %ax
+ mov %ax, %fs
+ mov %ax, %gs
+
/*
* This code is called in different ways depending on what loaded
* and started the kernel. This is used to detect how we get the
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 4d6ca1fccff1..3e08b22471aa 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.42 1994/10/30 20:09:12 bde Exp $
+ * $Id: locore.s,v 1.43 1994/10/31 17:20:15 joerg Exp $
*/
/*
@@ -178,6 +178,11 @@ NON_GPROF_ENTRY(btext)
pushl $PSL_MBO
popfl
+ /* Don't trust what the BIOS gives for %fs and %gs. */
+ mov %ds, %ax
+ mov %ax, %fs
+ mov %ax, %gs
+
/*
* This code is called in different ways depending on what loaded
* and started the kernel. This is used to detect how we get the
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 4d6ca1fccff1..3e08b22471aa 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.42 1994/10/30 20:09:12 bde Exp $
+ * $Id: locore.s,v 1.43 1994/10/31 17:20:15 joerg Exp $
*/
/*
@@ -178,6 +178,11 @@ NON_GPROF_ENTRY(btext)
pushl $PSL_MBO
popfl
+ /* Don't trust what the BIOS gives for %fs and %gs. */
+ mov %ds, %ax
+ mov %ax, %fs
+ mov %ax, %gs
+
/*
* This code is called in different ways depending on what loaded
* and started the kernel. This is used to detect how we get the