diff options
author | marha <marha@users.sourceforge.net> | 2009-10-04 19:13:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-10-04 19:13:27 +0000 |
commit | 77a4732b0637493966889fe3545966fdc12a1b5e (patch) | |
tree | 42ab7f9667a7b3bdd89e6bb5c50793dad170b974 /xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c | |
parent | 67b353c9ce039b254ba2e92cd6f842c505a8bd21 (diff) | |
download | vcxsrv-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/misc/SlowBcopy.c')
-rw-r--r-- | xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c | 52 |
1 files changed, 52 insertions, 0 deletions
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 |