diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 10 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 10 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 10 | ||||
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 10 | ||||
-rw-r--r-- | sys/i386/i386/mptable.c | 10 | ||||
-rw-r--r-- | sys/i386/include/mptable.h | 10 |
6 files changed, 60 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index f4f9c52..9b52fb1 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -467,6 +467,7 @@ init_secondary(void) { int gsel_tss; int x, myid = bootAP; + u_int cr0; gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[myid]; gdt_segs[GPROC0_SEL].ssd_base = @@ -496,6 +497,15 @@ init_secondary(void) PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); ltr(gsel_tss); + /* + * Set to a known state: + * Set by mpboot.s: CR0_PG, CR0_PE + * Set by cpu_setregs: CR0_NE, CR0_MP, CR0_TS, CR0_WP, CR0_AM + */ + cr0 = rcr0(); + cr0 &= ~(CR0_CD | CR0_NW | CR0_EM); + load_cr0(cr0); + pmap_set_opt(); } diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index f4f9c52..9b52fb1 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -467,6 +467,7 @@ init_secondary(void) { int gsel_tss; int x, myid = bootAP; + u_int cr0; gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[myid]; gdt_segs[GPROC0_SEL].ssd_base = @@ -496,6 +497,15 @@ init_secondary(void) PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); ltr(gsel_tss); + /* + * Set to a known state: + * Set by mpboot.s: CR0_PG, CR0_PE + * Set by cpu_setregs: CR0_NE, CR0_MP, CR0_TS, CR0_WP, CR0_AM + */ + cr0 = rcr0(); + cr0 &= ~(CR0_CD | CR0_NW | CR0_EM); + load_cr0(cr0); + pmap_set_opt(); } diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index f4f9c52..9b52fb1 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -467,6 +467,7 @@ init_secondary(void) { int gsel_tss; int x, myid = bootAP; + u_int cr0; gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[myid]; gdt_segs[GPROC0_SEL].ssd_base = @@ -496,6 +497,15 @@ init_secondary(void) PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); ltr(gsel_tss); + /* + * Set to a known state: + * Set by mpboot.s: CR0_PG, CR0_PE + * Set by cpu_setregs: CR0_NE, CR0_MP, CR0_TS, CR0_WP, CR0_AM + */ + cr0 = rcr0(); + cr0 &= ~(CR0_CD | CR0_NW | CR0_EM); + load_cr0(cr0); + pmap_set_opt(); } diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index f4f9c52..9b52fb1 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -467,6 +467,7 @@ init_secondary(void) { int gsel_tss; int x, myid = bootAP; + u_int cr0; gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[myid]; gdt_segs[GPROC0_SEL].ssd_base = @@ -496,6 +497,15 @@ init_secondary(void) PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); ltr(gsel_tss); + /* + * Set to a known state: + * Set by mpboot.s: CR0_PG, CR0_PE + * Set by cpu_setregs: CR0_NE, CR0_MP, CR0_TS, CR0_WP, CR0_AM + */ + cr0 = rcr0(); + cr0 &= ~(CR0_CD | CR0_NW | CR0_EM); + load_cr0(cr0); + pmap_set_opt(); } diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index f4f9c52..9b52fb1 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -467,6 +467,7 @@ init_secondary(void) { int gsel_tss; int x, myid = bootAP; + u_int cr0; gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[myid]; gdt_segs[GPROC0_SEL].ssd_base = @@ -496,6 +497,15 @@ init_secondary(void) PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); ltr(gsel_tss); + /* + * Set to a known state: + * Set by mpboot.s: CR0_PG, CR0_PE + * Set by cpu_setregs: CR0_NE, CR0_MP, CR0_TS, CR0_WP, CR0_AM + */ + cr0 = rcr0(); + cr0 &= ~(CR0_CD | CR0_NW | CR0_EM); + load_cr0(cr0); + pmap_set_opt(); } diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index f4f9c52..9b52fb1 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -467,6 +467,7 @@ init_secondary(void) { int gsel_tss; int x, myid = bootAP; + u_int cr0; gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[myid]; gdt_segs[GPROC0_SEL].ssd_base = @@ -496,6 +497,15 @@ init_secondary(void) PCPU_SET(common_tssd, *PCPU_GET(tss_gdt)); ltr(gsel_tss); + /* + * Set to a known state: + * Set by mpboot.s: CR0_PG, CR0_PE + * Set by cpu_setregs: CR0_NE, CR0_MP, CR0_TS, CR0_WP, CR0_AM + */ + cr0 = rcr0(); + cr0 &= ~(CR0_CD | CR0_NW | CR0_EM); + load_cr0(cr0); + pmap_set_opt(); } |