Commit ec491683 authored by Keith Packard's avatar Keith Packard
Browse files

kdrive: dont try MTRR on non-x86, fix backspace mapping

parent d09a156d
/*
* $XFree86$
* $XFree86: xc/programs/Xserver/hw/kdrive/linux/keyboard.c,v 1.4 2000/10/10 14:05:48 tsi Exp $
*
* Copyright 1999 Keith Packard
*
......@@ -64,7 +64,7 @@ static const KeySym linux_to_x[256] = {
XK_p, XK_q, XK_r, XK_s,
XK_t, XK_u, XK_v, XK_w,
XK_x, XK_y, XK_z, XK_braceleft,
XK_bar, XK_braceright, XK_asciitilde, XK_Delete,
XK_bar, XK_braceright, XK_asciitilde, XK_BackSpace,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
......
......@@ -26,6 +26,12 @@
#include "kdrive.h"
#ifdef linux
#ifdef __i386__
#define HAS_MTRR
#endif
#endif
#ifdef HAS_MTRR
#include <errno.h>
#include <unistd.h>
#include <sys/mman.h>
......@@ -91,14 +97,14 @@ KdUnmapDevice (void *addr, CARD32 size)
#endif
}
#ifdef linux
#ifdef HAS_MTRR
static int mtrr;
#endif
void
KdSetMappedMode (CARD32 addr, CARD32 size, int mode)
{
#ifdef linux
#ifdef HAS_MTRR
struct mtrr_sentry sentry;
unsigned long base, bound;
unsigned int type;
......@@ -131,7 +137,7 @@ KdSetMappedMode (CARD32 addr, CARD32 size, int mode)
void
KdResetMappedMode (CARD32 addr, CARD32 size, int mode)
{
#ifdef linux
#ifdef HAS_MTRR
struct mtrr_sentry sentry;
unsigned long base, bound;
unsigned int type;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment