summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-09-28 03:26:22 +0000
committertegge <tegge@FreeBSD.org>1998-09-28 03:26:22 +0000
commit1b80829d9cc3aff20819ea2b5fa48e43ccc9f010 (patch)
tree89d94783789a42b7fb09efac259031e68782b813 /sys
parent2a06e3385db2f244d149dbc14c5fc1f49fc96d80 (diff)
downloadFreeBSD-src-1b80829d9cc3aff20819ea2b5fa48e43ccc9f010.zip
FreeBSD-src-1b80829d9cc3aff20819ea2b5fa48e43ccc9f010.tar.gz
Use correct virtual address when configuring the per CPU idle page directory
for a vm86 call under SMP.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/locore.S5
-rw-r--r--sys/amd64/amd64/locore.s5
-rw-r--r--sys/i386/i386/locore.s5
-rw-r--r--sys/i386/i386/vm86bios.s6
4 files changed, 16 insertions, 5 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 2ea4af3..9c32517 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.111 1998/07/27 16:45:01 jlemon Exp $
+ * $Id: locore.s,v 1.112 1998/08/03 21:31:32 msmith Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -925,6 +925,9 @@ map_read_write:
movl R(cpu0pp), %eax
movl R(_IdlePTD), %ecx
movl %ecx,GD_MY_IDLEPTD(%eax)
+/* Initialize IdlePTDS[0] */
+ addl $KERNBASE, %ecx
+ movl %ecx, R(CNAME(IdlePTDS))
#endif /* SMP */
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 2ea4af3..9c32517 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.111 1998/07/27 16:45:01 jlemon Exp $
+ * $Id: locore.s,v 1.112 1998/08/03 21:31:32 msmith Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -925,6 +925,9 @@ map_read_write:
movl R(cpu0pp), %eax
movl R(_IdlePTD), %ecx
movl %ecx,GD_MY_IDLEPTD(%eax)
+/* Initialize IdlePTDS[0] */
+ addl $KERNBASE, %ecx
+ movl %ecx, R(CNAME(IdlePTDS))
#endif /* SMP */
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 2ea4af3..9c32517 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.111 1998/07/27 16:45:01 jlemon Exp $
+ * $Id: locore.s,v 1.112 1998/08/03 21:31:32 msmith Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -925,6 +925,9 @@ map_read_write:
movl R(cpu0pp), %eax
movl R(_IdlePTD), %ecx
movl %ecx,GD_MY_IDLEPTD(%eax)
+/* Initialize IdlePTDS[0] */
+ addl $KERNBASE, %ecx
+ movl %ecx, R(CNAME(IdlePTDS))
#endif /* SMP */
diff --git a/sys/i386/i386/vm86bios.s b/sys/i386/i386/vm86bios.s
index 34755a5..fafb24a 100644
--- a/sys/i386/i386/vm86bios.s
+++ b/sys/i386/i386/vm86bios.s
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: vm86bios.s,v 1.3 1998/07/27 16:45:05 jlemon Exp $
+ * $Id: vm86bios.s,v 1.4 1998/09/10 12:16:06 yokota Exp $
*/
#include "opt_vm86.h"
@@ -132,12 +132,14 @@ ENTRY(vm86_bioscall)
movl %cr3,%eax
pushl %eax /* save address space */
#ifdef SMP
+ movl _cpuid, %ecx
+ movl CNAME(IdlePTDS)(,%ecx,4), %ebx
movl _my_idlePTD,%ecx
#else
movl _IdlePTD,%ecx
-#endif
movl %ecx,%ebx
addl $KERNBASE,%ebx /* va of Idle PTD */
+#endif
movl 0(%ebx),%eax
pushl %eax /* old ptde != 0 when booting */
pushl %ebx /* keep for reuse */
OpenPOWER on IntegriCloud