Commit Graph

1316 Commits

Author SHA1 Message Date
fvdl
4eb09bb2aa Make shared IRQs for the normal PIC case work again as they did before
the MP merge (i.e. treat them as having the lowest level of all registered
handlers in the chain for the IRQ).
2002-10-03 15:58:56 +00:00
thorpej
89bf5a8f8e Add trailing ; to CFATTACH_DECL. 2002-10-02 15:52:22 +00:00
thorpej
1ad8e0ff42 Tidy up CFATTACH_DECL() formatting. 2002-10-02 05:47:08 +00:00
fvdl
26ab868e68 Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
2002-10-01 12:56:36 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
itojun
fe3d104e60 minor KNF 2002-08-13 05:33:51 +00:00
thorpej
65e781f38c Fix previous (need to add IO_TIMER1 to the register offsets). 2002-08-13 02:42:54 +00:00
itojun
f9b8434a5c fix includes (use dev/ic/i8253reg.h) 2002-08-13 02:17:45 +00:00
thorpej
05210534c0 No need for two copies of the i8253 register definitions. Remove the
i386-specific copy, and adjust its users to add in the timer i/o base
as necessary.
2002-08-13 00:50:33 +00:00
tshiozak
2d5fc6d0a9 add MD support for ACPI sleep/wakeup. 2002-06-18 07:56:12 +00:00
itohy
ece09443af s/XHOLE_VEC/XHOLD_VEC/ 2002-06-10 14:52:21 +00:00
thorpej
6ef955a02d Make this work with an ISO C preprocessor. 2002-05-31 18:22:54 +00:00
wiz
c6dc851f64 Remove opms(4) and its device, /dev/pms0, from the i386 port, because
it has been obsoleted by pms(4).

Reviewed by fvdl and christos.
2002-04-18 12:54:09 +00:00
lukem
fdc8fec66f allow default colours to be overridden by
PCCONS_DEFAULT_FG PCCONS_DEFAULT_SO_FG
	PCCONS_DEFAULT_BG PCCONS_DEFAULT_SO_BG
2002-04-14 14:20:33 +00:00
jdolecek
3da0847227 Make work on FPU-less computers again - if FPU is not detected in
npxprobe1(), set npxdna_func to new npxdna_empty(). This function just
returns 0 and thus fallbacks to a T_DNA trap (and math emulate, if present).
This fixes kern/15828 by Masaru Oki, tested on 386DX machine.
Reviewed by Jason Thorpe.

make npxdna_s87() and npxdna_xmm() static
g/c (npx_type == NPX_NONE) test from npxdna_s87(), it's no longer needed
2002-04-01 08:11:56 +00:00
atatat
31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
jdolecek
f32b3f4f89 Reduce the massive code duplication regarding joy(4). Split it into
MI and MD parts, and make ISA/ISAPNP/PCI joy(4) attachments MI.
2002-02-02 18:37:38 +00:00
enami
fbb7401965 Cope with rev. 1.16 of frame.h; trapframe now starts at if_gs in intrframe.
This fixes PR#14040.
2002-01-10 03:46:17 +00:00
toshii
2e3ff494cb Remove fwait after fxsave.
Raising math exception from fpu_save causes machine reboots.
Also, this fwait would cause incorrect results, as pending exceptions
are to be handled later after fxrstor.
2002-01-08 13:31:04 +00:00
thorpej
3835413bc1 Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
  resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
  isa_attach_args.  If either of these members are non-NULL,
  direct configuration of the bus is being performed.  Add an
  ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
  direct configuration is not being performed and the probe fucntion
  is returning success.
* Adapt device drivers -- currently, all driver probe routines return
  "no match" if ISA_DIRECT_CONFIG() evaluates to true.
2002-01-07 21:46:56 +00:00
perry
259130c9d4 boost up default times for when clocks are insane (as we do every few years.) 2002-01-01 09:14:14 +00:00
jdolecek
1dae310858 fix typo 2001-11-18 13:48:00 +00:00
lukem
95c969f245 add RCSID 2001-11-15 07:03:28 +00:00
jdolecek
1a92fabcb3 Don't print any warning if the time base was not provided (i.e. given as zero).
Fixes port-i386/1413 by David Carrel.
2001-11-03 11:16:25 +00:00
fvdl
165dd7f987 Make the newer gas happy by explicitly adding '*' to indirect calls, and
matching mov extensions with register names.
2001-09-21 14:12:50 +00:00
wiz
456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
thorpej
f5c35acc6c Eliminate a needless test, pointed out by Bill Sommerfeld. 2001-09-03 17:49:31 +00:00
thorpej
518ad20222 Upon further reading of the manual, don't save the MXCSR-at-last-exception.
Its status bits are sticky, and unaffacted by FNINIT.
2001-08-03 01:46:08 +00:00
thorpej
f72ee0a9c6 Remember the MXCSR at last-exception the way we do the FPU SW/TW. 2001-08-03 01:11:49 +00:00
thorpej
f0449fd933 - Rename cpu_use_fxsave to i386_use_fxsave.
- If we detect SSE/SSE2 support in the CPU, enable SSE exceptions
  and set i386_has_{sse,sse2} as appropriate.
