amd64: Fix for Xorg.
authorJordan Gordeev <jgordeev@dir.bg>
Thu, 17 Sep 2009 22:14:30 +0000 (01:14 +0300)
committerJordan Gordeev <jgordeev@dir.bg>
Thu, 17 Sep 2009 22:14:30 +0000 (01:14 +0300)
Xorg can now access the video card.
Adapted from i386.

sys/platform/pc64/amd64/sysarch.c

index 98a04bc..afc3bdb 100644 (file)
@@ -39,6 +39,7 @@
 #include <sys/sysproto.h>
 #include <sys/memrange.h>
 #include <sys/errno.h>
+#include <sys/proc.h>
 
 int
 sys_sysarch(struct sysarch_args *uap)
@@ -49,12 +50,14 @@ sys_sysarch(struct sysarch_args *uap)
 int
 cpu_set_iopl(void)
 {
-       return (EOPNOTSUPP);
+       curthread->td_lwp->lwp_md.md_regs->tf_rflags |= PSL_IOPL;
+       return(0);
 }
 
 int
 cpu_clr_iopl(void)
 {
-       return (EOPNOTSUPP);
+       curthread->td_lwp->lwp_md.md_regs->tf_rflags &= ~PSL_IOPL;
+       return(0);
 }