mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
DRI XFree86-4_3_99_12-merge import
This commit is contained in:
parent
1c133c27cc
commit
22bad9474b
157 changed files with 518 additions and 2201 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.5 2000/02/23 04:46:55 martin Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c,v 1.1 2002/02/25 00:45:41 dawes Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
@ -42,7 +42,7 @@ static XF86ModuleVersionInfo VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
|||
|
|
@ -1222,7 +1222,7 @@ static XF86ModuleVersionInfo VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.39 2003/11/10 18:21:41 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.38 2002/11/20 18:10:24 dawes Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
@ -1191,8 +1191,8 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
|
|||
|
||||
if (x0 < 0) x0 = 0;
|
||||
if (y0 < 0) y0 = 0;
|
||||
if (x1 > pScreen->width) x1 = pScreen->width;
|
||||
if (y1 > pScreen->height) y1 = pScreen->height;
|
||||
if (x1 > pScreen->width-1) x1 = pScreen->width-1;
|
||||
if (y1 > pScreen->height-1) y1 = pScreen->height-1;
|
||||
|
||||
pDRIPriv->private_buffer_rect.x1 = x0;
|
||||
pDRIPriv->private_buffer_rect.y1 = y0;
|
||||
|
|
@ -1557,7 +1557,7 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
|||
if(pDRIPriv->nrWindows > 0) {
|
||||
RegionRec reg;
|
||||
|
||||
REGION_NULL(pScreen, ®);
|
||||
REGION_INIT(pScreen, ®, NullBox, 0);
|
||||
TraverseTree(pWin, DRITreeTraversal, (pointer)(®));
|
||||
|
||||
if(REGION_NOTEMPTY(pScreen, ®)) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.19 2002/10/30 12:52:03 alanh Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg$ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
@ -25,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
**************************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.5 2001/06/15 21:22:39 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.6 2001/12/10 19:07:19 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Authors:
|
||||
|
|
@ -44,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.12 2002/10/30 12:52:03 alanh Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.13 2002/11/20 18:10:24 dawes Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
|
||||
/**
|
||||
* \file sarea.h
|
||||
* SAREA definitions.
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ ProcXF86DRIAuthConnection(
|
|||
rep.authenticated = 1;
|
||||
|
||||
if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) {
|
||||
ErrorF("Failed to authenticate %lu\n", (unsigned long)stuff->magic);
|
||||
ErrorF("Failed to authenticate %u\n", stuff->magic);
|
||||
rep.authenticated = 0;
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep);
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ xf86cos(double x)
|
|||
|
||||
|
||||
|
||||
$XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.9 2001/07/23 13:15:48 dawes Exp $
|
||||
$XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.10 2001/12/17 20:00:45 dawes Exp $
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.6 2003/12/30 15:18:30 herrb Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.5 2003/04/03 16:50:04 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
@ -117,13 +117,11 @@ has_bwx(void)
|
|||
#endif
|
||||
}
|
||||
#else /* __NetBSD__ */
|
||||
static unsigned long hae_thresh = (1UL << 24);
|
||||
static unsigned long hae_mask = 0xf8000000UL; /* XXX - should use xf86AXP.c */
|
||||
static struct alpha_bus_window *abw;
|
||||
static int abw_count = -1;
|
||||
|
||||
static void
|
||||
init_abw(void)
|
||||
init_abw()
|
||||
{
|
||||
if (abw_count < 0) {
|
||||
abw_count = alpha_bus_getwindows(ALPHA_BUS_TYPE_PCI_MEM, &abw);
|
||||
|
|
@ -144,7 +142,7 @@ has_bwx(void)
|
|||
}
|
||||
|
||||
static unsigned long
|
||||
dense_base(void)
|
||||
dense_base()
|
||||
{
|
||||
if (abw_count < 0)
|
||||
init_abw();
|
||||
|
|
@ -156,7 +154,7 @@ dense_base(void)
|
|||
}
|
||||
|
||||
static unsigned long
|
||||
memory_base(void)
|
||||
memory_base()
|
||||
{
|
||||
if (abw_count < 0)
|
||||
init_abw();
|
||||
|
|
@ -286,13 +284,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
|
|||
xf86Msg(X_PROBED,"Machine needs sparse mapping\n");
|
||||
pVidMem->mapMem = mapVidMemSparse;
|
||||
pVidMem->unmapMem = unmapVidMemSparse;
|
||||
#ifndef __NetBSD__
|
||||
if (axpSystem == -1)
|
||||
axpSystem = bsdGetAXP();
|
||||
hae_thresh = xf86AXPParams[axpSystem].hae_thresh;
|
||||
hae_mask = xf86AXPParams[axpSystem].hae_mask;
|
||||
sparse_size = xf86AXPParams[axpSystem].size;
|
||||
#endif /* __NetBSD__ */
|
||||
}
|
||||
pVidMem->initialised = TRUE;
|
||||
}
|
||||
|
|
@ -318,7 +314,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX);
|
||||
if (base == MAP_FAILED)
|
||||
{
|
||||
FatalError("%s: could not mmap %s [s=%lx,a=%lx] (%s)\n",
|
||||
FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
|
||||
"xf86MapVidMem", DEV_MEM, Size, Base,
|
||||
strerror(errno));
|
||||
}
|
||||
|
|
@ -328,7 +324,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
/* else, mmap /dev/vga */
|
||||
if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000)
|
||||
{
|
||||
FatalError("%s: Address 0x%lx outside allowable range\n",
|
||||
FatalError("%s: Address 0x%x outside allowable range\n",
|
||||
"xf86MapVidMem", Base);
|
||||
}
|
||||
base = mmap(0, Size,
|
||||
|
|
@ -376,7 +372,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
if ((long)ptr == -1)
|
||||
{
|
||||
xf86Msg(X_WARNING,
|
||||
"xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n",
|
||||
"xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
|
||||
DEV_MEM, Len, Base, Offset, strerror(errno));
|
||||
return(-1);
|
||||
}
|
||||
|
|
@ -494,7 +490,6 @@ struct parms {
|
|||
u_int64_t hae;
|
||||
};
|
||||
|
||||
#ifndef __NetBSD__
|
||||
static int
|
||||
sethae(u_int64_t hae)
|
||||
{
|
||||
|
|
@ -510,7 +505,6 @@ sethae(u_int64_t hae)
|
|||
return -1;
|
||||
#endif
|
||||
}
|
||||
#endif /* __NetBSD__ */
|
||||
|
||||
static pointer
|
||||
mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
||||
|
|
@ -559,6 +553,7 @@ readSparse8(pointer Base, register unsigned long Offset)
|
|||
{
|
||||
register unsigned long result, shift;
|
||||
register unsigned long msb;
|
||||
|
||||
mem_barrier();
|
||||
Offset += (unsigned long)Base - (unsigned long)memBase;
|
||||
shift = (Offset & 0x3) << 3;
|
||||
|
|
@ -566,12 +561,11 @@ readSparse8(pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
||||
result = *(vuip) ((unsigned long)memSBase + (Offset << 5));
|
||||
result >>= shift;
|
||||
return 0xffUL & result;
|
||||
|
|
@ -590,9 +584,7 @@ readSparse16(pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
|
@ -620,9 +612,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
|
@ -641,9 +631,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
|
@ -671,9 +659,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
|
@ -691,9 +677,7 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask ;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.1tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.2 2003/03/14 13:46:03 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.6 2001/02/16 14:45:10 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.8 2002/05/22 21:38:29 herrb Exp $ */
|
||||
|
||||
/* Resource information code */
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
|
|||
|
||||
#ifdef INCLUDE_XF86_NO_DOMAIN
|
||||
|
||||
#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
|
||||
#if defined(__alpha__) || defined(__sparc64__)
|
||||
|
||||
resPtr
|
||||
xf86BusAccWindowsFromOS(void)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Slightly modified xf86KbdBSD.c which is
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c,v 3.5.4.3 1998/06/05 16:23:03 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c,v 3.6 1998/07/25 16:56:33 dawes Exp $ */
|
||||
/*
|
||||
* Derived from VTsw_usl.c which is
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_apm.c,v 1.1 2000/02/29 03:09:25 dawes Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "os.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: bsd_axp.c,v 1.2 2002/10/29 23:19:13 herrb Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c,v 1.2 2002/10/29 23:19:13 herrb Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "os.h"
|
||||
|
|
@ -23,9 +23,9 @@ axpDevice bsdGetAXP(void);
|
|||
typedef struct {
|
||||
char *name;
|
||||
int type;
|
||||
} _AXP;
|
||||
} AXP;
|
||||
|
||||
static _AXP axpList[] = {
|
||||
static AXP axpList[] = {
|
||||
{"apecs",APECS},
|
||||
{"pyxis",PYXIS},
|
||||
{"cia",CIA},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_ev56.c,v 1.1 2000/03/05 16:59:17 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_ev56.c,v 1.2 2001/02/27 23:05:00 alanh Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "input.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.21 2003/09/24 02:43:34 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.20 2003/06/30 16:52:57 eich Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
@ -160,7 +160,7 @@ xf86OpenConsole()
|
|||
/* check if we are run with euid==0 */
|
||||
if (geteuid() != 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: Server must be suid root");
|
||||
FatalError("xf86OpenConsole: Server must be suid root\n");
|
||||
}
|
||||
|
||||
if (!KeepTty)
|
||||
|
|
@ -198,7 +198,7 @@ xf86OpenConsole()
|
|||
strcat(cons_drivers, supported_drivers[i]);
|
||||
}
|
||||
FatalError(
|
||||
"%s: No console driver found\n\tSupported drivers: %s\n\t%s",
|
||||
"%s: No console driver found\n\tSupported drivers: %s\n\t%s\n",
|
||||
"xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
|
||||
}
|
||||
#if 0 /* stdin is already closed in OsInit() */
|
||||
|
|
@ -213,7 +213,7 @@ xf86OpenConsole()
|
|||
case PCCONS:
|
||||
if (ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0)
|
||||
{
|
||||
FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s",
|
||||
FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s\n",
|
||||
"xf86OpenConsole", strerror(errno),
|
||||
CHECK_DRIVER_MSG);
|
||||
}
|
||||
|
|
@ -282,18 +282,18 @@ acquire_vt:
|
|||
vtmode.frsig = SIGUSR1;
|
||||
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed");
|
||||
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
|
||||
}
|
||||
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
|
||||
if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: KDENABIO failed (%s)",
|
||||
FatalError("xf86OpenConsole: KDENABIO failed (%s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
#endif
|
||||
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
|
||||
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
|
||||
}
|
||||
break;
|
||||
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
|
||||
|
|
@ -337,7 +337,7 @@ xf86OpenPccons()
|
|||
if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0)
|
||||
{
|
||||
FatalError(
|
||||
"%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s",
|
||||
"%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s\n",
|
||||
"xf86OpenPccons",
|
||||
strerror(errno),
|
||||
"Was expecting pccons driver with X support",
|
||||
|
|
@ -427,11 +427,11 @@ xf86OpenSyscons()
|
|||
{
|
||||
if (syscons_version >= 0x100)
|
||||
{
|
||||
FatalError("%s: Cannot find a free VT",
|
||||
FatalError("%s: Cannot find a free VT\n",
|
||||
"xf86OpenSyscons");
|
||||
}
|
||||
/* Should no longer reach here */
|
||||
FatalError("%s: %s %s\n\t%s %s",
|
||||
FatalError("%s: %s %s\n\t%s %s\n",
|
||||
"xf86OpenSyscons",
|
||||
"syscons versions prior to 1.0 require",
|
||||
"either the",
|
||||
|
|
@ -450,18 +450,18 @@ xf86OpenSyscons()
|
|||
#endif
|
||||
if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
|
||||
{
|
||||
FatalError("xf86OpenSyscons: Cannot open %s (%s)",
|
||||
FatalError("xf86OpenSyscons: Cannot open %s (%s)\n",
|
||||
vtname, strerror(errno));
|
||||
}
|
||||
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
|
||||
{
|
||||
FatalError("xf86OpenSyscons: VT_GETMODE failed");
|
||||
FatalError("xf86OpenSyscons: VT_GETMODE failed\n");
|
||||
}
|
||||
xf86Info.consType = SYSCONS;
|
||||
xf86Msg(X_PROBED, "Using syscons driver with X support");
|
||||
if (syscons_version >= 0x100)
|
||||
{
|
||||
xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
|
||||
xf86ErrorF(" (version %d.%d)\n", syscons_version >> 8,
|
||||
syscons_version & 0xFF);
|
||||
}
|
||||
else
|
||||
|
|
@ -515,7 +515,7 @@ xf86OpenPcvt()
|
|||
{
|
||||
if(ioctl(fd, VT_GETMODE, &vtmode) < 0)
|
||||
{
|
||||
FatalError("%s: VT_GETMODE failed\n%s%s\n%s",
|
||||
FatalError("%s: VT_GETMODE failed\n%s%s\n%s\n",
|
||||
"xf86OpenPcvt",
|
||||
"Found pcvt driver but X11 seems to be",
|
||||
" not supported.", CHECK_DRIVER_MSG);
|
||||
|
|
@ -554,7 +554,7 @@ xf86OpenPcvt()
|
|||
}
|
||||
else
|
||||
{
|
||||
FatalError("%s: Cannot find a free VT",
|
||||
FatalError("%s: Cannot find a free VT\n",
|
||||
"xf86OpenPcvt");
|
||||
}
|
||||
}
|
||||
|
|
@ -564,12 +564,12 @@ xf86OpenPcvt()
|
|||
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
|
||||
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
|
||||
{
|
||||
FatalError("xf86OpenPcvt: Cannot open %s (%s)",
|
||||
FatalError("xf86OpenPcvt: Cannot open %s (%s)\n",
|
||||
vtname, strerror(errno));
|
||||
}
|
||||
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
|
||||
{
|
||||
FatalError("xf86OpenPcvt: VT_GETMODE failed");
|
||||
FatalError("xf86OpenPcvt: VT_GETMODE failed\n");
|
||||
}
|
||||
xf86Info.consType = PCVT;
|
||||
#ifdef WSCONS_SUPPORT
|
||||
|
|
@ -616,7 +616,7 @@ xf86OpenWScons()
|
|||
}
|
||||
if (fd != -1) {
|
||||
if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) {
|
||||
FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s",
|
||||
FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s\n",
|
||||
"xf86OpenConsole", strerror(errno),
|
||||
CHECK_DRIVER_MSG);
|
||||
}
|
||||
|
|
@ -654,7 +654,7 @@ xf86CloseConsole()
|
|||
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
|
||||
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
|
||||
{
|
||||
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
|
||||
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
#endif
|
||||
|
|
@ -678,7 +678,7 @@ xf86CloseConsole()
|
|||
close(xf86Info.consoleFd);
|
||||
if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0)
|
||||
{
|
||||
xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)",
|
||||
xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_io.c,v 3.22 2002/05/18 21:15:16 herrb Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_io.c,v 3.23 2002/10/21 20:38:04 herrb Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
|
||||
* Copyright 1993 by David Dawes <dawes@xfree86.org>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
/* Modified for FreeBSD by David Dawes <dawes@XFree86.org> */
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_jstk.c,v 3.7 1998/07/25 16:56:34 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_jstk.c,v 3.8 2002/08/06 13:20:47 herrb Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.8 2003/11/04 03:16:58 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.6 2003/06/30 16:52:57 eich Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 by The XFree86 Project, Inc.
|
||||
|
|
@ -33,7 +33,7 @@ static KbdProtocolRec protocols[] = {
|
|||
#ifdef WSCONS_SUPPORT
|
||||
{"wskbd", PROT_WSCONS },
|
||||
#endif
|
||||
{ NULL, PROT_UNKNOWN_KBD }
|
||||
{ NULL, PROT_UNKNOWN }
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -408,7 +408,7 @@ OpenKeyboard(InputInfoPtr pInfo)
|
|||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
int i;
|
||||
KbdProtocolId prot = PROT_UNKNOWN_KBD;
|
||||
KbdProtocolId prot = PROT_UNKNOWN;
|
||||
char *s;
|
||||
|
||||
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
|
||||
|
|
@ -497,7 +497,7 @@ OpenKeyboard(InputInfoPtr pInfo)
|
|||
#endif
|
||||
default:
|
||||
xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",
|
||||
pInfo->name, pKbd->wsKbdType);
|
||||
pKbd->wsKbdType, pInfo->name);
|
||||
close(pInfo->fd);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.h,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
|
||||
|
||||
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
|
||||
CARD8 *pModMap);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kmod.c,v 3.2 2002/11/29 17:47:24 tsi Exp $ */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
|||
|
|
@ -1,30 +1,7 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v 1.28 2004/02/06 17:15:36 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v 1.24 2003/02/15 05:37:59 paulo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2003 by The XFree86 Project, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the copyright holder(s)
|
||||
* and author(s) shall not be used in advertising or otherwise to promote
|
||||
* the sale, use or other dealings in this Software without prior written
|
||||
* authorization from the copyright holder(s) and author(s).
|
||||
* Copyright 1999 by The XFree86 Project, Inc.
|
||||
*/
|
||||
|
||||
#include "X.h"
|
||||
|
|
@ -68,30 +45,6 @@
|
|||
static void usbSigioReadInput (int fd, void *closure);
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
/* These are for FreeBSD */
|
||||
#define DEFAULT_MOUSE_DEV "/dev/mouse"
|
||||
#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse"
|
||||
#define DEFAULT_PS2_DEV "/dev/psm0"
|
||||
|
||||
static const char *mouseDevs[] = {
|
||||
DEFAULT_MOUSE_DEV,
|
||||
DEFAULT_SYSMOUSE_DEV,
|
||||
DEFAULT_PS2_DEV,
|
||||
NULL
|
||||
};
|
||||
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
/* Only wsmouse mices are autoconfigured for now on OpenBSD */
|
||||
#define DEFAULT_WSMOUSE_DEV "/dev/wsmouse"
|
||||
#define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0"
|
||||
|
||||
static const char *mouseDevs[] = {
|
||||
DEFAULT_WSMOUSE_DEV,
|
||||
DEFAULT_WSMOUSE0_DEV,
|
||||
NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
static int
|
||||
SupportedInterfaces(void)
|
||||
{
|
||||
|
|
@ -151,8 +104,6 @@ DefaultProtocol(void)
|
|||
{
|
||||
#if defined(__FreeBSD__)
|
||||
return "Auto";
|
||||
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
return "WSMouse";
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
|
@ -207,7 +158,7 @@ SetupAuto(InputInfoPtr pInfo, int *protoPara)
|
|||
protoPara[0] = mode.syncmask[0];
|
||||
protoPara[1] = mode.syncmask[1];
|
||||
}
|
||||
xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n",
|
||||
xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n",
|
||||
pInfo->name, devproto[i].name);
|
||||
return devproto[i].name;
|
||||
}
|
||||
|
|
@ -245,142 +196,7 @@ SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
|
||||
#define MOUSED_PID_FILE "/var/run/moused.pid"
|
||||
|
||||
/*
|
||||
* Try to check if moused is running. DEFAULT_SYSMOUSE_DEV is useless without
|
||||
* it. There doesn't seem to be a better way of checking.
|
||||
*/
|
||||
static Bool
|
||||
MousedRunning(void)
|
||||
{
|
||||
FILE *f = NULL;
|
||||
unsigned int pid;
|
||||
|
||||
if ((f = fopen(MOUSED_PID_FILE, "r")) != NULL) {
|
||||
if (fscanf(f, "%u", &pid) == 1 && pid > 0) {
|
||||
if (kill(pid, 0) == 0) {
|
||||
fclose(f);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static const char *
|
||||
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
|
||||
{
|
||||
int fd = -1;
|
||||
const char **pdev, *dev = NULL;
|
||||
Bool devMouse = FALSE;
|
||||
struct stat devMouseStat;
|
||||
struct stat sb;
|
||||
|
||||
for (pdev = mouseDevs; *pdev; pdev++) {
|
||||
SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK));
|
||||
if (fd == -1) {
|
||||
#ifdef DEBUG
|
||||
ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno));
|
||||
#endif
|
||||
} else {
|
||||
/*
|
||||
* /dev/mouse is held until checks for matches with other devices
|
||||
* are done. This is so that when it points to /dev/sysmouse,
|
||||
* the test for whether /dev/sysmouse is usable can be made.
|
||||
*/
|
||||
if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) {
|
||||
if (fstat(fd, &devMouseStat) == 0)
|
||||
devMouse = TRUE;
|
||||
close(fd);
|
||||
continue;
|
||||
} else if (!strcmp(*pdev, DEFAULT_SYSMOUSE_DEV)) {
|
||||
/* Check if /dev/mouse is the same as /dev/sysmouse. */
|
||||
if (devMouse && fstat(fd, &sb) == 0 &&
|
||||
devMouseStat.st_dev == sb.st_dev &&
|
||||
devMouseStat.st_ino == sb.st_ino) {
|
||||
/* If the same, use /dev/sysmouse. */
|
||||
devMouse = FALSE;
|
||||
}
|
||||
close(fd);
|
||||
if (MousedRunning())
|
||||
break;
|
||||
else {
|
||||
#ifdef DEBUG
|
||||
ErrorF("moused isn't running\n");
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
close(fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*pdev)
|
||||
dev = *pdev;
|
||||
else if (devMouse)
|
||||
dev = DEFAULT_MOUSE_DEV;
|
||||
|
||||
if (dev) {
|
||||
/* Set the Device option. */
|
||||
pInfo->conf_idev->commonOptions =
|
||||
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", dev);
|
||||
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
|
||||
pInfo->name, dev);
|
||||
}
|
||||
|
||||
return *pdev;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
|
||||
/* Only support wsmouse configuration for now */
|
||||
static const char *
|
||||
SetupAuto(InputInfoPtr pInfo, int *protoPara)
|
||||
{
|
||||
|
||||
xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n",
|
||||
pInfo->name, "wsmouse");
|
||||
return "wsmouse";
|
||||
}
|
||||
|
||||
static void
|
||||
SetMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
|
||||
{
|
||||
|
||||
xf86MsgVerb(X_INFO, 3, "%s: SetMouseRes: protocol %s rate %d res %d\n",
|
||||
pInfo->name, protocol, rate, res);
|
||||
}
|
||||
|
||||
static const char *
|
||||
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
|
||||
{
|
||||
int fd = -1;
|
||||
const char **pdev;
|
||||
|
||||
for (pdev = mouseDevs; *pdev; pdev++) {
|
||||
SYSCALL(fd = open(*pdev, O_RDWR | O_NONBLOCK));
|
||||
if (fd != -1) {
|
||||
/* Set the Device option. */
|
||||
pInfo->conf_idev->commonOptions =
|
||||
xf86AddNewOption(pInfo->conf_idev->commonOptions,
|
||||
"Device", *pdev);
|
||||
xf86Msg(X_INFO, "%s: found Device \"%s\"\n",
|
||||
pInfo->name, *pdev);
|
||||
close(fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return *pdev;
|
||||
}
|
||||
#endif /* __OpenBSD__ && WSCONS_SUPPORT */
|
||||
|
||||
#ifdef WSCONS_SUPPORT
|
||||
#if defined(WSCONS_SUPPORT)
|
||||
#define NUMEVENTS 64
|
||||
|
||||
static void
|
||||
|
|
@ -686,11 +502,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
|
|||
#ifdef USB_NEW_HID
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
|
||||
hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) {
|
||||
xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
|
||||
xf86Msg(X_WARNING, "%s: no x locator\n");
|
||||
}
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
|
||||
hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) {
|
||||
xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
|
||||
xf86Msg(X_WARNING, "%s: no y locator\n");
|
||||
}
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
|
||||
hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) {
|
||||
|
|
@ -698,11 +514,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
|
|||
#else
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
|
||||
hid_input, &pUsbMse->loc_x) < 0) {
|
||||
xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
|
||||
xf86Msg(X_WARNING, "%s: no x locator\n");
|
||||
}
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
|
||||
hid_input, &pUsbMse->loc_y) < 0) {
|
||||
xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
|
||||
xf86Msg(X_WARNING, "%s: no y locator\n");
|
||||
}
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
|
||||
hid_input, &pUsbMse->loc_z) < 0) {
|
||||
|
|
@ -772,13 +588,6 @@ xf86OSMouseInit(int flags)
|
|||
p->SetPS2Res = SetSysMouseRes;
|
||||
p->SetBMRes = SetSysMouseRes;
|
||||
p->SetMiscRes = SetSysMouseRes;
|
||||
#endif
|
||||
#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
p->SetupAuto = SetupAuto;
|
||||
p->SetMiscRes = SetMouseRes;
|
||||
#endif
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
p->FindDevice = FindDevice;
|
||||
#endif
|
||||
p->PreInit = bsdMousePreInit;
|
||||
return p;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c,v 1.4 2003/09/24 02:43:34 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c,v 1.3 2003/03/14 13:46:03 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
@ -62,11 +62,11 @@
|
|||
#ifdef __OpenBSD__
|
||||
#define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
|
||||
"\tin /etc/sysctl.conf and reboot your machine\n" \
|
||||
"\trefer to xf86(4) for details"
|
||||
"\trefer to xf86(4) for details\n"
|
||||
#define SYSCTL_MSG2 \
|
||||
"Check that you have set 'machdep.allowaperture=2'\n" \
|
||||
"\tin /etc/sysctl.conf and reboot your machine\n" \
|
||||
"\trefer to xf86(4) for details"
|
||||
"\trefer to xf86(4) for details\n"
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
@ -220,7 +220,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
{
|
||||
if (devMemFd < 0)
|
||||
{
|
||||
FatalError("xf86MapVidMem: failed to open %s (%s)",
|
||||
FatalError("xf86MapVidMem: failed to open %s (%s)\n",
|
||||
DEV_MEM, strerror(errno));
|
||||
}
|
||||
base = mmap((caddr_t)0, Size,
|
||||
|
|
@ -229,7 +229,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
MAP_FLAGS, devMemFd, (off_t)Base);
|
||||
if (base == MAP_FAILED)
|
||||
{
|
||||
FatalError("%s: could not mmap %s [s=%lx,a=%lx] (%s)",
|
||||
FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
|
||||
"xf86MapVidMem", DEV_MEM, Size, Base,
|
||||
strerror(errno));
|
||||
}
|
||||
|
|
@ -239,7 +239,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
/* else, mmap /dev/vga */
|
||||
if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000)
|
||||
{
|
||||
FatalError("%s: Address 0x%lx outside allowable range",
|
||||
FatalError("%s: Address 0x%x outside allowable range\n",
|
||||
"xf86MapVidMem", Base);
|
||||
}
|
||||
base = mmap(0, Size,
|
||||
|
|
@ -250,7 +250,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
);
|
||||
if (base == MAP_FAILED)
|
||||
{
|
||||
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)",
|
||||
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
return(base);
|
||||
|
|
@ -288,7 +288,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
if ((long)ptr == -1)
|
||||
{
|
||||
xf86Msg(X_WARNING,
|
||||
"xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n",
|
||||
"xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
|
||||
DEV_MEM, Len, Base, Offset, strerror(errno));
|
||||
#ifdef __OpenBSD__
|
||||
if (Base < 0xa0000) {
|
||||
|
|
@ -328,7 +328,7 @@ xf86EnableIO()
|
|||
if (i386_iopl(TRUE) < 0)
|
||||
{
|
||||
#ifndef __OpenBSD__
|
||||
FatalError("%s: Failed to set IOPL for extended I/O",
|
||||
FatalError("%s: Failed to set IOPL for extended I/O\n",
|
||||
"xf86EnableIO");
|
||||
#else
|
||||
FatalError("%s: Failed to set IOPL for extended I/O\n%s",
|
||||
|
|
@ -366,7 +366,7 @@ xf86EnableIO()
|
|||
if ((IoFd = open("/dev/io", O_RDWR)) == -1)
|
||||
{
|
||||
FatalError("xf86EnableIO: "
|
||||
"Failed to open /dev/io for extended I/O");
|
||||
"Failed to open /dev/io for extended I/O\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -439,7 +439,7 @@ xf86SetTVOut(int mode)
|
|||
#endif /* PCCONS_SUPPORT */
|
||||
|
||||
default:
|
||||
FatalError("Xf86SetTVOut: Unsupported console");
|
||||
FatalError("Xf86SetTVOut: Unsupported console\n");
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
|
@ -464,7 +464,7 @@ xf86SetRGBOut()
|
|||
#endif /* PCCONS_SUPPORT */
|
||||
|
||||
default:
|
||||
FatalError("Xf86SetTVOut: Unsupported console");
|
||||
FatalError("Xf86SetTVOut: Unsupported console\n");
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/data.c,v 1.1.2.2 1999/12/03 10:12:41 hohndel Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/data.c,v 1.1 2000/02/11 18:06:49 dawes Exp $ */
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/descr.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/descr.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/parse.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/parse.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usage.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usage.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb.3,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $
|
||||
.\" $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb.3,v 1.1 2000/02/11 18:06:50 dawes Exp $
|
||||
.\"
|
||||
.Dd May 11, 1999
|
||||
.Dt USB 3
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb.h,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb.h,v 1.1 2000/02/11 18:06:51 dawes Exp $ */
|
||||
|
||||
#define _DIAGASSERT(e) assert(e)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
# If the number is * then the line matches all usages and the name
|
||||
# is a printf formatting string that will be given the usage number.
|
||||
#
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb_hid_usages,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb_hid_usages,v 1.1 2000/02/11 18:06:51 dawes Exp $
|
||||
#
|
||||
1 Generic Desktop
|
||||
0x00 Undefined
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usbvar.h,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usbvar.h,v 1.1 2000/02/11 18:06:51 dawes Exp $ */
|
||||
|
||||
struct report_desc {
|
||||
unsigned int size;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* $FreeBSD: src/sys/sys/memrange.h,v 1.4 1999/12/29 04:24:44 peter Exp $
|
||||
*/
|
||||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/memrange.h,v 1.1 2002/08/06 13:25:36 herrb Exp $ */
|
||||
|
||||
#ifndef _MEMRANGE_H
|
||||
#define _MEMRANGE_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: ppc_video.c,v 1.5 2003/03/14 13:46:04 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/ppc_video.c,v 1.5 2003/03/14 13:46:04 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
@ -80,7 +80,7 @@ ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
PROT_READ : (PROT_READ | PROT_WRITE),
|
||||
MAP_SHARED, fd, Base);
|
||||
if (base == MAP_FAILED)
|
||||
FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)",
|
||||
FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
|
||||
"xf86MapVidMem", Size, Base, strerror(errno));
|
||||
|
||||
return base;
|
||||
|
|
@ -102,7 +102,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
if (kmem == -1) {
|
||||
kmem = open(DEV_MEM, 2);
|
||||
if (kmem == -1) {
|
||||
FatalError("xf86ReadBIOS: open %s", DEV_MEM);
|
||||
FatalError("xf86ReadBIOS: open %s\n", DEV_MEM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: sparc64_video.c,v 1.2 2003/03/14 13:46:04 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/sparc64_video.c,v 1.2 2003/03/14 13:46:04 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
@ -71,7 +71,7 @@ sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
|
|||
PROT_READ : (PROT_READ | PROT_WRITE),
|
||||
MAP_SHARED, fd, Base);
|
||||
if (base == MAP_FAILED)
|
||||
FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)",
|
||||
FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
|
||||
"xf86MapVidMem", Size, Base, strerror(errno));
|
||||
return base;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.82 2004/01/16 15:39:04 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.80 2003/08/29 20:49:03 tsi Exp $ */
|
||||
/*
|
||||
* Pci.c - New server PCI access functions
|
||||
*
|
||||
|
|
@ -453,9 +453,9 @@ pciHostAddrToBusAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
|
|||
* to the base address register to get an accurate result. Otherwise it
|
||||
* makes a conservative guess based on the alignment of the already allocated
|
||||
* address. If the result is accurate (ie, not an over-estimate), this is
|
||||
* indicated by setting *min to TRUE (when min is non-NULL). This happens
|
||||
* when either the destructive flag is set, the information is supplied by
|
||||
* the OS if the OS supports this.
|
||||
* indicated by setting *min to TRUE (when min is non-NULL). This currently
|
||||
* only happens when the destructive flag is set, but in future it may be
|
||||
* possible to get the information from the OS when supported.
|
||||
*/
|
||||
|
||||
int
|
||||
|
|
@ -575,7 +575,7 @@ Bool
|
|||
pciMfDev(int busnum, int devnum)
|
||||
{
|
||||
PCITAG tag0, tag1;
|
||||
CARD32 id0, id1, val;
|
||||
unsigned long id0, id1, val;
|
||||
|
||||
/* Detect a multi-function device that complies to the PCI 2.0 spec */
|
||||
|
||||
|
|
@ -782,7 +782,7 @@ pciGenFindNext(void)
|
|||
(sub_class != PCI_SUBCLASS_BRIDGE_CARDBUS))
|
||||
xf86Msg(X_WARNING,
|
||||
"pciGenFindNext: primary bus mismatch on PCI"
|
||||
" bridge 0x%08lx (0x%02x, 0x%02x)\n",
|
||||
" bridge 0x%08x (0x%02x, 0x%02x)\n",
|
||||
pciDeviceTag, pciBusNum, pri_bus);
|
||||
pri_bus = pciBusNum;
|
||||
}
|
||||
|
|
@ -1016,9 +1016,7 @@ xf86scanpci(int flags)
|
|||
if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN))
|
||||
break;
|
||||
pciWriteByte(tag, PCI_PCI_BRIDGE_CONTROL_REG,
|
||||
devp->pci_bridge_control &
|
||||
~(PCI_PCI_BRIDGE_MASTER_ABORT_EN |
|
||||
PCI_PCI_BRIDGE_SECONDARY_RESET));
|
||||
devp->pci_bridge_control & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -1081,7 +1079,7 @@ xf86scanpci(int flags)
|
|||
if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN))
|
||||
break;
|
||||
pciWriteByte(devp->tag, PCI_PCI_BRIDGE_CONTROL_REG,
|
||||
devp->pci_bridge_control & ~PCI_PCI_BRIDGE_SECONDARY_RESET);
|
||||
devp->pci_bridge_control);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -1139,7 +1137,7 @@ xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
|
|||
base = xf86MapDomainMemory(ScreenNum, Flags, Tag, hostbase, Size);
|
||||
if (!base) {
|
||||
FatalError("xf86MapPciMem: Could not mmap PCI memory "
|
||||
"[base=0x%lx,hostbase=0x%lx,size=%lx] (%s)\n",
|
||||
"[base=0x%x,hostbase=0x%x,size=%x] (%s)\n",
|
||||
Base, hostbase, Size, strerror(errno));
|
||||
}
|
||||
/*
|
||||
|
|
@ -1189,8 +1187,8 @@ handlePciBIOS(PCITAG Tag, int basereg,
|
|||
savebase = pciReadLong(Tag, PCI_MAP_REG_START+(b_reg<<2));
|
||||
xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]"
|
||||
" for device %i:%i:%i\n", basereg,
|
||||
(int)PCI_BUS_FROM_TAG(Tag), (int)PCI_DEV_FROM_TAG(Tag),
|
||||
(int)PCI_FUNC_FROM_TAG(Tag));
|
||||
PCI_BUS_FROM_TAG(Tag), PCI_DEV_FROM_TAG(Tag),
|
||||
PCI_FUNC_FROM_TAG(Tag));
|
||||
pciWriteLong(Tag, PCI_MAP_REG_START + (b_reg << 2),
|
||||
(CARD32)~0);
|
||||
}
|
||||
|
|
@ -1299,7 +1297,7 @@ readPciBios(PCITAG Tag, CARD8* tmp, ADDRESS hostbase, pointer args)
|
|||
}
|
||||
if ((rd->Offset) > (image_length)) {
|
||||
xf86Msg(X_WARNING,"xf86ReadPciBios: requesting data past "
|
||||
"end of BIOS %li > %i\n",(rd->Offset) , (image_length));
|
||||
"end of BIOS %i > %i\n",(rd->Offset) , (image_length));
|
||||
} else {
|
||||
if ((rd->Offset + rd->Len) > (image_length)) {
|
||||
rd->Len = (image_length) - rd->Offset;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h,v 1.45 2004/02/02 03:55:31 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h,v 1.42 2003/08/29 21:08:06 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1998 by Concurrent Computer Corporation
|
||||
*
|
||||
|
|
@ -255,13 +255,9 @@
|
|||
# define ARCH_PCI_INIT linuxPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# elif defined(FreeBSD)
|
||||
# define ARCH_PCI_INIT freebsdPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# endif
|
||||
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
|
||||
#elif defined(__i386__) || defined(i386)
|
||||
#elif defined(__i386__)
|
||||
# define ARCH_PCI_INIT ix86PciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
|
|
@ -312,27 +308,21 @@
|
|||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# endif
|
||||
#elif defined(__sparc__) || defined(sparc)
|
||||
#elif defined(__sparc__)
|
||||
# if defined(linux)
|
||||
# define ARCH_PCI_INIT linuxPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# elif defined(sun)
|
||||
# define ARCH_PCI_INIT sparcPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc64__)
|
||||
# elif defined(__OpenBSD__) && defined(__sparc64__)
|
||||
# define ARCH_PCI_INIT freebsdPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# endif
|
||||
# if !defined(__FreeBSD__)
|
||||
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
|
||||
# endif
|
||||
#elif defined(__amd64__)
|
||||
# if defined(__FreeBSD__)
|
||||
# define ARCH_PCI_INIT freebsdPciInit
|
||||
# else
|
||||
# define ARCH_PCI_INIT ix86PciInit
|
||||
# endif
|
||||
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
|
||||
#elif defined(__AMD64__)
|
||||
# define ARCH_PCI_INIT ix86PciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# if defined(linux)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.2tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.3 2003/06/10 20:48:01 tsi Exp $ */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -170,8 +170,6 @@ promIsP1275(void)
|
|||
promP1275 = TRUE;
|
||||
else
|
||||
promP1275 = FALSE;
|
||||
#elif defined(__FreeBSD__)
|
||||
promP1275 = TRUE;
|
||||
#else
|
||||
#error Missing promIsP1275() function for this OS
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/axpPci.c,v 1.14 2002/12/11 02:44:28 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/axpPci.c,v 1.15 2002/12/12 04:12:02 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1998 by Concurrent Computer Corporation
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.4 2002/07/24 19:06:52 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.5 2002/08/27 22:07:07 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1998 by Concurrent Computer Corporation
|
||||
*
|
||||
|
|
@ -84,7 +84,7 @@ static pciBusInfo_t freebsdPci0 = {
|
|||
/* bridge */ NULL
|
||||
};
|
||||
|
||||
#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
|
||||
#if !defined(__OpenBSD__)
|
||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
||||
#ifdef __sparc__
|
||||
#ifndef ASI_PL
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v 1.25 2003/09/24 02:43:34 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v 1.24 2003/08/29 20:49:03 tsi Exp $ */
|
||||
/*
|
||||
* ix86Pci.c - x86 PCI driver
|
||||
*
|
||||
|
|
@ -345,9 +345,8 @@ void ix86PciSelectCfgmech(void)
|
|||
|
||||
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
|
||||
xf86MsgVerb(X_INFO, 3,
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08lx, mode1Res1"
|
||||
" = 0x%08lx\n", stages, (unsigned long)oldVal1,
|
||||
(unsigned long)mode1Res1);
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08x, mode1Res1"
|
||||
" = 0x%08x\n", stages, oldVal1, mode1Res1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -400,10 +399,9 @@ void ix86PciSelectCfgmech(void)
|
|||
|
||||
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
|
||||
xf86MsgVerb(X_INFO, 3,
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
|
||||
"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
|
||||
stages, (unsigned long)oldVal1,
|
||||
(unsigned long)mode1Res1, (unsigned long)mode1Res2);
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
|
||||
"\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
|
||||
stages, oldVal1, mode1Res1, mode1Res2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -417,10 +415,9 @@ void ix86PciSelectCfgmech(void)
|
|||
}
|
||||
|
||||
xf86MsgVerb(X_INFO, 3, "PCI: Standard check for type 1 failed.\n");
|
||||
xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
|
||||
"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
|
||||
stages, (unsigned long)oldVal1, (unsigned long)mode1Res1,
|
||||
(unsigned long)mode1Res2);
|
||||
xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
|
||||
"\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
|
||||
stages, oldVal1, mode1Res1, mode1Res2);
|
||||
|
||||
/* Try config type 2 */
|
||||
oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c,v 1.9 2002/09/24 16:14:16 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c,v 1.10 2002/11/17 18:42:01 alanh Exp $ */
|
||||
/*
|
||||
* Copyright 1998 by Concurrent Computer Corporation
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ppcPci.c,v 1.8 2002/07/24 19:06:52 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ppcPci.c,v 1.9 2002/08/27 22:07:07 tsi Exp $ */
|
||||
/*
|
||||
* ppcPci.c - PowerPC PCI access functions
|
||||
*
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.3 2001/04/20 17:02:43 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.5 2002/05/22 21:38:30 herrb Exp $ */
|
||||
|
||||
#ifndef _XF86_SBUS_H
|
||||
#define _XF86_SBUS_H
|
||||
|
|
@ -35,13 +35,7 @@
|
|||
#elif defined(__OpenBSD__) && defined(__sparc64__)
|
||||
/* XXX */
|
||||
#elif defined(CSRG_BASED)
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/fbio.h>
|
||||
#include <dev/ofw/openpromio.h>
|
||||
#else
|
||||
#include <machine/fbio.h>
|
||||
#endif
|
||||
#else
|
||||
#include <sun/fbio.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c,v 1.8 2004/01/16 15:39:38 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c,v 1.3 2003/07/17 15:08:22 tsi Exp $ */
|
||||
/*
|
||||
* Copyright (C) 2002-2003 The XFree86 Project, Inc. All Rights Reserved.
|
||||
*
|
||||
|
|
@ -97,10 +97,9 @@
|
|||
#define LBA_PORT5_CNTRL 0x1228U
|
||||
#define LBA_PORT6_CNTRL 0x1230U
|
||||
#define LBA_PORT7_CNTRL 0x1238U
|
||||
#define LBA_RESET_FUNCTION 0x0000000001UL
|
||||
#define LBA_CLEAR_ERROR 0x0000000010UL
|
||||
#define LBA_HARD_FAIL 0x0000000040UL
|
||||
#define LBA_RESET_COMPLETE 0x0100000000UL
|
||||
#define LBA_ROPE_RESET 0x01UL
|
||||
#define LBA_CLEAR_ERROR 0x10UL
|
||||
#define LBA_HARD_FAIL 0x40UL
|
||||
|
||||
#define ROPE_PAGE_CONTROL 0x1418U
|
||||
|
||||
|
|
@ -118,11 +117,8 @@
|
|||
#define IOA_SUBORDINATE_BUS 0x0059U
|
||||
|
||||
#define IOA_CONTROL 0x0108U
|
||||
#define IOA_RESET_FUNCTION 0x0000000001UL
|
||||
#define IOA_FORWARD_VGA 0x0000000008UL
|
||||
#define IOA_CLEAR_ERROR 0x0000000010UL
|
||||
#define IOA_HARD_FAIL 0x0000000040UL
|
||||
#define IOA_RESET_COMPLETE 0x0100000000UL
|
||||
#define IOA_FORWARD_VGA 0x08UL
|
||||
#define IOA_HARD_FAIL 0x40UL
|
||||
|
||||
#define IOA_LMMIO_BASE 0x0200U
|
||||
#define IOA_LMMIO_MASK 0x0208U
|
||||
|
|
@ -138,33 +134,12 @@
|
|||
#define IOA_ELMMIO_MASK 0x0258U
|
||||
#define IOA_EIOS_BASE 0x0260U
|
||||
#define IOA_EIOS_MASK 0x0268U
|
||||
#define IOA_GLOBAL_MASK 0x0270U
|
||||
|
||||
#define IOA_SLAVE_CONTROL 0x0278U
|
||||
#define IOA_VGA_PEER_ENABLE 0x2000UL
|
||||
#define IOA_MSI_BASE 0x0280U
|
||||
#define IOA_MSI_MASK 0x0288U
|
||||
|
||||
#define IOA_DMA_BASE 0x02B0U
|
||||
#define IOA_DMA_MASK 0x02B8U
|
||||
|
||||
#define IOA_ERROR_CONFIG 0x0680U
|
||||
#define IOA_ERROR_PIOWRITE 0x0001UL
|
||||
#define IOA_ERROR_PIOREAD 0x0002UL
|
||||
#define IOA_ERROR_DMAWRITE 0x0004UL
|
||||
#define IOA_ERROR_DMAREAD 0x0008UL
|
||||
#define IOA_ERROR_CONFIG_MASTER 0x0010UL
|
||||
#define IOA_ERROR_SMART 0x0020UL
|
||||
#define IOA_ERROR_FATAL_SERR 0x0040UL
|
||||
#define IOA_ERROR_ASSERT_SERR 0x0080UL
|
||||
/* ? 0x0100UL */
|
||||
#define IOA_ERROR_LOOPBACK 0x0200UL
|
||||
#define IOA_ERROR_CONFIG_TARGET 0x0400UL
|
||||
#define IOA_ERROR_IO_MASTER 0x0800UL
|
||||
#define IOA_ERROR_IO_TARGET 0x1000UL
|
||||
#define IOA_ERROR_MEM_MASTER 0x2000UL
|
||||
#define IOA_ERROR_MEM_TARGET 0x4000UL
|
||||
#define IOA_ERROR_HF_IO_FATAL 0x8000UL
|
||||
|
||||
#define RANGE_ENABLE 0x01UL /* In various base registers */
|
||||
|
||||
#define IO_MASK ((1UL << 16) - 1UL)
|
||||
|
|
@ -181,15 +156,10 @@
|
|||
static CARD8 *pZX1mio = NULL,
|
||||
*pZX1ioa = NULL;
|
||||
|
||||
/* Per-rope data */
|
||||
static INT8 zx1_ropemap[8];
|
||||
static CARD32 zx1_pciids[8];
|
||||
static CARD64 zx1_lbacntl[8];
|
||||
static INT8 zx1_ropemap[8]; /* One for each (potential) rope */
|
||||
static CARD64 zx1_lbacntl[8]; /* " " " " " */
|
||||
static int zx1_busno[8], zx1_subno[8];
|
||||
|
||||
/* Array of Booleans for non-empty buses */
|
||||
static INT8 zx1_busnmpt[MAX_PCI_BUSES];
|
||||
|
||||
static pciBusFuncs_t zx1BusFuncs;
|
||||
static int zx1_fakebus = -1;
|
||||
static Bool zx1_hasvga = FALSE;
|
||||
|
|
@ -322,8 +292,7 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
|
|||
* SLAVE_CONTROL register.
|
||||
*/
|
||||
tmp1 = MIO_QUAD(VGA_ROUTE);
|
||||
tmp2 = IOA_QUAD(ropenum, IOA_CONTROL) &
|
||||
~(IOA_RESET_FUNCTION | IOA_CLEAR_ERROR);
|
||||
tmp2 = IOA_QUAD(ropenum, IOA_CONTROL);
|
||||
if ((tmp1 & VGA_ENABLE) && ((tmp1 & 0x07UL) == ropenum)) {
|
||||
current |= PCI_PCI_BRIDGE_VGA_EN;
|
||||
if ((mask & PCI_PCI_BRIDGE_VGA_EN) &&
|
||||
|
|
@ -346,9 +315,8 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
|
|||
MIO_QUAD(VGA_ROUTE) = 0UL;
|
||||
tmp3 = IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL);
|
||||
if (tmp3 & IOA_FORWARD_VGA)
|
||||
IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL) = tmp3 &
|
||||
~(IOA_RESET_FUNCTION | IOA_FORWARD_VGA |
|
||||
IOA_CLEAR_ERROR);
|
||||
IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL) =
|
||||
tmp3 & ~IOA_FORWARD_VGA;
|
||||
}
|
||||
if (!(tmp2 & IOA_FORWARD_VGA)) {
|
||||
tmp2 |= IOA_FORWARD_VGA;
|
||||
|
|
@ -361,7 +329,7 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
|
|||
|
||||
/* Move on to master abort failure enablement */
|
||||
tmp1 = MIO_QUAD((ropenum << 3) + LBA_PORT0_CNTRL) &
|
||||
~(LBA_RESET_FUNCTION | LBA_CLEAR_ERROR);
|
||||
~(LBA_ROPE_RESET | LBA_CLEAR_ERROR);
|
||||
if ((tmp1 & LBA_HARD_FAIL) || (tmp2 & IOA_HARD_FAIL)) {
|
||||
current |= PCI_PCI_BRIDGE_MASTER_ABORT_EN;
|
||||
if ((mask & PCI_PCI_BRIDGE_MASTER_ABORT_EN) &&
|
||||
|
|
@ -423,15 +391,14 @@ GetZX1BridgeResources(int bus,
|
|||
static CARD32
|
||||
zx1FakeReadLong(PCITAG tag, int offset)
|
||||
{
|
||||
FatalError("zx1FakeReadLong(0x%lX, 0x%X) called\n",
|
||||
(unsigned long)tag, offset);
|
||||
FatalError("zx1FakeReadLong(0x%X, 0x%X) called\n", tag, offset);
|
||||
}
|
||||
|
||||
static void
|
||||
zx1FakeWriteLong(PCITAG tag, int offset, CARD32 val)
|
||||
{
|
||||
FatalError("zx1FakeWriteLong(0x%lX, 0x%X, 0x%08X) called\n",
|
||||
(unsigned long)tag, offset, val);
|
||||
FatalError("zx1FakeWriteLong(0x%X, 0x%X, 0x%08X) called\n",
|
||||
tag, offset, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -477,13 +444,13 @@ xf86PreScanZX1(void)
|
|||
resRange range;
|
||||
unsigned long mapSize = xf86getpagesize();
|
||||
unsigned long tmp, base, ioaaddr;
|
||||
unsigned long flagsd, based, lastd, maskd, routed;
|
||||
unsigned long flags0, base0, last0, mask0, route0;
|
||||
unsigned long flags1, base1, last1, mask1, route1;
|
||||
unsigned long flags2, base2, last2, mask2, route2;
|
||||
unsigned long flags3, base3, last3, mask3, route3;
|
||||
unsigned long flagsg, baseg, lastg, maskg, routeg;
|
||||
unsigned long flagsl, basel, lastl;
|
||||
unsigned long flagsd = 0, based = 0, lastd = 0, maskd = 0, routed = 0;
|
||||
unsigned long flags0 = 0, base0 = 0, last0 = 0, mask0 = 0, route0 = 0;
|
||||
unsigned long flags1 = 0, base1 = 0, last1 = 0, mask1 = 0, route1 = 0;
|
||||
unsigned long flags2 = 0, base2 = 0, last2 = 0, mask2 = 0, route2 = 0;
|
||||
unsigned long flags3 = 0, base3 = 0, last3 = 0, mask3 = 0, route3 = 0;
|
||||
unsigned long flagsg = 0, baseg = 0, lastg = 0, maskg = 0, routeg = 0;
|
||||
unsigned long flagsl = 0, basel = 0, lastl = 0;
|
||||
int i, rope;
|
||||
|
||||
/* Map mio registers (minimum 8k) */
|
||||
|
|
@ -493,7 +460,7 @@ xf86PreScanZX1(void)
|
|||
if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize)))
|
||||
return FALSE;
|
||||
|
||||
/* Look for ZX1's SBA and IOC */ /* XXX What about Dino? */
|
||||
/* Look for ZX1's SBA and IOC */
|
||||
if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) !=
|
||||
DEVID(VENDOR_HP, CHIP_ZX1_SBA)) ||
|
||||
(MIO_LONG(MIO_FUNCTION1 + PCI_ID_REG) !=
|
||||
|
|
@ -552,17 +519,16 @@ xf86PreScanZX1(void)
|
|||
|
||||
/* Prevent hard-fails */
|
||||
zx1_lbacntl[i] = MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) &
|
||||
~(LBA_RESET_FUNCTION | LBA_CLEAR_ERROR);
|
||||
~(LBA_ROPE_RESET | LBA_CLEAR_ERROR);
|
||||
if (zx1_lbacntl[i] & LBA_HARD_FAIL)
|
||||
MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) =
|
||||
zx1_lbacntl[i] & ~LBA_HARD_FAIL;
|
||||
|
||||
/* Poke for an ioa */
|
||||
zx1_pciids[i] = IOA_LONG(i, PCI_ID_REG);
|
||||
switch (zx1_pciids[i]) {
|
||||
tmp = IOA_LONG(i, PCI_ID_REG);
|
||||
switch ((CARD32)tmp) {
|
||||
case DEVID(VENDOR_HP, CHIP_ELROY):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA): /* Mercury */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_AGP8): /* QuickSilver */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA):
|
||||
/* Expected vendor/device IDs */
|
||||
zx1_busno[i] =
|
||||
(unsigned int)IOA_BYTE(i, IOA_SECONDARY_BUS);
|
||||
|
|
@ -571,10 +537,10 @@ xf86PreScanZX1(void)
|
|||
break;
|
||||
|
||||
default:
|
||||
if ((CARD16)(zx1_pciids[i] + 1U) > (CARD16)1U)
|
||||
if ((CARD16)(tmp + 1U) > (CARD16)1U)
|
||||
xf86MsgVerb(X_NOTICE, 0,
|
||||
"HP ZX1: Unexpected vendor/device id 0x%08X"
|
||||
" on rope %d\n", zx1_pciids[i], i);
|
||||
" on rope %d\n", (CARD32)tmp, i);
|
||||
/* Nobody home, or not the "right" kind of rope guest */
|
||||
|
||||
/*
|
||||
|
|
@ -621,14 +587,6 @@ xf86PreScanZX1(void)
|
|||
* ones.
|
||||
*/
|
||||
|
||||
flagsd = 0; based = 0; lastd = 0; maskd = 0; routed = 0;
|
||||
flags0 = 0; base0 = 0; last0 = 0; mask0 = 0; route0 = 0;
|
||||
flags1 = 0; base1 = 0; last1 = 0; mask1 = 0; route1 = 0;
|
||||
flags2 = 0; base2 = 0; last2 = 0; mask2 = 0; route2 = 0;
|
||||
flags3 = 0; base3 = 0; last3 = 0; mask3 = 0; route3 = 0;
|
||||
flagsg = 0; baseg = 0; lastg = 0; maskg = 0; routeg = 0;
|
||||
flagsl = 0; basel = 0; lastl = 0;
|
||||
|
||||
if ((tmp = MIO_QUAD(IOS_DIST_BASE)) & RANGE_ENABLE) {
|
||||
flagsd = RANGE_ENABLE;
|
||||
maskd = MIO_QUAD(IOS_DIST_MASK);
|
||||
|
|
@ -938,9 +896,6 @@ xf86PostScanZX1(void)
|
|||
if (!pZX1mio)
|
||||
return;
|
||||
|
||||
(void)memset(zx1_busnmpt, FALSE, sizeof(zx1_busnmpt));
|
||||
pBusInfo = pciBusInfo[0];
|
||||
|
||||
/*
|
||||
* Certain 2.4 & 2.5 Linux kernels add fake PCI devices. Remove them to
|
||||
* prevent any possible interference with our PCI validation.
|
||||
|
|
@ -952,11 +907,9 @@ xf86PostScanZX1(void)
|
|||
ppPCI = ppPCI2 = xf86scanpci(0); /* Recursion is only apparent */
|
||||
while ((pPCI = *ppPCI2++)) {
|
||||
switch (pPCI->pci_device_vendor) {
|
||||
case DEVID(VENDOR_HP, CHIP_ELROY):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_SBA): /* Pluto function 0 */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_IOC): /* Pluto function 1 */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA): /* Mercury */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_AGP8): /* QuickSilver */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_SBA):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_IOC):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA):
|
||||
xfree(pPCI); /* Remove it */
|
||||
continue;
|
||||
|
||||
|
|
@ -964,8 +917,6 @@ xf86PostScanZX1(void)
|
|||
*ppPCI++ = pPCI;
|
||||
idx++;
|
||||
|
||||
zx1_busnmpt[pPCI->busnum] = TRUE;
|
||||
|
||||
if (zx1_hasvga)
|
||||
continue;
|
||||
|
||||
|
|
@ -990,8 +941,8 @@ xf86PostScanZX1(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Restore hard-fail settings and figure out the actual secondary and
|
||||
* subordinate bus numbers.
|
||||
* Restore hard-fail settings and figure out the actual subordinate bus
|
||||
* numbers.
|
||||
*/
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (zx1_ropemap[i] != i)
|
||||
|
|
@ -1005,14 +956,6 @@ xf86PostScanZX1(void)
|
|||
|
||||
if (zx1_fakebus <= zx1_subno[i])
|
||||
zx1_fakebus = zx1_subno[i] + 1;
|
||||
|
||||
while (!zx1_busnmpt[zx1_busno[i]]) {
|
||||
if (zx1_busno[i]) /* Info for bus zero is in static storage */
|
||||
xfree(pciBusInfo[zx1_busno[i]]);
|
||||
pciBusInfo[zx1_busno[i]++] = NULL;
|
||||
if (zx1_busno[i] > zx1_subno[i])
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (zx1_fakebus >= pciNumBuses) {
|
||||
|
|
@ -1022,13 +965,13 @@ xf86PostScanZX1(void)
|
|||
}
|
||||
|
||||
/* Set up our extra bus functions */
|
||||
zx1BusFuncs = *(pBusInfo->funcs);
|
||||
zx1BusFuncs = *(pciBusInfo[0]->funcs);
|
||||
zx1BusFuncs.pciControlBridge = ControlZX1Bridge;
|
||||
zx1BusFuncs.pciGetBridgeResources = GetZX1BridgeResources;
|
||||
|
||||
/* Set up our own fake bus to act as the root segment */
|
||||
zx1FakeBus.configMech = pBusInfo->configMech;
|
||||
zx1FakeBus.numDevices = pBusInfo->numDevices;
|
||||
zx1FakeBus.configMech = pciBusInfo[0]->configMech;
|
||||
zx1FakeBus.numDevices = pciBusInfo[0]->numDevices;
|
||||
zx1FakeBus.primary_bus = zx1_fakebus;
|
||||
pciBusInfo[zx1_fakebus] = &zx1FakeBus;
|
||||
|
||||
|
|
@ -1063,8 +1006,7 @@ xf86PostScanZX1(void)
|
|||
|
||||
/* Add a fake PCI-to-PCI bridge to represent each active rope */
|
||||
for (i = 0; i < 8; i++) {
|
||||
if ((zx1_ropemap[i] != i) || (zx1_busno[i] > zx1_subno[i]) ||
|
||||
!(pBusInfo = pciBusInfo[zx1_busno[i]]))
|
||||
if ((zx1_ropemap[i] != i) || !(pBusInfo = pciBusInfo[zx1_busno[i]]))
|
||||
continue;
|
||||
|
||||
if (++idx >= MAX_PCI_DEVICES)
|
||||
|
|
@ -1074,7 +1016,7 @@ xf86PostScanZX1(void)
|
|||
pPCI->devnum = i | 0x10;
|
||||
/* pPCI->funcnum = 0; */
|
||||
pPCI->tag = PCI_MAKE_TAG(zx1_fakebus, pPCI->devnum, 0);
|
||||
pPCI->pci_device_vendor = zx1_pciids[i];
|
||||
pPCI->pci_device_vendor = DEVID(VENDOR_HP, CHIP_ZX1_LBA);
|
||||
pPCI->pci_base_class = PCI_CLASS_BRIDGE;
|
||||
pPCI->pci_sub_class = PCI_SUBCLASS_BRIDGE_PCI;
|
||||
pPCI->pci_header_type = 1;
|
||||
|
|
@ -1090,9 +1032,6 @@ xf86PostScanZX1(void)
|
|||
/* Plug in chipset routines */
|
||||
pBusInfo->funcs = &zx1BusFuncs;
|
||||
|
||||
/* Set bridge control register for scanpci utility */
|
||||
pPCI->pci_bridge_control = ControlZX1Bridge(zx1_busno[i], 0, 0);
|
||||
|
||||
#ifdef OLD_FORMAT
|
||||
xf86MsgVerb(X_INFO, 2, "PCI: BusID 0x%.2x,0x%02x,0x%1x "
|
||||
"ID 0x%04x,0x%04x Rev 0x%02x Class 0x%02x,0x%02x\n",
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
|
||||
*
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.2 2000/02/23 04:47:22 martin Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.3 2000/06/17 00:03:34 martin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ static XF86ModuleVersionInfo VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.32 2004/02/05 18:24:59 eich Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.30 2003/03/14 13:46:06 tsi Exp $ */
|
||||
/*
|
||||
* linux specific part of the int10 module
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich
|
||||
* Copyright 1999 Egbert Eich
|
||||
*/
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
|
|
@ -212,9 +212,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
} else
|
||||
((linuxInt10Priv*)pInt->private)->base_high = NULL;
|
||||
|
||||
if (!MapCurrentInt10(pInt))
|
||||
goto error3;
|
||||
|
||||
MapCurrentInt10(pInt);
|
||||
Int10Current = pInt;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
@ -240,7 +238,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE)
|
||||
if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE)
|
||||
xf86DrvMsg(screen, X_WARNING,
|
||||
"Unable to retrieve all of segment 0x%06lX.\n", cs);
|
||||
"Unable to retrieve all of segment 0x%06X.\n", cs);
|
||||
#ifdef DEBUG
|
||||
ErrorF("done\n");
|
||||
#endif
|
||||
|
|
@ -252,13 +250,13 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
&& !(initPrimary(options))) {
|
||||
if (bios.bus == BUS_ISA && bios.location.legacy) {
|
||||
xf86DrvMsg(screen, X_CONFIG,
|
||||
"Overriding BIOS location: 0x%x\n",
|
||||
"Overriding BIOS location: 0x%lx\n",
|
||||
bios.location.legacy);
|
||||
cs = bios.location.legacy >> 4;
|
||||
bios_base = (unsigned char *)(cs << 4);
|
||||
if (!int10_check_bios(screen, cs, bios_base)) {
|
||||
xf86DrvMsg(screen, X_ERROR,
|
||||
"No V_BIOS at specified address 0x%lx\n",cs << 4);
|
||||
"No V_BIOS at specified address 0x%x\n",cs << 4);
|
||||
goto error3;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -288,7 +286,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
}
|
||||
}
|
||||
|
||||
xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%lx\n", cs);
|
||||
xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%x\n", cs);
|
||||
|
||||
pInt->BIOSseg = cs;
|
||||
set_return_trap(pInt);
|
||||
|
|
@ -347,7 +345,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
bios_base = (unsigned char *)(cs << 4);
|
||||
if (!int10_check_bios(screen, cs, bios_base)) {
|
||||
xf86DrvMsg(screen,X_ERROR,"No V_BIOS found "
|
||||
"on override address %p\n",bios_base);
|
||||
"on override address 0x%x\n",bios_base);
|
||||
goto error3;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -367,7 +365,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
}
|
||||
}
|
||||
}
|
||||
xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%lx\n",cs);
|
||||
xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%x\n",cs);
|
||||
pInt->BIOSseg = cs;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -389,7 +387,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
return pInt;
|
||||
|
||||
error4:
|
||||
xf86DrvMsg(screen, X_ERROR, "shmat() call returned errno %d\n", errno);
|
||||
xf86DrvMsg(screen, X_ERROR, "shmat() call retruned errno %d\n", errno);
|
||||
error3:
|
||||
if (base_high)
|
||||
shmdt(base_high);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* $XFree86$ */
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
#include "xf86_ansic.h"
|
||||
|
|
@ -175,7 +173,7 @@ vm86_GP_fault(xf86Int10InfoPtr pInt)
|
|||
|
||||
case 0x0f:
|
||||
xf86DrvMsg(pInt->scrnIndex, X_ERROR,
|
||||
"CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8lx\n", X86_CS, X86_EIP);
|
||||
"CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8x\n", X86_CS, X86_EIP);
|
||||
goto op0ferr;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx.h,v 3.3 2002/11/25 14:05:04 eich Exp $ */
|
||||
|
||||
#ifndef LNX_H_
|
||||
# ifdef __alpha__
|
||||
|
|
|
|||
|
|
@ -190,8 +190,7 @@ xf86AccResFromOS(resPtr ret)
|
|||
defined(__s390__) || \
|
||||
defined(__hppa__)
|
||||
|
||||
/*
|
||||
* XXX this isn't exactly correct but it will get the server working
|
||||
/* XXX this isn't exactly correct but it will get the server working
|
||||
* for now until we get something better.
|
||||
*/
|
||||
|
||||
|
|
@ -204,7 +203,7 @@ xf86BusAccWindowsFromOS(void)
|
|||
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
|
||||
|
|
@ -222,7 +221,7 @@ xf86PciBusAccWindowsFromOS(void)
|
|||
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
|
||||
|
|
@ -231,7 +230,7 @@ xf86PciBusAccWindowsFromOS(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_UNUSED
|
||||
#ifdef INCLUDE_UNUSED */
|
||||
|
||||
resPtr
|
||||
xf86IsaBusAccWindowsFromOS(void)
|
||||
|
|
@ -242,7 +241,7 @@ xf86IsaBusAccWindowsFromOS(void)
|
|||
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
|
||||
|
|
@ -268,7 +267,7 @@ xf86AccResFromOS(resPtr ret)
|
|||
ret = xf86AddResToList(ret, &range, -1);
|
||||
RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c,v 1.1 2002/10/11 01:40:35 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Slightly modified xf86KbdLnx.c which is
|
||||
|
|
|
|||
|
|
@ -263,14 +263,14 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
|
|||
|
||||
if (offset % AGP_PAGE_SIZE != 0) {
|
||||
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
|
||||
"offset (0x%lx) is not page-aligned (%d)\n",
|
||||
"offset (0x%x) is not page-aligned (%d)\n",
|
||||
offset, AGP_PAGE_SIZE);
|
||||
return FALSE;
|
||||
}
|
||||
pageOffset = offset / AGP_PAGE_SIZE;
|
||||
|
||||
xf86DrvMsgVerb(screenNum, X_INFO, 3,
|
||||
"xf86BindGARTMemory: bind key %d at 0x%08lx "
|
||||
"xf86BindGARTMemory: bind key %d at 0x%08x "
|
||||
"(pgoffset %d)\n", key, offset, pageOffset);
|
||||
|
||||
bind.pg_start = pageOffset;
|
||||
|
|
@ -279,7 +279,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
|
|||
if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
|
||||
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
|
||||
"binding of gart memory with key %d\n"
|
||||
"\tat offset 0x%lx failed (%s)\n",
|
||||
"\tat offset 0x%x failed (%s)\n",
|
||||
key, offset, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -332,8 +332,8 @@ xf86EnableAGP(int screenNum, CARD32 mode)
|
|||
setup.agp_mode = mode;
|
||||
if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
|
||||
xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
|
||||
"AGPIOC_SETUP with mode %ld failed (%s)\n",
|
||||
(unsigned long)mode, strerror(errno));
|
||||
"AGPIOC_SETUP with mode %d failed (%s)\n",
|
||||
mode, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c,v 3.12 2001/12/24 22:54:31 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c,v 3.13 2002/10/16 01:24:28 dawes Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "os.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c,v 1.3 2001/02/15 11:03:56 alanh Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c,v 1.5 2002/11/25 14:05:04 eich Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "X.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c,v 3.5 2000/02/17 13:45:49 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c,v 3.7 2002/11/25 14:05:04 eich Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "input.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.15 2003/12/02 20:45:13 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.14 2001/10/31 22:50:30 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
|
||||
|
|
@ -8,19 +7,19 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the names of Orest Zborowski and David Wexelblat
|
||||
* not be used in advertising or publicity pertaining to distribution of
|
||||
* documentation, and that the names of Orest Zborowski and David Wexelblat
|
||||
* not be used in advertising or publicity pertaining to distribution of
|
||||
* the software without specific, written prior permission. Orest Zborowski
|
||||
* and David Wexelblat make no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* and David Wexelblat make no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*
|
||||
* OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD
|
||||
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE
|
||||
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD
|
||||
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE
|
||||
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
|
@ -36,8 +35,6 @@
|
|||
#include "xf86_OSlib.h"
|
||||
#include "lnx.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef USE_DEV_FB
|
||||
extern char *getenv(const char *);
|
||||
#include <linux/fb.h>
|
||||
|
|
@ -48,44 +45,13 @@ static Bool KeepTty = FALSE;
|
|||
static int VTnum = -1;
|
||||
static int activeVT = -1;
|
||||
|
||||
static int vtPermSave[4];
|
||||
static char vtname[11];
|
||||
|
||||
static int
|
||||
saveVtPerms(void)
|
||||
{
|
||||
/* We need to use stat to get permissions. */
|
||||
struct stat svtp;
|
||||
|
||||
/* Do them numerically ordered, hard coded tty0 first. */
|
||||
if (stat("/dev/tty0", &svtp) != 0)
|
||||
return 0;
|
||||
vtPermSave[0] = (int)svtp.st_uid;
|
||||
vtPermSave[1] = (int)svtp.st_gid;
|
||||
|
||||
/* Now check the console we are dealing with. */
|
||||
if (stat(vtname, &svtp) != 0)
|
||||
return 0;
|
||||
vtPermSave[2] = (int)svtp.st_uid;
|
||||
vtPermSave[3] = (int)svtp.st_gid;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
restoreVtPerms(void)
|
||||
{
|
||||
/* Set the terminal permissions back to before we started. */
|
||||
chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
|
||||
chown(vtname, vtPermSave[2], vtPermSave[3]);
|
||||
}
|
||||
|
||||
void
|
||||
xf86OpenConsole(void)
|
||||
{
|
||||
int i, fd = -1;
|
||||
int result;
|
||||
struct vt_mode VT;
|
||||
char vtname[11];
|
||||
struct vt_stat vts;
|
||||
MessageType from = X_PROBED;
|
||||
#ifdef USE_DEV_FB
|
||||
|
|
@ -95,7 +61,7 @@ xf86OpenConsole(void)
|
|||
char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
|
||||
char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
|
||||
|
||||
if (serverGeneration == 1)
|
||||
if (serverGeneration == 1)
|
||||
{
|
||||
/* check if we're run with euid==0 */
|
||||
if (geteuid() != 0)
|
||||
|
|
@ -158,15 +124,6 @@ xf86OpenConsole(void)
|
|||
xf86Info.vtno, strerror(errno));
|
||||
}
|
||||
|
||||
/*
|
||||
* Grab the vt ownership before we overwrite it.
|
||||
* Hard coded /dev/tty0 into this function as well for below.
|
||||
*/
|
||||
if (!saveVtPerms()){
|
||||
xf86Msg(X_WARNING,
|
||||
"xf86OpenConsole: Could not save ownership of VT\n");
|
||||
}
|
||||
|
||||
/* change ownership of the vt */
|
||||
chown(vtname, getuid(), getgid());
|
||||
|
||||
|
|
@ -214,7 +171,7 @@ xf86OpenConsole(void)
|
|||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
|
||||
}
|
||||
SYSCALL(result = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
|
||||
if (result < 0)
|
||||
if (result < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: VT_GETMODE failed\n");
|
||||
}
|
||||
|
|
@ -224,7 +181,7 @@ xf86OpenConsole(void)
|
|||
VT.mode = VT_PROCESS;
|
||||
VT.relsig = SIGUSR1;
|
||||
VT.acqsig = SIGUSR1;
|
||||
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
|
||||
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
|
||||
}
|
||||
|
|
@ -245,7 +202,7 @@ xf86OpenConsole(void)
|
|||
close(fbfd);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* serverGeneration != 1 */
|
||||
/*
|
||||
|
|
@ -290,9 +247,6 @@ xf86CloseConsole()
|
|||
activeVT = -1;
|
||||
}
|
||||
close(xf86Info.consoleFd); /* make the vt-manager happy */
|
||||
|
||||
restoreVtPerms(); /* restore the permissions */
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +254,7 @@ int
|
|||
xf86ProcessArgument(int argc, char *argv[], int i)
|
||||
{
|
||||
/*
|
||||
* Keep server from detaching from controlling tty. This is useful
|
||||
* Keep server from detaching from controlling tty. This is useful
|
||||
* when debugging (so the server can receive keyboard signals.
|
||||
*/
|
||||
if (!strcmp(argv[i], "-keeptty"))
|
||||
|
|
|
|||
|
|
@ -90,9 +90,10 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
|
|||
/* don't change, just test */
|
||||
kbdrep_s.rate = -1;
|
||||
kbdrep_s.delay = -1;
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* do the change */
|
||||
if (rate == 0) /* switch repeat off */
|
||||
kbdrep_s.rate = 0;
|
||||
|
|
@ -104,7 +105,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
|
|||
if (kbdrep_s.delay < 1)
|
||||
kbdrep_s.delay = 1;
|
||||
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -129,9 +130,8 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
|
|||
if (kbdrate_s.rate > 50)
|
||||
kbdrate_s.rate = 50;
|
||||
|
||||
if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
|
||||
return 0;
|
||||
}
|
||||
if (ioctl( fd, KIOCSRATE, &kbdrate_s ))
|
||||
return 0;
|
||||
|
||||
close( fd );
|
||||
|
||||
|
|
@ -143,7 +143,12 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
|
|||
|
||||
#undef rate
|
||||
|
||||
#if NeedFunctionPrototypes
|
||||
void xf86SetKbdRepeat(char rad)
|
||||
#else
|
||||
void xf86SetKbdRepeat(rad)
|
||||
char rad;
|
||||
#endif
|
||||
{
|
||||
#ifdef __sparc__
|
||||
int rate = 500; /* Default rate */
|
||||
|
|
@ -173,6 +178,7 @@ void xf86SetKbdRepeat(char rad)
|
|||
if (xf86Info.kbdDelay >= 0)
|
||||
delay = xf86Info.kbdDelay;
|
||||
|
||||
|
||||
if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_jstk.c,v 3.8.2.1 1998/06/05 16:23:12 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_jstk.c,v 3.13 1998/07/25 16:56:43 dawes Exp $ */
|
||||
|
||||
static const char rcs_id[] = "Id: lnx_jstk.c,v 1.1 1995/12/20 14:06:09 lepied Exp";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.4 2003/11/03 05:11:52 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.3 2003/08/19 17:32:34 tsi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 by The XFree86 Project, Inc.
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
static KbdProtocolRec protocols[] = {
|
||||
{"standard", PROT_STD },
|
||||
{ NULL, PROT_UNKNOWN_KBD }
|
||||
{ NULL, PROT_UNKNOWN }
|
||||
};
|
||||
|
||||
extern Bool VTSwitchEnabled;
|
||||
|
|
@ -117,7 +117,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
|
|||
/* don't change, just test */
|
||||
kbdrep_s.rate = -1;
|
||||
kbdrep_s.delay = -1;
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -132,8 +132,8 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
|
|||
if (kbdrep_s.delay < 1)
|
||||
kbdrep_s.delay = 1;
|
||||
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1; /* success! */
|
||||
|
|
@ -157,9 +157,8 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
|
|||
if (kbdrate_s.rate > 50)
|
||||
kbdrate_s.rate = 50;
|
||||
|
||||
if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
|
||||
return 0;
|
||||
}
|
||||
if (ioctl( fd, KIOCSRATE, &kbdrate_s ))
|
||||
return 0;
|
||||
|
||||
close( fd );
|
||||
|
||||
|
|
@ -447,7 +446,7 @@ OpenKeyboard(InputInfoPtr pInfo)
|
|||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
int i;
|
||||
KbdProtocolId prot = PROT_UNKNOWN_KBD;
|
||||
KbdProtocolId prot = PROT_UNKNOWN;
|
||||
char *s;
|
||||
|
||||
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.h,v 1.1 2002/10/11 01:40:35 dawes Exp $ */
|
||||
|
||||
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
|
||||
CARD8 *pModMap);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kmod.c,v 3.5 2001/10/01 13:44:14 eich Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kmod.c,v 3.6 2001/10/31 22:50:30 tsi Exp $ */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_mouse.c,v 1.2 2003/10/08 14:58:30 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_mouse.c,v 1.1 1999/05/17 13:17:18 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1999 by The XFree86 Project, Inc.
|
||||
|
|
@ -8,10 +8,6 @@
|
|||
#include "xf86.h"
|
||||
#include "xf86Xinput.h"
|
||||
#include "xf86OSmouse.h"
|
||||
#include "xf86_OSlib.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int
|
||||
SupportedInterfaces(void)
|
||||
|
|
@ -19,172 +15,6 @@ SupportedInterfaces(void)
|
|||
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO;
|
||||
}
|
||||
|
||||
static const char *
|
||||
DefaultProtocol(void)
|
||||
{
|
||||
return "Auto";
|
||||
}
|
||||
|
||||
#define DEFAULT_MOUSE_DEV "/dev/mouse"
|
||||
#define DEFAULT_PS2_DEV "/dev/psaux"
|
||||
#define DEFAULT_GPM_DATA_DEV "/dev/gpmdata"
|
||||
#define DEFAULT_GPM_CTL_DEV "/dev/gpmdata"
|
||||
|
||||
static const char *mouseDevs[] = {
|
||||
DEFAULT_MOUSE_DEV,
|
||||
DEFAULT_PS2_DEV,
|
||||
DEFAULT_GPM_DATA_DEV,
|
||||
NULL
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
MOUSE_PROTO_UNKNOWN = 0,
|
||||
MOUSE_PROTO_SERIAL,
|
||||
MOUSE_PROTO_PS2,
|
||||
MOUSE_PROTO_MSC,
|
||||
MOUSE_PROTO_GPM
|
||||
} protocolTypes;
|
||||
|
||||
static struct {
|
||||
protocolTypes proto;
|
||||
const char *name;
|
||||
} devproto[] = {
|
||||
{ MOUSE_PROTO_UNKNOWN, NULL },
|
||||
{ MOUSE_PROTO_PS2, "PS/2" },
|
||||
{ MOUSE_PROTO_MSC, "MouseSystems" },
|
||||
{ MOUSE_PROTO_GPM, "GPM" }
|
||||
};
|
||||
|
||||
static const char *
|
||||
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
|
||||
{
|
||||
int fd = -1;
|
||||
const char **pdev;
|
||||
|
||||
for (pdev = mouseDevs; *pdev; pdev++) {
|
||||
SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK | O_EXCL));
|
||||
if (fd == -1) {
|
||||
#ifdef DEBUG
|
||||
ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno));
|
||||
#endif
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
if (*pdev) {
|
||||
close(fd);
|
||||
/* Set the Device option. */
|
||||
pInfo->conf_idev->commonOptions =
|
||||
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", *pdev);
|
||||
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
|
||||
pInfo->name, *pdev);
|
||||
}
|
||||
|
||||
return *pdev;
|
||||
}
|
||||
|
||||
static const char *
|
||||
GuessProtocol(InputInfoPtr pInfo, int flags)
|
||||
{
|
||||
int fd = -1;
|
||||
const char *dev;
|
||||
char *realdev;
|
||||
struct stat sbuf;
|
||||
int i;
|
||||
int proto = MOUSE_PROTO_UNKNOWN;
|
||||
|
||||
dev = xf86SetStrOption(pInfo->conf_idev->commonOptions, "Device", NULL);
|
||||
if (!dev) {
|
||||
#ifdef DEBUG
|
||||
ErrorF("xf86SetStrOption failed to return the device name\n");
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
/* Look at the device name to guess the protocol. */
|
||||
realdev = NULL;
|
||||
if (strcmp(dev, DEFAULT_MOUSE_DEV) == 0) {
|
||||
if (lstat(dev, &sbuf) != 0) {
|
||||
#ifdef DEBUG
|
||||
ErrorF("lstat failed for %s (%s)\n", dev, strerror(errno));
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
if (S_ISLNK(sbuf.st_mode)) {
|
||||
realdev = xnfalloc(PATH_MAX + 1);
|
||||
i = readlink(dev, realdev, PATH_MAX);
|
||||
if (i <= 0) {
|
||||
#ifdef DEBUG
|
||||
ErrorF("readlink failed for %s (%s)\n", dev, strerror(errno));
|
||||
#endif
|
||||
xfree(realdev);
|
||||
return NULL;
|
||||
}
|
||||
realdev[i] = '\0';
|
||||
}
|
||||
}
|
||||
if (!realdev)
|
||||
realdev = xnfstrdup(dev);
|
||||
else {
|
||||
/* If realdev doesn't contain a '/' then prepend "/dev/" */
|
||||
if (!strchr(realdev, '/')) {
|
||||
char *tmp = xnfalloc(strlen(realdev) + 5 + 1);
|
||||
sprintf(tmp, "/dev/%s", realdev);
|
||||
xfree(realdev);
|
||||
realdev = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
|
||||
proto = MOUSE_PROTO_PS2;
|
||||
else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0)
|
||||
proto = MOUSE_PROTO_MSC;
|
||||
else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0)
|
||||
proto = MOUSE_PROTO_GPM;
|
||||
xfree(realdev);
|
||||
/*
|
||||
* If the protocol can't be guessed from the device name,
|
||||
* try to characterise it.
|
||||
*/
|
||||
if (proto == MOUSE_PROTO_UNKNOWN) {
|
||||
SYSCALL (fd = open(dev, O_RDWR | O_NONBLOCK | O_EXCL));
|
||||
if (isatty(fd)) {
|
||||
/* Serial PnP has already failed, so give up. */
|
||||
} else {
|
||||
if (fstat(fd, &sbuf) != 0) {
|
||||
#ifdef DEBUG
|
||||
ErrorF("fstat failed for %s (%s)\n", dev, strerror(errno));
|
||||
#endif
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
if (S_ISFIFO(sbuf.st_mode)) {
|
||||
/* Assume GPM data in MSC format. */
|
||||
proto = MOUSE_PROTO_MSC;
|
||||
} else {
|
||||
/* Default to PS/2 */
|
||||
proto = MOUSE_PROTO_PS2;
|
||||
}
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
if (proto == MOUSE_PROTO_UNKNOWN) {
|
||||
xf86Msg(X_ERROR, "%s: GuessProtocol: Cannot find mouse protocol.\n",
|
||||
pInfo->name);
|
||||
return NULL;
|
||||
} else {
|
||||
for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) {
|
||||
if (devproto[i].proto == proto) {
|
||||
xf86Msg(X_INFO,
|
||||
"%s: GuessProtocol: "
|
||||
"setting mouse protocol to \"%s\"\n",
|
||||
pInfo->name, devproto[i].name);
|
||||
return devproto[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
OSMouseInfoPtr
|
||||
xf86OSMouseInit(int flags)
|
||||
{
|
||||
|
|
@ -194,9 +24,6 @@ xf86OSMouseInit(int flags)
|
|||
if (!p)
|
||||
return NULL;
|
||||
p->SupportedInterfaces = SupportedInterfaces;
|
||||
p->DefaultProtocol = DefaultProtocol;
|
||||
p->FindDevice = FindDevice;
|
||||
p->GuessProtocol = GuessProtocol;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c,v 3.8 2002/04/09 15:59:37 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c,v 3.9 2003/02/17 15:29:22 dawes Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "X.h"
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
close(fd);
|
||||
if (base == MAP_FAILED) {
|
||||
FatalError("xf86MapVidMem: Could not mmap framebuffer"
|
||||
" (0x%08lx,0x%lx) (%s)\n", Base, Size,
|
||||
" (0x%08x,0x%x) (%s)\n", Base, Size,
|
||||
strerror(errno));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_init.c,v 3.2 1998/07/25 16:56:45 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_init.c,v 3.3 1998/08/29 05:43:58 dawes Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "Xmd.h"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_io.c,v 3.9 2002/10/11 01:40:35 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_io.c,v 3.10 2003/02/17 15:11:57 dawes Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_mmap.c,v 3.5 1998/08/29 05:43:58 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_mmap.c,v 3.6 2000/02/11 22:36:02 dawes Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_noinline.c,v 3.5 2000/07/31 23:25:18 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_noinline.c,v 3.6 2002/01/25 21:56:20 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1998 by Metro Link Incorporated
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_ppc.S,v 1.1 1999/07/10 07:24:49 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_ppc.c,v 1.1 2002/12/14 04:41:14 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1998 by Metro Link Incorporated
|
||||
*
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_video.c,v 3.17 2000/10/28 01:42:27 mvojkovi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_video.c,v 3.18 2002/12/14 04:41:14 dawes Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "input.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.s,v 1.2 1998/07/25 16:56:49 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.S,v 1.1 1999/07/10 07:24:49 dawes Exp $ */
|
||||
/******************************************************************************
|
||||
Copyright 1993 by Glenn G. Lai
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Thanks to Linus Torvalds for contributing this code.
|
|||
|
||||
****************************************************************************/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.c,v 1.3 1999/12/03 19:17:44 eich Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.c,v 1.4 2000/02/12 20:45:44 dawes Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "xf86.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/Delay.c,v 3.3 2000/12/08 20:13:38 eich Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/Delay.c,v 3.4 2003/03/25 04:18:23 dawes Exp $ */
|
||||
|
||||
#ifdef __UNIXOS2__
|
||||
#define I_NEED_OS2_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.s,v 1.2 1998/07/25 16:56:49 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.S,v 1.1 1999/07/10 07:24:50 dawes Exp $ */
|
||||
/*******************************************************************************
|
||||
Copyright 1994 by Glenn G. Lai
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Stub for Alpha Linux
|
||||
*******************************************************************************/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.c,v 1.1.2.1 1998/06/04 17:35:59 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.c,v 1.3 2000/08/04 16:13:41 eich Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
#include "xf86.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.s,v 1.2 1998/07/25 16:56:50 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.S,v 1.1 1999/07/10 07:24:51 dawes Exp $ */
|
||||
/*******************************************************************************
|
||||
Copyright 1994 by Glenn G. Lai
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
for Alpha Linux
|
||||
*******************************************************************************/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c,v 1.6tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c,v 1.6 2003/04/07 16:23:39 eich Exp $ */
|
||||
|
||||
/*
|
||||
* Create a dependency that should be immune from the effect of register
|
||||
|
|
@ -26,13 +26,13 @@
|
|||
void
|
||||
xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
|
||||
{
|
||||
#if defined(__ia64__)
|
||||
outb(0x80, 0x00);
|
||||
#endif
|
||||
while(len--)
|
||||
{
|
||||
*dst++ = *src++;
|
||||
#if !defined(__sparc__) && \
|
||||
!defined(__powerpc__) && \
|
||||
!defined(__mips__) && \
|
||||
!defined(__ia64__)
|
||||
#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__)
|
||||
outb(0x80, 0x00);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_IlHack.c,v 3.4.4.1 1998/06/04 17:36:01 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_IlHack.c,v 3.5 1998/07/25 16:56:51 dawes Exp $ */
|
||||
/*
|
||||
* This file is an incredible crock to get the normally-inline functions
|
||||
* built into the server so that things can be debugged properly.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_Util.c,v 3.7 1999/01/14 13:05:05 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/xf86_Util.c,v 3.8 2001/10/28 03:34:02 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/VTsw_sco.c,v 1.2 1998/07/25 16:56:57 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/VTsw_sco.c,v 1.4 2003/07/07 15:34:27 eich Exp $ */
|
||||
/*
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
* Copyright 1993 by David McCullough <davidm@stallion.oz.au>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_init.c,v 3.13 2002/06/03 21:22:10 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_init.c,v 3.14 2002/11/20 23:00:44 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_io.c,v 3.9 2002/10/11 01:40:36 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_io.c,v 3.10 2003/02/17 15:11:59 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_iop.c,v 1.1 2002/06/03 21:22:10 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 2001 by J. Kean Johnston <jkj@caldera.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_mouse.c,v 3.12 2001/06/30 22:41:49 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_mouse.c,v 3.13 2002/11/20 23:07:50 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_video.c,v 3.8tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_video.c,v 3.9 2003/03/14 13:46:07 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_noop.c,v 3.1.4.1 1998/06/05 16:23:20 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_noop.c,v 3.2 1998/07/25 16:56:59 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_usl.c,v 3.1.4.1 1998/06/05 16:23:21 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_usl.c,v 3.4 2002/09/16 18:06:14 eich Exp $ */
|
||||
/*
|
||||
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c,v 3.5 1998/09/13 00:51:32 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c,v 3.7 2000/09/19 12:46:22 eich Exp $ */
|
||||
/*
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_mmap.c,v 1.8 2000/11/19 16:38:06 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/bios_mmap.c,v 1.9 2001/05/23 14:46:05 alanh Exp $ */
|
||||
/*
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/inout.s,v 3.5 1996/12/23 06:50:58 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/inout.S,v 1.1 1999/07/10 07:24:52 dawes Exp $ */
|
||||
|
||||
#include "assyntax.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/ioperm_noop.c,v 3.3 1998/07/25 16:57:00 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/ioperm_noop.c,v 3.4 2001/07/23 13:15:48 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.102 2003/11/19 03:52:58 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.96 2003/09/09 03:20:41 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1997-2003 by The XFree86 Project, Inc.
|
||||
*
|
||||
|
|
@ -254,18 +254,6 @@ xf86strlen(const char* s)
|
|||
return (xf86size_t)strlen(s);
|
||||
}
|
||||
|
||||
xf86size_t
|
||||
xf86strlcat(char *dest, const char *src, xf86size_t size)
|
||||
{
|
||||
return(strlcat(dest, src, size));
|
||||
}
|
||||
|
||||
xf86size_t
|
||||
xf86strlcpy(char *dest, const char *src, xf86size_t size)
|
||||
{
|
||||
return strlcpy(dest, src, size);
|
||||
}
|
||||
|
||||
char*
|
||||
xf86strncat(char* dest, const char* src, xf86size_t n)
|
||||
{
|
||||
|
|
@ -496,7 +484,7 @@ xf86mmap(void *start, xf86size_t length, int prot,
|
|||
if (flags & XF86_MAP_FIXED) f |= MAP_FIXED;
|
||||
if (flags & XF86_MAP_SHARED) f |= MAP_SHARED;
|
||||
if (flags & XF86_MAP_PRIVATE) f |= MAP_PRIVATE;
|
||||
#if defined(__amd64__) && defined(linux)
|
||||
#ifdef __AMD64__
|
||||
if (flags & XF86_MAP_32BIT) f |= MAP_32BIT;
|
||||
#endif
|
||||
if (prot & XF86_PROT_EXEC) p |= PROT_EXEC;
|
||||
|
|
@ -670,7 +658,7 @@ static void _xf86checkhndl(XF86FILE_priv* f,const char *func)
|
|||
{
|
||||
if (!f || f->magic != XF86FILE_magic ||
|
||||
!f->filehnd || !f->fname) {
|
||||
FatalError("libc_wrapper error: passed invalid FILE handle to %s",
|
||||
FatalError("libc_wrapper error: passed invalid FILE handle to %s\n",
|
||||
func);
|
||||
exit(42);
|
||||
}
|
||||
|
|
@ -1103,7 +1091,7 @@ xf86setvbuf(XF86FILE* f, char *buf, int mode, xf86size_t size)
|
|||
vbufmode = _IOLBF;
|
||||
break;
|
||||
default:
|
||||
FatalError("libc_wrapper error: mode in setvbuf incorrect");
|
||||
FatalError("libc_wrapper error: mode in setvbuf incorrect\n");
|
||||
exit(42);
|
||||
}
|
||||
|
||||
|
|
@ -1313,7 +1301,7 @@ static void
|
|||
_xf86checkdirhndl(XF86DIR_priv* f,const char *func)
|
||||
{
|
||||
if (!f || f->magic != XF86DIR_magic || !f->dir || !f->dirent) {
|
||||
FatalError("libc_wrapper error: passed invalid DIR handle to %s",
|
||||
FatalError("libc_wrapper error: passed invalid DIR handle to %s\n",
|
||||
func);
|
||||
exit(42);
|
||||
}
|
||||
|
|
@ -1829,7 +1817,7 @@ xf86getpagesize()
|
|||
pagesize = PAGE_SIZE;
|
||||
#endif
|
||||
if (pagesize == -1)
|
||||
FatalError("xf86getpagesize: Cannot determine page size");
|
||||
FatalError("xf86getpagesize: Cannot determine page size\n");
|
||||
|
||||
return pagesize;
|
||||
}
|
||||
|
|
@ -1883,13 +1871,13 @@ xf86GetErrno ()
|
|||
int
|
||||
xf86shmget(xf86key_t key, int size, int xf86shmflg)
|
||||
{
|
||||
int shmflg;
|
||||
|
||||
/* This copies the permissions (SHM_R, SHM_W for u, g, o). */
|
||||
shmflg = xf86shmflg & 0777;
|
||||
int shmflg = xf86shmflg & 0777;
|
||||
|
||||
if (key == XF86IPC_PRIVATE) key = IPC_PRIVATE;
|
||||
|
||||
|
||||
if (xf86shmflg & XF86SHM_R) shmflg |= SHM_R;
|
||||
if (xf86shmflg & XF86SHM_W) shmflg |= SHM_W;
|
||||
if (xf86shmflg & XF86IPC_CREAT) shmflg |= IPC_CREAT;
|
||||
if (xf86shmflg & XF86IPC_EXCL) shmflg |= IPC_EXCL;
|
||||
if (xf86shmflg & XF86IPC_NOWAIT) shmflg |= IPC_NOWAIT;
|
||||
|
|
@ -1991,7 +1979,7 @@ xf86setjmp(xf86jmp_buf env)
|
|||
int
|
||||
xf86setjmp0(xf86jmp_buf env)
|
||||
{
|
||||
FatalError("setjmp: type 0 called instead of type %d", xf86getjmptype());
|
||||
FatalError("setjmp: type 0 called instead of type %d\n", xf86getjmptype());
|
||||
}
|
||||
|
||||
#if !defined(__GLIBC__) || (__GLIBC__ < 2) /* libc5 */
|
||||
|
|
@ -2010,7 +1998,7 @@ xf86setjmp1(xf86jmp_buf env, int arg2)
|
|||
int
|
||||
xf86setjmp1(xf86jmp_buf env, int arg2)
|
||||
{
|
||||
FatalError("setjmp: type 1 called instead of type %d", xf86getjmptype());
|
||||
FatalError("setjmp: type 1 called instead of type %d\n", xf86getjmptype());
|
||||
}
|
||||
|
||||
#endif /* HAS_GLIBC_SIGSETJMP */
|
||||
|
|
@ -2024,7 +2012,7 @@ xf86setjmp1_arg2()
|
|||
int
|
||||
xf86setjmperror(xf86jmp_buf env)
|
||||
{
|
||||
FatalError("setjmp: don't know how to handle setjmp() type %d",
|
||||
FatalError("setjmp: don't know how to handle setjmp() type %d\n",
|
||||
xf86getjmptype());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/std_kbdEv.c,v 3.2 1998/07/25 16:57:01 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/std_kbdEv.c,v 3.3 1999/05/07 02:56:23 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
|
||||
* Copyright 1993 by David Dawes <dawes@xfree86.org>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sysv_kbd.c,v 3.3 1998/07/25 16:57:02 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sysv_kbd.c,v 3.4 1999/01/14 13:05:11 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
|
||||
* Copyright 1993 by David Dawes <dawes@XFree86.org>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/xf86Axp.h,v 1.3 2001/02/15 19:46:03 eich Exp $ */
|
||||
|
||||
#ifndef _XF86_AXP_H_
|
||||
#define _XF86_AXP_H_
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_bios.c,v 1.2tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_bios.c,v 1.2 2001/10/28 03:34:02 tsi Exp $ */
|
||||
/*
|
||||
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
@ -71,7 +71,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
{
|
||||
if (!xf86LinearVidMem())
|
||||
FatalError("xf86ReadBIOS: Could not mmap BIOS"
|
||||
" [a=%lx]\n", Base);
|
||||
" [a=%x]\n", Base);
|
||||
sprintf(solx86_vtname, apertureDevName);
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
if (ptr == MAP_FAILED)
|
||||
{
|
||||
xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed "
|
||||
"[0x%08lx, 0x%04x]\n",
|
||||
"[0x%05x, 0x%04x]\n",
|
||||
solx86_vtname, Base, mlen);
|
||||
close(fd);
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c,v 1.5 2001/11/25 13:51:24 tsi Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c,v 1.6 2002/06/06 13:49:34 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
@ -26,9 +26,6 @@
|
|||
#include "xf86.h"
|
||||
#include "xf86Priv.h"
|
||||
#include "xf86_OSlib.h"
|
||||
#ifdef __i386
|
||||
# include <sys/kd.h>
|
||||
#endif
|
||||
|
||||
static Bool KeepTty = FALSE;
|
||||
static Bool Protect0 = FALSE;
|
||||
|
|
@ -37,11 +34,7 @@ static int VTnum = -1;
|
|||
static int xf86StartVT = -1;
|
||||
#endif
|
||||
|
||||
#if defined(__SOL8__) || !defined(__i386)
|
||||
static char fb_dev[PATH_MAX] = "/dev/fb";
|
||||
#else
|
||||
static char fb_dev[PATH_MAX] = "/dev/console";
|
||||
#endif
|
||||
|
||||
void
|
||||
xf86OpenConsole(void)
|
||||
|
|
@ -169,15 +162,12 @@ xf86OpenConsole(void)
|
|||
|
||||
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
|
||||
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
|
||||
#endif
|
||||
#ifdef __i386
|
||||
|
||||
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
|
||||
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
|
||||
#endif
|
||||
}
|
||||
else /* serverGeneration != 1 */
|
||||
{
|
||||
#ifdef HAS_USL_VTS
|
||||
/*
|
||||
* Now re-get the VT
|
||||
*/
|
||||
|
|
@ -255,11 +245,6 @@ xf86CloseConsole(void)
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef __i386
|
||||
/* Reset the display back to text mode */
|
||||
ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_USL_VTS
|
||||
|
||||
/*
|
||||
|
|
@ -276,6 +261,8 @@ xf86CloseConsole(void)
|
|||
* Did the whole thing similarly to the way linux does it
|
||||
*/
|
||||
|
||||
/* Reset the display back to text mode */
|
||||
ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
|
||||
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
|
||||
{
|
||||
VT.mode = VT_AUTO; /* Set default vt handling */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/ $XFree86$
|
||||
/ $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_inout.s,v 1.1 2001/05/28 02:42:31 tsi Exp $
|
||||
/
|
||||
/ Copyright 1994-2001 The XFree86 Project, Inc. All Rights Reserved.
|
||||
/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_io.c,v 1.2 2002/10/11 01:40:37 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_io.c,v 1.3 2003/02/17 15:12:00 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
|
||||
* Copyright 1993 by David Dawes <dawes@xfree86.org>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue