Upgrade to version 3.3.6

patch-4 has been split into several parts (patch-0?); one patch per
modified file
This commit is contained in:
Jean-Marc Zucconi 2000-01-12 03:49:50 +00:00
parent 8732158081
commit cd7d36b7f3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24659
22 changed files with 856 additions and 90 deletions

View file

@ -1,19 +0,0 @@
--- programs/xterm/termcap.orig Mon May 10 15:10:04 1999
+++ programs/xterm/termcap Mon Sep 27 02:32:32 1999
@@ -32,7 +32,7 @@
:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
:kn#12:\
:kH=\E[4~::@7=\E[4~:kh=\E[1~:\
- :@0=\E[1~:kI=\E[2~:kD=^?:\
+ :@0=\E[1~:kI=\E[2~:kD=^?:\
:*6=\E[4~:kP=\E[5~:kN=\E[6~:\
:km:\
:kb=^H:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
@@ -125,6 +125,6 @@
# This is the only entry which you should have to customize, since "xterm"
# is widely used for a variety of incompatible terminal emulations including
# color_xterm and rxvt.
-v0|xterm|X11 terminal emulator:\
+v0|xterm|X11 terminal emulator:\
:tc=xterm-xfree86:
# :tc=xterm-r6:

View file

@ -1,11 +0,0 @@
--- programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h~ Mon Sep 6 10:47:18 1999
+++ programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h Fri Sep 24 14:39:18 1999
@@ -421,7 +421,7 @@
/* Wait until Command FIFO is empty */
#define WaitCommandEmpty() do { int loop=0; mem_barrier(); \
- if (s3vPriv.chip == S3_ViRGE_GX2 || s3vPriv.chip == S3_ViRGE_MX || s3vPriv.chip == S3_ViRGE_MXP) \
+ if (S3_ViRGE_GX2_SERIES(s3vPriv.chip) || S3_ViRGE_MX_SERIES(s3vPriv.chip)) \
while ((!(((((mmtr)s3vMmioMem)->subsys_regs.regs.adv_func_cntl)) & 0x400)) && (loop++<MAXLOOP)); \
else if (S3_TRIO_3D_SERIES(s3vPriv.chip)) \
while (((IN_SUBSYS_STAT() & 0x5f00) != 0x5f00) && (loop++<MAXLOOP)); \

View file

@ -1,19 +0,0 @@
--- programs/xterm/termcap.orig Mon May 10 15:10:04 1999
+++ programs/xterm/termcap Mon Sep 27 02:32:32 1999
@@ -32,7 +32,7 @@
:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
:kn#12:\
:kH=\E[4~::@7=\E[4~:kh=\E[1~:\
- :@0=\E[1~:kI=\E[2~:kD=^?:\
+ :@0=\E[1~:kI=\E[2~:kD=^?:\
:*6=\E[4~:kP=\E[5~:kN=\E[6~:\
:km:\
:kb=^H:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
@@ -125,6 +125,6 @@
# This is the only entry which you should have to customize, since "xterm"
# is widely used for a variety of incompatible terminal emulations including
# color_xterm and rxvt.
-v0|xterm|X11 terminal emulator:\
+v0|xterm|X11 terminal emulator:\
:tc=xterm-xfree86:
# :tc=xterm-r6:

View file

@ -1,11 +0,0 @@
--- programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h~ Mon Sep 6 10:47:18 1999
+++ programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h Fri Sep 24 14:39:18 1999
@@ -421,7 +421,7 @@
/* Wait until Command FIFO is empty */
#define WaitCommandEmpty() do { int loop=0; mem_barrier(); \
- if (s3vPriv.chip == S3_ViRGE_GX2 || s3vPriv.chip == S3_ViRGE_MX || s3vPriv.chip == S3_ViRGE_MXP) \
+ if (S3_ViRGE_GX2_SERIES(s3vPriv.chip) || S3_ViRGE_MX_SERIES(s3vPriv.chip)) \
while ((!(((((mmtr)s3vMmioMem)->subsys_regs.regs.adv_func_cntl)) & 0x400)) && (loop++<MAXLOOP)); \
else if (S3_TRIO_3D_SERIES(s3vPriv.chip)) \
while (((IN_SUBSYS_STAT() & 0x5f00) != 0x5f00) && (loop++<MAXLOOP)); \

View file

@ -0,0 +1,71 @@
diff -ur /usr/ports/x11/XFree86/work/xc/config/cf/FreeBSD.cf config/cf/FreeBSD.cf
--- /usr/ports/x11/XFree86/work/xc/config/cf/FreeBSD.cf Sun Nov 8 11:19:10 1998
+++ config/cf/FreeBSD.cf Tue Dec 8 10:10:06 1998
diff -ur /usr/ports/x11/XFree86/work/xc/config/cf/Imake.cf config/cf/Imake.cf
@@ -308,7 +308,12 @@
# define AsmDefines AsmElfDefines
#endif
+#ifdef i386Architecture
#define ServerExtraDefines GccGasOption XFree86ServerDefines
+#endif
+#ifdef AlphaArchitecture
+#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
+#endif
#define StandardDefines -DCSRG_BASED
@@ -333,14 +338,14 @@
/* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
#ifndef DefaultGcc2i386Opt
#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
-#define DefaultGcc2i386Opt -O2
+#define DefaultGcc2i386Opt
#endif
#endif
#ifdef i386Architecture
# define OptimizedCDebugFlags DefaultGcc2i386Opt
#else
-# define OptimizedCDebugFlags -O2
+# define OptimizedCDebugFlags
#endif
#ifndef PreIncDir
@@ -449,14 +454,18 @@
#define DlLibrary /**/
#endif
+#ifdef AlphaArchitecture
+#define IoLibrary -lio
+#else
+#define IoLibrary /**/
+#endif
+
#if BuildDynamicLoading
-#define ServerExtraSysLibs DlLibrary
+#define ServerExtraSysLibs DlLibrary IoLibrary
#else
-#define ServerExtraSysLibs /**/
+#define ServerExtraSysLibs IoLibrary
#endif
#include <bsdLib.rules>
-#ifdef i386Architecture
#include <xfree86.cf>
-#endif
--- /usr/ports/x11/XFree86/work/xc/config/cf/Imake.cf Fri Nov 13 14:10:12 1998
+++ config/cf/Imake.cf Tue Dec 8 10:05:49 1998
@@ -160,6 +160,11 @@
# define i386Architecture
# undef i386
# endif
+# ifdef __alpha__
+# define AlphaBsdArchitecture
+# define AlphaArchitecture
+# undef __alpha__
+# endif
#endif /* __FreeBSD__ */
#ifdef AMOEBA

View file

@ -0,0 +1,12 @@
diff -ur /usr/ports/x11/XFree86/work/xc/config/cf/xfree86.cf config/cf/xfree86.cf
--- /usr/ports/x11/XFree86/work/xc/config/cf/xfree86.cf Sun Nov 8 11:19:11 1998
+++ config/cf/xfree86.cf Tue Dec 8 10:05:55 1998
@@ -853,7 +853,7 @@
#endif
#ifndef XFree86ConsoleDefines
-#ifdef i386BsdArchitecture
+#if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture)
#define XFree86ConsoleDefines -DPCCONS_SUPPORT -DSYSCONS_SUPPORT -DPCVT_SUPPORT
#else
#define XFree86ConsoleDefines /**/

View file

@ -0,0 +1,30 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h Mon Dec 23 06:31:04 1996
+++ programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h Tue Dec 8 10:05:55 1998
@@ -37,6 +37,18 @@
#define outw(p,v) _outw((v),(p))
#define outl(p,v) _outl((v),(p))
#else
+#if defined(__FreeBSD__) && defined(__alpha__)
+
+#include <sys/types.h>
+
+extern void outb(u_int32_t port, u_int8_t val);
+extern void outw(u_int32_t port, u_int16_t val);
+extern void outl(u_int32_t port, u_int32_t val);
+extern u_int8_t inb(u_int32_t port);
+extern u_int16_t inw(u_int32_t port);
+extern u_int32_t inl(u_int32_t port);
+
+#else
#ifdef GCCUSESGAS
static __inline__ void
outb(port, val)
@@ -156,6 +168,7 @@
#endif /* GCCUSESGAS */
#endif /* linux && __alpha__ */
+#endif /* __FreeBSD__ && __alpha__ */
#ifdef linux

View file

@ -0,0 +1,14 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/Imakefile programs/Xserver/hw/xfree86/SuperProbe/Imakefile
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/Imakefile Mon Oct 19 21:38:44 1998
+++ programs/Xserver/hw/xfree86/SuperProbe/Imakefile Tue Dec 8 10:05:55 1998
@@ -31,6 +31,10 @@
#if defined(i386BsdArchitecture)
# define OSModule OS_386BSD
#endif
+#if defined(AlphaBsdArchitecture)
+# define OSModule OS_386BSD
+ SYS_LIBRARIES = -lio
+#endif
#if defined(MinixArchitecture)
# define OSModule OS_Minix
#endif

View file

@ -0,0 +1,21 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3.c programs/Xserver/hw/xfree86/accel/s3/s3.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3.c Mon Oct 19 21:39:13 1998
+++ programs/Xserver/hw/xfree86/accel/s3/s3.c Wed Dec 9 10:27:41 1998
@@ -291,7 +291,7 @@
int s3_968_DashBug = 0;
unsigned long s3MemBase = 0;
Bool tmp_useSWCursor = FALSE;
-#ifdef __alpha__
+#if defined(__alpha__) && defined(linux)
unsigned long _bus_base(void);
Bool isJensen = FALSE;
#endif
@@ -1034,7 +1034,7 @@
xf86VerifyOptions(&validOptions, &s3InfoRec);
-#ifdef __alpha__
+#if defined(__alpha__) && defined(linux)
#ifdef TEST_JENSEN_CODE
if (1)
#else

View file

@ -0,0 +1,12 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3im.c programs/Xserver/hw/xfree86/accel/s3/s3im.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3im.c Fri Nov 13 14:15:12 1998
+++ programs/Xserver/hw/xfree86/accel/s3/s3im.c Wed Dec 9 10:29:01 1998
@@ -51,7 +51,7 @@
(a & 0x02) << 5 | \
(a & 0x01) << 7;
-#ifdef __alpha__
+#if defined(__alpha__) && defined(linux)
extern Bool isJensen;
#define MemToBusBase(Base,dst,src,count) { if(isJensen) JensenMemToBus(Base,dst,src,count); else MemToBus(&Base[dst],src,count); }
#define BusToMemBase(dst,Base,src,count) { if(isJensen) JensenBusToMem(Base,dst,src,count); else BusToMem(dst,&Base[src],count); }

View file

@ -0,0 +1,26 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common/compiler.h programs/Xserver/hw/xfree86/common/compiler.h
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common/compiler.h Mon Oct 19 21:39:32 1998
+++ programs/Xserver/hw/xfree86/common/compiler.h Tue Dec 8 10:58:16 1998
@@ -145,7 +145,21 @@
return _inl(port);
}
-# else /* defined(linux) */
+# elif defined(__FreeBSD__)
+/* for FreeBSD on Alpha, we use the libio inx/outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/* *before* any inx/outx is done. */
+
+#include <sys/types.h>
+
+extern void outb(u_int32_t port, u_int8_t val);
+extern void outw(u_int32_t port, u_int16_t val);
+extern void outl(u_int32_t port, u_int32_t val);
+extern u_int8_t inb(u_int32_t port);
+extern u_int16_t inw(u_int32_t port);
+extern u_int32_t inl(u_int32_t port);
+
+# else /* defined(__FreeBSD__) */
#define outb(a, b) /* NOP */
#define outw(a, b) /* NOP */

View file

@ -0,0 +1,12 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c Sun Nov 24 09:55:37 1996
+++ programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c Tue Dec 8 10:05:56 1998
@@ -299,8 +299,6 @@
* "bge reg, xx"). I hope alpha-gcc will be fixed to notice this eventually..
*/
-#include <linux/types.h>
-
/*
* This should be done in one go with ldq_u*2/mask/stq_u. Do it
* with a macro so that we can fix it up later..

View file

@ -0,0 +1,21 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/Imakefile programs/Xserver/hw/xfree86/common_hw/Imakefile
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/Imakefile Tue Feb 24 21:01:21 1998
+++ programs/Xserver/hw/xfree86/common_hw/Imakefile Tue Dec 8 10:05:56 1998
@@ -15,7 +15,7 @@
XSRCS = BUSmemcpy.c IODelay.c SlowBcopy.c $(IOSRC)
XOBJS = BUSmemcpy.o IODelay.o SlowBcopy.o $(IOOBJ)
#else
-#if defined(ArcArchitecture)
+#if defined(ArcArchitecture) || defined(AlphaArchitecture)
XSRCS = BUSmemcpy.c IODelay.c SlowBcopy.c $(IOSRC)
XOBJS = BUSmemcpy.o IODelay.o SlowBcopy.o $(IOOBJ)
#else
@@ -42,7 +42,7 @@
NormalLibraryTarget(xf86_hw,$(OBJS))
-#if !(defined(LinuxArchitecture) && defined(AlphaArchitecture)) && !defined(ArcArchitecture)
+#if !defined(AlphaArchitecture) && !defined(ArcArchitecture)
ObjectFromAsmSource(BUSmemcpy,NullParameter)
ObjectFromAsmSource(IODelay,NullParameter)
ObjectFromAsmSource(SlowBcopy,NullParameter)

View file

@ -0,0 +1,34 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c Sun Jan 5 11:58:24 1997
+++ programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c Tue Dec 8 10:05:56 1998
@@ -37,7 +37,12 @@
* Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996
*/
+#ifdef linux
unsigned long _bus_base(void);
+#define isJensen() (!_bus_base())
+#else
+#define isJensen() 0
+#endif
#ifdef TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */
#define SPARSE (5)
@@ -50,7 +55,7 @@
unsigned char *src, *dst;
int count;
{
- if (!_bus_base()) /* Jensen */
+ if (isJensen())
{
unsigned long addr;
long result;
@@ -74,7 +79,7 @@
unsigned char *src, *dst;
int count;
{
- if (!_bus_base()) /* Jensen */
+ if (isJensen())
{
unsigned long addr;

112
x11/XFree86/files/patch-0a Normal file
View file

@ -0,0 +1,112 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c Fri Nov 13 14:15:23 1998
+++ programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c Tue Dec 8 10:05:56 1998
@@ -490,7 +490,7 @@
static int pciConfigType = 0;
static int pciMaxDevice = 0;
-#if defined(__alpha__)
+#if defined(__alpha__) && defined(linux)
#include <asm/unistd.h>
#define BUS(tag) (((tag)>>16)&0xff)
#define DFN(tag) (((tag)>>8)&0xff)
@@ -512,7 +512,69 @@
{
return syscall(__NR_pciconfig_write, bus, dfn, off, len, buf);
}
-#endif /* __alpha__ */
+#endif /* __alpha__ && linux */
+#if defined(__alpha__) && defined(__FreeBSD__)
+
+#include <sys/pciio.h>
+
+#define BUS(tag) (((tag)>>16)&0xff)
+#define DFN(tag) (((tag)>>8)&0xff)
+
+static int pciFd = -1;
+
+void pciconfig_enable(void)
+{
+ pciFd = open("/dev/pci", O_RDWR);
+}
+
+void pciconfig_disable(void)
+{
+#if 0
+ /* MGA server calls pciWriteLong after pciDisableIO */
+ close(pciFd);
+ pciFd = -1;
+#endif
+}
+
+int pciconfig_read(
+ unsigned char bus,
+ unsigned char dfn,
+ unsigned char off,
+ unsigned char len,
+ void * buf)
+{
+ struct pci_io io;
+ int error;
+ io.pi_sel.pc_bus = bus;
+ io.pi_sel.pc_dev = dfn >> 3;
+ io.pi_sel.pc_func = dfn & 7;
+ io.pi_reg = off;
+ io.pi_width = len;
+ error = ioctl(pciFd, PCIOCREAD, &io);
+ if (error)
+ return error;
+ memcpy(buf, &io.pi_data, len);
+ return 0;
+}
+
+int pciconfig_write(
+ unsigned char bus,
+ unsigned char dfn,
+ unsigned char off,
+ unsigned char len,
+ void * buf)
+{
+ struct pci_io io;
+ io.pi_sel.pc_bus = bus;
+ io.pi_sel.pc_dev = dfn >> 3;
+ io.pi_sel.pc_func = dfn & 7;
+ io.pi_reg = off;
+ io.pi_width = len;
+ memcpy(&io.pi_data, buf, len);
+ return ioctl(pciFd, PCIOCWRITE, &io);
+}
+
+#endif /* __alpha__ && __FreeBSD__ */
static Bool
pcibusCheck()
@@ -1052,6 +1114,9 @@
static void
pciEnableIO(int scrnIndex)
{
+#if defined(__alpha__) && defined(__FreeBSD__)
+ pciconfig_enable();
+#else
/* This is enough to ensure that full I/O is enabled */
unsigned pciIOPorts[] = { PCI_MODE1_ADDRESS_REG };
int numPciIOPorts = sizeof(pciIOPorts) / sizeof(pciIOPorts[0]);
@@ -1059,13 +1124,18 @@
xf86ClearIOPortList(scrnIndex);
xf86AddIOPorts(scrnIndex, numPciIOPorts, pciIOPorts);
xf86EnableIOPorts(scrnIndex);
+#endif
}
static void
pciDisableIO(int scrnIndex)
{
+#if defined(__alpha__) && defined(__FreeBSD__)
+ pciconfig_disable();
+#else
xf86DisableIOPorts(scrnIndex);
xf86ClearIOPortList(scrnIndex);
+#endif
}
static Bool

View file

@ -0,0 +1,12 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/Imakefile programs/Xserver/hw/xfree86/os-support/Imakefile
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/Imakefile Sun May 11 06:04:24 1997
+++ programs/Xserver/hw/xfree86/os-support/Imakefile Tue Dec 8 10:05:56 1998
@@ -38,7 +38,7 @@
OS_SUBDIR = lynxos
#endif
-#if defined(i386BsdArchitecture)
+#if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture)
# if defined(BSD386Architecture)
OS_SUBDIR = bsdi
# else

View file

@ -0,0 +1,16 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile programs/Xserver/hw/xfree86/os-support/bsd/Imakefile
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile Sun Jan 5 11:59:09 1997
+++ programs/Xserver/hw/xfree86/os-support/bsd/Imakefile Tue Dec 8 10:05:56 1998
@@ -31,8 +31,12 @@
IOPERMDEFINES = -DUSE_I386_IOPL
# endif
#else
+# if defined(AlphaBsdArchitecture)
+ IOPERMDEFINES = -DUSE_ALPHA_PORTS
+# else
IOPERM_SRC = ioperm_noop.c
IOPERM_OBJ = ioperm_noop.o
+# endif
#endif
SRCS = bsd_init.c bsd_video.c bsd_io.c bsd_VTsw.c bios_devmem.c mapVT_noop.c \

View file

@ -0,0 +1,12 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c Mon Oct 19 21:40:36 1998
+++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c Tue Dec 8 10:05:56 1998
@@ -386,7 +386,7 @@
vtmode_t vtmode;
char vtname[12];
struct stat status;
- long syscons_version;
+ int syscons_version;
/* Check for syscons */
if ((fd = open(SYSCONS_CONSOLE_DEV1, SYSCONS_CONSOLE_MODE, 0)) >= 0

398
x11/XFree86/files/patch-0e Normal file
View file

@ -0,0 +1,398 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c Mon Feb 16 00:42:01 1998
+++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c Tue Dec 8 10:05:56 1998
@@ -40,6 +40,13 @@
#define MAP_FLAGS (MAP_FILE | MAP_SHARED)
#endif
+#ifdef __alpha__
+extern u_int64_t dense_base();
+#define BUS_BASE dense_base()
+#else
+#define BUS_BASE 0L
+#endif
+
/***************************************************************************/
/* Video Memory Mapping section */
/***************************************************************************/
@@ -77,7 +84,7 @@
{
/* Try to map a page at the VGA address */
base = (pointer)mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
- MAP_FLAGS, fd, (off_t)0xA0000);
+ MAP_FLAGS, fd, (off_t)0xA0000 + BUS_BASE);
if (base != (pointer)-1)
{
@@ -147,7 +154,6 @@
#endif
}
-
pointer
xf86MapVidMem(ScreenNum, Region, Base, Size)
int ScreenNum;
@@ -160,6 +166,10 @@
if (!devMemChecked)
checkDevMem(FALSE);
+#ifdef __alpha__
+ Base = (pointer)((unsigned long)Base & ((1L<<32) - 1));
+#endif
+
if (useDevMem)
{
if (devMemFd < 0)
@@ -169,7 +179,7 @@
}
base = (pointer)mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
MAP_FLAGS, devMemFd,
- (off_t)(unsigned long) Base);
+ (off_t)(unsigned long) Base + BUS_BASE);
if (base == (pointer)-1)
{
FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
@@ -195,11 +205,14 @@
}
base = (pointer)mmap(0, Size, PROT_READ|PROT_WRITE, MAP_FLAGS,
xf86Info.screenFd,
-#ifdef __mips__
- (unsigned long)Base);
+#if defined(__alpha__)
+ (unsigned long)Base + BUS_BASE
+#elif defined(__mips__)
+ (unsigned long)Base
#else
- (unsigned long)Base - 0xA0000);
+ (unsigned long)Base - 0xA0000
#endif
+ );
if (base == (pointer)-1)
{
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
@@ -397,7 +410,73 @@
ErrorF("EnableIOPorts: failed to open %s (%s)\n",
"/dev/ttyC0", strerror(errno));
}
-
+
+ ExtendedEnabled = TRUE;
+
+ return;
+}
+
+void
+xf86DisableIOPorts(ScreenNum)
+int ScreenNum;
+{
+ int i;
+
+ ScreenEnabled[ScreenNum] = FALSE;
+
+ return;
+}
+
+void xf86DisableIOPrivs()
+{
+}
+
+#endif /* USE_ARC_MMAP */
+
+#ifdef USE_ALPHA_PORTS
+
+static Bool ScreenEnabled[MAXSCREENS];
+static Bool ExtendedEnabled = FALSE;
+static Bool InitDone = FALSE;
+
+void
+xf86ClearIOPortList(ScreenNum)
+int ScreenNum;
+{
+ if (!InitDone)
+ {
+ int i;
+ for (i = 0; i < MAXSCREENS; i++)
+ ScreenEnabled[i] = FALSE;
+ InitDone = TRUE;
+ }
+ return;
+}
+
+void
+xf86AddIOPorts(ScreenNum, NumPorts, Ports)
+int ScreenNum;
+int NumPorts;
+unsigned *Ports;
+{
+ return;
+}
+
+void
+xf86EnableIOPorts(ScreenNum)
+int ScreenNum;
+{
+ int i;
+ int fd;
+ pointer base;
+
+ ScreenEnabled[ScreenNum] = TRUE;
+
+ if (ExtendedEnabled)
+ return;
+
+ ioperm(0, 65536, TRUE);
+
ExtendedEnabled = TRUE;
return;
@@ -411,6 +490,8 @@
ScreenEnabled[ScreenNum] = FALSE;
+ ioperm(0, 65536, FALSE);
+
return;
}
@@ -428,7 +509,7 @@
xf86DisableInterrupts()
{
-#if !defined(__mips__)
+#if !defined(__mips__) && !defined(__alpha__)
#ifdef __GNUC__
__asm__ __volatile__("cli");
#else
@@ -443,7 +524,7 @@
xf86EnableInterrupts()
{
-#if !defined(__mips__)
+#if !defined(__mips__) && !defined(__alpha__)
#ifdef __GNUC__
__asm__ __volatile__("sti");
#else
@@ -453,3 +534,223 @@
return;
}
+
+#if defined(__alpha__)
+
+#if 0
+
+#include <machine/sysarch.h>
+
+#define SPARSE_SHIFT 5
+
+static pointer sparseMappedVirt;
+static unsigned long sparseMappedPhys;
+
+pointer xf86MapVidMemSparse(ScreenNum, Region, Base, Size)
+int ScreenNum;
+int Region;
+pointer Base;
+unsigned long Size;
+{
+ pointer base;
+ int fd;
+
+ sparseMappedPhys = (unsigned long) Base;
+
+ Size <<= SPARSE_SHIFT;
+ Base = (pointer)((sparseMappedPhys & ~_bus_hae_mask()) << SPARSE_SHIFT);
+
+ if ((fd = open("/dev/mem", O_RDWR)) < 0)
+ {
+ FatalError("xf86MapVidMem: failed to open /dev/mem (%s)\n",
+ strerror(errno));
+ }
+ /* This requirers linux-0.99.pl10 or above */
+ base = (pointer)mmap((caddr_t)0, Size,
+ PROT_READ | PROT_WRITE,
+ MAP_SHARED, fd,
+ (off_t)Base + _bus_base_sparse());
+ close(fd);
+ if ((long)base == -1)
+ {
+ FatalError("xf86MapVidMem: Could not mmap framebuffer (%s)\n",
+ strerror(errno));
+ }
+
+ /*
+ * This enables user HAE settings for this process.
+ */
+ alpha_sethae(0);
+
+ sparseMappedVirt = base;
+
+ return base;
+}
+
+void xf86UnMapVidMemSparse(ScreenNum, Region, Base, Size)
+int ScreenNum;
+int Region;
+pointer Base;
+unsigned long Size;
+{
+ Size <<= SPARSE_SHIFT;
+
+ munmap((caddr_t)Base, Size);
+}
+
+#define vuip volatile unsigned int *
+
+static void
+setupAddress(Offset)
+unsigned long Offset;
+{
+ unsigned long phys = sparseMappedPhys + Offset;
+ alpha_sethae(phys & _bus_hae_mask());
+}
+
+int xf86ReadSparse8(Base, Offset)
+pointer Base;
+unsigned long Offset;
+{
+ unsigned long result, shift;
+
+ shift = (Offset & 0x3) * 8;
+ setupAddress(Offset);
+ result = *(vuip) ((unsigned long)Base + (Offset << SPARSE_SHIFT));
+ result >>= shift;
+ return 0xffUL & result;
+}
+
+int xf86ReadSparse16(Base, Offset)
+pointer Base;
+unsigned long Offset;
+{
+ unsigned long result, shift;
+
+ shift = (Offset & 0x2) * 8;
+ setupAddress(Offset);
+ result = *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(1<<(SPARSE_SHIFT-2)));
+ result >>= shift;
+ return 0xffffUL & result;
+}
+
+int xf86ReadSparse32(Base, Offset)
+pointer Base;
+unsigned long Offset;
+{
+ unsigned long result;
+
+ setupAddress(Offset);
+ result = *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(3<<(SPARSE_SHIFT-2)));
+ return result;
+}
+
+void xf86WriteSparse8(Value, Base, Offset)
+int Value;
+pointer Base;
+unsigned long Offset;
+{
+ unsigned int b = Value & 0xffU;
+
+ setupAddress(Offset);
+ *(vuip) ((unsigned long)Base + (Offset << SPARSE_SHIFT)) = b * 0x01010101;
+}
+
+void xf86WriteSparse16(Value, Base, Offset)
+int Value;
+pointer Base;
+unsigned long Offset;
+{
+ unsigned int w = Value & 0xffffU;
+
+ setupAddress(Offset);
+ *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(1<<(SPARSE_SHIFT-2))) =
+ w * 0x00010001;
+}
+
+void xf86WriteSparse32(Value, Base, Offset)
+int Value;
+pointer Base;
+unsigned long Offset;
+{
+ setupAddress(Offset);
+ *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(3<<(SPARSE_SHIFT-2))) = Value;
+}
+
+#else
+
+extern void *map_memory(u_int32_t address, u_int32_t size);
+extern void unmap_memory(void *handle, u_int32_t size);
+extern u_int8_t readb(void *handle, u_int32_t offset);
+extern u_int16_t readw(void *handle, u_int32_t offset);
+extern u_int32_t readl(void *handle, u_int32_t offset);
+extern void writeb(void *handle, u_int32_t offset, u_int8_t val);
+extern void writew(void *handle, u_int32_t offset, u_int16_t val);
+extern void writel(void *handle, u_int32_t offset, u_int32_t val);
+
+pointer xf86MapVidMemSparse(ScreenNum, Region, Base, Size)
+int ScreenNum;
+int Region;
+pointer Base;
+unsigned long Size;
+{
+ return (pointer) map_memory((u_int32_t) (u_int64_t) Base, Size);
+}
+
+void xf86UnMapVidMemSparse(ScreenNum, Region, Base, Size)
+int ScreenNum;
+int Region;
+pointer Base;
+unsigned long Size;
+{
+ unmap_memory(Base, Size);
+}
+
+int xf86ReadSparse8(Base, Offset)
+pointer Base;
+unsigned long Offset;
+{
+ return readb(Base, Offset);
+}
+
+int xf86ReadSparse16(Base, Offset)
+pointer Base;
+unsigned long Offset;
+{
+ return readw(Base, Offset);
+}
+
+int xf86ReadSparse32(Base, Offset)
+pointer Base;
+unsigned long Offset;
+{
+ return readl(Base, Offset);
+}
+
+void xf86WriteSparse8(Value, Base, Offset)
+int Value;
+pointer Base;
+unsigned long Offset;
+{
+ writeb(Base, Offset, Value);
+}
+
+void xf86WriteSparse16(Value, Base, Offset)
+int Value;
+pointer Base;
+unsigned long Offset;
+{
+ writel(Base, Offset, Value);
+}
+
+void xf86WriteSparse32(Value, Base, Offset)
+int Value;
+pointer Base;
+unsigned long Offset;
+{
+ writel(Base, Offset, Value);
+}
+
+#endif
+
+#endif /* __alpha__ */

View file

@ -0,0 +1,53 @@
diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c
--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c Mon Dec 23 06:50:58 1996
+++ programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c Tue Dec 8 10:05:56 1998
@@ -60,25 +60,7 @@
* re: boundaries and sizes and such...
*/
-/*
- * The Jensen lacks dense memory, thus we have to address the bus via
- * the sparse addressing scheme.
- *
- * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996
- */
-
-#ifdef TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */
-#define SPARSE (5)
-#define isJensen (1)
-#else
-#define isJensen (!_bus_base())
-#define SPARSE (7)
-#endif
-
-extern unsigned long _bus_base(void);
-extern unsigned long _bus_base_sparse(void);
-#define BUS_BASE (isJensen ? _bus_base_sparse() : _bus_base())
-#define JENSEN_SHIFT(x) (isJensen ? ((long)x<<SPARSE) : (long)x)
+extern u_int64_t dense_base(void);
#define SIZE (64*1024)
@@ -92,8 +74,8 @@
return(-1);
}
- base = mmap((caddr_t)0, JENSEN_SHIFT(SIZE), PROT_READ,
- MAP_SHARED, fd, (off_t)(JENSEN_SHIFT(Base) + BUS_BASE));
+ base = mmap((caddr_t)0, SIZE, PROT_READ,
+ MAP_SHARED, fd, (off_t)Base + dense_base());
if (base == (caddr_t)-1UL)
{
@@ -102,9 +84,9 @@
return(-1);
}
- SlowBCopyFromBus(base+JENSEN_SHIFT(Offset), Buf, Len);
+ SlowBCopyFromBus(base+Offset, Buf, Len);
- munmap((caddr_t)JENSEN_SHIFT(base), JENSEN_SHIFT(SIZE));
+ munmap((caddr_t)base, SIZE);
close(fd);
return(Len);

View file

@ -1,19 +0,0 @@
--- programs/xterm/termcap.orig Mon May 10 15:10:04 1999
+++ programs/xterm/termcap Mon Sep 27 02:32:32 1999
@@ -32,7 +32,7 @@
:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
:kn#12:\
:kH=\E[4~::@7=\E[4~:kh=\E[1~:\
- :@0=\E[1~:kI=\E[2~:kD=^?:\
+ :@0=\E[1~:kI=\E[2~:kD=^?:\
:*6=\E[4~:kP=\E[5~:kN=\E[6~:\
:km:\
:kb=^H:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
@@ -125,6 +125,6 @@
# This is the only entry which you should have to customize, since "xterm"
# is widely used for a variety of incompatible terminal emulations including
# color_xterm and rxvt.
-v0|xterm|X11 terminal emulator:\
+v0|xterm|X11 terminal emulator:\
:tc=xterm-xfree86:
# :tc=xterm-r6:

View file

@ -1,11 +0,0 @@
--- programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h~ Mon Sep 6 10:47:18 1999
+++ programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h Fri Sep 24 14:39:18 1999
@@ -421,7 +421,7 @@
/* Wait until Command FIFO is empty */
#define WaitCommandEmpty() do { int loop=0; mem_barrier(); \
- if (s3vPriv.chip == S3_ViRGE_GX2 || s3vPriv.chip == S3_ViRGE_MX || s3vPriv.chip == S3_ViRGE_MXP) \
+ if (S3_ViRGE_GX2_SERIES(s3vPriv.chip) || S3_ViRGE_MX_SERIES(s3vPriv.chip)) \
while ((!(((((mmtr)s3vMmioMem)->subsys_regs.regs.adv_func_cntl)) & 0x400)) && (loop++<MAXLOOP)); \
else if (S3_TRIO_3D_SERIES(s3vPriv.chip)) \
while (((IN_SUBSYS_STAT() & 0x5f00) != 0x5f00) && (loop++<MAXLOOP)); \