summaryrefslogtreecommitdiff
path: root/hw/xfree86/int10
AgeCommit message (Collapse)AuthorFilesLines
2011-10-15int10: Port internal users off xf86MapVidMemAdam Jackson2-7/+11
This API is apparently semi-deprecated even by XFree86 standards, and there are only four drivers left using it. Let's start chopping it off. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-10-15pci: Remove xf86MapDomainMemoryAdam Jackson1-5/+2
This is slightly draconian, but that API is just awful. In all but one case in the callers it's used to get a map of some legacy VGA memory, and it would be cleaner for the caller to just call pci_device_map_legacy. The sole exception is in the vesa driver, which uses it to avoid having to look up which device the BAR belongs to. That's similarly trivial to fix. Having done that, Linux's PCI layer is now very small indeed. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-10-15int10: Use pciaccess rom fetch for !PC machinesAdam Jackson1-57/+1
... instead of rolling our own, badly. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15pci: Deprecate the PCITAG typeAdam Jackson1-1/+1
It is kept around to help drivers through the API transition and will be removed at some point in the future. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15int10: Port to pciaccess' legacy IO APIAdam Jackson4-52/+52
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-09-21Merge remote-tracking branch 'mattst88/for-keith'Keith Packard1-16/+16
2011-09-21Silence printf format warnings in helper_exec.cMatt Turner1-16/+16
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-15int10: Delete #if 0'd implementation that's older than our git history.Jamey Sharp1-13/+1
Throughout the xserver git history, the generic portion of the int10 module has always used other methods for reading the video BIOS. For some time now it's been purely libpciaccess based. This commented-out use of xf86ReadBIOS is entirely superfluous. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-09-15Remove PC98 support.Jamey Sharp2-4/+1
Gaetan Nadon wrote: Alan Coopersmith wrote: "I think we recently dropped PC98 support from the X server, so I'd be okay with dropping the documentation now". Let's make them be right, shall we? Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Gaetan Nadon <memsize@videotron.ca> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-08int10: warning fixAdam Jackson1-1/+1
helper_exec.c: In function 'pciCfg1in': helper_exec.c:507:4: warning: passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer type /usr/include/pciaccess.h:153:5: note: expected 'uint32_t *' but argument is of type 'CARD32 *' Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-20xfree86: Convert some xf86BlockSIGIO to OsBlockSignalsAdam Jackson1-2/+3
The DDC1 and int10 code are blocking SIGIO to get some assurance that their usleep() calls take as long as they expect. That's a good start but you really want to be blocking more than just SIGIO, SIGALRM too at minimum. At this point, except for SIGIO handler setup itself, BlockSIGIO really means "block input events". Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-28Merge remote branch 'ajax/less-loader'Keith Packard1-22/+1
2010-09-22xfree86: Remove useless module setup functions where appropriateAdam Jackson1-22/+1
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-14xfree86: bus: move macros from common PCI header to private fileTiago Vignatti1-0/+5
Only int10/helper_exec.c is using them. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-10Record some additional library dependencies in xf86 modulesAlan Coopersmith1-0/+1
Helps with symbol resolution when building with -z defs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-05-26xfree86/int10/helper_mem: Fix log message.Jamey Sharp1-4/+1
Three years ago in commit f62beb6f3609e8b6e61325ac89017590811bbd07 ajax deleted the code that could have set this format string to anything else, so just use the format string literal. This makes GCC happy since it can check the argument types, which, by the way, weren't correct since this format string doesn't need any arguments. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov3-15/+15
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-15Fix builds with --with-int10=stubAlan Coopersmith1-0/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Adam Jackson <ajax@redhat.com>
2009-08-31xfree86: removal of some dead code due VGA arbiter's inclusionTiago Vignatti1-4/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-06-17xfree86: silence a few int10 compiler warnings.Peter Hutterer1-14/+14
'format ‘%#x’ expects type ‘unsigned int’, but argument 2 has type ‘CARD32’' and similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04Fix "warning: XXX defined but not used"Tomas Carnecky1-0/+2
generic.c:80: warning: ‘read_legacy_video_BIOS’ defined but not used Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04Fix "warning: unused variable XXX"Tomas Carnecky1-2/+1
events.c:4614: warning: unused variable ‘kbd’ xkbUtils.c:361: warning: unused variable ‘maxKeysPerMod’ xf86Events.c:409: warning: unused variable ‘ke’ generic.c:131: warning: unused variable ‘cs’ generic.c:130: warning: unused variable ‘size’ xf86RandR12.c:591: warning: unused variable ‘crtc’ Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade7-75/+78
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-30Remove declarations of symbols that are never defined.Paulo Cesar Pereira de Andrade1-1/+0
These symbols were removed from the X Server, or never declared. One symbol that may need special attention is XkbBuildCoreState(), that doesn't have a prototype anywhere, but is called from xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in include/xkbstr.h. fb/wfbrename.h also may need some cleanup, as it makes several "renames" of non existing symbols.
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade6-47/+47
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-11-28Make visible symbols required by xorg modules.Paulo Cesar Pereira de Andrade2-2/+2
This patch exports all symbols required by the compilable (in a x86 linux computer) xorg/driver/* modules. Still missing symbols worth mentioning are: sunleo miFindMaxBand no longer available intel (uxa/uxa-accel.c) fbShmPutImage no longer available (and should have been static) mga MGAGetClientPointer (should come from matrox's libhal) This is not a definitive "visibility" patch, as all it does is to export missing symbols, but the modules that current don't compile, may require more symbols once fixed, and third party drivers should also require more symbols exported. A "definitive" patch should export symbols defined in the sdk.
2008-11-27Export symbols required by the vesa and fbdev drivers.Paulo Cesar Pereira de Andrade3-12/+12
This is a minimal set of patches, to have an usable X Server when compiling it with symbols hidden by default.
2008-11-25Warning fixAdam Jackson1-0/+2
helper_exec.c: In function ‘port_rep_inb’: helper_exec.c:219: warning: implicit declaration of function ‘DEBUG_IO_TRACE’ helper_exec.c:219: warning: nested extern declaration of ‘DEBUG_IO_TRACE’
2008-11-24Bus: Remove ISA support.Adam Jackson1-13/+0
No, really. PCI is old enough to drive now. If you want this, get the kernel to expose a framebuffer device.
2008-10-14int10: Degrade the checksum warning to X_INFO.Adam Jackson1-1/+1
I've seen about one case in three years where this has actually been correlated with the real cause of failure, and we've trained people to freak out about X_WARNING, so let's be less alarmist.
2008-10-07int10: Fix a nasty memory leak.Adam Jackson1-0/+2
2008-10-07int10: Don't warn when scanning for devices we don't have.Adam Jackson1-7/+1
Some BIOSes (hi XGI!) will attempt to enumerate the PCI bus by asking for the config space of every possible device number. This despite perfectly functional BIOS methods to enumerate the bus exactly.
2008-10-07int10: Remove useless check.Adam Jackson1-7/+0
If you have more than one PCI device with the same d/b/d/f, you're already in trouble.
2008-10-06xalloc+memset(0) -> xcallocAdam Jackson1-3/+3
2008-08-18int10: Fix int1A for %ax == 0xB101.Adam Jackson1-1/+27
pciNumBuses was pretty much always 1 post-pciaccess. That ain't good.
2008-06-24Bug #11842: Fix emulation of int1A PCI BIOS services.Adam Jackson1-6/+6
Use only %di to name the PCI register to read/write, rather than %edi. DOS is only expecting the base PCI config space anyway, and the BIOS might be using the high bits of %edi.
2008-04-04Fix PCI config space cycles from int10 emulator.Adam Jackson1-1/+1
The top bit of 0xCF8 is an enable bit, not part of the domain. Sending cycles to domain 128 instead of domain 0 is rarely the right thing to do.
2008-03-13Bug #14332: Fix PCI access cycles from x86emu.Bart Trojanowski1-7/+50
The address written to 0xcf8 contains the PCI slot address to send the config cycle to. However, we would ignore that and always send the cycle to the device whose BIOS we were running. This breaks some integrated graphics platforms that have explicit knowledge about the system's host bridge, for example.
2008-03-01clean some "unused" warningsGeorge Sapountzis1-2/+0
2007-08-30Fixing a misleading comment which could suggest a GPL violation.Egbert Eich1-2/+2
The author of the int10 code looked at the VBIOS POSTing code in DOSEMU to get some initial idea on how to POST a VBIOS. To give credit to the DOSEMU Team for this inspiration a comment was added to the code which could suggest that code from the GPLed DOSEMU was directly incorporated into this code. This patch should clearify the situation.
2007-08-23Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into ↵Ian Romanick4-234/+91
pci-rework Conflicts: hw/xfree86/common/xf86.h hw/xfree86/common/xf86Init.c hw/xfree86/common/xf86pciBus.c hw/xfree86/int10/generic.c hw/xfree86/int10/helper_exec.c hw/xfree86/loader/xf86sym.c hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/Pci.h hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/os-support/linux/int10/linux.c
2007-07-27Remove all trace of Option "BiosLocation".Adam Jackson3-182/+27
This code was deeply dangerous. If anyone actually had a use for this code, we should find a better way of doing it.
2007-07-03Fix build when int10 doesn't use x86emu.Michel Dänzer1-0/+2
2007-07-02Make x86emu's I/O cycle tracing more useful.Adam Jackson1-58/+59
Print debug messages only when the appropriate debug bit is set in the 8086 state vector, so you can focus in on the call you're actually interested in.
2007-01-24Move xf86ReadLegacyBIOS to the one place that uses it.Ian Romanick1-1/+55
xf86ReadLegacyBIOS is only used by one function in int10/generic.c. Move a generic implementation of that function there, rename it to read_legcay_BIOS, and delete all remnants of it from all other places.
2007-01-15Convert to new pci_device_cfg_write_u* interface.Ian Romanick2-6/+6
2007-01-11Convert int10 and vgaHW to use 'struct pci_device' instead of PCITAG.Ian Romanick4-32/+12
Convert all uses of PCITAG in int10 and vgaHW to 'struct pci_device'. This allows the conversion of xf86ReadLegacyVideoBIOS and xf86MapDomainMemory to 'struct pci_device' from PCITAG.
2006-12-13Set Int10Current->Tag for the linux native int10 moduleAlan Hourihane1-1/+1
Fixes bug #9296 (cherry picked from 731952c561a3972d09d1315f4fd31466e459ccb9 commit)
2006-12-08Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver ↵Ian Romanick2-15/+20
into pci-rework Conflicts: hw/xfree86/common/xf86Configure.c hw/xfree86/common/xf86Helper.c hw/xfree86/common/xf86pciBus.c hw/xfree86/int10/helper_exec.c hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/os-support/linux/lnx_pci.c hw/xfree86/scanpci/Makefile.am hw/xfree86/utils/pcitweak/Makefile.am hw/xfree86/utils/scanpci/Makefile.am
2006-11-04Merge master back to randr-1.2Keith Packard2-10/+14