summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the mxcsr properly, so the initial value in a process isn'tdas2005-03-171-0/+10
| | | | just the value that was left over from some other application.
* Eleminate 3 PC98 ifdefs:imp2005-03-161-17/+5
| | | | | | | | o Use IP_NPX in preference to hard coded value to write 0 to clear busy# o Use md macro for a full reset of the npx o Use IRQ_NPX in preference to hard coded value for each platform. # The other two ifdefs in this file are hard to remove
* Define IRQ_NPX for the irq used for the npx. Define macro for a fullimp2005-03-161-0/+11
| | | | reset of of npx, as appropriate for the platform.
* bus_alloc_resource must obey the same rules asimp2005-03-161-1/+1
| | | | | | rman_resource_resournce_bound wrt end parameter. The end parameter here was the same as the start. However, it should be start + count - 1, so make it that instead.
* Whitespace sync with amd64. (Rather than re-add the extra blank linespeter2005-03-111-3/+0
| | | | on amd64, I'm removing them here)
* - Remove the BURN_BRIDGES marked support for hooking into the ISA timer 0jhb2005-03-091-144/+2
| | | | | | | | interrupt. - Remove the timer_func variable as it now has a static value of hardclock() and is only used in one place. Axe borrowed from: phk
* Allocate and map a 12k data buffer such that it is contiguous iniedowse2005-03-041-9/+21
| | | | | both the kernel and vm86 virtual address spaces. Use this to increase the maximum VESA save state size we can handle.
* netchild's mega-patch to isolate compiler dependencies into a centraljoerg2005-03-022-15/+11
| | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago
* Reduce the maximum supported save state size to 4k, as the 8k limitiedowse2005-03-011-3/+1
| | | | was not implemented correctly and needs further work.
* Add a missing bcopy() to make saving the VESA state actually work.iedowse2005-02-281-3/+13
| | | | | | | | | | Also save the DAC state, increase the maximum save state size from 4k to 8k, and refuse to save the VESA state if the BIOS reports it is larger than the maximum size we can handle. It doesn't appear that anything currently uses this code, but it turns out to be capable of restoring some notebook displays to a working state after a suspend-resume cycle.
* kill unused valuesam2005-02-251-1/+1
| | | | Noticed by: Coverity Prevent analysis tool
* Forced commit after moving mb86960.h from i386/isa/ic to dev/fe. Itimp2005-02-201-340/+0
| | | | is only used by the fe driver, and isn't MD.
* Use the local APIC timer to drive the various kernel clocks on SMP machinesjhb2005-02-081-19/+19
| | | | | | | | | | | | | | | | | | | | | | | rather than forwarding interrupts from the clock devices around using IPIs: - Add an IDT vector that pushes a clock frame and calls lapic_handle_timer(). - Add functions to program the local APIC timer including setting the divisor, and setting up the timer to either down a periodic countdown or one-shot countdown. - Add a lapic_setup_clock() function that the BSP calls from cpu_init_clocks() to setup the local APIC timer if it is going to be used. The setup uses a one-shot countdown to calibrate the timer. We then program the timer on each CPU to fire at a frequency of hz * 3. stathz is defined as freq / 23 (hz * 3 / 23), and profhz is defined as freq / 2 (hz * 3 / 2). This gives the clocks relatively prime divisors while keeping a low LCM for the frequency of the clock interrupts. Thanks to Peter Jeremy for suggesting this approach. - Remove the hardclock and statclock forwarding code including the two associated IPIs. The bitmap IPI handler has now effectively degenerated to just IPI_AST. - When the local APIC timer is used we don't turn the RTC on at all, but we still enable interrupts on the ISA timer 0 (i8254) for timecounting purposes.
* Since we are quite unlikely to ever face another platform whichphk2005-02-061-16/+13
| | | | | | | | | uses the i8237 without trying to emulate the PC architecture move the register definitions for the i8237 chip into the central include file for the chip, except for the PC98 case which is magic. Add new isa_dmatc() function which tells us as cheaply as possible if the terminal count has been reached for a given channel.
* Anytime we write to the RTC's status B register to possibly enablejhb2005-02-031-0/+3
| | | | | | | | | | | interrupts, read from the interrupt status register to clear any pending interrupts. Otherwise in some rare cases the RTC would never fire any interrupts as it constantly thinks it has an interrupt pending. PR: i386/17800 PR: kern/76776 Submitted by: Jose M. Alcaide jose at we dot lc dot ehu dot es MFC after: 2 weeks
* Tweak the ELCR support slightly. Explicitly probe the ELCR during bootjhb2005-01-182-12/+4
| | | | | | | | instead of burying that in the atpic(4) code as atpic(4) is not the only user of elcr(4). Change the elcr(4) code to export a global elcr_found variable that other code can check to see if a valid ELCR was found. MFC after: 1 month
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-0621-23/+26
|
* Get rid of #ifdef for legacy system. Move that into the MD code.imp2004-12-241-0/+7
| | | | Export minimal symbols to allow this to happen.
* Separate mse driver into a core driver and a bus attachments. Separate outimp2004-12-121-917/+0
| | | | | | | | | | | | | the ISA and CBUS (called isa on pc98) attachments. Eliminate all PC98 ifdefs in the process (the driver in pc98/pc98/mse.c was a copy of the one in i386/isa/mse.c with PC98 ifdefs). Create a module for this driver. I've tested this my PC-9821RaS40 with moused. I've not tested this on i386 because I have no InPort cards, or similar such things. NEC standardized on bus mice very early, long before ps/2 mice ports apeared, so all PC-98 machines supported by FreeBSD/pc98 have bus mice, I believe. Reviewed by: nyan-san
* Don't include sys/user.h merely for its side-effect of recursivelydas2004-11-271-1/+0
| | | | including other headers.
* pbio has moved to dev/pbioimp2004-11-111-463/+0
| | | | Prodded by: peter
* Add new function ttyinitmode() which sets our systemwide defaultphk2004-10-181-6/+1
| | | | | | | | | | | | | | modes on a tty structure. Both the ".init" and the current settings are initialized allowing the function to be used both at attach and open time. The function takes an argument to decide if echoing should be enabled. Echoing should not be enabled for regular physical serial ports unless they are consoles, in which case they should be configured by ttyconsolemode() instead. Use the new function throughout.
* Let nexus print our flags for us. Also, clean up an obfuscated if stmt.njl2004-10-141-10/+7
|
* Remove local hacks to set flags now that the device probe does this for us.njl2004-10-141-2/+1
| | | | | | | Tested on every device except sio_pci and the pc98 fd.c. Perhaps something similar should be done for the "disabled" hints also. MFC after: 2 weeks
* Fix conflicts I didn't fix before I committed my busspace changes.imp2004-10-111-4/+2
| | | | Noticed by: ru@ (and likely tinderbox, I haven't checked)
* Convert to newbus. (chances are we could now move this to dev/pbioimp2004-10-101-46/+61
| | | | | | since I believe it is now MI, but that hasn't been done yet). Reviewed by: dds
* style(9)obrien2004-10-091-57/+51
|
* Port pbio to HEAD.imp2004-10-071-0/+456
| | | | OK'd by: dds
* Add new a function isa_dma_init() which returns an errno when it failsphk2004-09-151-13/+11
| | | | | | | | | and which takes a M_WAITOK/M_NOWAIT flag argument. Add compatibility isa_dmainit() macro which whines loudly if isa_dma_init() fails. Problem uncovered by: tegge
* Remove now unused #include files.phk2004-09-151-52/+0
|
* Optimize intr_execute_handlers() by combining the pic_disable_source() andscottl2004-08-021-21/+50
| | | | | | | | | | | | | | pic_eoi_source() into one call. This halves the number of spinlock operations and indirect function calls in the normal case of handling a normal (ithread) interrupt. Optimize the atpic and ioapic drivers to use inlines where appropriate in supporting the intr_execute_handlers() change. This knocks 900ns, or roughly 1350 cycles, off of the time spent servicing an interrupt in the common case on my 1.5GHz P4 uniprocessor system. SMP systems likely won't see as much of a gain due to the ioapic being more efficient than the atpic. I'll investigate porting this to amd64 soon. Reviewed by: jhb
* Preparation commit for the tty cleanups that will follow in the nearphk2004-07-151-1/+1
| | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming.
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-1/+1
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Partially revert previous commit. Calling getit() unconditionally fixedmarcel2004-07-111-11/+22
| | | | | | | | | | | | | | a problem that could also be fixed differently without reverting previous attempts to fix DELAY while the debugger is active (rev 1.204). The bug was that the i8254 implements a countdown timer, while for (k)db_active a countup timer was implemented. This resulted in premature termination and consequently the breakage of DELAY. The fix (relative to rev 1.211) is to implement a countdown timer for the kdb_active case. As such the ability to step clock initialization is preserved and DELAY does what is expected of it. Blushed: bde :-) Submitted by: bde
* Call getit() unconditionally and only grab clock_lock when themarcel2004-07-101-20/+13
| | | | | | debugger is not active. The fixes breakages of DELAY() when running in the debugger, because not calling getit() when the debugger is active yields a DELAY that doesn't.
* Update for the KDB framework:marcel2004-07-102-18/+12
| | | | | | o Make debugging code conditional upon KDB instead of DDB. o Call kdb_enter() instead of Debugger(). o Remove local (static) variable in_debugger. Use kdb_active instead.
* Something funny happened on the way to the floppy driver today...phk2004-07-051-3/+11
| | | | | | | | | | | | | When two drivers share an ISA DMA channel, they both call isa_dmainit() and the second call fails if DIAGNOSTIC is on. If isa_dmainit() was already called successfully, just return silently. This only works if both drivers agree on the bounce buffer size, but since sharing DMA is usually only possible on very special hardware and then typically only for devices of the same type (which would have multiple instances of the same device driver), this is not a problem in practice.
* Remove now obsolete port assignments and sizes. These more properlyimp2004-07-051-77/+1
| | | | | | | | belong in the respective drivers. I've not removed ALL of them, as a few still haven't moved. I've just removed the ones that aren't used. # these can be removed from amd64, but I'm having issues getting to # sledge at the moment for a build.
* Don't define __RMAN_RESOURCE_VISISBLE. They aren't needed here afterimp2004-07-031-12/+18
| | | | | I've converted the direct accessing of struct resource members to the preferred interface.
* This needs __RMAN_RESOURCE_VISIBLE if PC98 is defined.nyan2004-07-011-0/+3
|
* Trim a few things from the dmesg output and stick them under bootverbose tojhb2004-07-011-12/+16
| | | | | | | cut down on the clutter including PCI interrupt routing, MTRR, pcibios, etc. Discussed with: USENIX Cabal
* Clear any pending exceptions before using frstor (in the non-FXSR case)bde2004-06-191-0/+4
| | | | | | | | | | in npxsetregs() too. npxsetregs() must overwrite the previous state, and it is never paired with an npxgetregs() that would defuse the previous state (since npxgetregs() would have fninit'ed the state, leaving nothing to do). PR: 68058 (this should complete the fix) Tested by: Simon Barner <barner@in.tum.de>
* Fixed a panic caused by over-optimizing npxdrop() in the non-FXSR case.bde2004-06-181-0/+9
| | | | | | | | | | | | | | | | frstor can trap despite it being a control instruction, since it bogusly checks for pending exceptions in the state that it is overwriting. This used to be a non-problem because frstor was always paired with a previous fnsave, and fnsave does an implicit fninit so any pending exceptions only remain live in the saved state. Now frstor is sometimes paired with npxdrop() and we must do a little more than just forget that the npx was used in npxdrop() to avoid a trap later. This is a non-problem in the FXSR case because fxrstor doesn't do the bogus check. FXSR is part of SSE, and npxdrop() is only in FreeBSD-5.x, so this bug only affected old machines running FreeBSD-5.x. PR: 68058
* Do the dreaded s/dev_t/struct cdev */phk2004-06-168-37/+37
| | | | Bump __FreeBSD_version accordingly.
* Remove atdevbase and replace it's remaining uses with direct references tojhb2004-06-101-0/+1
| | | | KERNBASE instead.
* Fixed misclassification of npx interrupts caused by npx_probe().bde2004-06-061-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dividing by 0 in order to check for irq13/exception16 delivery apparently always causes an irq13 even if we have configured for exception16 (by setting CR0_NE). This was expected, but the timing of the irq13 was unexpected. Without CR0_NE, the irq13 is delivered synchronously at least on my test machine, but with CR0_NE it is delivered a little later (about 250 nsec) in PIC mode and much later (5000-10000 nsec) in APIC mode. So especially in APIC mode, the irq13 may arrive after it is supposed to be shut down. It should then be masked, but the shutdown is incomplete, so the irq goes to a null handler that just reports it as stray. The fix is to wait a bit after dividing by 0 to give a good chance of the irq13 being handled by its proper handler. Removed the hack that was supposed to recover from the incomplete shutdown of irq13. The shutdown is now even more incomplete, or perhaps just incomplete in a different way, but the hack now has no effect because irq13 is edge triggered and handling of edge triggered interrupts is now optimized by skipping their masking. The hack only worked due to it accidentally not losing races. The incomplete shutdown of irq13 still allows unprivileged users to generate a stray irq13 (except on systems where irq13 is actually used) by unmasking an npx exception and causing one. The exception gets handled properly by the exception 16 handler. A spurious irq13 is delivered asynchronously but is harmless (as in the probe) because it is almost perfectly not handled by the null interrupt handler. Perfectly not handling it involves mainly not resetting the npx busy latch. This prevents further irq13's despite them not being masked in the [A]PIC.
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.phk2004-06-041-2/+1
|
* Machine generated patch which changes linedisc calls from accessingphk2004-06-041-5/+5
| | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit.
* Use ttymalloc() instead of ttyregister().phk2004-06-044-15/+12
|
* Gainfully employ the new ttyioctl in the trivial cases.phk2004-06-011-8/+1
|
OpenPOWER on IntegriCloud