Commit Graph

1328 Commits

Author SHA1 Message Date
perry
c2afe21c94 Change from a hardcoded sanity check date that has to be updated by
hand every few years to code that uses the automatically generated
time value from config_time.h
Fixes an ancient XXX in the code.
2002-12-10 23:24:33 +00:00
fvdl
5c45b70587 Don't use delay() in the IPI wait loop. Use an empty one instead, with
a counter check in the DIAGNOSTIC case.
2002-12-04 01:36:10 +00:00
kenh
25c20430c3 The day-of-week register in the MC146818 has the value 1-7, but
clock_secs_to_ymdhms() returns dt_wday with a range of 0-6.  Make sure
the DOW register has the correct range.
2002-12-03 16:11:11 +00:00
christos
729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +00:00
fvdl
ae4b76c8d3 New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.
2002-11-22 15:23:35 +00:00
fvdl
fe506424c6 Removed in the new intr world. 2002-11-22 14:53:05 +00:00
fvdl
e2b6067204 Removed, no longer needed. Defines were either dupilcates, or have been
moved to other files.
2002-11-22 14:43:32 +00:00
itohy
6f08fa6ecb XINTR_TSS() macro for non-ELF case
whitespace nit
2002-11-11 09:17:16 +00:00
itohy
e7bab7c73c delete reference to astpending, which does not exist any longer 2002-11-10 14:28:10 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
fvdl
c55b2f6fa9 Define XINTR_TSS 2002-10-05 21:29:01 +00:00
fvdl
2153e9d81a Adjust callers to setgate() to match new extra parameter. 2002-10-05 21:28:34 +00:00
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