summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
Commit message (Collapse)AuthorAgeFilesLines
* Make pcvt and syscons live in the same kernel. If both are enabled, thenbde1995-09-101-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the first one in the config has priority. They can be switched using userconfig(). i386/i386/conf.c: Initialize the shared syscons/pcvt cdevsw entry to `nx'. Add cdevsw registration functions. Use devsw functions of the correct type if they exist. i386/i386/cons.c: Add renamed syscons entry points to constab. i386/i386/cons.h: Declare the renamed syscons entry points. i386/i386/machdep.c: Repeat console initialization after userconfig() in case the current console has become wrong. This depends on cn functions not wiring down anything important. sys/conf.h: Declare new functions. i386/isa/isa.[ch]: Add a function to decide which display driver has priority. Should be done better. i386/isa/syscons.c: Rename pccn* -> sccn*. Initialize CRTC start address in case the previous driver has moved it. i386/isa/syscons.c, i386/isa/pcvt/* Initialize the bogusly shared variable Crtat dynamically in case the stored value was changed by the previous driver. Initialize cdevsw table from a template. Don't grab the console if another display driver has priority. i386/isa/syscons.h, i386/isa/pcvt/pcvt_hdr.h: Don't externally declare now-static cdevsw functions. i386/isa/pcvt/pcvt_hdr.h: Set the sensitive hardware flag so that pcvt doesn't always have lower priority than syscons. This also fixes the "stupid" detection of the display after filling the display with text. i386/isa/pcvt/pcvt_out.c: Don't be confused the off-screen cursor offset 0xffff set by syscons. kern/subr_xxx.c: Add enough nxio/nodev/null devsw functions of the correct type for syscons and pcvt.
* Submitted by: Luigi Rizzo (luigi@iet.unipi.it)julian1995-09-081-2/+12
| | | | | Obtained from: Luigi Rizzo and Gunther Schadow Kernel support for the asc scanner driver
* Remove extra args from the calls to getit(). The bug was benign with thebde1995-08-251-4/+4
| | | | default function call convention.
* Convert to ANSI C: change #endif THING to #endif /* THING */.bde1995-06-141-59/+57
| | | | | | | | | | | | | | | | | Fix one such THING in code to match comment. Sort IO_GSC* into numeric order and update comments about the gaps. Sort common SCSI addresses into alphabetical order. Remove bogus comments about com ports having i/o size 4. Uniformize whitespace. Uniformize case in hex digits. This file is very incomplete. In particular, it doesn't mention any network cards. This doesn't matter much for the base addresses, but it means that the comments about which addresses are free are mostly bogus. The i/o sizes are unreliable because of split address ranges for many devices (VGA, wd). The i/o sizes are incomplete. In particular, there are no sizes for SCSI controllers. The bt driver still returns a truth value instead of a size.
* Merge RELENG_2_0_5 into HEADrgrimes1995-06-111-2/+2
|
* Remove trailing whitespace.rgrimes1995-05-303-32/+32
|
* "1 easy fix in 10 excrutiating steps"jkh1995-05-131-2/+2
| | | | | A phone call from Manfred quickly pointed up the fact that I got the conflict check backwards. NOW we implement the conflict checking correctly! Wheesh!
* Add variable `idelayed' and macros setdelayed() and schedsofttty()bde1995-05-111-1/+7
| | | | | | | | | | | | to access it. setdelayed() actually ORs the bits in `idelayed' into `ipending' and clears `idelayed'. Call setdelayed() every (normal) clock tick to convert delayed interrupts into pending ones. Drivers can set bits in `idelayed' at any time to schedule an interrupt at the next clock tick. This is more efficient than calling timeout(). Currently only software interrupts can be scheduled.
* Pass me the pointed chapeau - this typo somehow got through my testing.jkh1995-05-111-2/+2
|
* Remove all vestiges of the ALLOW_CONFLICT_FOO evil and replace it withjkh1995-05-111-12/+5
| | | | something slightly less evil - a per device conflict flag.
* include hooks for EISA configuration (possibly wrong :)julian1995-04-231-12/+14
|
* Don't waste time sending an EOI to ICU1 if option AUTO_EOI_1 is defined.bde1995-04-152-14/+18
| | | | | | | | | | | | Previously, this worked right if both AUTO_EOI_1 and AUTO_EOI_2 are defined, but not if AUTO_EOI_1 is defined and AUTO_EOI_2 is not defined. The latter case should be the default. DUMMY_NOPS should be the default too. Currently there are only two NOPs slowing down rtcin() (although there are no delays in writertc()) and several FASTER_NOPs slowing down interrupt handling in vector.s. Fix stack offsets for the (previously) unused untested FAST_INTR_HANDLER_USES_ES case.
* Add a class field to devconf and mst drivers.wollman1995-04-122-29/+35
| | | | | | | | | | | | For those where it was easy, drivers were also fixed to call dev_attach() during probe rather than attach (in keeping with the new design articulated in a mail message five months ago). For a few that were really easy, correct state tracking was added as well. The `fd' driver was fixed to correctly fill in the description. The CPU identify code was fixed to attach a `cpu' device. The code was also massively reordered to fill in cpu_model with somethingremotely resembling what identifycpu() prints out. A few bytes saved by using %b to format the features list rather than lots of ifs.
* Print "on isa" for devices with port==0 per Bruce suggestionache1995-04-061-2/+2
|
* Print "on motherboard" for isa? devices with id_iobase == 0ache1995-04-041-11/+9
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-281-3/+3
| | | | | (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before.
* Do a printf("\n") after all conditional printfs have been done so thatswallace1995-03-251-4/+5
| | | | a newline is always done. Remove \n's from last conditonal printfs.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-5/+8
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Prepare for shared interrupts (required by the new PCI code that addsse1995-03-161-1/+28
| | | | | | support for PCI PCI bridges, e.g. found on 4ch. Ethernet cards). Submitted by: Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
* Changed the printf()s in npxattach a bit so you don't end up withwpaul1995-03-051-6/+6
| | | | | | | | | | | | | messages like this: wdc0 at 0x1f0-0x1f7 irq 14 on isa wdc0: unit 0 (wd0): <ST506> wd0: size unknown, using BIOS values: 615 cyl, 4 head, 17 sec, bytes/sec 512 npx0 at 0xf0-0xff irq 13 on motherboard npx0: changing root device to wd0a ^^^^^^ The spurious 'npx0: ' pops up if you have a 386 with a 387 FPU.
* Change EISA size to 256 instead of 4096.phk1995-02-251-2/+2
| | | | Neither are correct, but 256 does least damage.
* Read K&R and get the { } right :-)phk1995-02-251-7/+6
|
* I belive I finally got the "on eisa" right.phk1995-02-251-5/+6
| | | | | | | | | | | | | | | | if (!(isdp->id_iobase & 0xf300)) { | printf(" on motherboard\n"); | } else if (isdp->id_iobase >= 0x1000 && | !(isdp->id_opbase & 0x300)) { | printf (" on eisa slot %d\n", | isdp->id_iobase >> 12); | } else { | printf (" on isa\n"); | } | } Based on info in "The undocumented PC" p.165
* Submitted by: seb@erix.ericsson.se (Sebastian Strollo)bde1995-02-231-2/+5
| | | | | Remove over-cautious early fnop() synchronization. It caused the probe to hang on systems without an FPU.
* Undo the busy latch changes made in the previous revision. They brokebde1995-02-171-4/+4
| | | | | | some 386/387 systems. Don't print the IRQ number twice in the boot diagnostics.
* This is the latest version of the APM stuff from HOSOKAWA, I have lookedphk1995-02-171-1/+3
| | | | | | | | | | | | | briefly over it, and see some serious architectural issues in this stuff. On the other hand, I doubt that we will have any solution to these issues before 2.1, so we might as well leave this in. Most of the stuff is bracketed by #ifdef's so it shouldn't matter too much in the normal case. Reviewed by: phk Submitted by: HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
* Changed address of the game controller to 0x201 (was 0x200)jmz1995-01-251-2/+2
| | | | joy.c: joystick driver
* Submitted by: Bruce Evansats1995-01-191-30/+9
| | | | | | Put in the much shorter and cleaner version for the calibrate_cycle_counter for the Pentium that Bruce suggested. Tested here on my Pentium and it works okay.
* Work around a compiler bug in gcc2.6.3 in handling (long long) variables andats1995-01-071-3/+24
| | | | | | | shifting. Also correct the original code as Garrett noticed it in mail. Leave the mishandled code in to use it later if future versions of gcc are correct. The code was part of the calibrate_cyclecounter routine to get the speed of the pentium chip.
* Gunther Schadow <gusw@fub46.zedat.fu-berlin.de>'sjkh1995-01-071-4/+5
| | | | | driver for the Genius GS-4500 hand scanner. Submitted by: gusw@fub46.zedat.fu-berlin.de
* Use sufficient parentheses in macros.bde1995-01-031-79/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove bogus input operands for fnsave(), fnstcw() and fnstsw(). Change all fwait's to fnop's. This might help avoid hardware bugs. Wait after fninit with an fnop. This should be safer now. Fix some spelling and formatting errors. Use natural sizes for control and status words (u_short, promotes to int). Don't clobber the SWI_CLOCK_MASK bits in npx0_imask when using IRQ13. Set the devconf state correctly (always busy, if configured). Improve code for npx_registerdev() a little (gcc can't keep id->id_unit in a register for some reason). Don't register a nonexistent npx device. Print a useful message in npxattach() again (delete references to errors and not the whole message). Don't print "387 emulator" if there is no emulator in the kernel. Use %p for pointers in error messages. Don't clobber the FPU state when there is an FPU exception. Just clear the exception flags (after saving the flags as before). This allows debuggers and SIGFPE handlers to look at the full exception state. SIGFPE handlers should normally return via longjmp(), which restores a good FPU state (as before). Returning from a SIGFPE handler may leave the FPU in the wrong state (as before). Clear the busy latch _after_ clearing the exception flags so that there is less chance of getting a bogus h/w interrupt for a control operation. Clear the saved exception status word when the next FPU instruction is excuted so that it doesn't stick around until the next exception. Clear the busy latch after fnsave() in npxsave() in case it was set when npxsave() was called.
* icu.s:bde1994-12-301-78/+40
| | | | | | | | | | | | | | | | | | | | | Move definition of `stat_imask' to clock.c. clock.c: Rename `rtcmask' to `stat_imask' and export it. Rename `clkmask' to `clk_imask' for consistency. Only calculate TIMER_DIV(hz) once. Merge debugging and "garbage" code to produce debugging code and format the output better. Make writertc() static inline and use it everywhere. Now all accesses to the clock registers go through rtcin() and writertc(). Move rtc initialization to cpu_initclocks(). Merge enablertclock() with cpu_initclocks() and remove enablertclock(). The extra entry point was just a leftover from 1.1.5.
* i386/exception.s,bde1994-12-032-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of interrupt nesting level. It is normally 0 for syscalls and traps, but is fudged to 1 for their exit processing in case they metamorphose into an interrupt handler. i386/genassym.c; Remove support for the obsolete pcb_iml and pcb_cmap2. Add support for pcb_inl. i386/swtch.s: Fudge the interrupt nesting level across context switches and in the idle loop so that the work for preemptive context switches gets counted as interrupt time, the work for voluntary context switches gets counted mostly as system time (the part when curproc == 0 gets counted as interrupt time), and only truly idle time gets counted as idle time. Remove obsolete support (commented out and otherwise) for pcb_iml. Load curpcb just before curproc instead of just after so that curpcb is always valid if curproc is. A few more changes like this may fix tracing through context switches. Remove obsolete function swtch_to_inactive(). include/cpu.h: Use the new interrupt nesting level variable to implement a non-fake CLF_INTR() so that accounting for the interrupt state works. You can use top, iostat or (best) an up to date systat to see interrupt overheads. I see the expected huge interrupt overheads for ISA devices (on a 486DX/33, about 55% for an IDE drive transferring 1250K/sec and the same for a WD8013EBT network card transferring 1100K/sec). The huge interrupt overheads for serial devices are unfortunately normally invisible. include/pcb.h: Remove the obsolete pcb_iml and pcb_cmap2. Replace them by padding to preserve binary compatibility. Use part of the new padding for pcb_inl. isa/icu.s: isa/vector.s: Keep track of interrupt nesting level.
* I just learned that isa.h is included in assembler files too...phk1994-11-191-3/+2
|
* addphk1994-11-191-1/+3
| | | | | extern u_int atdevbase; /* offset in virtual memory of ISA io mem */ here for a moment, to get it into BETA
* IO_EISASIZE should be 1 slot, not 2.gibbs1994-11-181-2/+2
|
* Get IO_EISASIZE properly defined now.jkh1994-11-181-1/+2
| | | | | | Reviewed by: Submitted by: Obtained from:
* Log processes that exit with an masked npx exception that would trapbde1994-11-141-8/+21
| | | | | | | | | | | | | with the current default exception (un)mask. There should be no such processes unless you change the mask. Someday the mask should be changed to the IEEE default of everything masked. The npx state gets saved so that it can be checked and this may have the side effect of fixing a bug that was reported for 1.1.5. (npx exceptions may sometimes leak across exits and clobber another process. I can't see how this can happen.) Get some missing/wrong declarations from headers now that the headers have them.
* Move declarations of atdevbase and rtcin() to cpufunc.h (a less wrongbde1994-11-141-12/+5
| | | | | | | | place). Fix spelling error. Uniformize idempotency ifdef.
* Revision 1.6 fix was lost: don't write 0 to RTC_DIAGache1994-11-121-2/+1
|
* Use adjkerntz into inittodr too (for APM stuff)ache1994-11-101-2/+2
|
* Public function declarations moved to <machine/npx.h>.bde1994-11-061-4/+1
|
* Maintain a new variable `timer0_overflow_threshold' so that microtime()bde1994-11-051-41/+87
| | | | | | | | | | | | | | | | | | | | | doesn't have to calculate it every call. Rename `timer0_prescale' to `timer0_prescaler_count' and maintain it correctly. Previously we lost a few 8253 cycles for every "prescaled" clock interrupt, and the lossage grows rapidly at 16 KHz. Now we only lose a few cycles for every standard clock interrupt. Rename `*_divisor' to `*_max_count'. Do the calculation of TIMER_DIV(rate) only once instead of 3 times each time the rate is changed. Don't allow preposterously large interrupt rates. Bug fixes elsewhere should allow the system to survive rates that saturate the system, however. Clean up declarations. Include <machine/clock.h> to check our own declarations.
* Add extra id_enabled flag for userconfig to manipulate. If id_enabledjkh1994-11-031-1/+6
| | | | is FALSE, the device will not be probed. id_enabled is TRUE by default.
* Fix a very old, very stupid race clearing the mask bit for the currentbde1994-11-012-8/+10
| | | | | | | | interrupt. Other bits in imen and icu+1 are volatile. INTREN() and INTRDIS() in icu.h need to be changed similarly. Change #include's to 2.0 style.
* DMA automode patch, fix SB16 clicksache1994-11-011-1/+19
| | | | Submitted by: tim@cs.city.ac.uk
* Fixed a couple of wrong printfs (too few arguments supplied). Also zappedphk1994-10-261-1/+2
| | | | | a couple of unused vars at the same time. Added a #include <sys/proc.h> to isa.c while here anyway.
* BEWARE: Interface change of register_intr() !se1994-10-251-4/+5
| | | | | | Changed the fifth parameter to register_intr() from u_int mask into u_int *maskptr in preparation for new features (shared interrupts and removable devices, eg. for PCMCIA).
* BEWARE: Interface change of register_intr() !se1994-10-251-3/+7
| | | | | | Changed the fifth parameter to register_intr() from u_int mask into u_int *maskptr in preparation for new features (shared interrupts and removable devices, eg. for PCMCIA).
* Finished device configuration database work for all ISA devices (except `ze')wollman1994-10-232-3/+39
| | | | | | | | | | | | | and all SCSI devices (except that it's not done quite the way I want). New information added includes: - A text description of the device - A ``state''---unknown, unconfigured, idle, or busy - A generic parent device (with support in the m.i. code) - An interrupt mask type field (which will hopefully go away) so that . ``doconfig'' can be written This requires a new version of the `lsdev' program as well (next commit).
OpenPOWER on IntegriCloud