diff options
Diffstat (limited to 'xorg-server/hw/xfree86/os-support')
-rw-r--r-- | xorg-server/hw/xfree86/os-support/hurd/hurd_video.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c | 52 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/shared/bios_mmap.c | 2 |
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); |