Index: programs/Xserver/hw/xfree86/common/compiler.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/compiler.h,v retrieving revision 1.8 diff -u -r1.8 compiler.h --- programs/Xserver/hw/xfree86/common/compiler.h 3 Jul 2005 07:01:24 -0000 1.8 +++ programs/Xserver/hw/xfree86/common/compiler.h 21 Jul 2005 18:39:08 -0000 @@ -124,6 +124,8 @@ # define DO_PROTOTYPES # endif +#include "xf86str.h" + # if defined(NO_INLINE) || defined(DO_PROTOTYPES) # if !defined(__arm__) @@ -131,21 +133,21 @@ && !(defined(__alpha__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \ -extern void outb(unsigned short, unsigned char); -extern void outw(unsigned short, unsigned short); -extern void outl(unsigned short, unsigned int); -extern unsigned int inb(unsigned short); -extern unsigned int inw(unsigned short); -extern unsigned int inl(unsigned short); +extern void outb(BusRec *, unsigned short, unsigned char); +extern void outw(BusRec *, unsigned short, unsigned short); +extern void outl(BusRec *, unsigned short, unsigned int); +extern unsigned int inb(BusRec *, unsigned short); +extern unsigned int inw(BusRec *, unsigned short); +extern unsigned int inl(BusRec *, unsigned short); # else /* __sparc__, __arm32__, __alpha__*/ -extern void outb(unsigned long, unsigned char); -extern void outw(unsigned long, unsigned short); -extern void outl(unsigned long, unsigned int); -extern unsigned int inb(unsigned long); -extern unsigned int inw(unsigned long); -extern unsigned int inl(unsigned long); +extern void outb(BusRec *, unsigned long, unsigned char); +extern void outw(BusRec *, unsigned long, unsigned short); +extern void outl(BusRec *, unsigned long, unsigned int); +extern unsigned int inb(BusRec *, unsigned long); +extern unsigned int inw(BusRec *, unsigned long); +extern unsigned int inl(BusRec *, unsigned long); # endif /* __sparc__, __arm32__, __alpha__ */ # endif /* __arm__ */ @@ -176,42 +178,42 @@ extern void (*_alpha_outb)(char val, unsigned long port); static __inline__ void -outb(unsigned long port, unsigned char val) +outb(BusRec *, unsigned long port, unsigned char val) { _alpha_outb(val, port); } extern void (*_alpha_outw)(short val, unsigned long port); static __inline__ void -outw(unsigned long port, unsigned short val) +outw(BusRec *, unsigned long port, unsigned short val) { _alpha_outw(val, port); } extern void (*_alpha_outl)(int val, unsigned long port); static __inline__ void -outl(unsigned long port, unsigned int val) +outl(BusRec *, unsigned long port, unsigned int val) { _alpha_outl(val, port); } extern unsigned int (*_alpha_inb)(unsigned long port); static __inline__ unsigned int -inb(unsigned long port) +inb(BusRec *, unsigned long port) { return _alpha_inb(port); } extern unsigned int (*_alpha_inw)(unsigned long port); static __inline__ unsigned int -inw(unsigned long port) +inw(BusRec *, unsigned long port) { return _alpha_inw(port); } extern unsigned int (*_alpha_inl)(unsigned long port); static __inline__ unsigned int -inl(unsigned long port) +inl(BusRec *, unsigned long port) { return _alpha_inl(port); } @@ -226,12 +228,12 @@ /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ -extern void outb(unsigned int port, unsigned char val); -extern void outw(unsigned int port, unsigned short val); -extern void outl(unsigned int port, unsigned int val); -extern unsigned char inb(unsigned int port); -extern unsigned short inw(unsigned int port); -extern unsigned int inl(unsigned int port); +extern void outb(BusRec *, unsigned int port, unsigned char val); +extern void outw(BusRec *, unsigned int port, unsigned short val); +extern void outl(BusRec *, unsigned int port, unsigned int val); +extern unsigned char inb(BusRec *, unsigned int port); +extern unsigned short inw(BusRec *, unsigned int port); +extern unsigned int inl(BusRec *, unsigned int port); # endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */ @@ -502,12 +504,12 @@ # undef inb # undef inw # undef inl -extern void outb(unsigned long port, unsigned char val); -extern void outw(unsigned long port, unsigned short val); -extern void outl(unsigned long port, unsigned int val); -extern unsigned int inb(unsigned long port); -extern unsigned int inw(unsigned long port); -extern unsigned int inl(unsigned long port); +extern void outb(BusRec *, unsigned long port, unsigned char val); +extern void outw(BusRec *, unsigned long port, unsigned short val); +extern void outl(BusRec *, unsigned long port, unsigned int val); +extern unsigned int inb(BusRec *, unsigned long port); +extern unsigned int inw(BusRec *, unsigned long port); +extern unsigned int inl(BusRec *, unsigned long port); # elif defined(linux) && defined(__amd64__) @@ -527,26 +529,26 @@ static __inline__ void -outb(unsigned short port, unsigned char val) +outb(BusRec *, unsigned short port, unsigned char val) { __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port)); } static __inline__ void -outw(unsigned short port, unsigned short val) +outw(BusRec *, unsigned short port, unsigned short val) { __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port)); } static __inline__ void -outl(unsigned short port, unsigned int val) +outl(BusRec *, unsigned short port, unsigned int val) { __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port)); } static __inline__ unsigned int -inb(unsigned short port) +inb(BusRec *, unsigned short port) { unsigned char ret; __asm__ __volatile__("inb %1,%0" : @@ -556,7 +558,7 @@ } static __inline__ unsigned int -inw(unsigned short port) +inw(BusRec *, unsigned short port) { unsigned short ret; __asm__ __volatile__("inw %1,%0" : @@ -566,7 +568,7 @@ } static __inline__ unsigned int -inl(unsigned short port) +inl(BusRec *, unsigned short port) { unsigned int ret; __asm__ __volatile__("inl %1,%0" : @@ -585,7 +587,7 @@ # define barrier() __asm__ __volatile__(".word 0x8143e00a": : :"memory") static __inline__ void -outb(unsigned long port, unsigned char val) +outb(BusRec *, unsigned long port, unsigned char val) { __asm__ __volatile__("stba %0, [%1] %2" : /* No outputs */ @@ -594,7 +596,7 @@ } static __inline__ void -outw(unsigned long port, unsigned short val) +outw(BusRec *, unsigned long port, unsigned short val) { __asm__ __volatile__("stha %0, [%1] %2" : /* No outputs */ @@ -603,7 +605,7 @@ } static __inline__ void -outl(unsigned long port, unsigned int val) +outl(BusRec *, unsigned long port, unsigned int val) { __asm__ __volatile__("sta %0, [%1] %2" : /* No outputs */ @@ -612,7 +614,7 @@ } static __inline__ unsigned int -inb(unsigned long port) +inb(BusRec *, unsigned long port) { unsigned int ret; __asm__ __volatile__("lduba [%1] %2, %0" @@ -622,7 +624,7 @@ } static __inline__ unsigned int -inw(unsigned long port) +inw(BusRec *, unsigned long port) { unsigned int ret; __asm__ __volatile__("lduha [%1] %2, %0" @@ -632,7 +634,7 @@ } static __inline__ unsigned int -inl(unsigned long port) +inl(BusRec *, unsigned long port) { unsigned int ret; __asm__ __volatile__("lda [%1] %2, %0" @@ -916,40 +918,41 @@ # define PORT_SIZE short # endif +/* This should go away now that in/out take a device id */ unsigned int IOPortBase; /* Memory mapped I/O port area */ static __inline__ void -outb(unsigned PORT_SIZE port, unsigned char val) +outb(BusRec *, unsigned PORT_SIZE port, unsigned char val) { *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val; } static __inline__ void -outw(unsigned PORT_SIZE port, unsigned short val) +outw(BusRec *, unsigned PORT_SIZE port, unsigned short val) { *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val; } static __inline__ void -outl(unsigned PORT_SIZE port, unsigned int val) +outl(BusRec *, unsigned PORT_SIZE port, unsigned int val) { *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val; } static __inline__ unsigned int -inb(unsigned PORT_SIZE port) +inb(BusRec *, unsigned PORT_SIZE port) { return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase); } static __inline__ unsigned int -inw(unsigned PORT_SIZE port) +inw(BusRec *, unsigned PORT_SIZE port) { return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase); } static __inline__ unsigned int -inl(unsigned PORT_SIZE port) +inl(BusRec *, unsigned PORT_SIZE port) { return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase); } @@ -1084,6 +1087,7 @@ # define MAP_FAILED ((void *)-1) # endif +/* This, too, should die. */ extern volatile unsigned char *ioBase; #if defined(linux) && defined(__powerpc64__) @@ -1250,42 +1254,42 @@ static __inline__ void -outb(unsigned short port, unsigned char value) +outb(BusRec *, unsigned short port, unsigned char value) { if(ioBase == MAP_FAILED) return; xf86WriteMmio8((void *)ioBase, port, value); } static __inline__ void -outw(unsigned short port, unsigned short value) +outw(BusRec *, unsigned short port, unsigned short value) { if(ioBase == MAP_FAILED) return; xf86WriteMmio16Le((void *)ioBase, port, value); } static __inline__ void -outl(unsigned short port, unsigned int value) +outl(BusRec *, unsigned short port, unsigned int value) { if(ioBase == MAP_FAILED) return; xf86WriteMmio32Le((void *)ioBase, port, value); } static __inline__ unsigned int -inb(unsigned short port) +inb(BusRec *, unsigned short port) { if(ioBase == MAP_FAILED) return 0; return xf86ReadMmio8((void *)ioBase, port); } static __inline__ unsigned int -inw(unsigned short port) +inw(BusRec *, unsigned short port) { if(ioBase == MAP_FAILED) return 0; return xf86ReadMmio16Le((void *)ioBase, port); } static __inline__ unsigned int -inl(unsigned short port) +inl(BusRec *, unsigned short port) { if(ioBase == MAP_FAILED) return 0; return xf86ReadMmio32Le((void *)ioBase, port); @@ -1380,26 +1384,26 @@ */ static __inline__ void -outb(unsigned short port, unsigned char val) +outb(BusRec *, unsigned short port, unsigned char val) { __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port)); } static __inline__ void -outw(unsigned short port, unsigned short val) +outw(BusRec *, unsigned short port, unsigned short val) { __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port)); } static __inline__ void -outl(unsigned short port, unsigned int val) +outl(BusRec *, unsigned short port, unsigned int val) { __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port)); } static __inline__ unsigned int -inb(unsigned short port) +inb(BusRec *, unsigned short port) { unsigned char ret; __asm__ __volatile__("inb %1,%0" : @@ -1409,7 +1413,7 @@ } static __inline__ unsigned int -inw(unsigned short port) +inw(BusRec *, unsigned short port) { unsigned short ret; __asm__ __volatile__("inw %1,%0" : @@ -1419,7 +1423,7 @@ } static __inline__ unsigned int -inl(unsigned short port) +inl(BusRec *, unsigned short port) { unsigned int ret; __asm__ __volatile__("inl %1,%0" : @@ -1431,25 +1435,25 @@ # else /* GCCUSESGAS */ static __inline__ void -outb(unsigned short port, unsigned char val) +outb(BusRec *device, unsigned short port, unsigned char val) { __asm__ __volatile__("out%B0 (%1)" : :"a" (val), "d" (port)); } static __inline__ void -outw(unsigned short port, unsigned short val) +outw(BusRec *device, unsigned short port, unsigned short val) { __asm__ __volatile__("out%W0 (%1)" : :"a" (val), "d" (port)); } static __inline__ void -outl(unsigned short port, unsigned int val) +outl(BusRec *device, unsigned short port, unsigned int val) { __asm__ __volatile__("out%L0 (%1)" : :"a" (val), "d" (port)); } static __inline__ unsigned int -inb(unsigned short port) +inb(BusRec *device, unsigned short port) { unsigned char ret; __asm__ __volatile__("in%B0 (%1)" : @@ -1459,7 +1463,7 @@ } static __inline__ unsigned int -inw(unsigned short port) +inw(BusRec *device, unsigned short port) { unsigned short ret; __asm__ __volatile__("in%W0 (%1)" : @@ -1469,7 +1473,7 @@ } static __inline__ unsigned int -inl(unsigned short port) +inl(BusRec *device, unsigned short port) { unsigned int ret; __asm__ __volatile__("in%L0 (%1)" : @@ -1483,34 +1487,34 @@ # else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__)*/ static __inline__ void -outb(unsigned short port, unsigned char val) +outb(BusRec *device, unsigned short port, unsigned char val) { } static __inline__ void -outw(unsigned short port, unsigned short val) +outw(BusRec *device, unsigned short port, unsigned short val) { } static __inline__ void -outl(unsigned short port, unsigned int val) +outl(BusRec *device, unsigned short port, unsigned int val) { } static __inline__ unsigned int -inb(unsigned short port) +inb(BusRec *device, unsigned short port) { return 0; } static __inline__ unsigned int -inw(unsigned short port) +inw(BusRec *device, unsigned short port) { return 0; } static __inline__ unsigned int -inl(unsigned short port) +inl(BusRec *device, unsigned short port) { return 0; } @@ -1564,38 +1568,38 @@ # if PPCIO_DEBUG -extern void debug_outb(unsigned int a, unsigned char b, int line, char *file); -extern void debug_outw(unsigned int a, unsigned short w, int line, char *file); -extern void debug_outl(unsigned int a, unsigned int l, int line, char *file); -extern unsigned char debug_inb(unsigned int a, int line, char *file); -extern unsigned short debug_inw(unsigned int a, int line, char *file); -extern unsigned int debug_inl(unsigned int a, int line, char *file); - -# define outb(a,b) debug_outb(a,b, __LINE__, __FILE__) -# define outw(a,w) debug_outw(a,w, __LINE__, __FILE__) -# define outl(a,l) debug_outl(a,l, __LINE__, __FILE__) -# define inb(a) debug_inb(a, __LINE__, __FILE__) -# define inw(a) debug_inw(a, __LINE__, __FILE__) -# define inl(a) debug_inl(a, __LINE__, __FILE__) +extern void debug_outb(BusRec *device, unsigned int a, unsigned char b, int line, char *file); +extern void debug_outw(BusRec *device, unsigned int a, unsigned short w, int line, char *file); +extern void debug_outl(BusRec *device, unsigned int a, unsigned int l, int line, char *file); +extern unsigned char debug_inb(BusRec *device, unsigned int a, int line, char *file); +extern unsigned short debug_inw(BusRec *device, unsigned int a, int line, char *file); +extern unsigned int debug_inl(BusRec *device, unsigned int a, int line, char *file); + +# define outb(d,a,b) debug_outb(d,a,b, __LINE__, __FILE__) +# define outw(d,a,w) debug_outw(d,a,w, __LINE__, __FILE__) +# define outl(d,a,l) debug_outl(d,a,l, __LINE__, __FILE__) +# define inb(d,a) debug_inb(d,a, __LINE__, __FILE__) +# define inw(d,a) debug_inw(d,a, __LINE__, __FILE__) +# define inl(d,a) debug_inl(d,a, __LINE__, __FILE__) # else /* !PPCIO_DEBUG */ -extern unsigned char inb(unsigned int a); -extern unsigned short inw(unsigned int a); -extern unsigned int inl(unsigned int a); +extern unsigned char inb(BusRec *device, unsigned int a); +extern unsigned short inw(BusRec *device, unsigned int a); +extern unsigned int inl(BusRec *device, unsigned int a); # if PPCIO_INLINE -# define outb(a,b) \ +# define outb(d,a,b) \ (*((volatile unsigned char *)(ioBase + (a))) = (b), eieio()) -# define outw(a,w) (stw_brx((w),ioBase,(a)), eieio()) -# define outl(a,l) (stl_brx((l),ioBase,(a)), eieio()) +# define outw(d,a,w) (stw_brx((w),ioBase,(a)), eieio()) +# define outl(d,a,l) (stl_brx((l),ioBase,(a)), eieio()) # else /* !PPCIO_INLINE */ -extern void outb(unsigned int a, unsigned char b); -extern void outw(unsigned int a, unsigned short w); -extern void outl(unsigned int a, unsigned int l); +extern void outb(BusRec *device, unsigned int a, unsigned char b); +extern void outw(BusRec *device, unsigned int a, unsigned short w); +extern void outl(BusRec *device, unsigned int a, unsigned int l); # endif /* PPCIO_INLINE */ @@ -1660,12 +1664,12 @@ # if defined(QNX4) # include -extern unsigned inb(unsigned port); -extern unsigned inw(unsigned port); -extern unsigned inl(unsigned port); -extern void outb(unsigned port, unsigned val); -extern void outw(unsigned port, unsigned val); -extern void outl(unsigned port, unsigned val); +extern unsigned inb(BusRec *device, unsigned port); +extern unsigned inw(BusRec *device, unsigned port); +extern unsigned inl(BusRec *device, unsigned port); +extern void outb(BusRec *device, unsigned port, unsigned val); +extern void outw(BusRec *device, unsigned port, unsigned val); +extern void outl(BusRec *device, unsigned port, unsigned val); # endif /* QNX4 */ # if defined(IODEBUG) && defined(__GNUC__) @@ -1675,13 +1679,13 @@ # undef outb # undef outw # undef outl -# define inb(a) __extension__ ({unsigned char __c=RealInb(a); ErrorF("inb(0x%03x) = 0x%02x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) -# define inw(a) __extension__ ({unsigned short __c=RealInw(a); ErrorF("inw(0x%03x) = 0x%04x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) -# define inl(a) __extension__ ({unsigned int __c=RealInl(a); ErrorF("inl(0x%03x) = 0x%08x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) - -# define outb(a,b) (ErrorF("outb(0x%03x, 0x%02x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutb(a,b)) -# define outw(a,b) (ErrorF("outw(0x%03x, 0x%04x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutw(a,b)) -# define outl(a,b) (ErrorF("outl(0x%03x, 0x%08x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutl(a,b)) +# define inb(d,a) __extension__ ({unsigned char __c=RealInb(d,a); ErrorF("inb(0x%03x) = 0x%02x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) +# define inw(d,a) __extension__ ({unsigned short __c=RealInw(d,a); ErrorF("inw(0x%03x) = 0x%04x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) +# define inl(d,a) __extension__ ({unsigned int __c=RealInl(d,a); ErrorF("inl(0x%03x) = 0x%08x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) + +# define outb(d,a,b) (ErrorF("outb(0x%03x, 0x%02x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutb(d,a,b)) +# define outw(d,a,b) (ErrorF("outw(0x%03x, 0x%04x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutw(d,a,b)) +# define outl(d,a,b) (ErrorF("outl(0x%03x, 0x%08x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutl(d,a,b)) # endif # endif /* NO_INLINE */ Index: programs/Xserver/hw/xfree86/common/xf86Bus.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v retrieving revision 1.10 diff -u -r1.10 xf86Bus.c --- programs/Xserver/hw/xfree86/common/xf86Bus.c 3 Jul 2005 08:53:42 -0000 1.10 +++ programs/Xserver/hw/xfree86/common/xf86Bus.c 21 Jul 2005 18:39:09 -0000 @@ -3077,7 +3077,9 @@ static void CheckGenericGA() { -/* This needs to be changed for multiple domains */ +/* + * This needs to be changed for multiple domains, should we pass in a device? + */ #if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) IOADDRESS GenericIOBase = VGAHW_GET_IOBASE(); CARD8 CurrentValue, TestValue; @@ -3085,13 +3087,13 @@ /* VGA CRTC registers are not used here, so don't bother unlocking them */ /* VGA has one more read/write attribute register than EGA */ - (void) inb(GenericIOBase + VGA_IN_STAT_1_OFFSET); /* Reset flip-flop */ - outb(VGA_ATTR_INDEX, 0x14 | 0x20); - CurrentValue = inb(VGA_ATTR_DATA_R); - outb(VGA_ATTR_DATA_W, CurrentValue ^ 0x0F); - outb(VGA_ATTR_INDEX, 0x14 | 0x20); - TestValue = inb(VGA_ATTR_DATA_R); - outb(VGA_ATTR_DATA_W, CurrentValue); + (void) inb(NULL, GenericIOBase + VGA_IN_STAT_1_OFFSET); /* Reset flip-flop */ + outb(NULL, VGA_ATTR_INDEX, 0x14 | 0x20); + CurrentValue = inb(NULL, VGA_ATTR_DATA_R); + outb(NULL, VGA_ATTR_DATA_W, CurrentValue ^ 0x0F); + outb(NULL, VGA_ATTR_INDEX, 0x14 | 0x20); + TestValue = inb(NULL ,VGA_ATTR_DATA_R); + outb(NULL, VGA_ATTR_DATA_W, CurrentValue); if ((CurrentValue ^ 0x0F) == TestValue) { primaryBus.type = BUS_ISA; Index: programs/Xserver/hw/xfree86/common/xf86Helper.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Helper.c,v retrieving revision 1.9 diff -u -r1.9 xf86Helper.c --- programs/Xserver/hw/xfree86/common/xf86Helper.c 3 Jul 2005 08:53:42 -0000 1.9 +++ programs/Xserver/hw/xfree86/common/xf86Helper.c 21 Jul 2005 18:39:10 -0000 @@ -2107,22 +2107,22 @@ ErrorF("your OS does not support disabling interrupts, then you\n"); FatalError("must specify a Clocks line in the XF86Config file.\n"); } - while ((inb(status) & maskval) == 0x00) + while ((inb(&pScrn->device, status) & maskval) == 0x00) if (sync-- == 0) goto finish; /* Something appears to be happening, so reset sync count */ sync = 200000; - while ((inb(status) & maskval) == maskval) + while ((inb(&pScrn->device, status) & maskval) == maskval) if (sync-- == 0) goto finish; /* Something appears to be happening, so reset sync count */ sync = 200000; - while ((inb(status) & maskval) == 0x00) + while ((inb(&pScrn->device, status) & maskval) == 0x00) if (sync-- == 0) goto finish; for (rcnt = 0; rcnt < 5; rcnt++) { - while (!(inb(status) & maskval)) + while (!(inb(&pScrn->device, status) & maskval)) cnt++; - while ((inb(status) & maskval)) + while ((inb(&pScrn->device, status) & maskval)) cnt++; } Index: programs/Xserver/hw/xfree86/common/xf86Module.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Module.h,v retrieving revision 1.5 diff -u -r1.5 xf86Module.h --- programs/Xserver/hw/xfree86/common/xf86Module.h 3 Jul 2005 08:53:42 -0000 1.5 +++ programs/Xserver/hw/xfree86/common/xf86Module.h 21 Jul 2005 18:39:11 -0000 @@ -196,6 +196,7 @@ /* Prototypes for Loader functions that are exported to modules */ #ifndef IN_LOADER +#define OUT_OF_LOADER /* Prototypes with opaque pointers for use by modules */ pointer LoadSubModule(pointer, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, Index: programs/Xserver/hw/xfree86/common/xf86str.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86str.h,v retrieving revision 1.8 diff -u -r1.8 xf86str.h --- programs/Xserver/hw/xfree86/common/xf86str.h 3 Jul 2005 08:53:42 -0000 1.8 +++ programs/Xserver/hw/xfree86/common/xf86str.h 21 Jul 2005 18:39:11 -0000 @@ -921,6 +921,7 @@ int clock[MAXCLOCKS]; /* list of clock frequencies */ int videoRam; /* amount of video ram (kb) */ unsigned long biosBase; /* Base address of video BIOS */ + BusRec device; /* Actual device */ unsigned long memPhysBase; /* Physical address of FB */ unsigned long fbOffset; /* Offset of FB in the above */ IOADDRESS domainIOBase; /* Domain I/O base address */ Index: programs/Xserver/hw/xfree86/drivers/apm/apm.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/apm/apm.h,v retrieving revision 1.3 diff -u -r1.3 apm.h --- programs/Xserver/hw/xfree86/drivers/apm/apm.h 20 Apr 2005 12:25:22 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/apm/apm.h 21 Jul 2005 18:39:11 -0000 @@ -61,6 +61,7 @@ #endif #define TRUE (1) +/* PciBusId? */ #define rdinx(port, ind) (outb((port), (ind)), inb((port) + 1)) #define wrinx(port, ind, val) outb((port), (ind)), outb((port) + 1, (val)) #define modinx(port, ind, mask, bits) \ Index: programs/Xserver/hw/xfree86/drivers/apm/apm_dga.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/apm/apm_dga.c,v retrieving revision 1.3 diff -u -r1.3 apm_dga.c --- programs/Xserver/hw/xfree86/drivers/apm/apm_dga.c 11 Jul 2005 02:29:44 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/apm/apm_dga.c 21 Jul 2005 18:39:11 -0000 @@ -340,8 +340,8 @@ } else { /* Wait until vertical retrace is in progress. */ - while (inb(pApm->iobase + 0x3DA) & 0x08); - while (!(inb(pApm->iobase + 0x3DA) & 0x08)); + while (inb(&pScrn->device, pApm->iobase + 0x3DA) & 0x08); + while (!(inb(&pScrn->device, pApm->iobase + 0x3DA) & 0x08)); } } Index: programs/Xserver/hw/xfree86/drivers/apm/apm_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/apm/apm_driver.c,v retrieving revision 1.6 diff -u -r1.6 apm_driver.c --- programs/Xserver/hw/xfree86/drivers/apm/apm_driver.c 11 Jul 2005 02:29:44 -0000 1.6 +++ programs/Xserver/hw/xfree86/drivers/apm/apm_driver.c 21 Jul 2005 18:39:12 -0000 @@ -360,7 +360,7 @@ apm_xbase = (rdinx(0x3C4, 0x1F) << 8) | rdinx(0x3C4, 0x1E); - if (!(wrinx(0x3C4, 0x1D, 0xCA >> 2), inb(apm_xbase + 2))) { + if (!(wrinx(0x3C4, 0x1D, 0xCA >> 2), inb(NULL, apm_xbase + 2))) { /* * TODO Not PCI */ Index: programs/Xserver/hw/xfree86/drivers/apm/apm_regs.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/apm/apm_regs.h,v retrieving revision 1.2 diff -u -r1.2 apm_regs.h --- programs/Xserver/hw/xfree86/drivers/apm/apm_regs.h 23 Apr 2004 19:25:03 -0000 1.2 +++ programs/Xserver/hw/xfree86/drivers/apm/apm_regs.h 21 Jul 2005 18:39:12 -0000 @@ -49,16 +49,16 @@ /* IO port access to extended registers */ #define RDXB_IOP(addr) (wrinx(pApm->xport, 0x1D, (addr) >> 2), \ - inb(pApm->xbase + ((addr) & 3))) + inb(NULL, pApm->xbase + ((addr) & 3))) #define RDXW_IOP(addr) (wrinx(pApm->xport, 0x1D, (addr) >> 2), \ - inw(pApm->xbase + ((addr) & 2))) + inw(NULL, pApm->xbase + ((addr) & 2))) #define RDXL_IOP(addr) (wrinx(pApm->xport, 0x1D, (addr) >> 2), \ - inl(pApm->xbase)) + inl(NULL, pApm->xbase)) #define WRXB_IOP(addr,val) \ do { \ if (check08((addr), (val))) { \ wrinx(pApm->xport, 0x1D, (addr) >> 2); \ - outb(pApm->xbase + ((addr) & 3), (val)); \ + outb(NULL, pApm->xbase + ((addr) & 3), (val)); \ curr08[MIN((addr), 0x80)] = (val); \ break; \ } \ @@ -67,7 +67,7 @@ do { \ if (check16((addr), (val))) { \ wrinx(pApm->xport, 0x1D, (addr) >> 2); \ - outw(pApm->xbase + ((addr) & 2), (val)); \ + outw(NULL, pApm->xbase + ((addr) & 2), (val)); \ curr16[MIN(((addr) / 2), 0x40)] = (val); \ break; \ } \ @@ -76,7 +76,7 @@ do { \ if (check32((addr), (val))) { \ wrinx(pApm->xport, 0x1D, (addr) >> 2); \ - outl(pApm->xbase, (val)); \ + outl(NULL, pApm->xbase, (val)); \ curr32[MIN(((addr) / 4), 0x20)] = (val); \ break; \ } \ Index: programs/Xserver/hw/xfree86/drivers/ark/ark.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ark/ark.h,v retrieving revision 1.2 diff -u -r1.2 ark.h --- programs/Xserver/hw/xfree86/drivers/ark/ark.h 23 Apr 2004 19:25:33 -0000 1.2 +++ programs/Xserver/hw/xfree86/drivers/ark/ark.h 21 Jul 2005 18:39:12 -0000 @@ -69,10 +69,10 @@ Bool ARKAccelInit(ScreenPtr pScreen); -#define rdinx(port, ind) (outb((port), (ind)), inb((port) + 1)) +#define rdinx(port, ind) (outb(NULL, (port), (ind)), inb(NULL, (port) + 1)) #define wrinx(port, ind, val) \ do { \ - outb((port), (ind)); outb((port) + 1, (val)); \ + outb(NULL ,(port), (ind)); outb(NULL, (port) + 1, (val)); \ } while(0) #define modinx(port, ind, mask, bits) \ do { \ Index: programs/Xserver/hw/xfree86/drivers/ark/ark_accel.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ark/ark_accel.c,v retrieving revision 1.4 diff -u -r1.4 ark_accel.c --- programs/Xserver/hw/xfree86/drivers/ark/ark_accel.c 11 Jul 2005 02:29:44 -0000 1.4 +++ programs/Xserver/hw/xfree86/drivers/ark/ark_accel.c 21 Jul 2005 18:39:12 -0000 @@ -52,7 +52,7 @@ IOADDRESS port = pScrn->domainIOBase + 0x3cb; for (;;) { - if (!(inb(port) & 0x40)) + if (!(inb(&pScrn->device, port) & 0x40)) break; } } Index: programs/Xserver/hw/xfree86/drivers/ark/ark_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ark/ark_driver.c,v retrieving revision 1.5 diff -u -r1.5 ark_driver.c --- programs/Xserver/hw/xfree86/drivers/ark/ark_driver.c 11 Jul 2005 02:29:44 -0000 1.5 +++ programs/Xserver/hw/xfree86/drivers/ark/ark_driver.c 21 Jul 2005 18:39:13 -0000 @@ -386,9 +386,9 @@ pARK->PciInfo->func); /* unlock CRTC[0-7] */ - outb(hwp->PIOOffset + hwp->IOBase + 4, 0x11); - tmp = inb(hwp->PIOOffset + hwp->IOBase + 5); - outb(hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f); + outb(&pScrn->device, hwp->PIOOffset + hwp->IOBase + 4, 0x11); + tmp = inb(&pScrn->device, hwp->PIOOffset + hwp->IOBase + 5); + outb(&pScrn->device, hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f); modinx(hwp->PIOOffset + 0x3c4, 0x1d, 0x01, 0x01); /* use membase's later on ??? */ @@ -431,9 +431,9 @@ { int man_id, dev_id; - inb(hwp->PIOOffset + 0x3c6); /* skip cmd register */ - man_id = inb(hwp->PIOOffset + 0x3c6); /* manufacturer id */ - dev_id = inb(hwp->PIOOffset + 0x3c6); /* device id */ + inb(&pScrn->device, hwp->PIOOffset + 0x3c6); /* skip cmd register */ + man_id = inb(&pScrn->device, hwp->PIOOffset + 0x3c6); /* manufacturer id */ + dev_id = inb(&pScrn->device, hwp->PIOOffset + 0x3c6); /* device id */ if (man_id == 0x84 && dev_id == 0x98) { pARK->ramdac = ZOOMDAC; pARK->dac_width = 16; @@ -1139,40 +1139,40 @@ ARKFreeRec(pScrn); } - +/* Needs a pScrn or BusRec... */ static unsigned char get_daccomm(IOADDRESS isaIOBase) { unsigned char tmp; - outb(isaIOBase + 0x3c8, 0); - inb(isaIOBase + 0x3c6); - inb(isaIOBase + 0x3c6); - inb(isaIOBase + 0x3c6); - inb(isaIOBase + 0x3c6); - tmp = inb(isaIOBase + 0x3c6); - outb(isaIOBase + 0x3c8, 0); + outb(NULL, isaIOBase + 0x3c8, 0); + inb(NULL, isaIOBase + 0x3c6); + inb(NULL, isaIOBase + 0x3c6); + inb(NULL, isaIOBase + 0x3c6); + inb(NULL, isaIOBase + 0x3c6); + tmp = inb(NULL, isaIOBase + 0x3c6); + outb(NULL, isaIOBase + 0x3c8, 0); return tmp; } - +/* Same here (see above) */ static unsigned char set_daccom(IOADDRESS isaIOBase, unsigned char comm) { #if 0 - outb(isaIOBase + 0x3c8, 0); + outb(NULL, isaIOBase + 0x3c8, 0); #else - inb(isaIOBase + 0x3c8); + inb(NULL, isaIOBase + 0x3c8); #endif - inb(isaIOBase + 0x3c6); - inb(isaIOBase + 0x3c6); - inb(isaIOBase + 0x3c6); - inb(isaIOBase + 0x3c6); - outb(isaIOBase + 0x3c6, comm); + inb(NULL, isaIOBase + 0x3c6); + inb(NULL, isaIOBase + 0x3c6); + inb(NULL, isaIOBase + 0x3c6); + inb(NULL, isaIOBase + 0x3c6); + outb(NULL, isaIOBase + 0x3c6, comm); #if 0 - outb(isaIOBase + 0x3c8, 0); + outb(NULL, isaIOBase + 0x3c8, 0); #else - inb(isaIOBase + 0x3c8); + inb(NULL, isaIOBase + 0x3c8); #endif - return inb(isaIOBase + 0x3c6); + return inb(NULL, isaIOBase + 0x3c6); } Index: programs/Xserver/hw/xfree86/drivers/ati/atidac.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/atidac.h,v retrieving revision 1.3 diff -u -r1.3 atidac.h --- programs/Xserver/hw/xfree86/drivers/ati/atidac.h 21 Sep 2004 18:10:34 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/ati/atidac.h 21 Jul 2005 18:39:13 -0000 @@ -81,8 +81,8 @@ # define DACDelay \ do \ { \ - (void)inb(pATI->CPIO_DAC_WAIT); \ - (void)inb(pATI->CPIO_DAC_WAIT); \ + (void)inb(NULL, pATI->CPIO_DAC_WAIT); \ + (void)inb(NULL, pATI->CPIO_DAC_WAIT); \ } while (0) extern void ATISetDACIOPorts(ATIPtr, ATICRTCType); Index: programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h,v retrieving revision 1.4 diff -u -r1.4 atimach64io.h --- programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h 21 Sep 2004 18:10:34 -0000 1.4 +++ programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h 21 Jul 2005 18:39:13 -0000 @@ -134,14 +134,14 @@ pATI->CPIOBase) # define inr(_Register) \ - inl(ATIIOPort(_Register)) + inl(NULL, ATIIOPort(_Register)) # define outr(_Register, _Value) \ - outl(ATIIOPort(_Register), _Value) + outl(NULL, ATIIOPort(_Register), _Value) # define in8(_Register) \ - inb(ATIIOPort(_Register)) + inb(NULL, ATIIOPort(_Register)) # define out8(_Register, _Value) \ - outb(ATIIOPort(_Register), _Value) + outb(NULL, ATIIOPort(_Register), _Value) #endif /* AVOID_CPIO */ Index: programs/Xserver/hw/xfree86/drivers/ati/ativgaio.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/ativgaio.h,v retrieving revision 1.3 diff -u -r1.3 ativgaio.h --- programs/Xserver/hw/xfree86/drivers/ati/ativgaio.h 21 Sep 2004 18:10:34 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/ati/ativgaio.h 21 Jul 2005 18:39:13 -0000 @@ -40,14 +40,14 @@ /* Odds and ends to ease reading and writting of indexed registers */ #define GetReg(_Register, _Index) \ ( \ - outb(_Register, _Index), \ - inb((_Register) + 1) \ + outb(NULL, _Register, _Index), \ + inb(NULL, (_Register) + 1) \ ) #define PutReg(_Register, _Index, _Value) \ do \ { \ - outb(_Register, _Index); \ - outb((_Register) + 1, _Value); \ + outb(NULL, _Register, _Index); \ + outb((NULL, _Register) + 1, _Value); \ } while (0) #endif /* AVOID_CPIO */ Index: programs/Xserver/hw/xfree86/drivers/chips/ct_bank.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/chips/ct_bank.c,v retrieving revision 1.3 diff -u -r1.3 ct_bank.c --- programs/Xserver/hw/xfree86/drivers/chips/ct_bank.c 11 Jul 2005 02:29:46 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/chips/ct_bank.c 21 Jul 2005 18:39:15 -0000 @@ -186,10 +186,12 @@ CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); register unsigned char tmp; - outw(cPtr->PIOBase + 0x3D6, ((((bank << 3) & 0xFF) << 8) | 0x10)); - outb(cPtr->PIOBase + 0x3D6, 0x0C); - tmp = inb(cPtr->PIOBase + 0x3D7) & 0xEF; - outw(cPtr->PIOBase + 0x3D6, (((((bank >> 1) & 0x10) | tmp) << 8) | 0x0C)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 3) & 0xFF) << 8) | 0x10)); + outb(&pScreen->device, cPtr->PIOBase + 0x3D6, 0x0C); + tmp = inb(&pScreen->device, cPtr->PIOBase + 0x3D7) & 0xEF; + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + (((((bank >> 1) & 0x10) | tmp) << 8) | 0x0C)); #ifdef __arm32__ /* Must drain StrongARM write buffer on bank switch! */ @@ -209,10 +211,12 @@ CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); register unsigned char tmp; - outw(cPtr->PIOBase + 0x3D6, ((((bank << 3) & 0xFF) << 8) | 0x11)); - outb(cPtr->PIOBase + 0x3D6, 0x0C); - tmp = inb(cPtr->PIOBase + 0x3D7) & 0xBF; - outw(cPtr->PIOBase + 0x3D6, (((((bank << 1) & 0x40) | tmp) << 8) | 0x0C)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 3) & 0xFF) << 8) | 0x11)); + outb(&pScreen->device, cPtr->PIOBase + 0x3D6, 0x0C); + tmp = inb(&pScreen->device, cPtr->PIOBase + 0x3D7) & 0xBF; + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + (((((bank << 1) & 0x40) | tmp) << 8) | 0x0C)); #ifdef __arm32__ /* Must drain StrongARM write buffer on bank switch! */ @@ -231,11 +235,13 @@ CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); register unsigned char tmp; - outw(cPtr->PIOBase + 0x3D6, ((((bank << 3) & 0xFF) << 8) | 0x10)); - outw(cPtr->PIOBase + 0x3D6, ((((bank << 3) & 0xFF) << 8) | 0x11)); - outb(cPtr->PIOBase + 0x3D6, 0x0C); - tmp = inb(cPtr->PIOBase + 0x3D7) & 0xAF; - outw(cPtr->PIOBase + 0x3D6, + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 3) & 0xFF) << 8) | 0x10)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 3) & 0xFF) << 8) | 0x11)); + outb(&pScreen->device, cPtr->PIOBase + 0x3D6, 0x0C); + tmp = inb(&pScreen->device, cPtr->PIOBase + 0x3D7) & 0xAF; + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, (((((bank << 1) & 0x40) | ((bank >> 1) & 0x10) | tmp) << 8) | 0x0C)); #ifdef __arm32__ @@ -255,10 +261,12 @@ CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); register unsigned char tmp; - outw(cPtr->PIOBase + 0x3D6, ((((bank << 5) & 0xFF) << 8) | 0x10)); - outb(cPtr->PIOBase + 0x3D6, 0x0C); - tmp = inb(cPtr->PIOBase + 0x3D7) & 0xEF; - outw(cPtr->PIOBase + 0x3D6, (((((bank << 1) & 0x10) | tmp) << 8) | 0x0C)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 5) & 0xFF) << 8) | 0x10)); + outb(&pScreen->device, cPtr->PIOBase + 0x3D6, 0x0C); + tmp = inb(&pScreen->device, cPtr->PIOBase + 0x3D7) & 0xEF; + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + (((((bank << 1) & 0x10) | tmp) << 8) | 0x0C)); #ifdef __arm32__ /* Must drain StrongARM write buffer on bank switch! */ @@ -277,10 +285,12 @@ CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); register unsigned char tmp; - outw(cPtr->PIOBase + 0x3D6, ((((bank << 5) & 0xFF) << 8) | 0x11)); - outb(cPtr->PIOBase + 0x3D6, 0x0C); - tmp = inb(cPtr->PIOBase + 0x3D7) & 0xBF; - outw(cPtr->PIOBase + 0x3D6, (((((bank << 3) & 0x40) | tmp) << 8) | 0x0C)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 5) & 0xFF) << 8) | 0x11)); + outb(&pScreen->device, cPtr->PIOBase + 0x3D6, 0x0C); + tmp = inb(&pScreen->device, cPtr->PIOBase + 0x3D7) & 0xBF; + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + (((((bank << 3) & 0x40) | tmp) << 8) | 0x0C)); #ifdef __arm32__ /* Must drain StrongARM write buffer on bank switch! */ @@ -299,11 +309,13 @@ CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); register unsigned char tmp; - outw(cPtr->PIOBase + 0x3D6, ((((bank << 5) & 0xFF) << 8) | 0x10)); - outw(cPtr->PIOBase + 0x3D6, ((((bank << 5) & 0xFF) << 8) | 0x11)); - outb(cPtr->PIOBase + 0x3D6, 0x0C); - tmp = inb(cPtr->PIOBase + 0x3D7) & 0xAF; - outw(cPtr->PIOBase + 0x3D6, + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 5) & 0xFF) << 8) | 0x10)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 5) & 0xFF) << 8) | 0x11)); + outb(&pScreen->device, cPtr->PIOBase + 0x3D6, 0x0C); + tmp = inb(&pScreen->device, cPtr->PIOBase + 0x3D7) & 0xAF; + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, (((((bank << 3) & 0x40) | ((bank << 1) & 0x10) | tmp) << 8) | 0x0C)); #ifdef __arm32__ @@ -322,7 +334,8 @@ { CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); - outw(cPtr->PIOBase + 0x3D6, (((bank & 0x7F) << 8) | 0x0E)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + (((bank & 0x7F) << 8) | 0x0E)); #ifdef __arm32__ /* Must drain StrongARM write buffer on bank switch! */ @@ -340,7 +353,8 @@ { CHIPSPtr cPtr = CHIPSPTR(xf86Screens[pScreen->myNum]); - outw(cPtr->PIOBase + 0x3D6, ((((bank << 2) & 0x7F) << 8) | 0x0E)); + outw(&pScreen->device, cPtr->PIOBase + 0x3D6, + ((((bank << 2) & 0x7F) << 8) | 0x0E)); #ifdef __arm32__ /* Must drain StrongARM write buffer on bank switch! */ Index: programs/Xserver/hw/xfree86/drivers/chips/ct_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/chips/ct_driver.c,v retrieving revision 1.12 diff -u -r1.12 ct_driver.c --- programs/Xserver/hw/xfree86/drivers/chips/ct_driver.c 11 Jul 2005 02:29:46 -0000 1.12 +++ programs/Xserver/hw/xfree86/drivers/chips/ct_driver.c 21 Jul 2005 18:39:18 -0000 @@ -986,8 +986,8 @@ * This function has the only direct register access in the C&T driver. * All other register access through functions to allow for full MMIO. */ - outb(0x3D6, 0x00); - tmp = inb(0x3D7); + outb(NULL, 0x3D6, 0x00); + tmp = inb(NULL, 0x3D7); switch (tmp & 0xF0) { case 0x70: /* CT65520 */ @@ -1017,11 +1017,11 @@ break; default: if (tmp == 0x2C) { - outb(0x3D6, 0x01); - tmp = inb(0x3D7); + outb(NULL, 0x3D6, 0x01); + tmp = inb(NULL, 0x3D7); if (tmp != 0x10) break; - outb(0x3D6, 0x02); - tmp = inb(0x3D7); + outb(NULL, 0x3D6, 0x02); + tmp = inb(NULL, 0x3D7); switch (tmp) { case 0xE0: /* CT65550 */ found = CHIPS_CT65550; break; @@ -1034,8 +1034,8 @@ case 0xC0: /* CT69000 */ found = CHIPS_CT69000; break; case 0x30: /* CT69030 */ - outb(0x3D6, 0x03); - tmp = inb(0x3D7); + outb(NULL, 0x3D6, 0x03); + tmp = inb(NULL, 0x3D7); if (tmp == 0xC) found = CHIPS_CT69030; break; @@ -1049,12 +1049,12 @@ } /* We only want ISA/VL Bus - so check for PCI Bus */ if(found > CHIPS_CT65548) { - outb(0x3D6, 0x08); - tmp = inb(0x3D7); + outb(NULL, 0x3D6, 0x08); + tmp = inb(NULL, 0x3D7); if(tmp & 0x01) found = -1; } else if(found > CHIPS_CT65535) { - outb(0x3D6, 0x01); - tmp = inb(0x3D7); + outb(NULL, 0x3D6, 0x01); + tmp = inb(NULL, 0x3D7); if ((tmp & 0x07) == 0x06) found = -1; } return found; @@ -6719,7 +6719,7 @@ /* set the clock */ chipsClockLoad(pScrn, &ChipsReg->Clock); /* chipsClockLoad() sets this so we don't want vgaHWRestore() change it */ - VgaReg->MiscOutReg = inb(cPtr->PIOBase + 0x3CC); + VgaReg->MiscOutReg = inb(&pScrn->device, cPtr->PIOBase + 0x3CC); /* set extended regs */ chipsRestoreExtendedRegs(pScrn, ChipsReg); Index: programs/Xserver/hw/xfree86/drivers/chips/ct_regs.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/chips/ct_regs.c,v retrieving revision 1.3 diff -u -r1.3 ct_regs.c --- programs/Xserver/hw/xfree86/drivers/chips/ct_regs.c 11 Jul 2005 02:29:46 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/chips/ct_regs.c 21 Jul 2005 18:39:19 -0000 @@ -120,67 +120,67 @@ void chipsStdWriteXR(CHIPSPtr cPtr, CARD8 index, CARD8 value) { - outb(cPtr->PIOBase + CHIPS_XR_INDEX, index); - outb(cPtr->PIOBase + CHIPS_XR_DATA, value); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_XR_INDEX, index); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_XR_DATA, value); } static CARD8 chipsStdReadXR(CHIPSPtr cPtr, CARD8 index) { - outb(cPtr->PIOBase + CHIPS_XR_INDEX, index); - return inb(cPtr->PIOBase + CHIPS_XR_DATA); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_XR_INDEX, index); + return inb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_XR_DATA); } static void chipsStdWriteFR(CHIPSPtr cPtr, CARD8 index, CARD8 value) { - outb(cPtr->PIOBase + CHIPS_FR_INDEX, index); - outb(cPtr->PIOBase + CHIPS_FR_DATA, value); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_FR_INDEX, index); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_FR_DATA, value); } static CARD8 chipsStdReadFR(CHIPSPtr cPtr, CARD8 index) { - outb(cPtr->PIOBase + CHIPS_FR_INDEX, index); - return inb(cPtr->PIOBase + CHIPS_FR_DATA); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_FR_INDEX, index); + return inb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_FR_DATA); } static void chipsStdWriteMR(CHIPSPtr cPtr, CARD8 index, CARD8 value) { - outb(cPtr->PIOBase + CHIPS_MR_INDEX, index); - outb(cPtr->PIOBase + CHIPS_MR_DATA, value); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_MR_INDEX, index); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_MR_DATA, value); } static CARD8 chipsStdReadMR(CHIPSPtr cPtr, CARD8 index) { - outb(cPtr->PIOBase + CHIPS_MR_INDEX, index); - return inb(cPtr->PIOBase + CHIPS_MR_DATA); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_MR_INDEX, index); + return inb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_MR_DATA); } static void chipsStdWriteMSS(CHIPSPtr cPtr, vgaHWPtr hwp, CARD8 value) { - outb(cPtr->PIOBase + CHIPS_MSS, value); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_MSS, value); } static CARD8 chipsStdReadMSS(CHIPSPtr cPtr) { - return inb(cPtr->PIOBase + CHIPS_MSS); + return inb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_MSS); } static void chipsStdWriteIOSS(CHIPSPtr cPtr, CARD8 value) { - outb(cPtr->PIOBase + CHIPS_IOSS, value); + outb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_IOSS, value); } static CARD8 chipsStdReadIOSS(CHIPSPtr cPtr) { - return inb(cPtr->PIOBase + CHIPS_IOSS); + return inb(cPtr->PciInfo->pciid, cPtr->PIOBase + CHIPS_IOSS); } void Index: programs/Xserver/hw/xfree86/drivers/chips/util/modClock.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/chips/util/modClock.c,v retrieving revision 1.2 diff -u -r1.2 modClock.c --- programs/Xserver/hw/xfree86/drivers/chips/util/modClock.c 23 Apr 2004 19:27:51 -0000 1.2 +++ programs/Xserver/hw/xfree86/drivers/chips/util/modClock.c 21 Jul 2005 18:39:19 -0000 @@ -224,58 +224,58 @@ SET_IOPL(); - idx = inb(0x3D6); + idx = inb(NULL, 0x3D6); if (IS_HiQV(ChipType)) { if (IS_MemClk(ClockType)) { printf ("XRCC = 0x%02X\n", M - 2); printf ("XRCD = 0x%02X\n", N - 2); printf ("XRCE = 0x%02X\n", (0x80 | (P * 16 + (PSN == 1)))); - outb(0x3D6, 0xCE); /* Select Fix MClk before */ - tmp = inb(0x3D7); - outb(0x3D7, tmp & 0x7F); - outb(0x3D6, 0xCC); - outb(0x3D7, (M - 2)); - outb(0x3D6, 0xCD); - outb(0x3D7, (N - 2)); - outb(0x3D6, 0xCE); - outb(0x3D7, (0x80 | (P * 16 + (PSN == 1)))); + outb(NULL, 0x3D6, 0xCE); /* Select Fix MClk before */ + tmp = inb(NULL, 0x3D7); + outb(NULL, 0x3D7, tmp & 0x7F); + outb(NULL, 0x3D6, 0xCC); + outb(NULL, 0x3D7, (M - 2)); + outb(NULL, 0x3D6, 0xCD); + outb(NULL, 0x3D7, (N - 2)); + outb(NULL, 0x3D6, 0xCE); + outb(NULL, 0x3D7, (0x80 | (P * 16 + (PSN == 1)))); } else { printf ("XR%X = 0x%02X\n", 0xC0 + 4 * ProgClock, M - 2); printf ("XR%X = 0x%02X\n", 0xC1 + 4 * ProgClock, N - 2); printf ("XR%X = 0x%02X\n", 0xC2 + 4 * ProgClock, 0); printf ("XR%X = 0x%02X\n", 0xC3 + 4 * ProgClock, P * 16 + (PSN == 1)); - outb(0x3D6, 0xC0 + 4 * ProgClock); - outb(0x3D7, (M - 2)); - outb(0x3D6, 0xC1 + 4 * ProgClock); - outb(0x3D7, (N - 2)); - outb(0x3D6, 0xC2 + 4 * ProgClock); - outb(0x3D7, 0x0); - outb(0x3D6, 0xC3 + 4 * ProgClock); - outb(0x3D7, (P * 16 + (PSN == 1))); + outb(NULL, 0x3D6, 0xC0 + 4 * ProgClock); + outb(NULL, 0x3D7, (M - 2)); + outb(NULL, 0x3D6, 0xC1 + 4 * ProgClock); + outb(NULL, 0x3D7, (N - 2)); + outb(NULL, 0x3D6, 0xC2 + 4 * ProgClock); + outb(NULL, 0x3D7, 0x0); + outb(NULL, 0x3D6, 0xC3 + 4 * ProgClock); + outb(NULL, 0x3D7, (P * 16 + (PSN == 1))); } } else { printf ("XR30 = 0x%02X\n", P * 2 + (PSN == 1)); printf ("XR31 = 0x%02X\n", M - 2); printf ("XR32 = 0x%02X\n", N - 2); - outb(0x3D6, 0x33); - tmp = inb(0x3D7); + outb(NULL, 0x3D6, 0x33); + tmp = inb(NULL, 0x3D7); if (IS_MemClk(ClockType)) { - outb(0x3D7, tmp | 0x20); + outb(NULL, 0x3D7, tmp | 0x20); } else { - outb(0x3D7, tmp & ~0x20); + outb(NULL, 0x3D7, tmp & ~0x20); } - outb(0x3D6, 0x30); - outb(0x3D7, (P * 2 + (PSN == 1))); - outb(0x3D6, 0x31); - outb(0x3D7, (M - 2)); - outb(0x3D6, 0x32); - outb(0x3D7, (N - 2)); - outb(0x3D6, 0x33); - outb(0x3D7, tmp); + outb(NULL, 0x3D6, 0x30); + outb(NULL, 0x3D7, (P * 2 + (PSN == 1))); + outb(NULL, 0x3D6, 0x31); + outb(NULL, 0x3D7, (M - 2)); + outb(NULL, 0x3D6, 0x32); + outb(NULL, 0x3D7, (N - 2)); + outb(NULL, 0x3D6, 0x33); + outb(NULL, 0x3D7, tmp); } - outb(0x3D6, idx); + outb(NULL, 0x3D6, idx); RESET_IOPL(); return 0; } @@ -286,8 +286,8 @@ SET_IOPL(); - outb(0x3D6, 0x00); - temp = inb(0x3D7); + outb(NULL, 0x3D6, 0x00); + temp = inb(NULL, 0x3D7); ChipType = 0; if (temp != 0xA5) { if ((temp & 0xF0) == 0x70) { @@ -324,8 +324,8 @@ /* At this point the chip could still be a HiQV, so check for * that. This test needs some looking at */ if ((temp != 0) && (ChipType == 0)) { - outb(0x3D6, 0x02); - temp = inb(0x03D7); + outb(NULL, 0x3D6, 0x02); + temp = inb(NULL, 0x03D7); if (temp == 0xE0) { ChipType = CT65550; } Index: programs/Xserver/hw/xfree86/int10/helper_exec.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/int10/helper_exec.c,v retrieving revision 1.4 diff -u -r1.4 helper_exec.c --- programs/Xserver/hw/xfree86/int10/helper_exec.c 3 Jul 2005 07:01:28 -0000 1.4 +++ programs/Xserver/hw/xfree86/int10/helper_exec.c 21 Jul 2005 18:39:22 -0000 @@ -323,7 +323,7 @@ } #endif /* __NOT_YET__ */ } else { - val = inb(Int10Current->ioBase + port); + val = inb(NULL, Int10Current->ioBase + port); #ifdef PRINT_PORT ErrorF(" inb(%#x) = %2.2x\n", port, val); #endif @@ -345,7 +345,7 @@ (void)getsecs(&sec, &usec); val = (CARD16)(usec / 3); } else { - val = inw(Int10Current->ioBase + port); + val = inw(NULL, Int10Current->ioBase + port); } #ifdef PRINT_PORT ErrorF(" inw(%#x) = %4.4x\n", port, val); @@ -382,7 +382,7 @@ #ifdef PRINT_PORT ErrorF(" outb(%#x, %2.2x)\n", port, val); #endif - outb(Int10Current->ioBase + port, val); + outb(NULL, Int10Current->ioBase + port, val); } } @@ -393,7 +393,7 @@ ErrorF(" outw(%#x, %4.4x)\n", port, val); #endif - outw(Int10Current->ioBase + port, val); + outw(NULL, Int10Current->ioBase + port, val); } CARD32 @@ -402,7 +402,7 @@ CARD32 val; if (!pciCfg1in(port, &val)) - val = inl(Int10Current->ioBase + port); + val = inl(NULL, Int10Current->ioBase + port); #ifdef PRINT_PORT ErrorF(" inl(%#x) = %8.8x\n", port, val); @@ -418,7 +418,7 @@ #endif if (!pciCfg1out(port, val)) - outl(Int10Current->ioBase + port, val); + outl(NULL, Int10Current->ioBase + port, val); } CARD8 @@ -522,18 +522,18 @@ LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { xf86SetCurrentAccess(FALSE, xf86Screens[pInt->scrnIndex]); - vga->save_msr = inb(pInt->ioBase + 0x03CC); - vga->save_vse = inb(pInt->ioBase + 0x03C3); + vga->save_msr = inb(NULL, pInt->ioBase + 0x03CC); + vga->save_vse = inb(NULL, pInt->ioBase + 0x03C3); #ifndef __ia64__ - vga->save_46e8 = inb(pInt->ioBase + 0x46E8); + vga->save_46e8 = inb(NULL, pInt->ioBase + 0x46E8); #endif - vga->save_pos102 = inb(pInt->ioBase + 0x0102); - outb(pInt->ioBase + 0x03C2, ~(CARD8)0x03 & vga->save_msr); - outb(pInt->ioBase + 0x03C3, ~(CARD8)0x01 & vga->save_vse); + vga->save_pos102 = inb(NULL, pInt->ioBase + 0x0102); + outb(NULL, pInt->ioBase + 0x03C2, ~(CARD8)0x03 & vga->save_msr); + outb(NULL, pInt->ioBase + 0x03C3, ~(CARD8)0x01 & vga->save_vse); #ifndef __ia64__ - outb(pInt->ioBase + 0x46E8, ~(CARD8)0x08 & vga->save_46e8); + outb(NULL, pInt->ioBase + 0x46E8, ~(CARD8)0x08 & vga->save_46e8); #endif - outb(pInt->ioBase + 0x0102, ~(CARD8)0x01 & vga->save_pos102); + outb(NULL, pInt->ioBase + 0x0102, ~(CARD8)0x01 & vga->save_pos102); xf86SetCurrentAccess(TRUE, xf86Screens[pInt->scrnIndex]); } @@ -541,12 +541,12 @@ UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { xf86SetCurrentAccess(FALSE, xf86Screens[pInt->scrnIndex]); - outb(pInt->ioBase + 0x0102, vga->save_pos102); + outb(NULL, pInt->ioBase + 0x0102, vga->save_pos102); #ifndef __ia64__ - outb(pInt->ioBase + 0x46E8, vga->save_46e8); + outb(NULL, pInt->ioBase + 0x46E8, vga->save_46e8); #endif - outb(pInt->ioBase + 0x03C3, vga->save_vse); - outb(pInt->ioBase + 0x03C2, vga->save_msr); + outb(NULL, pInt->ioBase + 0x03C3, vga->save_vse); + outb(NULL, pInt->ioBase + 0x03C2, vga->save_msr); xf86SetCurrentAccess(TRUE, xf86Screens[pInt->scrnIndex]); } Index: programs/Xserver/hw/xfree86/loader/loaderProcs.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v retrieving revision 1.2 diff -u -r1.2 loaderProcs.h --- programs/Xserver/hw/xfree86/loader/loaderProcs.h 3 Jul 2005 07:01:29 -0000 1.2 +++ programs/Xserver/hw/xfree86/loader/loaderProcs.h 21 Jul 2005 18:39:22 -0000 @@ -89,13 +89,15 @@ ModuleDescPtr LoadModule(const char *, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); +#ifndef OUT_OF_LOADER ModuleDescPtr LoadSubModule(ModuleDescPtr, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent); -void LoadFont(FontModule *); +void LoadFont(FontModulePtr); void UnloadModule(ModuleDescPtr); void UnloadSubModule(ModuleDescPtr); +#endif void UnloadDriver(ModuleDescPtr); void FreeModuleDesc(ModuleDescPtr mod); ModuleDescPtr NewModuleDesc(const char *); Index: programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v retrieving revision 1.5 diff -u -r1.5 ix86Pci.c --- programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c 3 Jul 2005 07:01:30 -0000 1.5 +++ programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c 21 Jul 2005 18:39:23 -0000 @@ -288,7 +288,7 @@ xf86MsgVerb(X_INFO, 2, "PCI: Probing config type using method 1\n"); - oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG); + oldVal1 = inl(NULL, PCI_CFGMECH1_ADDRESS_REG); #ifdef DEBUGPCI if (xf86Verbose > 2) { @@ -317,16 +317,16 @@ ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV; ix86Pci0.funcs = &ix86Funcs1; - outl(PCI_CFGMECH1_ADDRESS_REG, PCI_EN); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, PCI_EN); #if 0 /* * This seems to cause some Neptune-based PCI machines to switch * from config type 1 to config type 2 */ - outb(PCI_CFGMECH1_ADDRESS_REG + 3, 0); + outb(NULL, PCI_CFGMECH1_ADDRESS_REG + 3, 0); #endif - mode1Res1 = inl(PCI_CFGMECH1_ADDRESS_REG); + mode1Res1 = inl(NULL, PCI_CFGMECH1_ADDRESS_REG); #ifdef DEBUGPCI if (xf86Verbose > 2) { @@ -336,7 +336,7 @@ } #endif - outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, oldVal1); if (mode1Res1) { @@ -380,8 +380,8 @@ ErrorF("\tWriting 0xff000001 to MODE1_ADDR_REG\n"); } #endif - outl(PCI_CFGMECH1_ADDRESS_REG, 0xff000001); - mode1Res2 = inl(PCI_CFGMECH1_ADDRESS_REG); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, 0xff000001); + mode1Res2 = inl(NULL, PCI_CFGMECH1_ADDRESS_REG); #ifdef DEBUGPCI if (xf86Verbose > 2) { @@ -391,7 +391,7 @@ } #endif - outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, oldVal1); if ((mode1Res2 & 0x80000001) == 0x80000000) { @@ -436,15 +436,15 @@ (unsigned long)mode1Res2); /* Try config type 2 */ - oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG); + oldVal2 = inb(NULL, PCI_CFGMECH2_ENABLE_REG); if ((oldVal2 & 0xf0) == 0) { ix86Pci0.configMech = PCI_CFG_MECH_2; ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV; ix86Pci0.funcs = &ix86Funcs2; - outb(PCI_CFGMECH2_ENABLE_REG, 0x0e); - mode2Res1 = inb(PCI_CFGMECH2_ENABLE_REG); - outb(PCI_CFGMECH2_ENABLE_REG, oldVal2); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, 0x0e); + mode2Res1 = inb(NULL, PCI_CFGMECH2_ENABLE_REG); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, oldVal2); if (mode2Res1 == 0x0e) { if (ix86PciBusCheck()) { @@ -463,10 +463,10 @@ xf86MsgVerb(X_INFO, 2, "PCI: Probing config type using method 2\n"); - outb(PCI_CFGMECH2_ENABLE_REG, 0x00); - outb(PCI_CFGMECH2_FORWARD_REG, 0x00); - mode2Res1 = inb(PCI_CFGMECH2_ENABLE_REG); - mode2Res2 = inb(PCI_CFGMECH2_FORWARD_REG); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, 0x00); + outb(NULL, PCI_CFGMECH2_FORWARD_REG, 0x00); + mode2Res1 = inb(NULL, PCI_CFGMECH2_ENABLE_REG); + mode2Res2 = inb(NULL, PCI_CFGMECH2_FORWARD_REG); if (mode2Res1 == 0 && mode2Res2 == 0) { xf86MsgVerb(X_INFO, 2, "PCI: Config type is 2\n"); @@ -476,10 +476,10 @@ return; } - oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG); - outl(PCI_CFGMECH1_ADDRESS_REG, PCI_EN); - mode1Res1 = inl(PCI_CFGMECH1_ADDRESS_REG); - outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1); + oldVal1 = inl(NULL, PCI_CFGMECH1_ADDRESS_REG); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, PCI_EN); + mode1Res1 = inl(NULL, PCI_CFGMECH1_ADDRESS_REG); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, oldVal1); if (mode1Res1 == PCI_EN) { xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n"); ix86Pci0.configMech = PCI_CFG_MECH_1; @@ -566,9 +566,9 @@ #endif addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg); - outl(PCI_CFGMECH1_ADDRESS_REG, addr); - data = inl(PCI_CFGMECH1_DATA_REG); - outl(PCI_CFGMECH1_ADDRESS_REG, 0); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, addr); + data = inl(NULL, PCI_CFGMECH1_DATA_REG); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, 0); #ifdef DEBUGPCI ErrorF("ix86PciReadLong 0x%lx\n", data); @@ -591,11 +591,11 @@ enable = PCI_ENABLE_FROM_TAG(Tag); addr = PCI_ADDR_FROM_TAG_CFG2(Tag,reg); - outb(PCI_CFGMECH2_ENABLE_REG, enable); - outb(PCI_CFGMECH2_FORWARD_REG, forward); - data = inl((CARD16)addr); - outb(PCI_CFGMECH2_ENABLE_REG, 0); - outb(PCI_CFGMECH2_FORWARD_REG, 0); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, enable); + outb(NULL, PCI_CFGMECH2_FORWARD_REG, forward); + data = inl(NULL, (CARD16)addr); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, 0); + outb(NULL, PCI_CFGMECH2_FORWARD_REG, 0); #ifdef DEBUGPCI ErrorF("ix86PciReadLong 0x%lx\n", data); @@ -617,9 +617,9 @@ CARD32 addr; addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg); - outl(PCI_CFGMECH1_ADDRESS_REG, addr); - outl(PCI_CFGMECH1_DATA_REG, data); - outl(PCI_CFGMECH1_ADDRESS_REG, 0); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, addr); + outl(NULL, PCI_CFGMECH1_DATA_REG, data); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, 0); } static void @@ -632,11 +632,11 @@ enable = PCI_ENABLE_FROM_TAG(Tag); addr = PCI_ADDR_FROM_TAG_CFG2(Tag,reg); - outb(PCI_CFGMECH2_ENABLE_REG, enable); - outb(PCI_CFGMECH2_FORWARD_REG, forward); - outl((CARD16)addr, data); - outb(PCI_CFGMECH2_ENABLE_REG, 0); - outb(PCI_CFGMECH2_FORWARD_REG, 0); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, enable); + outb(NULL, PCI_CFGMECH2_FORWARD_REG, forward); + outl(NULL, (CARD16)addr, data); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, 0); + outb(NULL, PCI_CFGMECH2_FORWARD_REG, 0); } static void @@ -656,11 +656,11 @@ #endif addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg); - outl(PCI_CFGMECH1_ADDRESS_REG, addr); - data = inl(PCI_CFGMECH1_DATA_REG); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, addr); + data = inl(NULL, PCI_CFGMECH1_DATA_REG); data = (data & ~mask) | (val & mask); - outl(PCI_CFGMECH1_DATA_REG, data); - outl(PCI_CFGMECH1_ADDRESS_REG, 0); + outl(NULL, PCI_CFGMECH1_DATA_REG, data); + outl(NULL, PCI_CFGMECH1_ADDRESS_REG, 0); } static void @@ -677,13 +677,13 @@ enable = PCI_ENABLE_FROM_TAG(Tag); addr = PCI_ADDR_FROM_TAG_CFG2(Tag,reg); - outb(PCI_CFGMECH2_ENABLE_REG, enable); - outb(PCI_CFGMECH2_FORWARD_REG, forward); - data = inl((CARD16)addr); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, enable); + outb(NULL, PCI_CFGMECH2_FORWARD_REG, forward); + data = inl(NULL, (CARD16)addr); data = (data & ~mask) | (val & mask); - outl((CARD16)addr, data); - outb(PCI_CFGMECH2_ENABLE_REG, 0); - outb(PCI_CFGMECH2_FORWARD_REG, 0); + outl(NULL, (CARD16)addr, data); + outb(NULL, PCI_CFGMECH2_ENABLE_REG, 0); + outb(NULL, PCI_CFGMECH2_FORWARD_REG, 0); } void Index: programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v retrieving revision 1.5 diff -u -r1.5 lnx_io.c --- programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c 3 Jul 2005 07:01:32 -0000 1.5 +++ programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c 21 Jul 2005 18:39:23 -0000 @@ -205,18 +205,18 @@ } timeout = KBC_TIMEOUT; - while (((inb(0x64) & 2) == 2) && --timeout) + while (((inb(NULL, 0x64) & 2) == 2) && --timeout) usleep(1000); /* wait */ if (timeout == 0) return; - outb(0x60, 0xf3); /* set typematic rate */ - while (((inb(0x64) & 2) == 2) && --timeout) + outb(NULL, 0x60, 0xf3); /* set typematic rate */ + while (((inb(NULL, 0x64) & 2) == 2) && --timeout) usleep(1000); /* wait */ usleep(10000); - outb(0x60, value); + outb(NULL, 0x60, value); #endif /* __alpha__ || __i386__ || __ia64__ */ } Index: programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v retrieving revision 1.8 diff -u -r1.8 lnx_kbd.c --- programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c 3 Jul 2005 07:01:32 -0000 1.8 +++ programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c 21 Jul 2005 18:39:24 -0000 @@ -243,18 +243,18 @@ } timeout = KBC_TIMEOUT; - while (((inb(0x64) & 2) == 2) && --timeout) + while (((inb(NULL, 0x64) & 2) == 2) && --timeout) usleep(1000); /* wait */ if (timeout == 0) return; - outb(0x60, 0xf3); /* set typematic rate */ - while (((inb(0x64) & 2) == 2) && --timeout) + outb(NULL, 0x60, 0xf3); /* set typematic rate */ + while (((inb(NULL, 0x64) & 2) == 2) && --timeout) usleep(1000); /* wait */ usleep(10000); - outb(0x60, value); + outb(NULL, 0x60, value); #endif /* __alpha__ || __i386__ || __ia64__ */ } Index: programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c,v retrieving revision 1.4 diff -u -r1.4 SlowBcopy.c --- programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c 3 Jul 2005 07:01:34 -0000 1.4 +++ programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c 21 Jul 2005 18:39:24 -0000 @@ -37,7 +37,7 @@ !defined(__powerpc__) && \ !defined(__mips__) && \ !defined(__ia64__) - outb(0x80, 0x00); + outb(NULL, 0x80, 0x00); /* what is this, a delay? */ #endif } } Index: programs/Xserver/hw/xfree86/vgahw/vgaHW.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c,v retrieving revision 1.9 diff -u -r1.9 vgaHW.c --- programs/Xserver/hw/xfree86/vgahw/vgaHW.c 3 Jul 2005 08:53:48 -0000 1.9 +++ programs/Xserver/hw/xfree86/vgahw/vgaHW.c 21 Jul 2005 18:39:25 -0000 @@ -159,67 +159,67 @@ static void stdWriteCrtc(vgaHWPtr hwp, CARD8 index, CARD8 value) { - outb(hwp->IOBase + hwp->PIOOffset + VGA_CRTC_INDEX_OFFSET, index); - outb(hwp->IOBase + hwp->PIOOffset + VGA_CRTC_DATA_OFFSET, value); + outb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_CRTC_INDEX_OFFSET, index); + outb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_CRTC_DATA_OFFSET, value); } static CARD8 stdReadCrtc(vgaHWPtr hwp, CARD8 index) { - outb(hwp->IOBase + hwp->PIOOffset + VGA_CRTC_INDEX_OFFSET, index); - return inb(hwp->IOBase + hwp->PIOOffset + VGA_CRTC_DATA_OFFSET); + outb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_CRTC_INDEX_OFFSET, index); + return inb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_CRTC_DATA_OFFSET); } static void stdWriteGr(vgaHWPtr hwp, CARD8 index, CARD8 value) { - outb(hwp->PIOOffset + VGA_GRAPH_INDEX, index); - outb(hwp->PIOOffset + VGA_GRAPH_DATA, value); + outb(NULL, hwp->PIOOffset + VGA_GRAPH_INDEX, index); + outb(NULL, hwp->PIOOffset + VGA_GRAPH_DATA, value); } static CARD8 stdReadGr(vgaHWPtr hwp, CARD8 index) { - outb(hwp->PIOOffset + VGA_GRAPH_INDEX, index); - return inb(hwp->PIOOffset + VGA_GRAPH_DATA); + outb(NULL, hwp->PIOOffset + VGA_GRAPH_INDEX, index); + return inb(NULL, hwp->PIOOffset + VGA_GRAPH_DATA); } static void stdWriteSeq(vgaHWPtr hwp, CARD8 index, CARD8 value) { - outb(hwp->PIOOffset + VGA_SEQ_INDEX, index); - outb(hwp->PIOOffset + VGA_SEQ_DATA, value); + outb(NULL, hwp->PIOOffset + VGA_SEQ_INDEX, index); + outb(NULL, hwp->PIOOffset + VGA_SEQ_DATA, value); } static CARD8 stdReadSeq(vgaHWPtr hwp, CARD8 index) { - outb(hwp->PIOOffset + VGA_SEQ_INDEX, index); - return inb(hwp->PIOOffset + VGA_SEQ_DATA); + outb(NULL, hwp->PIOOffset + VGA_SEQ_INDEX, index); + return inb(NULL, hwp->PIOOffset + VGA_SEQ_DATA); } static CARD8 stdReadST00(vgaHWPtr hwp) { - return inb(hwp->PIOOffset + VGA_IN_STAT_0); + return inb(NULL, hwp->PIOOffset + VGA_IN_STAT_0); } static CARD8 stdReadST01(vgaHWPtr hwp) { - return inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); + return inb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); } static CARD8 stdReadFCR(vgaHWPtr hwp) { - return inb(hwp->PIOOffset + VGA_FEATURE_R); + return inb(NULL, hwp->PIOOffset + VGA_FEATURE_R); } static void stdWriteFCR(vgaHWPtr hwp, CARD8 value) { - outb(hwp->IOBase + hwp->PIOOffset + VGA_FEATURE_W_OFFSET,value); + outb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_FEATURE_W_OFFSET,value); } static void @@ -230,9 +230,9 @@ else index |= 0x20; - (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); - outb(hwp->PIOOffset + VGA_ATTR_INDEX, index); - outb(hwp->PIOOffset + VGA_ATTR_DATA_W, value); + (void) inb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); + outb(NULL, hwp->PIOOffset + VGA_ATTR_INDEX, index); + outb(NULL, hwp->PIOOffset + VGA_ATTR_DATA_W, value); } static CARD8 @@ -243,85 +243,85 @@ else index |= 0x20; - (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); - outb(hwp->PIOOffset + VGA_ATTR_INDEX, index); - return inb(hwp->PIOOffset + VGA_ATTR_DATA_R); + (void) inb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); + outb(NULL, hwp->PIOOffset + VGA_ATTR_INDEX, index); + return inb(NULL, hwp->PIOOffset + VGA_ATTR_DATA_R); } static void stdWriteMiscOut(vgaHWPtr hwp, CARD8 value) { - outb(hwp->PIOOffset + VGA_MISC_OUT_W, value); + outb(NULL, hwp->PIOOffset + VGA_MISC_OUT_W, value); } static CARD8 stdReadMiscOut(vgaHWPtr hwp) { - return inb(hwp->PIOOffset + VGA_MISC_OUT_R); + return inb(NULL, hwp->PIOOffset + VGA_MISC_OUT_R); } static void stdEnablePalette(vgaHWPtr hwp) { - (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); - outb(hwp->PIOOffset + VGA_ATTR_INDEX, 0x00); + (void) inb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); + outb(NULL, hwp->PIOOffset + VGA_ATTR_INDEX, 0x00); hwp->paletteEnabled = TRUE; } static void stdDisablePalette(vgaHWPtr hwp) { - (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); - outb(hwp->PIOOffset + VGA_ATTR_INDEX, 0x20); + (void) inb(NULL, hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET); + outb(NULL, hwp->PIOOffset + VGA_ATTR_INDEX, 0x20); hwp->paletteEnabled = FALSE; } static void stdWriteDacMask(vgaHWPtr hwp, CARD8 value) { - outb(hwp->PIOOffset + VGA_DAC_MASK, value); + outb(NULL, hwp->PIOOffset + VGA_DAC_MASK, value); } static CARD8 stdReadDacMask(vgaHWPtr hwp) { - return inb(hwp->PIOOffset + VGA_DAC_MASK); + return inb(NULL, hwp->PIOOffset + VGA_DAC_MASK); } static void stdWriteDacReadAddr(vgaHWPtr hwp, CARD8 value) { - outb(hwp->PIOOffset + VGA_DAC_READ_ADDR, value); + outb(NULL, hwp->PIOOffset + VGA_DAC_READ_ADDR, value); } static void stdWriteDacWriteAddr(vgaHWPtr hwp, CARD8 value) { - outb(hwp->PIOOffset + VGA_DAC_WRITE_ADDR, value); + outb(NULL, hwp->PIOOffset + VGA_DAC_WRITE_ADDR, value); } static void stdWriteDacData(vgaHWPtr hwp, CARD8 value) { - outb(hwp->PIOOffset + VGA_DAC_DATA, value); + outb(NULL, hwp->PIOOffset + VGA_DAC_DATA, value); } static CARD8 stdReadDacData(vgaHWPtr hwp) { - return inb(hwp->PIOOffset + VGA_DAC_DATA); + return inb(NULL, hwp->PIOOffset + VGA_DAC_DATA); } static CARD8 stdReadEnable(vgaHWPtr hwp) { - return inb(hwp->PIOOffset + VGA_ENABLE); + return inb(NULL, hwp->PIOOffset + VGA_ENABLE); } static void stdWriteEnable(vgaHWPtr hwp, CARD8 value) { - outb(hwp->PIOOffset + VGA_ENABLE, value); + outb(NULL, hwp->PIOOffset + VGA_ENABLE, value); } void Index: programs/Xserver/hw/xfree86/vgahw/vgaHW.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.h,v retrieving revision 1.8 diff -u -r1.8 vgaHW.h --- programs/Xserver/hw/xfree86/vgahw/vgaHW.h 3 Jul 2005 08:53:48 -0000 1.8 +++ programs/Xserver/hw/xfree86/vgahw/vgaHW.h 21 Jul 2005 18:39:25 -0000 @@ -165,7 +165,7 @@ } vgaHWRec; /* Some macros that VGA drivers can use in their ChipProbe() function */ -#define VGAHW_GET_IOBASE() ((inb(VGA_MISC_OUT_R) & 0x01) ? \ +#define VGAHW_GET_IOBASE() ((inb(NULL, VGA_MISC_OUT_R) & 0x01) ? \ VGA_IOBASE_COLOR : VGA_IOBASE_MONO) #define OVERSCAN 0x11 /* Index of OverScan register */ @@ -185,8 +185,8 @@ #else #define DACDelay(hw) \ do { \ - (void)inb((hw)->PIOOffset + (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ - (void)inb((hw)->PIOOffset + (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ + (void)inb(NULL, (hw)->PIOOffset + (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ + (void)inb(NULL, (hw)->PIOOffset + (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ } while (0) #endif Index: programs/Xserver/hw/xfree86/xf4bpp/vgaImages.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/xf4bpp/vgaImages.c,v retrieving revision 1.3 diff -u -r1.3 vgaImages.c --- programs/Xserver/hw/xfree86/xf4bpp/vgaImages.c 3 Jul 2005 07:01:41 -0000 1.3 +++ programs/Xserver/hw/xfree86/xf4bpp/vgaImages.c 21 Jul 2005 18:39:25 -0000 @@ -388,11 +388,11 @@ /* Setup VGA Registers */ #ifndef PC98_EGC SetVideoGraphicsIndex( Graphics_ModeIndex ) ; -tmpc = inb( GraphicsDataRegister ); +tmpc = inb(NULL, GraphicsDataRegister ); SetVideoGraphicsData( tmpc & ~0x8 ) ; /* Clear the bit */ SetVideoGraphicsIndex( Read_Map_SelectIndex ) ; #else -outw(EGC_MODE, 0x0800); +outw(NULL, EGC_MODE, 0x0800); #endif skip = BIT_OFFSET( x ) ; Index: programs/Xserver/hw/xfree86/xf4bpp/vgaReg.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/xf4bpp/vgaReg.h,v retrieving revision 1.3 diff -u -r1.3 vgaReg.h --- programs/Xserver/hw/xfree86/xf4bpp/vgaReg.h 3 Jul 2005 07:01:41 -0000 1.3 +++ programs/Xserver/hw/xfree86/xf4bpp/vgaReg.h 21 Jul 2005 18:39:25 -0000 @@ -24,7 +24,7 @@ /* $XConsortium: vgaReg.h /main/4 1996/02/21 17:59:02 kaleb $ */ -#define SET_BYTE_REGISTER( ioport, value ) outb( ioport, value ) +#define SET_BYTE_REGISTER( ioport, value ) outb(NULL, ioport, value ) #define SET_INDEX_REGISTER( ioport, value ) SET_BYTE_REGISTER( ioport, value ) #define SET_DATA_REGISTER( ioport, value ) SET_BYTE_REGISTER( ioport, value ) /* GJA -- deleted RTIO and ATRIO case here, so that a PCIO #define became