[PATCH] Do not trap access to timer and keyboard

olafBuddenhagen at gmx.net olafBuddenhagen at gmx.net
Sun Mar 14 20:00:30 PDT 2010


Hi,

On Sat, Mar 13, 2010 at 02:26:26AM +0100, Samuel Thibault wrote:

> diff --git a/hw/xfree86/os-support/hurd/hurd_video.c b/hw/xfree86/os-support/hurd/hurd_video.c
> index 4a99db3..e049ceb 100644
> --- a/hw/xfree86/os-support/hurd/hurd_video.c
> +++ b/hw/xfree86/os-support/hurd/hurd_video.c
> @@ -124,8 +124,6 @@ xf86EnableIO()
>  	FatalError("xf86EnableIO: ioperm() failed (%s)\n", strerror(errno));
>  	return FALSE;
>      }
> -    ioperm(0x40,4,0); /* trap access to the timer chip */
> -    ioperm(0x60,4,0); /* trap access to the keyboard controller */
>      return TRUE;
>  }

As this is not really system-specific, the same patch probably should be
applied to the Linux version of this file too. (Where this code is
originally borrowed from.) It only doesn't show in the Linux variant,
because it always does ioperm() *and* iopl(), making the ioperm()
meaningless -- which BTW might be worth fixing too, as iopl() is even
more dangerous than ioperm()...

-antrik-


More information about the xorg-devel mailing list