summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
Commit message (Collapse)AuthorAgeFilesLines
* - Move some macros from icu.h into atpic.c as that is the only place theyjhb2004-05-112-61/+19
| | | | | | | | are used. - Reduce duplication of a couple of macros removing the duplicates from ich.h. - Remove unused macros from icu.h as well as locore protection as this header is no longer included in assembly sources.
* Trim unused includes.jhb2004-05-113-8/+0
|
* - Simplify the sizeof expression in the CTASSERT() for NUM_ISA_IRQS.jhb2004-05-101-3/+3
| | | | | | - Fixup grammar in a comment. Submitted by: bde (1)
* Fixed PC98 support.nyan2004-05-061-0/+31
| | | | | - Disable an ELCR on PC98. - Correct IRQs.
* - Add a new pic method pic_config_intr() to set the trigger mode andjhb2004-05-041-1/+60
| | | | | | | | | | | | | | polarity for a specified IRQ. The intr_config_intr() function wraps this pic method hiding the IRQ to interrupt source lookup. - Add a config_intr() method to the atpic(4) driver that reconfigures the interrupt using the ELCR if possible and returns an error otherwise. - Add a config_intr() method to the apic(4) driver that just logs any requests that would change the existing programming under bootverbose. Currently, the only changes the apic(4) driver receives are due to bugs in the acpi(4) driver and its handling of link devices, hence the reason for such requests currently being ignored. - Have the nexus(4) driver on i386 implement the bus_config_intr() function by calling intr_config_intr().
* - Add a member to the atpic interrupt source structures to indicate if thejhb2004-05-041-5/+51
| | | | | | | | | | | | | | | | IRQ is edge triggered or level triggered. For ISA interrupts, we assume that edge triggered interrupts are always active high and that level triggered interrupts are always active low. - Don't disable an edge triggered interrupt in the PIC. This avoids outb instructions to the actual PIC for traditional ISA IRQs such as IRQ 1, 6, 14, and 15. (Fast interrupts such as IRQs 0 and 8 don't mask their source, so this doesn't change anything for them.) - For MCA systems we assume that all interrupts are level triggered and thus need masking. Otherwise, we probe the ELCR. If it exists we trust what it tells us regarding which interrupts are level triggered. If it does not exist, we assume that IRQs 0, 1, 2, and 8 are edge triggered and that all other IRQs are level triggered and need masking. - Instruct the ELCR mini-driver to restore its saved state during resume.
* Add a simple mini-driver for the ELCR register. Originally, the ELCRjhb2004-05-041-0/+143
| | | | | | | | | | | | | | | register controlled the trigger mode and polarity of EISA interrupts. However, it appears that most (all?) PCI systems use the ELCR to manage the trigger mode and polarity of ISA interrupts as well since ISA IRQs used to route PCI interrupts need to be level triggered with active low polarity. We check to see if the ELCR exists by sanity checking the value we get back ensuring that IRQS 0 (8254), 1 (atkbd), 2 (the link from the slave PIC), and 8 (RTC) are all clear indicating edge trigger and active high polarity. This mini-driver will be used by the atpic driver to manage the trigger and polarity of ISA IRQs. Also, the mptable parsing code will use this mini driver rather than examining the ELCR directly.
* - Add an IMEN_MASK macro that returns the 8-bit bitmask of an atpicjhb2004-05-031-8/+16
| | | | | | | | interrupt source. - Only do an outb() to the PIC to clear a bit in imen if the bit is set. - Add a NUM_ISA_IRQS macro to replace uglier 'sizeof(array) / sizeof(member)' expressions along with a CTASSERT() to ensure that the macro is correct.
* Remove old cy driver files. They have been repo-copied to sys/dev/cy andbde2004-05-023-3283/+0
| | | | sys/dev/ic and adjusted to work there.
* - The i8254 uses IRQ 0, not IRQ 8. Correct i8254_intsrc to reference thejhb2004-04-271-4/+6
| | | | | | | | correct interrupt source. - Cache a pointer to the i8254_intsrc's pending method to avoid several pointer indirections in i8254_get_timecount(). Reported by: bde
* Use BSD spelling vs. SysV.obrien2004-04-191-1/+1
|
* Use %eax rather than %ax when loading segment registers to avoid partialjhb2004-04-161-6/+6
| | | | | | register stalls. Reviewed by: bde (a while ago, and I think an earlier version)
* Remove advertising clause from University of California Regent'simp2004-04-079-36/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* The bs driver was replaced with the ct(pc98) driver. takahashi-sanimp2004-04-0711-5588/+0
| | | | (nyan) says this driver is now obsolete and can be removed.
* Converted the isa probe and attach to new-bus so that this driver worksbde2004-04-051-45/+81
| | | | | | | | | | | | | | | | | | | | | without the (defunct) isa compatibility shims. The new-bus-specific parts are very similar to the ones for the pci probe and attach. This was held up too long waiting for a repo copy to src/sys/dev/cy, so I decided to fix the files in their old place. This gives easier to read and merge diffs anyway. The "count" line in src/sys/conf/files won't be changed until after the repo copy, so old kernel configs that specify a count need not be (and must not be) changed until then. The count is just ignored in the driver. One unfinished detail is dynamic allocation of arrays with <count> and (<count> * 32) entries, and iteration over the arrays. This is now kludged with a fixed count of 10 (up to 10 cards with up to 32 ports each). Prodded by: imp Submitted by: mostly by imp Approved by: imp
* Moved initialization of the lock from the (isa) probe function to thebde2004-04-051-6/+6
| | | | | | | common attach function so that the lock gets initialized in all cases. This fixes breakage of the initialization of the lock in the pci case in rev.1.135 (between the releases of 5.1 and 5.2). The lock is only used in the SMP case, so this bug was not always fatal.
* Removed a vestige of the stl driver.bde2004-03-181-312/+0
|
* remove stale comment since these limits have been increased YEARS ago...jmg2004-03-171-3/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-174-6/+5
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Remove isa compat stuff.imp2004-03-143-444/+0
| | | | | | | Only cy, bs and wd in the tree still use it. I have a replacement for cy that I need to test on ISA and PCI cards. bs and wd are pc98 only drivers that appear to no longer be necessary. I'll be removing them when I hear back from the pc98 people.
* The gsc driver uses the old COMPAT_ISA api. Retire it so we canimp2004-03-142-916/+0
| | | | | retire the COMPAT_ISA shims. If someone were to redo this driver with the new APIs and test it, it can return.
* The rdp driver uses the COMPAT_OLD api. This is being retired, soimp2004-03-142-1583/+0
| | | | | | this driver is being retired. Remove it from the tree. If someone wants to update it to the latest APIs and can test the hardware, it can return to the tree.
* The spigot driver uses the old COMPAT_ISA interface. Retire it sinceimp2004-03-141-287/+0
| | | | | that's going away soon. Should someone reimplement it using modern APIs and can test the driver, it can return.
* The le driver uses ISA_COMPAT, which is going away soon. Retire itimp2004-03-144-2320/+0
| | | | | and releated files. If someone wants to fix it to use the new APIs and test it, it can be brought back.
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-143-9/+0
|
* stl and stli use the old COMPAT_ISA api. slt also uses the really oldimp2004-03-143-7458/+0
| | | | | | | | COMPAT_PCI api. This API is going away, so this driver is going away also. If users are interested in updating this, please contact the author since he has some preliminary work to move this to newer APIs.
* Remove straggler from gp driver removalimp2004-03-141-27/+0
|
* Remove gp driver. It uses the old COMPAT_ISA shims.imp2004-03-142-1209/+0
| | | | If this driver is rewritten using newer APIs it can return.
* Remove ctx driver. another scanner. This one uses COMPAT_ISA shimsimp2004-03-142-496/+0
| | | | | | which is going away soon. If someone updates this to the latest APIs and tests it, it can return.
* Remove asc driver, support for GI1904 based hand scanners. Thisimp2004-03-142-966/+0
| | | | | | | driver uses COMPAT_ISA shims, and those shims are going away. It can be brought back if someone updates it to the latest APIs, and moves it to the appropriate place in the tree.
* Remove wt driver. It still uses COMPAT_ISA_DRIVER which is going awayimp2004-03-142-1109/+0
| | | | | | very soon. Users needing this driver should update it to a newer API.
* These are changes to allow to use the Intel C/C++ compiler (lang/icc)trhodes2004-03-122-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild
* Device megapatch 4/6:phk2004-02-2113-5/+26
| | | | | | | | 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 3/6:phk2004-02-214-13/+0
| | | | | | | | | | | | Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures.
* Device megapatch 1/6:phk2004-02-2114-26/+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.
* Fixed a misplaced ifdef that prevented npx.c building without "device isa"bde2004-02-131-1/+1
| | | | | | | | | ISA. npx has few isa dependencies, but it does unconditional outb()'s to the isa bus in the !SMP case, and it attaches to isa if "device isa" is configured in order to support PNP-ISA. The ifdef for the latter was misplaced. PR: 62595
* Fix a typo in kan's last commit: cnavaiable() -> cnavailable()roam2004-02-051-1/+1
|
* Eliminate global cons_unavailable flag and replace it by the statuskan2004-02-053-4/+7
| | | | | bit maintained on a per-device basis. Single variable is inadequate on machines running with multiple consoles enabled.
* Revert the skipping of segment register reloads as it appears to actuallyjhb2004-02-031-4/+1
| | | | | be a pessimization on non Pentium4 CPUs. More importantly, it is buggy as it can cause GPF's when using APM or vm86.
* Optimize the i386 interrupt entry code to not reload the segment registersjhb2004-01-281-1/+4
| | | | | | | if they already contain the correct kernel selectors. Reviewed by: peter Suggested by: peter
* Fix a long-standing bug that had been introduced in rev 1.24 with thejoerg2004-01-071-1/+4
| | | | | | replacement of struct proc by struct thread. This bug could cause a NULL pointer dereferencation under certain circumstances (e. g. while running /etc/rc.d/pcvt).
* - Use i8259A register defines from shared sys/dev/ic/i8259.h rather thanjhb2004-01-062-67/+20
| | | | | | from the i386-specific icu.h. - Replace PC98 magic numbers with equivalent register define values along with comments about PC-98 "quirks".
* First part of the removal of drivers for hardware that isn't relevantimp2003-12-071-633/+0
| | | | | | | | | | | | or whose drivers haven't even compiled for years. The loran hardware was very unique, and only a few copies of it ever existed. It used the old COMPAT_ISA_DRIVER and when the author was contacted, he indicated that he had no intention of ever updating this driver and it was no longer relevant to the FreeBSD world and can be removed without impact to anybody. Approved by: phk
* Remove cx in its old location.imp2003-12-034-3199/+0
| | | | Approved by: re@ <scottl>
* Fixed breakage of the pci case of the cy driver by the new interruptbde2003-12-021-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | code. Both the driver and the new code were wrong. Driver interrupt handlers are supposed to take "void *vsc" arg, but some including all COMPAT_ISA drivers and the pci part of the cy driver want an "int unit" arg. They got this using bogus casts of function pointers which should have kept working despite their bogusness. However, the new interrupt code doesn't honor requests to pass an arg of ((void *)0), so things are very broken if the arg is actually a representation of unit 0. The fix is to use a normal "void *vsc" arg for the pci case and a wrapper for the COMPAT_ISA case (of the cy driver). This cleans up new-busification of the pci case but takes the COMPAT_ISA case a little further from new-bus. The corresponding bug for the COMPAT_ISA case has already been fixed similarly using a wrapper in compat_isa.c and we need another wrapper just to undo that. Fixed some directly related style bugs (mainly by removing compatibility cruft). cy.c: Fixed an indirectly related old bug in cyattach_common(). A wrong status was returned in the unlikely event that malloc() failed. Approved by: re (scottl)
* Add a special check for a stray IRQ 7 or IRQ 15 to see if it is actuallyjhb2003-11-191-0/+22
| | | | | | | a spurious interrupt from one of the 8259As. If so, don't log it as a stray IRQ, but just silently ignore it. Approved by: re (rwatson)
* - Add counts to the ATPIC interrupt sources and point the ATPIC interruptjhb2003-11-191-6/+17
| | | | | | | | | | | source count pointers at them so that intr_execute_handlers() won't choke when it tries to handle an unregisterd ATPIC interrupt source. - Install the low-level ATPIC interrupt handlers when we first program the ATPIC in atpic_startup() rather than at SI_SUB_INTR. This is only necessary to work around buggy code that enables interrupts too early in the boot process (namely, the vm86 code). Approved by: re (rwatson)
* Restored the call to schedsofttty() (now spelled swi_sched(...)) again.bde2003-11-161-14/+19
| | | | | | | | Its restoration in rev.1.102 was mistranslated to the equivalent of setsofttty() in rev.1.105. This increased overheads by causing a context switch to the SWI handler after almost every interrupt. The increase was approx. 50% on a Celeron 366 (from 23 usec to 34 usec per interrupt).
* Localized the cy driver's locking.bde2003-11-161-23/+20
|
* Always install IDT entries for ATPIC interrupt sources. The APIC nojhb2003-11-141-10/+3
| | | | | | | longer uses these interrupt vectors for its ISA interrupt pins, so these entries will not be overwritten. If we get a spurious interrupt from the ATPIC when using the APIC, it will be treated as a stray interrupt instead of causing a panic.
OpenPOWER on IntegriCloud