NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xsrc/43457: X11 does not set MTRR register for framebuffer memory
>Number: 43457
>Category: xsrc
>Synopsis: X11 does not set MTRR register for framebuffer memory
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: xsrc-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 11 12:25:00 +0000 2010
>Originator: Witold Jan Wnuk
>Release: NetBSD-current
>Organization:
>Environment:
NetBSD foster 5.99.30 NetBSD 5.99.30 (FOSTER) #7: Mon Jun 7 07:32:36 CEST 2010
w@foster:/home/w/NetBSD/src/sys/arch/i386/compile/FOSTER i386
>Description:
-DHAVE_MTRR not specified in libpciaccess Makefile. -DHAVE_MMTR specified but
not used.
>How-To-Repeat:
>Fix:
Remove -DHAVE_MMTR. Add -DHAVE_MTRR for i386 and x86_64, fix netbsd_pci.c.
Patch follows.
Index: src/external/mit/xorg/lib/libpciaccess/Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/lib/libpciaccess/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- src/external/mit/xorg/lib/libpciaccess/Makefile 3 Jun 2010 09:42:40
-0000 1.4
+++ src/external/mit/xorg/lib/libpciaccess/Makefile 11 Jun 2010 12:07:25
-0000
@@ -18,7 +18,7 @@
netbsd_pci.c
CPPFLAGS+= ${X11FLAGS} -I${X11SRCDIR.${LIB}}/include \
- -DHAVE_MMTR -DHAVE_ZLIB \
+ -DHAVE_ZLIB \
-DHAVE_STRING_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H \
-DPCIIDS_PATH=\"${X11ROOTDIR}/share/pciids\"
@@ -35,11 +35,13 @@
.if ${MACHINE_ARCH} == "i386"
LDADD+= -li386
DPADD+= ${LIBI386}
+CPPFLAGS+= -DHAVE_MTRR
.endif
.if ${MACHINE_ARCH} == "x86_64"
LDADD+= -lx86_64
DPADD+= ${LIBX86_64}
+CPPFLAGS+= -DHAVE_MTRR
.endif
.include <bsd.x11.mk>
Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c,v
retrieving revision 1.6
diff -u -r1.6 netbsd_pci.c
--- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c 12 Jan 2010
03:05:31 -0000 1.6
+++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c 11 Jun 2010
12:07:25 -0000
@@ -146,11 +146,11 @@
/* No need to set an MTRR if it's the default mode. */
if ((map->flags & PCI_DEV_MAP_FLAG_CACHABLE) ||
(map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) {
- m.base = base;
+ m.base = map->base;
m.flags = MTRR_VALID | MTRR_PRIVATE;
- m.len = size;
+ m.len = map->size;
m.owner = getpid();
- if (map->flags & PCI_DEV_MAP_FLAG_CACHEABLE)
+ if (map->flags & PCI_DEV_MAP_FLAG_CACHABLE)
m.type = MTRR_TYPE_WB;
if (map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)
m.type = MTRR_TYPE_WC;
@@ -177,7 +177,7 @@
(map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) {
m.base = map->base;
m.flags = 0;
- m.len = size;
+ m.len = map->size;
m.type = MTRR_TYPE_UC;
(void)netbsd_set_mtrr(&m, &n);
}
Home |
Main Index |
Thread Index |
Old Index