summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't check for IRQ conflicts before probing the device, so thatbde1994-10-191-4/+1
| | | | | | | drivers have a chance to change their IRQ before it is checked. This was implemented in revision 1.21 and broken in revision 1.26. Drivers that can change their IRQ should probably be configured with "irq ?".
* Add support for devconf to a large number of device drivers, and dowollman1994-10-191-0/+15
| | | | the right thing in dev_goawayall() when kdc_goaway is null.
* isa.c isa_device.h: declare & define {e,}isa_{in,ex}ternalize().wollman1994-10-191-2/+67
| | | | | fd.c: register devices and implement disk stats. wd.c: fix disk stats and call isa_externalize() as appropriate.
* isa_device.h: Added flag for sensitive HW. ed# seems to break if anythingphk1994-10-171-16/+46
| | | | | | | | | | | | | | | | | | | | else has been probed. This feature could go away again, if we can curb the problem another way. if_ed.c, syscons.c: Set the above flag. ed# because it needs it, syscons because it looks stupid to "detect" the display you have already filled up with text :-) bt742a.c: Check bt_cmd() return-val during probe, thus failing on adaptec's. Also silenced various printf's during the probe. isa.c: Probe devices with the above flag set before the rest. Reduce the number of "conflict" messages per device to one. *** Please test the GENERIC-kernel now, if nobody can make it fail, GENERICAH and GENERICBT has a finite and short life-expectancy... ***
* A couple of prototypes moved out from here.phk1994-10-081-3/+1
|
* Add disable_rtc_set variable to block resettodr() call, needed forache1994-10-041-2/+6
| | | | adjkerntz -i, per Bruce suggestion
* RTC_CENTURY usage ifdefed out by USE_RTC_CENTURY compile option,ache1994-10-041-1/+9
| | | | pointed by Bruce
* Laptop Advanced Power Management support by HOSOKAWA Tatsumi.dg1994-10-013-51/+103
| | | | Submitted by: HOSOKAWA Tatsumi
* Add #ifndef ALLOW_CONFLICT_IRQswallace1994-09-301-1/+6
| | | | Reviewed by: jkh
* Updated pcaudio.c to latest from 1.1.5.1sos1994-09-291-67/+49
| | | | | | Enabled timer reprogramming in clock.c (this could use more work). Obtained from: FreeBSD-1.1.5.1
* From 1.1.5:dg1994-09-221-2/+2
| | | | | | >revision 1.8 >date: 1994/06/03 06:42:30; author: davidg; state: Exp; lines: +2 -2 >Patch from Bruce Evans: npxintr() needs to mask softclock().
* Don't supply the `usermode' arg to softclock(). The 2.0 softclock() doesn'tbde1994-09-202-4/+4
| | | | take an arg.
* Don't lose the RTC interrupt in resettodr().bde1994-09-201-2/+2
|
* Remove the alias splnone() for spl0(). It was used only once.bde1994-09-201-2/+2
|
* resettodr() implemented, inittodr() fixedache1994-09-201-70/+136
| | | | Submitted by: me & chris@gnome.co.uk
* The previous revision got the wrong log message (for clock.c). It shouldbde1994-09-181-2/+2
| | | | | | | | | have got the following: Back out the changes in the previous revision. Function-like macros were replaced by compound statements that work in less contexts. Unoformize idempotency #ifdef.
* Remove some unnecessary #includes.bde1994-09-182-26/+20
| | | | | | | | | | | | Restore the simple leap year calculation as a macro and document it so that it doesn't become complicated again. The simple version works for all leap years covered by 32-bit time_t's. The complicated version doesn't work for all leap years covered by 64-bit time_t's since among other reasons, the solar system is not stable for long enough. Fix declarations. Nuke spinwait().
* Redo Kernel NTP PLL support, kernel side.wollman1994-09-181-22/+1
| | | | | | | | | | | | | | | | | This code is mostly taken from the 1.1 port (which was in turn taken from Dave Mills's kern.tar.Z example). A few significant differences: 1) ntp_gettime() is now a MIB variable rather than a system call. A few fiddles are done in libc to make it behave the same. 2) mono_time does not participate in the PLL adjustments. 3) A new interface has been defined (in <machine/clock.h>) for doing possibly machine-dependent things around the time of the clock update. This is used in Pentium kernels to disable interrupts, set `time', and reset the CPU cycle counter as quickly as possible to avoid jitter in microtime(). Measurements show an apparent resolution of a bit more than 8.14usec, which is reasonable given system-call overhead.
* Removed inclusion of pio.h and cpufunc.h (cpufunc.h is included fromdg1994-09-161-5/+5
| | | | | systm.h). Merged functionality of pio.h into cpufunc.h. Cleaned up some related code.
* Removed some macros that are now in cpufunc.hpaul1994-09-151-11/+1
| | | | Reviewed by: Bruce
* 1. adjkerntz variable added for preparation to resettodr() implementationache1994-09-141-2/+4
| | | | 2. Leap year calculations fixed
* Reversed my patch from yesterday. "eisa" if >= 0x1000.phk1994-09-131-2/+2
| | | | pas0 will be in "eisa", even though it isn't.
* Only say eisa if ((ioaddr & 0xfff) >= 0x400)phk1994-09-131-2/+2
|
* Define new MIB variable, hw.floatingpoint, which is true if FP hardwarewollman1994-09-091-3/+4
| | | | is present, and false if an emulator is being used.
* Reviewed by:ats1994-09-021-2/+2
| | | | | | | | | | | | | | | | | | | Submitted by: 1) if_ie.c: Changed a printf and put a space in it. Formerly the "<3C507>" confused the syslog. He tried to see that as the priority to log that message. 2) isa_device.h: Changed the iobase variable from short to u_short. EISA Adresses can go up to 0xf000 and the sign extension doesn't look good in the probe output. Example: ep1 at 0xffff8000-0xffff8000f is not good :-), i like more a ep1 at 0x8000-0x8000f. 3) isa.c: Changed a string constant from "probe" to "prob", it gets later already an "ed" tagged on the end.
* Fix up some sloppy coding practices:wollman1994-08-181-3/+1
| | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
* Bruce Evans' dynamic interrupt support.dg1994-08-184-422/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /usr/src/sys/i386/isa/clock.c: o Garrett's statclock changes. o Wire xxxintr, not Vclk. o Wire using register_intr(), not setidt(). /usr/src/sys/i386/isa/icu.s: o Garrett's statclock changes. o Removed unused variable high_imask. o Fake int 8 for rtc as well as int 0 for clk. Required for kernel profiling with statclock, harmless otherwise. /usr/src/sys/i386/isa/isa.c: o Allow isdp->id_irq and other things in *isdp to be changed by probes. Changing interrupts later requires direct calls to register_intr() and unregister_intr() and more care. ALLOW_CONFLICT_* is brought over from 1.1.5, except ALLOW_CONFLICT_IRQ is not supported. IRQ conflict checking is delayed until after probing so that drivers can change the IRQ to a free one; real conflicts require more cooperation between drivers to handle. o Too many details to list. o This file requires splitting and a lot more work. /usr/src/sys/i386/isa/isa_device.h: o Declare more things more completely. /usr/src/sys/i386/isa/sio.c: o Prepare to register interrupt handlers as fast. /usr/src/sys/i386/isa/vector.s: o Generate entry code for 16 fast interrupt handlers and 16 normal interrupt handlers. Changed some constants to variables: # $unit is now intr_unit[intr]. Type is int. Someday it should be a cookie suitable for the handler (e.g., a struct com_s for sio). # $handler is now intr_handler[intr]. # intrcnt_actv[id_num] is now *intr_countp[intr]. The indirection is required to get a contiguous range of counters for vmstat and so that the drivers depend more in the driver than on the interrupt number (drivers could take turns using an interrupt and the counts would remain correct). There is a separate counter for each device and for each stray interrupt. In 1.1.5, stray interrupt 7 clobbers the count for device 7 or something worse if there is no device 7 :-(. # mask is now intr_mask[intr] (was already indirect). o Entry points are now _XintrI and _XfastintrI (I = intr = 0-15), not _VdevU (U = unit). o Removed BUILD_VECTORS stuff. There's a trace of it left for the string table for vmstat but config now generates the string in one piece because nothing more is required. o Removed old handling of stray interrupts and older comments about it. Submitted by: Bruce Evans
* Enable use of the RTC chip for the statistical clock. While this doeswollman1994-08-151-4/+56
| | | | | | | | | | | not provide the full accuracy of a randomized statistical clock, it does provide greater accuracy than the previous method, while not significantly increasing overhead. It also provides profiling support at 1024 Hz. You must re-compile config before making a new kernel, or you will end up with unresolved symbols. Reviewed uy: Bruce evans said it worked for him.
* Change all #includes to follow the current Berkeley style. Some of thesewollman1994-08-133-43/+43
| | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make
* For Pentium machines, use a faster version of microtime with 8 usecwollman1994-08-111-1/+29
| | | | | resolution (can probably be improved somewhat). Other machines take a three-instruction hit if I586_CPU is defined, none otherwise.
* Tell Pentium users their CPU speed. (More changes to make use of thiswollman1994-08-101-2/+23
| | | | to come later.)
* Handle NMI's in accordance with data in van Gilluwe book.wollman1994-08-101-4/+23
|
* Fix from Bruce Evans:dg1994-06-111-2/+4
| | | | Set npx_exists = 0 in the case of broken error reporting.
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-253-15/+28
| | | | | 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.
* 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 IO_PPI define, pulled timer related stuffsos1994-04-211-6/+3
|
* Pulled out timer related functions -> now in clock.csos1994-04-211-160/+1
|
* New support for sharing the timerssos1994-04-211-23/+208
| | | | | | acquire_timer / release_timer Pulled in timer related functions from isa.c
* Change from Bruce:ache1994-04-021-2/+2
| | | | | | isa_dmarangecheck() is off by one error. > ISARAM_END should be >= ISARAM_END. Only the first page above 16M was mishandled.
* New interrupt code from Bruce Evans. In additional to Bruce's attacheddg1994-04-025-246/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* At the suggestion of Bruce Evans, don't zero RTC diag register. Doing sodg1994-02-061-3/+1
| | | | was causing problems for some machines.
* Now prints ``on eisa'' if id_iobase >= 0x1000, and made a slight codergrimes1994-01-221-5/+12
| | | | cleanup for the other 2 cases of ``on motherboard'' and ``on isa''.
* Add missing paren so that it now compiles.rgrimes1994-01-171-2/+2
|
* Updated the TODO file with missing things.ats1994-01-161-2/+2
| | | | | | | Changed the output of the isa probe routine, that only devices, that have an IO address and are smaller than 0x100 to be on the motherboard. The seagate SCSI adapter is an example of a card, that doesn't have an IO address and works only memory mapped.
* Correct Vresume size, we have now 32 bits for it.ache1994-01-102-4/+4
|
* Fixed comment that refered to 8252 (we really have 8253's).rgrimes1994-01-051-3/+3
| | | | Per some one on the mailing list.
* Convert syscall to trapframe. Based on work done by John Brezak.dg1994-01-031-3/+1
|
* Document use of counters 29 and 30 for CCITT netisrs.wollman1993-12-202-6/+6
|
* Make everything compile with -Wtraditional. Make it easier to distributewollman1993-12-192-6/+9
| | | | | | | | | | | a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
OpenPOWER on IntegriCloud