PERFORCE change 106881 for review
Roman Divacky
rdivacky at FreeBSD.org
Fri Sep 29 06:22:11 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106881
Change 106881 by rdivacky at rdivacky_witten on 2006/09/29 13:21:44
Be sane and set %gs instead of %fs. Still not there but getting closer.
Affected files ...
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#5 edit
Differences ...
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#5 (text+ko) ====
@@ -57,6 +57,7 @@
#include <amd64/linux32/linux.h>
#include <amd64/linux32/linux32_proto.h>
+#include <amd64/include/specialreg.h>
#include <compat/linux/linux_ipc.h>
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_util.h>
@@ -679,9 +680,11 @@
/* this is taken from amd64 version of cpu_set_user_tls() */
critical_enter();
- /* set %fs */
- td->td_pcb->pcb_fsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase);
- wrmsr(MSR_FSBASE, td->td_pcb->pcb_fsbase);
+ /* set %gs */
+ td->td_pcb->pcb_gsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase);
+#if 0
+ wrmsr(MSR_KGSBASE, td->td_pcb->pcb_fsbase);
+#endif
critical_exit();
}
@@ -1281,9 +1284,9 @@
/* this is taken from amd64 version of cpu_set_user_tls() */
critical_enter();
- /* set %fs */
- td->td_pcb->pcb_fsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase);
- wrmsr(MSR_FSBASE, td->td_pcb->pcb_fsbase);
+ /* set %gs */
+ td->td_pcb->pcb_gsbase = (register_t)((register_t)sd.sd_hibase << 24 | sd.sd_lobase);
+ wrmsr(MSR_KGSBASE, td->td_pcb->pcb_gsbase);
critical_exit();
More information about the p4-projects
mailing list