summaryrefslogtreecommitdiffstats
path: root/sys/isa
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused FDNUMTOUNIT() macrophk2004-02-291-2/+0
|
* Make mode setting with fdcontrol(8) stick.phk2004-02-251-182/+61
| | | | Recognize when configured for "auto".
* Device megapatch 4/6:phk2004-02-213-1/+6
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-212-4/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Workaround some ACPI BIOSen which break the IO port into multiplenjl2004-02-151-1/+35
| | | | | | | | | | | | | resources. (Note that the correct range is 0x3f7,0x3f0-0x3f5.) Such devices will be detected as follows: fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 To do this, we find the minimum and maximum start addresses for the resources and use them as the base for the IO and control ports. Help from: jhb
* Significantly reduce the "jitter" that is typical for PS/2 micealfred2003-12-111-110/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when using a KVM. There is no actual solution possible, but this gets us pretty close. Typically when switching back to a FreeBSD box and moving the mouse wild data is produced, because the protocol's validation/checksum system is extremely weak it is impossible to determine that we're out of sync before dropping several bogus packets to user land. The actual solution that appears to offer the best clamping of jitter is to buffer the mouse packets if we've not seen mouse activity for more than .5 seconds. Then waiting to flush that data for 1/20th of a second. If within that 20th of a second we get any packets that do fail the weak test we drop the entire queue and back off accepting data from the mouse for 2 seconds and then repeat the whole deal. You can still get _some_ jitter, notably if you switch to the FreeBSD box, then move the mouse just enough to generate one or two packets. Those packets may be bogus, but may still pass the validity check. One way to finally kill the problem once and for all is to check the initial packets for "wild" values. Typically one sees packets in the +/-60 range during normal operation, however when bogus data is generated it's typically near the outer range of +/-120 or more, those packets would be a good candidate for dropping or clamping. I've been running with this for several weeks now and it has significantly helped me stay sane even with a piece of junk Belkin KVM causing wild jitter each and every time I switch. Lastly I'd like to note that my experience with Windows shows me that somehow the Microsoft PS/2 driver typically avoids this problem, but that may only be possible when running the mouse in a dumb-ed down PS/2 mode that Belkin recommends on their site.
* Don't disable the TSC with statclock_disable.phk2003-11-131-9/+9
|
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-11-091-1/+1
| | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current
* New APIC support code:jhb2003-11-031-182/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The apic interrupt entry points have been rewritten so that each entry point can serve 32 different vectors. When the entry is executed, it uses one of the 32-bit ISR registers to determine which vector in its assigned range was triggered. Thus, the apic code can support 159 different interrupt vectors with only 5 entry points. - We now always to disable the local APIC to work around an errata in certain PPros and then re-enable it again if we decide to use the APICs to route interrupts. - We no longer map IO APICs or local APICs using special page table entries. Instead, we just use pmap_mapdev(). We also no longer export the virtual address of the local APIC as a global symbol to the rest of the system, but only in local_apic.c. To aid this, the APIC ID of each CPU is exported as a per-CPU variable. - Interrupt sources are provided for each intpin on each IO APIC. Currently, each source is given a unique interrupt vector meaning that PCI interrupts are not shared on most machines with an I/O APIC. That mapping for interrupt sources to interrupt vectors is up to the APIC enumerator driver however. - We no longer probe to see if we need to use mixed mode to route IRQ 0, instead we always use mixed mode to route IRQ 0 for now. This can be disabled via the 'NO_MIXED_MODE' kernel option. - The npx(4) driver now always probes to see if a built-in FPU is present since this test can now be performed with the new APIC code. However, an SMP kernel will panic if there is more than one CPU and a built-in FPU is not found. - PCI interrupts are now properly routed when using APICs to route interrupts, so remove the hack to psuedo-route interrupts when the intpin register was read. - The apic.h header was moved to apicreg.h and a new apicvar.h header that declares the APIs used by the new APIC code was added.
* Fix a panic that occurs when resuming. For some reason, sc->cur_scp isnjl2003-10-291-0/+4
| | | | | | NULL. Submitted by: Andrew Thompson <andy@fud.org.nz>
* Look at the equipment list for amd64 as well as i386 for autodetectingpeter2003-10-231-2/+2
| | | | floppy drives in the absence of hints.
* Eliminate use bio_blkno.phk2003-10-181-16/+10
|
* Change fb_attach() and fb_detach() to take a integer unit number ratherphk2003-09-261-1/+1
| | | | | | than a dev_t. All of the dev_t's passed were bogusly created with makedev()
* Per TRB vote: restore the aquire_timer0 and associated goo. This willimp2003-09-241-2/+146
| | | | | | | | be gone in FreeBSD 6, so put BURN_BRIDGES around it. The TRB also felt that if something better comes along sooner, it can be used to replace this code. Delayed by: BSDcon and subsequent disk crash.
* Pick up softc from dev_t rathern than through newbus gymnastics.phk2003-09-171-11/+12
|
* Since it is static these days, there is no reason to uppercase thephk2003-09-171-4/+4
| | | | first letter of fdopen() to avoid nameclashing with other stuff.
* Disable the use of cloning use in floppy and CD drivers.phk2003-09-111-6/+6
| | | | | | | | | | This commit puts the relevant code snippets under #ifdef GONE_IN_5 (rather than #ifndef BURN_BRIDGES) thereby disabling the code now. The code wil be entirely removed before 5.2 unless we find reasons why this would be a bad idea. Approach suggested by: imp
* clock.c:bde2003-09-071-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Quick fix for calling DELAY() for ddb input in some (atkbd-based) console drivers. ddb must not use any normal locks, but DELAY() normally calls getit() which needs clock_lock. One problem with using normal locks in ddb is that deadlock is possible, but deadlock on clock_lock is unlikely becaluse clock_lock is bogusly recursive, apparently just to hide the problem of ddb using it. The i8254 clock hardware has mostly write-only registers so it is important for it to use a lock that gives exclusive access. (atkbd hardware is also unfriendly to reentrant software but that problem is more local and already solved.) I mostly saw the symptoms of the bug caused by unlocking in getit() running cpu_unpend(). cpu_unpend() should not be called while in ddb and Debugger() calls for failing assertions about this caused a breakpoint within ddb. ddb must also not call getit() because ddb may be being used to step through clock initialization code that has stopped or otherwise mangled the clock. If the clock is stopped, then getit() always returns the same value and DELAY() takes forever if it trusts getit(). The quick fix is implement DELAY(n) as (n * timer_freq / 1000000) inb(0x84)'s if ddb is active. machdep.c: Don't permit recursion on clock_lock.
* Clean up some antique stuff. We do not support Weitek FPUs etc, and neverpeter2003-09-051-10/+0
| | | | did.
* Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.phk2003-09-051-3/+19
| | | | | | | | | | | For the floppy driver, use fdcontrol to manipulate density selection. For the CD drivers, the 'a' and 'c' suffix is without actual effect and any applications insisting on it can be satisfied with a symlink: ln -s /dev/cd0 /dev/cd0a Ongoing discussion may result in these pieces of code being removed before the 5-stable branch as opposed to after.
* Give timecounters a numeric quality field.phk2003-08-161-1/+2
| | | | | | | | | | | | | | | | A timecounter will be selected when registered if its quality is not negative and no less than the current timecounters. Add a sysctl to report all available timecounters and their qualities. Give the dummy timecounter a solid negative quality of minus a million. Give the i8254 zero and the ACPI 1000. The TSC gets 800, unless APM or SMP forces it negative. Other timecounters default to zero quality and thereby retain current selection behaviour.
* remove acquire_timer0() and release_timer0() and related stuff.phk2003-08-151-134/+2
|
* Dont initialize a TSC timecounter until we know if it is broken or not.phk2003-08-061-0/+1
|
* Add printer support to puc(4) driver.ambrisko2003-08-012-2431/+0
| | | | | | | | | | | - Move isa/ppc* to sys/dev/ppc (repo-copy) - Add an attachment method to ppc for puc - In puc we need to walk the chain of parents. Still to do, is to make ppc(4) & puc(4) work on other platforms. Testers wanted. PR: 38372 (in spirit done differently) Verified by: Make universe (if I messed up a platform please fix)
* Add support for the A4 Tech RFSW-35 mouse wheel. Probe is similar tomikeh2003-07-121-3/+10
| | | | | | 4D Plus. PR: 44333
* - Make the isab devclass global to allow for multiple ISA bridge drivers.jhb2003-07-082-0/+22
| | | | | | | - Factor out code common to all ISA bridge drivers attach methods into a isab_attach() function. - Rename the PCI-ISA bridge driver's attach function to pci_isab_attach() and have it call isab_attach().
* Reset the PSM aux device twice to help pierce through some KVM's tomikeh2003-07-071-0/+9
| | | | | | get the correct data from the attached mouse. Multiple resets should be harmless, but just in case, the second one is non-fatal and is just ignored.
* - Use the new resource_disabled() helper function to see if devices arejhb2003-07-024-8/+5
| | | | | | | | | | | | disabled. - Change the apm driver to match the acpi driver's behavior by checking to see if the device is disabled in the identify routine instead of in the probe routine. This way if the device is disabled it is never created. Note that a few places (ips(4), Alpha SMP) used "disable" instead of "disabled" for their hint names, and these hints must be changed to "disabled". If this is a big problem, resource_disabled() can always be changed to honor both names.
* Add PnP PS/2 id for Dell Latitude X200.mikeh2003-07-011-0/+1
| | | | | PR: 48516 MFC after: 2 weeks
* Force media autodetection if the device has lost its parameter table.yar2003-06-161-1/+7
| | | | | | | | | Previously, any normal I/O on an fdc(4) device would fail with ENXIO if the device had been opened in non-blocking mode and then closed prior to the conventional access; that would last until the floppy disk was ejected and re-inserted to raise the unit attention condition. Add a clarifying comment.
* If in non-blocking mode, return EAGAIN instead of ENXIOyar2003-06-161-1/+4
| | | | | | | on an I/O attempt. This is needed for consistency with the concept of the half-opened state of fdc(4). PR: kern/52338
* Always set bio_resid properly in fdstrategy(),yar2003-06-151-3/+2
| | | | | | | | | | as should every block device strategy routine. There was at least one evil consequence of not doing so: Some errors returned by fdstrategy() could be lost (EAGAIN, in particular.) PR: kern/52338 (in the audit-trail) Discussed with: bde
* Check whether the floppy type pointer has been set before tryingyar2003-06-151-0/+4
| | | | | | | | | | | | to access floppy parameters through it. Note: The DIOCGSECTORSIZE and DIOCGMEDIASIZE handlers withing fdioctl() couldn't be just moved to below the existing check for blocking mode because fd->ft can be non-NULL while still in non-blocking mode (fd->ft can be set with the FD_STYPE ioctl.) PR: kern/52338 No MFC: Not applicable to STABLE
* Use __FBSDID().obrien2003-06-1112-24/+36
|
* Use __FBSDID().obrien2003-06-021-1/+3
|
* wrap macro in do {...} while(0)phk2003-05-311-2/+2
|
* Remove unused variable(s).phk2003-05-311-6/+2
| | | | Found by: FlexeLint
* Remove break after return;phk2003-05-311-7/+0
| | | | Found by: FlexeLint
* Don't rely on boolean expression evaluating to 1 or 0 by default.phk2003-05-311-1/+1
| | | | Found by: FlexeLint
* Remove unused variable(s).phk2003-05-311-3/+3
| | | | | | Mark a non-critical memoryleak with XXX comment Found by: FlexeLint
* Remove unused variable.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* Remove extra ';'phk2003-05-311-1/+1
| | | | Found by: FlexeLint
* Only use the pc bios stuff on i386's. I think this might even be unusedpeter2003-05-011-0/+2
| | | | there too.
* Create a 'legacy' node for AMD64 as well as i386. While we'll neverpeter2003-04-301-1/+1
| | | | | | have to use it since all AMD64 machines are supposed to have acpi etc, I'm using it during development so I can avoid the acpi code for now. Yes, this is cheating.
* Fix some easy, global, lint warnings. In most cases, this meansmarkm2003-04-304-4/+4
| | | | | making some local variables static. In a couple of cases, this means removing an unused variable.
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-04-292-2/+2
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* Add a module version number.mdodd2003-04-151-0/+1
|
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-1/+1
| | | | | | | | Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate.
* Correct an argument to bus_alloc_resource().mdodd2003-03-251-2/+2
|
* - Add vm_paddr_t, a physical address type. This is required for systemsjake2003-03-251-1/+1
| | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
OpenPOWER on IntegriCloud