aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-04 19:13:27 +0000
committermarha <marha@users.sourceforge.net>2009-10-04 19:13:27 +0000
commit77a4732b0637493966889fe3545966fdc12a1b5e (patch)
tree42ab7f9667a7b3bdd89e6bb5c50793dad170b974 /xorg-server/hw/xfree86/os-support
parent67b353c9ce039b254ba2e92cd6f842c505a8bd21 (diff)
downloadvcxsrv-77a4732b0637493966889fe3545966fdc12a1b5e.tar.gz
vcxsrv-77a4732b0637493966889fe3545966fdc12a1b5e.tar.bz2
vcxsrv-77a4732b0637493966889fe3545966fdc12a1b5e.zip
Updated to
xkeyboard-config-1.7 pixman-0.16.2 libX11-1.3 libXinerama-1.1 xkbcomp-1.1.1 recordproto-1.14 xineramaproto-1.2 inputproto-2.0 compositeproto-0.4.1 xorg-server-1.7.0
Diffstat (limited to 'xorg-server/hw/xfree86/os-support')
-rw-r--r--xorg-server/hw/xfree86/os-support/hurd/hurd_video.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c52
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/bios_mmap.c2
3 files changed, 54 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
index b8b00c892..4a99db375 100644
--- a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
+++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
@@ -42,7 +42,7 @@
* Video Memory Mapping section
***************************************************************************/
static pointer
-mapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size)
+mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
{
mach_port_t device,iopl_dev;
memory_object_t iopl_mem;
diff --git a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c
index 8a5017e52..182a3e6ec 100644
--- a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c
+++ b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c
@@ -1,8 +1,15 @@
+/*******************************************************************************
+ for Alpha Linux
+*******************************************************************************/
+
/*
* Create a dependency that should be immune from the effect of register
* renaming as is commonly seen in superscalar processors. This should
* insert a minimum of 100-ns delays between reads/writes at clock rates
* up to 100 MHz---GGL
+ *
+ * Slowbcopy(char *src, char *dst, int count)
+ *
*/
#ifdef HAVE_XORG_CONFIG_H
@@ -47,3 +54,48 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
while(len--)
*dst++ = *src++;
}
+
+#ifdef __alpha__
+
+#ifdef linux
+
+#define SPARSE (7)
+
+#else
+
+#define SPARSE 0
+
+#endif
+
+void
+xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count)
+{
+ unsigned long addr;
+ long result;
+
+ addr = (unsigned long) src;
+ while( count ){
+ result = *(volatile int *) addr;
+ result >>= ((addr>>SPARSE) & 3) * 8;
+ *dst++ = (unsigned char) (0xffUL & result);
+ addr += 1<<SPARSE;
+ count--;
+ outb(0x80, 0x00);
+ }
+}
+
+void
+xf86SlowBCopyToBus(unsigned char *src, unsigned char *dst, int count)
+{
+ unsigned long addr;
+
+ addr = (unsigned long) dst;
+ while(count) {
+ *(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101;
+ src++;
+ addr += 1<<SPARSE;
+ count--;
+ outb(0x80, 0x00);
+ }
+}
+#endif
diff --git a/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c b/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c
index a615a1d45..40afd5b8e 100644
--- a/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c
+++ b/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c
@@ -131,7 +131,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
return(-1);
}
- xf86SlowBcopy((unsigned char *)(base+Offset), Buf, Len);
+ xf86SlowBCopyFromBus((unsigned char *)(base+Offset), Buf, Len);
munmap((caddr_t)base, mlen);
close(fd);