mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
c554962384
PR: ports/19372 Submitted by: Taguchi, Takesi <taguchi@tohoku.iij.ad.jp> (Maintainer)
54 lines
1.6 KiB
Plaintext
54 lines
1.6 KiB
Plaintext
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);
|
|
|