summaryrefslogtreecommitdiffstats
path: root/sys/isa
Commit message (Collapse)AuthorAgeFilesLines
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-254-95/+101
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* Update the reprogram timer stuff, now the frequency of timer 0sos1994-05-021-70/+60
| | | | | can only be changed at the "right" times. Accuracy should be assured.
* Updated swedish keymap.sos1994-04-261-18/+18
|
* Fixed missing bounds check in scroll up/down sequence, that couldsos1994-04-261-5/+11
| | | | cause a panic (and did).
* Define new option, INACCURATE_MICROTIME_IS_OK. When this is defined,wollman1994-04-231-1/+5
| | | | | | | | | | the NTP kernel PLL is disabled, and acquire_timer0() is enabled, thus opening the door for microtime() (and hence gettimeofday()) to return bogus timestamps. This option is necessary for the `pca' driver to work, but is implemented to underscore the fact that accurate timekeeping and the `pca' driver are incompatible at present. If someone writes a version of microtime() that works when the `pca' driver is being used, this can get junked.
* Added support for the 16 port Boca via a flag to specify that there isdg1994-04-231-4/+9
| | | | no master port.
* Changed timer usage to new functions in clock.csos1994-04-211-6/+8
|
* New support for sharing the timerssos1994-04-211-23/+208
| | | | | | acquire_timer / release_timer Pulled in timer related functions from isa.c
* Bug fixes and performance improvements from John Dyson and myself:dg1994-04-201-1/+2
| | | | | | | | | | | | | | | 1) check va before clearing the page clean flag. Not doing so was causing the vnode pager error 5 messages when paging from NFS. (pmap.c) 2) put back interrupt protection in idle_loop. Bruce didn't think it was necessary, John insists that it is (and I agree). (swtch.s) 3) various improvements to the clustering code (vm_machdep.c). It's now enabled/used by default. 4) bad disk blocks are now handled properly when doing clustered IOs. (wd.c, vm_machdep.c) 5) bogus bad block handling fixed in wd.c. 6) algorithm improvements to the pageout/pagescan daemons. It's amazing how well 4MB machines work now.
* Patch from S0ren, 80x50 font trashed after switching from X consoleache1994-04-121-1/+7
|
* Fix arguments of CONS_GETINFOache1994-04-071-2/+4
|
* Add declaration missing from previous bde's versionache1994-04-031-1/+2
|
* CHANGES from Bruce:ache1994-04-031-196/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- This list of changes is in approximately chronological order (oldest first). o Many cosmetic changes - renamed comintr1 -> siointr1, moved things around and fixed whitespace. o Reduced SLIP latency (FRAME_END hack) from 20-30 ms to 16 ms at 115200 bps (you won't notice the average 10 ms improvement on slow lines). ppp seems to use only counted transfers so there's no similar hack available. It's too hard for the driver to know the count. o Temporary #ifdefs for new and old interrupt handling (OLD_INTERRUPT_HANDLING decided by setsofttty() not being externally defined. o Don't test for the IIR_NOPEND bit being set - test for the non-fifo part of the iir equalling it like the docs say to. States with other IIR_NOPEND set in combination with the other iir bits are undefined. The docs may be stupid - the old test would not have broken when the fifo bits were introduced. o Noted more problems with DTR wait. o Rewrote console stuff. Still some initialization and state preservation problems. Same for kgdb stuff. The driver doesn't do anything about the console close bug. It needs to be fixed entirely in i386/cons.c. I like chmr's version where the the console driver revectors the device open and close routines. o Temporary (?) #ifdefs for references to tty buffers. o Noted further things to do in (2 comments about 3 places) for phk's change to not touch RTS unless it is being used for flow control. o Temporary #ifdefs for timestamp handling. It needs fixing. The microtime() call breaks the first rule of writing fast interrupt handlers: NO calls to functions that might do slow and bad things. microtime() enables interrupts. This turns out to be only moderately harmful. Also, I want the timestamp copy outside of the normal interrupt handler. o Don't init com->tp early for the !DONT_MALLOC_TTYS case - both sides are NULL. o Worry about com->tp == NULL in siopoll. I don't see how you survived the (incc <= 0 || !(tp->state & TS_ISOPEN)) test. Perhaps early sttys or comcontrols set up the tp's for _all_ the ports before this code is reached.
* New interrupt code from Bruce Evans. In additional to Bruce's attacheddg1994-04-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list of changes, I've made the following additional changes: 1) i386/include/ipl.h renamed to spl.h as the name conflicts with the file of the same name in i386/isa/ipl.h. 2) changed all use of *mask (i.e. netmask, biomask, ttymask, etc) to *_imask (net_imask, etc). 3) changed vestige of splnet use in if_is to splimp. 4) got rid of "impmask" completely (Bruce had gotten rid of netmask), and are now using net_imask instead. 5) dozens of minor cruft to glue in Bruce's changes. These require changes I made to config(8) as well, and thus it must be rebuilt. -DG from Bruce Evans: sio: o No diff is supplied. Remove the define of setsofttty(). I hope that is enough. *.s: o i386/isa/debug.h no longer exists. The event counters became too much trouble to maintain. All function call entry and exception entry counters can be recovered by using profiling kernel (the new profiling supports all entry points; however, it is too slow to leave enabled all the time; it also). Only BDBTRAP() from debug.h is now used. That is moved to exception.s. It might be worth preserving SHOW_BITS() and calling it from _mcount() (if enabled). o T_ASTFLT is now only set just before calling trap(). o All exception handlers set SWI_AST_MASK in cpl as soon as possible after entry and arrange for _doreti to restore it atomically with exiting. It is not possible to set it atomically with entering the kernel, so it must be checked against the user mode bits in the trap frame before committing to using it. There is no place to store the old value of cpl for syscalls or traps, so there are some complications restoring it. Profiling stuff (mostly in *.s): o Changes to kern/subr_mcount.c, gcc and gprof are not supplied yet. o All interesting labels `foo' are renamed `_foo' and all uninteresting labels `_bar' are renamed `bar'. A small change to gprof allows ignoring labels not starting with underscores. o MCOUNT_LABEL() is to provide names for counters for times spent in exception handlers. o FAKE_MCOUNT() is a version of MCOUNT() suitable for exception handlers. Its arg is the pc where the exception occurred. The new mcount() pretends that this was a call from that pc to a suitable MCOUNT_LABEL(). o MEXITCOUNT is to turn off any timer started by MCOUNT(). /usr/src/sys/i386/i386/exception.s: o The non-BDB BPTTRAP() macros were doing a sti even when interrupts were disabled when the trap occurred. The sti (fixed) sti is actually a no-op unless you have my changes to machdep.c that make the debugger trap gates interrupt gates, but fixing that would make the ifdefs messier. ddb seems to be unharmed by both interrupts always disabled and always enabled (I had the branch in the fix back to front for some time :-(). o There is no known pushal bug. o tf_err can be left as garbage for syscalls. /usr/src/sys/i386/i386/locore.s: o Fix and update BDE_DEBUGGER support. o ENTRY(btext) before initialization was dangerous. o Warm boot shot was longer than intended. /usr/src/sys/i386/i386/machdep.c: o DON'T APPLY ALL OF THIS DIFF. It's what I'm using, but may require other changes. Use the following: o Remove aston() and setsoftclock(). Maybe use the following: o No netisr.h. o Spelling fix. o Delay to read the Rebooting message. o Fix for vm system unmapping a reduced area of memory after bounds_check_with_label() reduces the size of a physical i/o for a partition boundary. A similar fix is required in kern_physio.c. o Correct use of __CONCAT. It never worked here for non- ANSI cpp's. Is it time to drop support for non-ANSI? o gdt_segs init. 0xffffffffUL is bogus because ssd_limit is not 32 bits. The replacement may have the same value :-), but is more natural. o physmem was one page too low. Confusing variable names. Don't use the following: o Better numbers of buffers. Each 8K page requires up to 16 buffer headers. On my system, this results in 5576 buffers containing [up to] 2854912 bytes of memory. The usual allocation of about 384 buffers only holds 192K of disk if you use it on an fs with a block size of 512. o gdt changes for bdb. o *TGT -> *IDT changes for bdb. o #ifdefed changes for bdb. /usr/src/sys/i386/i386/microtime.s: o Use the correct asm macros. I think asm.h was copied from Mach just for microtime and isn't used now. It certainly doesn't belong in <sys>. Various macros are also duplicated in sys/i386/boot.h and libc/i386/*.h. o Don't switch to and from the IRR; it is guaranteed to be selected (default after ICU init and explicitly selected in isa.c too, and never changed until the old microtime clobbered it). /usr/src/sys/i386/i386/support.s: o Non-essential changes (none related to spls or profiling). o Removed slow loads of %gs again. The LDT support may require not relying on %gs, but loading it is not the way to fix it! Some places (copyin ...) forgot to load it. Loading it clobbers the user %gs. trap() still loads it after certain types of faults so that fuword() etc can rely on it without loading it explicitly. Exception handlers don't restore it. If we want to preserve the user %gs, then the fastest method is to not touch it except for context switches. Comparing with VM_MAXUSER_ADDRESS and branching takes only 2 or 4 cycles on a 486, while loading %gs takes 9 cycles and using it takes another. o Fixed a signed branch to unsigned. /usr/src/sys/i386/i386/swtch.s: o Move spl0() outside of idle loop. o Remove cli/sti from idle loop. sw1 does a cli, and in the unlikely event of an interrupt occurring and whichqs becoming zero, sw1 will just jump back to _idle. o There's no spl0() function in asm any more, so use splz(). o swtch() doesn't need to be superaligned, at least with the new mcounting. o Fixed a signed branch to unsigned. o Removed astoff(). /usr/src/sys/i386/i386/trap.c: o The decentralized extern decls were inconsistent, of course. o Fixed typo MATH_EMULTATE in comments. */ o Removed unused variables. o Old netmask is now impmask; print it instead. Perhaps we should print some of the new masks. o BTW, trap() should not print anything for normal debugger traps. /usr/src/sys/i386/include/asmacros.h: o DON'T APPLY ALL OF THIS DIFF. Just use some of the null macros as necessary. /usr/src/sys/i386/include/cpu.h: o CLKF_BASEPRI() changes since cpl == SWI_AST_MASK is now normal while the kernel is running. o Don't use var++ to set boolean variables. It fails after a mere 4G times :-) and is slower than storing a constant on [3-4]86s. /usr/src/sys/i386/include/cpufunc.h: o DON'T APPLY ALL OF THIS DIFF. You need mainly the include of <machine/ipl.h>. Unfortunately, <machine/ipl.h> is needed by almost everything for the inlines. /usr/src/sys/i386/include/ipl.h: o New file. Defines spl inlines and SWI macros and declares most variables related to hard and soft interrupt masks. /usr/src/sys/i386/isa/icu.h: o Moved definitions to <machine/ipl.h> /usr/src/sys/i386/isa/icu.s: o Software interrupts (SWIs) and delayed hardware interrupts (HWIs) are now handled uniformally, and dispatching them from splx() is more like dispatching them from _doreti. The dispatcher is essentially *(handler[ffs(ipending & ~cpl)](). o More care (not quite enough) is taken to avoid unbounded nesting of interrupts. o The interface to softclock() is changed so that a trap frame is not required. o Fast interrupt handlers are now handled more uniformally. Configuration is still too early (new handlers would require bits in <machine/ipl.h> and functions to vector.s). o splnnn() and splx() are no longer here; they are inline functions (could be macros for other compilers). splz() is the nontrivial part of the old splx(). /usr/src/sys/i386/isa/ipl.h o New file. Supposed to have only bus-dependent stuff. Perhaps the h/w masks should be declared here. /usr/src/sys/i386/isa/isa.c: o DON'T APPLY ALL OF THIS DIFF. You need only things involving *mask and *MASK and comments about them. netmask is now a pure software mask. It works like the softclock mask. /usr/src/sys/i386/isa/vector.s: o Reorganize AUTO_EOI* macros. o Option FAST_INTR_HANDLER_USERS_ES for people who don't trust fastintr handlers. o fastintr handlers need to metamorphose into ordinary interrupt handlers if their SWI bit has become set. Previously, sio had unintended latency for handling output completions and input of SLIP framing characters because this was not done. /usr/src/sys/net/netisr.h: o The machine-dependent stuff is now imported from <machine/ipl.h>. /usr/src/sys/sys/systm.h o DON'T APPLY ALL OF THIS DIFF. You need mainly the different splx() prototype. The spl*() prototypes are duplicated as inlines in <machine/ipl.h> but they need to be duplicated here in case there are no inlines. I sent systm.h and cpufunc.h to Garrett. We agree that spl0 should be replaced by splnone and not the other way around like I've done. /usr/src/sys/kern/kern_clock.c o splsoftclock() now lowers cpl so the direct call to softclock() works as intended. o softclock() interface changed to avoid passing the whole frame (some machines may need another change for profile_tick()). o profiling renamed _profiling to avoid ANSI namespace pollution. (I had to improve the mcount() interface and may as well fix it.) The GUPROF variant doesn't actually reference profiling here, but the 'U' in GUPROF should mean to select the microtimer mcount() and not change the interface.
* Replace CAPS led with ALTGR led for ALTGR mode (soft) keyboards,ache1994-04-011-7/+15
| | | | currently affects only russian keyboard.
* Change got_status/modem_status assignment per Bruce suggestion,ache1994-04-011-4/+4
| | | | because inb clears modem status port.
* 1) Better fix for false carrier detect on bidir portache1994-03-261-8/+16
| | | | | 2) ttyclose moved after comhardclose, because clears t_state 3) slpx(s) moved after l_open to prevent undetected carrier down
* Fix false carrier detection on incoming bidir port.ache1994-03-251-1/+3
|
* 1) Change dtrwait 300 to 3 * hz (to be more kosher)ache1994-03-231-2/+4
| | | | 2) Protect sioclose by spltty()
* Add siostop to sioclose, because ttyflush called fromache1994-03-211-1/+2
| | | | wrong places removed now.
* Increase default DTR wait time up to 3 secs.ache1994-03-211-2/+2
| | | | | Also hardw. specs says 2.5 secs is enough, many modems needs at least 3 secs.
* previous optimization from John wasn't quite ready for primetime.dg1994-03-211-9/+1
|
* Two fixes from John Dyson to fix hangs and panics when using ctrl-T:dg1994-03-201-13/+46
| | | | | | | 1) tty.c: gather all the info about the processes before calling ttyprintf (which may block). 2) syscons.c: handle asynchronous output properly (data structures may be corrupted otherwise).
* Remove ttyfree from siocloseache1994-03-181-6/+1
| | | | | | | | | Example: Application use port cua01 Getty open ttyd1 (allocates rawq,outq,etc) and waits while application done Application quits, sioclose issued, ttyfree issued (getty calls revoke) Getty awakes and goes to panic into initrb (NULL rawq)
* Checking l_close in unneeded (one of my previous fixes),ache1994-03-141-3/+2
| | | | so back it out.
* Don't call ttyclose twice into sioclose and move ttycloseache1994-03-101-2/+3
| | | | before comhardclose
* First open:ache1994-03-081-4/+11
| | | | | | | | | now HUPCL set only in bidir case for callin lines (this prevents set HUPCL on mouse) comhardclose: in addition to HUPCL case now DTR dropped for bidir case if line was active in and no carrier present now. (this prevents DTR sleep on mouse)
* From: Jim Babb <babb@sedhps01.mdc.com>nate1994-03-081-1/+2
| | | | | | | | Subject: Re: Bugs with floppy drives Date: Tue, 8 Mar 94 9:11:54 CST The transfer speed was only set in the retry after error, not when switching drives.
* Modified pccnprobe to not set cn_tp = CONSOLE_TTY if __FreeBSD__ isdg1994-03-081-2/+2
| | | | defined. This code should probably be yanked out.
* Removed a #warning that I left here.guido1994-03-061-4/+3
|
* Ttys structures are now allocated dynamically via ttymalloc/ttyfree.guido1994-03-022-25/+35
| | | | | | | | | | | | | | | | This inetrface should be used from now on. pseudo device pty xx still keeps its meaning: a maximum of xx ptys is allowed. A ringbuffer is now 2040 bytes long, per Garrett Wollman's request. The changes are inspired by the way NetBSD did it (thanks for that!), though I made it slihghtly different, including the interface so at least 75% of the allocated space is deallocated when the tty is closed. Note further that it is easy to modify the ringbuffer length runtime. This will have to wait untill some later date... -Guido
* 360 DD entry speed fixed to 250KBPSache1994-03-021-2/+2
|
* floppy tape support shouldn't interfere with floppy disk driver onalm1994-03-021-3/+4
| | | | systems with no floppy tape drive (patch from Jim Babb).
* RTS shouldn't be touched unless CS_RTS_IFLOW is set.phk1994-02-261-2/+3
|
* TIOCTIMESTAMP capability. The port in question must be configured withphk1994-02-241-1/+20
| | | | "vector siointrts". Thus only a compare is added for the other ports.
* From: Jim Babb <babb@sedhps01.mdc.com>nate1994-02-142-3/+43
| | | | | | | Date: Mon, 14 Feb 94 15:57:14 CST This adds a copyright to the fdc.h file and fixes a bug in re-tries during writes on a heavily loaded system.
* Tentative fdc patches...alm1994-02-073-39/+40
|
* Change all siointr (expect in Vsio, of course) to comintr1ache1994-02-071-16/+9
| | | | | | This saves two commands per each direct comintr1 call, allows some strict check in siointr and also fix bug with suspended output on multiport cards
* Add floppy tape driver - fd => fdcalm1994-02-072-98/+182
|
* From: Chris Wiener <cwiener@CRLABS.COM>dg1994-02-071-2/+2
| | | | | | | | | | When the keyboard is probed, the LED's blink quickly and "Keyboard reset failed" is printed on the console. The init routine keeps trying endlessly with the same behavior as above. I got the latest -current sup sources (06-Feb-94 12:00 GMT) to work using the old syscons.c. The following patch makes the new syscons work:
* At the suggestion of Bruce Evans, don't zero RTC diag register. Doing sodg1994-02-061-3/+1
| | | | was causing problems for some machines.
* 1) Proper fix for suspended output in multiport caseache1994-02-061-6/+8
| | | | 2) IIR_NOPEND is really *one* bit, we don't need to check whole MASK
* Make the screen savers runtime switchable. Everybody wants achmr1994-02-041-26/+57
| | | | | different default saver, and the size increase in the kernel is minimal ( < 2.5K ).
* Make BLANK_SAVER default to stop best saver war.ache1994-02-021-2/+2
|
* Fix error in multiport part:ache1994-02-021-5/+4
| | | | while input char not entered, output was suspended
* Moved paren in sgetc to where it belongs. (My fault, I must have wiped itnate1994-02-011-2/+2
| | | | out when I applied the patch to get the new features by hand)
* Add missing arg to Debugger() call.rich1994-02-011-3/+3
| | | | Add missing close paren in sgetc() definition.
* Make old SNAKE_SAVER code compile with new syscons changes.ache1994-02-011-15/+15
|
* 1) Restore removed SNAKE_SAVER (Nate, WHY you do it?)ache1994-02-011-7/+71
| | | | | | 2) Make SNAKE_SAVER like default, if no saver specified in "options" 3) Remove #ifdef STAR_SAVER before line /* make screensaver happy */ this code needed in any case.
* Russian keymap is broken after last commit (fixed)ache1994-02-011-11/+11
| | | | Nate, please, be more careful next time.
OpenPOWER on IntegriCloud