summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Dyson <dyson@FreeBSD.org>1997-07-17 19:45:01 +0000
committerJohn Dyson <dyson@FreeBSD.org>1997-07-17 19:45:01 +0000
commit78342719d663694f3857a13c4fe191cc52e3dbb1 (patch)
tree0e622f3decc7b6730ed7bf5202e6183b112a0f57
parent5a93a1d7263c62b5adb0dcb76c19d5a7b55d65ce (diff)
Notes
-rw-r--r--sys/amd64/amd64/locore.S7
-rw-r--r--sys/amd64/amd64/locore.s7
-rw-r--r--sys/amd64/amd64/mp_machdep.c6
-rw-r--r--sys/amd64/amd64/mptable.c6
-rw-r--r--sys/amd64/amd64/pmap.c16
-rw-r--r--sys/amd64/include/mptable.h6
-rw-r--r--sys/i386/i386/locore.s7
-rw-r--r--sys/i386/i386/mp_machdep.c6
-rw-r--r--sys/i386/i386/mptable.c6
-rw-r--r--sys/i386/i386/pmap.c16
-rw-r--r--sys/i386/include/mptable.h6
-rw-r--r--sys/kern/subr_smp.c6
12 files changed, 69 insertions, 26 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 2958c469d67a..e2ae0df7f36b 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.90 1997/06/27 23:19:43 fsmp Exp $
+ * $Id: locore.s,v 1.91 1997/07/15 11:07:32 kato Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -821,9 +821,12 @@ over_symalloc:
jne map_read_write
#endif
xorl %edx,%edx
+
+#if !defined(SMP)
testl $CPUID_PGE, R(_cpu_feature)
jz 2f
orl $PG_G,%edx
+#endif
2: movl $R(_etext),%ecx
addl $PAGE_MASK,%ecx
@@ -836,9 +839,11 @@ over_symalloc:
andl $~PAGE_MASK, %eax
map_read_write:
movl $PG_RW,%edx
+#if !defined(SMP)
testl $CPUID_PGE, R(_cpu_feature)
jz 1f
orl $PG_G,%edx
+#endif
1: movl R(_KERNend),%ecx
subl %eax,%ecx
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 2958c469d67a..e2ae0df7f36b 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.90 1997/06/27 23:19:43 fsmp Exp $
+ * $Id: locore.s,v 1.91 1997/07/15 11:07:32 kato Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -821,9 +821,12 @@ over_symalloc:
jne map_read_write
#endif
xorl %edx,%edx
+
+#if !defined(SMP)
testl $CPUID_PGE, R(_cpu_feature)
jz 2f
orl $PG_G,%edx
+#endif
2: movl $R(_etext),%ecx
addl $PAGE_MASK,%ecx
@@ -836,9 +839,11 @@ over_symalloc:
andl $~PAGE_MASK, %eax
map_read_write:
movl $PG_RW,%edx
+#if !defined(SMP)
testl $CPUID_PGE, R(_cpu_feature)
jz 1f
orl $PG_G,%edx
+#endif
1: movl R(_KERNend),%ecx
subl %eax,%ecx
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 157c218d2fad..7b74a3632a89 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.14 1997/07/13 00:42:14 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.27 1997/07/13 01:22:43 fsmp Exp $
*/
#include "opt_smp.h"
@@ -395,6 +395,8 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
PTD[0] = 0;
+ pmap_set_opt((unsigned *)PTD);
+
invltlb();
}
@@ -1542,6 +1544,8 @@ start_all_aps(u_int boot_addr)
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);
+ pmap_set_opt_bsp();
+
/* number of APs actually started */
return mp_ncpus - 1;
}
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 157c218d2fad..7b74a3632a89 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.14 1997/07/13 00:42:14 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.27 1997/07/13 01:22:43 fsmp Exp $
*/
#include "opt_smp.h"
@@ -395,6 +395,8 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
PTD[0] = 0;
+ pmap_set_opt((unsigned *)PTD);
+
invltlb();
}
@@ -1542,6 +1544,8 @@ start_all_aps(u_int boot_addr)
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);
+ pmap_set_opt_bsp();
+
/* number of APs actually started */
return mp_ncpus - 1;
}
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 2f4083326d70..17d926c77d83 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.147 1997/06/25 20:07:50 tegge Exp $
+ * $Id: pmap.c,v 1.148 1997/07/17 04:33:38 dyson Exp $
*/
/*
@@ -389,9 +389,10 @@ pmap_bootstrap(firstaddr, loadaddr)
pgeflag = 0;
#if !defined(SMP)
- if (cpu_feature & CPUID_PGE)
+ if (cpu_feature & CPUID_PGE) {
pgeflag = PG_G;
-#endif /* !SMP */
+ }
+#endif
/*
* Initialize the 4MB page size flag
@@ -403,6 +404,7 @@ pmap_bootstrap(firstaddr, loadaddr)
*/
pdir4mb = 0;
+#if !defined(DISABLE_PSE)
if (cpu_feature & CPUID_PSE) {
unsigned ptditmp;
/*
@@ -429,9 +431,9 @@ pmap_bootstrap(firstaddr, loadaddr)
invltlb();
#endif
}
+#endif
}
-#if defined(SMP)
/*
* Set 4mb pdir for mp startup, and global flags
*/
@@ -446,7 +448,7 @@ pmap_set_opt(unsigned *pdir) {
}
}
- if (cpu_feature & CPUID_PGE) {
+ if (pgeflag && (cpu_feature & CPUID_PGE)) {
load_cr4(rcr4() | CR4_PGE);
for(i = KPTDI; i < KPTDI + nkpt; i++) {
if (pdir[i]) {
@@ -465,7 +467,6 @@ pmap_set_opt_bsp(void) {
pmap_set_opt((unsigned *)PTD);
invltlb();
}
-#endif
/*
* Initialize the pmap module.
@@ -2323,6 +2324,7 @@ pmap_object_init_pt(pmap, addr, object, pindex, size, limit)
*/
if (pseflag &&
(object->type == OBJT_DEVICE) &&
+ ((addr & (NBPDR - 1)) == 0) &&
((size & (NBPDR - 1)) == 0) ) {
int i;
int s;
@@ -2375,9 +2377,7 @@ retry:
ptepindex += 1;
}
p->flags |= PG_MAPPED;
-#if 0
invltlb();
-#endif
return;
}
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 157c218d2fad..7b74a3632a89 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.14 1997/07/13 00:42:14 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.27 1997/07/13 01:22:43 fsmp Exp $
*/
#include "opt_smp.h"
@@ -395,6 +395,8 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
PTD[0] = 0;
+ pmap_set_opt((unsigned *)PTD);
+
invltlb();
}
@@ -1542,6 +1544,8 @@ start_all_aps(u_int boot_addr)
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);
+ pmap_set_opt_bsp();
+
/* number of APs actually started */
return mp_ncpus - 1;
}
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 2958c469d67a..e2ae0df7f36b 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.90 1997/06/27 23:19:43 fsmp Exp $
+ * $Id: locore.s,v 1.91 1997/07/15 11:07:32 kato Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -821,9 +821,12 @@ over_symalloc:
jne map_read_write
#endif
xorl %edx,%edx
+
+#if !defined(SMP)
testl $CPUID_PGE, R(_cpu_feature)
jz 2f
orl $PG_G,%edx
+#endif
2: movl $R(_etext),%ecx
addl $PAGE_MASK,%ecx
@@ -836,9 +839,11 @@ over_symalloc:
andl $~PAGE_MASK, %eax
map_read_write:
movl $PG_RW,%edx
+#if !defined(SMP)
testl $CPUID_PGE, R(_cpu_feature)
jz 1f
orl $PG_G,%edx
+#endif
1: movl R(_KERNend),%ecx
subl %eax,%ecx
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 157c218d2fad..7b74a3632a89 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.14 1997/07/13 00:42:14 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.27 1997/07/13 01:22:43 fsmp Exp $
*/
#include "opt_smp.h"
@@ -395,6 +395,8 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
PTD[0] = 0;
+ pmap_set_opt((unsigned *)PTD);
+
invltlb();
}
@@ -1542,6 +1544,8 @@ start_all_aps(u_int boot_addr)
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);
+ pmap_set_opt_bsp();
+
/* number of APs actually started */
return mp_ncpus - 1;
}
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 157c218d2fad..7b74a3632a89 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.14 1997/07/13 00:42:14 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.27 1997/07/13 01:22:43 fsmp Exp $
*/
#include "opt_smp.h"
@@ -395,6 +395,8 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
PTD[0] = 0;
+ pmap_set_opt((unsigned *)PTD);
+
invltlb();
}
@@ -1542,6 +1544,8 @@ start_all_aps(u_int boot_addr)
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);
+ pmap_set_opt_bsp();
+
/* number of APs actually started */
return mp_ncpus - 1;
}
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 2f4083326d70..17d926c77d83 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.147 1997/06/25 20:07:50 tegge Exp $
+ * $Id: pmap.c,v 1.148 1997/07/17 04:33:38 dyson Exp $
*/
/*
@@ -389,9 +389,10 @@ pmap_bootstrap(firstaddr, loadaddr)
pgeflag = 0;
#if !defined(SMP)
- if (cpu_feature & CPUID_PGE)
+ if (cpu_feature & CPUID_PGE) {
pgeflag = PG_G;
-#endif /* !SMP */
+ }
+#endif
/*
* Initialize the 4MB page size flag
@@ -403,6 +404,7 @@ pmap_bootstrap(firstaddr, loadaddr)
*/
pdir4mb = 0;
+#if !defined(DISABLE_PSE)
if (cpu_feature & CPUID_PSE) {
unsigned ptditmp;
/*
@@ -429,9 +431,9 @@ pmap_bootstrap(firstaddr, loadaddr)
invltlb();
#endif
}
+#endif
}
-#if defined(SMP)
/*
* Set 4mb pdir for mp startup, and global flags
*/
@@ -446,7 +448,7 @@ pmap_set_opt(unsigned *pdir) {
}
}
- if (cpu_feature & CPUID_PGE) {
+ if (pgeflag && (cpu_feature & CPUID_PGE)) {
load_cr4(rcr4() | CR4_PGE);
for(i = KPTDI; i < KPTDI + nkpt; i++) {
if (pdir[i]) {
@@ -465,7 +467,6 @@ pmap_set_opt_bsp(void) {
pmap_set_opt((unsigned *)PTD);
invltlb();
}
-#endif
/*
* Initialize the pmap module.
@@ -2323,6 +2324,7 @@ pmap_object_init_pt(pmap, addr, object, pindex, size, limit)
*/
if (pseflag &&
(object->type == OBJT_DEVICE) &&
+ ((addr & (NBPDR - 1)) == 0) &&
((size & (NBPDR - 1)) == 0) ) {
int i;
int s;
@@ -2375,9 +2377,7 @@ retry:
ptepindex += 1;
}
p->flags |= PG_MAPPED;
-#if 0
invltlb();
-#endif
return;
}
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 157c218d2fad..7b74a3632a89 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.14 1997/07/13 00:42:14 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.27 1997/07/13 01:22:43 fsmp Exp $
*/
#include "opt_smp.h"
@@ -395,6 +395,8 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
PTD[0] = 0;
+ pmap_set_opt((unsigned *)PTD);
+
invltlb();
}
@@ -1542,6 +1544,8 @@ start_all_aps(u_int boot_addr)
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);
+ pmap_set_opt_bsp();
+
/* number of APs actually started */
return mp_ncpus - 1;
}
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 157c218d2fad..7b74a3632a89 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.14 1997/07/13 00:42:14 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.27 1997/07/13 01:22:43 fsmp Exp $
*/
#include "opt_smp.h"
@@ -395,6 +395,8 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
PTD[0] = 0;
+ pmap_set_opt((unsigned *)PTD);
+
invltlb();
}
@@ -1542,6 +1544,8 @@ start_all_aps(u_int boot_addr)
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);
+ pmap_set_opt_bsp();
+
/* number of APs actually started */
return mp_ncpus - 1;
}