- Expose i386_use_fxsave and i386_has_{sse,sse2} through sysctl
  as machdep.{osfsxr,sse,sse2}.
2001-08-02 22:04:28 +00:00
thorpej
99a7f640fe Add support for saving/restoring SSE/SSE2 state using FXSAVE/FXRSTOR.
Reviewed by Frank.
2001-08-02 21:04:43 +00:00
jdolecek
2b7d2123cd Make console polling (cnpollc/cngetc) work on IBM PS/2 keyboard controller
using level triggered interrupts, which livelocks calling intr routine
if the data register is not read in the interrupt routine, as it's case
when polling after interrupts are enabled during boot.

Block all interrupts when polling for keypress, and modify intr routine
to read and store value from data register. The latter one is to avoid
losing a keypress when one would manage to press a key when kernel is
not in spl-guarded code section.

Tested with classic pccons, 'pcconskbd at pckbc' and 'pckbd at pckbc'
configurations, on i386.
2001-07-31 13:15:28 +00:00
wiz
d2cede024b Replace some memcpy()s with probably overlapping arguments with memmove()s. 2001-07-24 22:29:07 +00:00
mrg
6d1680019c use a shift instead of a divide. 2001-07-17 13:52:24 +00:00
wiz
c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
jdolecek
f6af05f407 Back the last revision off, upon Bill Sommerfeld's request 2001-06-02 00:46:00 +00:00
jdolecek
5dbe622e77 When polling, raise priority level to tty, to block keyboard interrupts
when the system is "warm", i.e. interrupts are not blocked anymore.
This seems to be necessary on my PS/2 Model 70 keyboard - without this,
system ends up in endless loop calling the keyboard intr routine if a key
is pressed when polling. This _may_ be just specific to level-triggered
interrupts PS/2 MCA uses, though it's more likely it's just the way the
particular keyboard controller works.

Discussed on tech-kern@.
2001-06-02 00:01:04 +00:00
lukem
9c92176b44 don't bother providing duplicate code for {read,write}_eflags() since it's in cpufuncs.h anyway 2001-05-17 16:35:06 +00:00
scw
2963ff5c58 Add l_poll' to struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
thorpej
9d7220db23 Explicitly include <machine/pio.h>. 2001-04-26 17:56:37 +00:00
jdolecek
7c9c35e3e7 Move the inclusion of 'mca.h' so that it doesn't depend on pcppi. The clock
interrupts are properly reset on PS/2 now.

Handle the slighly different PS/2 CMOS layout and get/set century
byte as appropriate. The check for valid CMOS CRC checksum is not implemented
yet; I don't currently know algorithm they use.

The info about PS/2 CMOS was taken from the Padgett Peterson's
x86/MSDOS Interrupt List, release 60.
2001-04-23 09:35:12 +00:00
thorpej
8b3fc18a1f Generic soft interrupt implementation for NetBSD/i386. This could
probably be tuned somewhat, but this is a stop-gap measure to hold
us until Bill Sommerfeld's new interrupt code comes in from the
MP branch.
2001-04-14 06:49:30 +00:00
wiz
c79d6f4378 Fix typo in comment reported by Yuji Yamano in kern/12391. 2001-03-12 17:26:37 +00:00
thorpej
ccea4c274b Avoid doing Very Bad Things by passing a horrible IRQ value to
npxprobe1().  Fixes a problem on IBM Thinkpads reported by
Chuck Cranor.
2001-01-21 04:55:48 +00:00
fvdl
0546607276 Export some variables. 2001-01-17 00:03:02 +00:00
thorpej
3a7c4f5973 Don't panic if we detect an IRQ combination that can't be shared,
just return NULL.
2001-01-10 01:15:32 +00:00
soren
2cc519bba5 <pc/display.h> has been moved to <dev/ic/pcdisplay.h>. 2000-12-01 07:55:10 +00:00
thorpej
990d23039d NBPG -> PAGE_SIZE. 2000-11-14 22:55:51 +00:00
eeh
8c3f6a0d10 Adapt to new line discipline scheme. 2000-11-02 00:37:56 +00:00