summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2018-02-23 19:40:25 -0300
committerLuiz Souza <luiz@netgate.com>2018-02-23 19:40:25 -0300
commit810d45dfd8239a4b42661bd4bb4e470e3a41799d (patch)
treed928247b28cade91875dbd576151ff3464a5e313 /sys/amd64/amd64/mp_machdep.c
parentb594788dcae53ea420f48e88b5cb5b7dc67b672a (diff)
downloadFreeBSD-src-810d45dfd8239a4b42661bd4bb4e470e3a41799d.zip
FreeBSD-src-810d45dfd8239a4b42661bd4bb4e470e3a41799d.tar.gz
Revert "Revert "MFC r327818:""
This reverts commit c1ee180537f04875eccd8e9b3d630b73ad654b14.
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index ce07e0f..70b2e6d 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -87,8 +87,6 @@ extern struct pcpu __pcpu[];
char *doublefault_stack;
char *nmi_stack;
-extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32);
-
/*
* Local data and functions.
*/
@@ -188,7 +186,7 @@ init_secondary(void)
{
struct pcpu *pc;
struct nmi_pcpu *np;
- u_int64_t msr, cr0;
+ u_int64_t cr0;
int cpu, gsel_tss, x;
struct region_descriptor ap_gdt;
@@ -263,15 +261,7 @@ init_secondary(void)
cr0 &= ~(CR0_CD | CR0_NW | CR0_EM);
load_cr0(cr0);
- /* Set up the fast syscall stuff */
- msr = rdmsr(MSR_EFER) | EFER_SCE;
- wrmsr(MSR_EFER, msr);
- wrmsr(MSR_LSTAR, (u_int64_t)IDTVEC(fast_syscall));
- wrmsr(MSR_CSTAR, (u_int64_t)IDTVEC(fast_syscall32));
- msr = ((u_int64_t)GSEL(GCODE_SEL, SEL_KPL) << 32) |
- ((u_int64_t)GSEL(GUCODE32_SEL, SEL_UPL) << 48);
- wrmsr(MSR_STAR, msr);
- wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D);
+ amd64_conf_fast_syscall();
/* signal our startup to the BSP. */
mp_naps++;
OpenPOWER on IntegriCloud