Commit Graph

269 Commits

Author SHA1 Message Date
Peter Wemm
213fcefef2 Make it build, copy from dev/sio/sio.c:
isa_set_flags -> device_set_flags
isa_get_flags -> device_get_flags
1999-09-08 13:46:54 +00:00
Peter Wemm
f97d942bd0 Restore the old sio* - bruce can fix it himself. 1999-09-08 10:59:03 +00:00
Peter Wemm
e5174d14c5 Repo copy isa/sio* to dev/sio/sio* in preperation for extra bus methods
including pci.
Also, eliminate NSIOTOT and do it dynamically where it matters.
1999-09-06 14:06:23 +00:00
Peter Wemm
945f740363 Move the #if 0 to catch the card.h include and make sure it's zero. 1999-09-06 13:30:36 +00:00
Warner Losh
13264f28fb Start to disentangle the isa attachments from other buses. Partially
rewrite the pccard attachment case.  This is a work in progress, but
doesn't break the isa case.

I left the #if 0...#endif around the pccard stuff, at Peter's request,
so that normal users don't shoot themselves in the foot.

While I was here:
	o Indent a comment to the right location
	o Spell Unknown with a final 'n'.

Reviewed by: peter
1999-09-06 06:45:20 +00:00
Doug Rabson
bd64ce72a8 Add USR3031 pnp id.
Submitted by: Steve Price <sprice@hiwaay.net>
1999-09-04 14:31:56 +00:00
Doug Rabson
1c3111dc06 Remove the last vestiges of the old pnp code in favour of the new one. 1999-09-03 20:01:08 +00:00
Doug Rabson
4249382df0 This represents essentially a complete rewrite of the ISA PnP code. The
new system is integrated with the ISA bus code more cleanly and allows
the future addition of more enumerators such as PnPBIOS and ACPI.

This commit also enables the new pcm driver since it is somewhat tied to
the new PnP code.
1999-09-01 20:53:43 +00:00
Poul-Henning Kamp
c5b72c3d85 s/si_tty_tty/si_tty/g 1999-08-30 10:35:37 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Poul-Henning Kamp
9dcbe2404a Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled.

Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)

Add the correct hook for devfs to kern_conf.c

The net result of this excercise is that a lot less files depends on DEVFS,
and devtoname() gets more sensible output in many cases.

A few drivers had minor additional cleanups performed relating to cdevsw
registration.

A few drivers don't register a cdevsw{} anymore, but only use make_dev().
1999-08-23 20:59:21 +00:00
Poul-Henning Kamp
f1fe3bf115 make alpha compile again. 1999-08-09 11:02:45 +00:00
Poul-Henning Kamp
ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
Poul-Henning Kamp
4cb4c215e5 Allocate and register struct tty on the fly. 1999-08-08 20:25:14 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Kazutaka YOKOTA
f94ae09657 Skip the device if it is disabled, when searching for a serial port
to be used for the kernel console in sccnprobe().
1999-06-29 17:34:16 +00:00
Kazutaka YOKOTA
6e8394b8ba The second phase of syscons reorganization.
- Split syscons source code into manageable chunks and reorganize
  some of complicated functions.

- Many static variables are moved to the softc structure.

- Added a new key function, PREV.  When this key is pressed, the vty
  immediately before the current vty will become foreground.  Analogue
  to PREV, which is usually assigned to the PrntScrn key.
  PR: kern/10113
  Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>

- Modified the kernel console input function sccngetc() so that it
  handles function keys properly.

- Reorganized the screen update routine.

- VT switching code is reorganized.  It now should be slightly more
  robust than before.

- Added the DEVICE_RESUME function so that syscons no longer hooks the
  APM resume event directly.

- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
  SC_NO_HISTORY and SC_NO_SYSMOUSE.
  Various parts of syscons can be omitted so that the kernel size is
  reduced.

  SC_PIXEL_MODE
  Made the VESA 800x600 mode an option, rather than a standard part of
  syscons.

  SC_DISABLE_DDBKEY
  Disables the `debug' key combination.

  SC_ALT_MOUSE_IMAGE
  Inverse the character cell at the mouse cursor position in the text
  console, rather than drawing an arrow on the screen.
  Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)

  SC_DFLT_FONT
  makeoptions "SC_DFLT_FONT=_font_name_"
  Include the named font as the default font of syscons.  16-line,
  14-line and 8-line font data will be compiled in.  This option replaces
  the existing STD8X16FONT option, which loads 16-line font data only.

- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.

- The video driver provides a set of ioctl commands to manipulate the
  frame buffer.

- New kernel configuration option: VGA_WIDTH90
  Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60.  These
  modes are mot always supported by the video card.
  PR: i386/7510
  Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.

- The header file machine/console.h is reorganized; its contents is now
  split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
  (another new file).  machine/console.h is still maintained for
  compatibility reasons.

- Kernel console selection/installation routines are fixed and
  slightly rebumped so that it should now be possible to switch between
  the interanl kernel console (sc or vt) and a remote kernel console
  (sio) again, as it was in 2.x, 3.0 and 3.1.

- Screen savers and splash screen decoders
  Because of the header file reorganization described above, screen
  savers and splash screen decoders are slightly modified.  After this
  update, /sys/modules/syscons/saver.h is no longer necessary and is
  removed.
1999-06-22 14:14:06 +00:00
Peter Wemm
20510b2017 Use the proper interfaces to find if a device is enabled, don't dig into
the bus mechanism's private internals!
1999-06-20 13:10:09 +00:00
Greg Lehey
89bf63adaa sioprobe: Don't try to initialize disabled ports. In particular,
attempting to initialize sio3 caused problems with ATI video boards,
which cleverly share the I/O space.

PR: kern/12295
1999-06-19 08:14:56 +00:00
Kirk McKusick
5e1a20fd26 COM_LLCONSOLE should over-ride COM_DEBUGGER request. 1999-06-15 22:15:10 +00:00
Poul-Henning Kamp
3faff79c9e The PPSAPI group defines the polarity in draft 3, we guessed it wrong. 1999-05-31 06:57:31 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".

        Initialize the d_maj and d_bmaj fields.

        The d_reset field was not removed, although it is never used.

I used a program to do most of this, so all the files now use the
same consistent format.  Please keep it that way.

Vinum and i4b not modified, patches emailed to respective authors.
1999-05-30 16:53:49 +00:00
Doug Rabson
46e1f231cd Simplistic pnp support. Needs more ids to be added. 1999-05-30 11:14:39 +00:00
Doug Rabson
0476a4d4ff Allow a sio port with its flags set to DEBUGGER+LLCONSOLE to be used for
gdb. This allows the sio probe for that port to be disabled which stops
it from confusing the debugger.
1999-05-28 09:37:11 +00:00
Doug Rabson
6f50cfb43a Use the resource apis to manipulate resources. 1999-05-22 15:47:34 +00:00
Doug Rabson
1d3710bdf3 Adjust console stuff now that makedev is no longer a macro. 1999-05-10 14:01:35 +00:00
Peter Wemm
d1935ba94c Make COM_ESP and COM_MULTIPORT compile for LINT. It might even work.. 1999-05-09 20:35:02 +00:00
Peter Wemm
1d361692a7 Optimize out a couple of places where com_addr() is used twice in a row,
although this is pretty trivial.  devclass_get_softc() is a tad more
expensive than the old com_addr() implementation.  If Bruce is really
worried about the cost of this, it could always be changed so that the
softc pointer is stored in a local array again.
1999-05-09 16:56:38 +00:00
Peter Wemm
6f42b336a5 Move opt_sio.h options to conf/options and activate in isa/sio.c 1999-05-09 13:10:49 +00:00
Poul-Henning Kamp
52400704e9 Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
Poul-Henning Kamp
3000820ae0 add some amount of sanity to the way the gdb stuff finds its device.
I'm not too happy about the result either, but at least it has less
chance of backfiring.

This particular feature could be called "a mess" without offending
anybody.
1999-05-09 10:51:13 +00:00
Poul-Henning Kamp
1a4dd80a43 siocngetc & putc can be staticized. 1999-05-09 10:28:50 +00:00
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
Kirk McKusick
5c92a5b353 Get rid of extern declarations on gdb stuff so systems compiled without
DDB will compile. Warn users that try to use GDB without specifying a GDB
port in their configuration file.
1999-05-07 23:08:23 +00:00
Matt Jacob
49c36ff4f3 fix it so it compiles on alpha again 1999-05-07 17:52:01 +00:00
Poul-Henning Kamp
46eede0058 Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw.  bdevsw() is now an (inline)
        function.

        Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
        to the order of the cmaj/bmaj arguments!)

        Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
        (ditto!)

(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1999-05-07 10:11:40 +00:00
Kirk McKusick
e244fe31d6 Generalize to allow any serial port to be used as the GDB port.
Mark the GDB port in the config file with flags 0x80. Currently
only the sio driver checks these flags and sets up a GDB port,
but adding similar code to other serial drivers would be easy.
For backward compatibility, if an sio port is marked as the console
and no port is marked as the gdb port, the GDB port will be mapped
to the console port. This hack should go away at some point.
1999-05-07 06:50:41 +00:00
Peter Wemm
d5558c001a Fix up a few easy 'assignment used as truth value' and 'suggest parens
around && within ||' type warnings.  I'm pretty sure I have not masked
any problems here, I've committed real problem fixes seperately.
1999-05-06 18:44:42 +00:00
Poul-Henning Kamp
f711d546d2 Suser() simplification:
1:
  s/suser/suser_xxx/

2:
  Add new function: suser(struct proc *), prototyped in <sys/proc.h>.

3:
  s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/

The remaining suser_xxx() calls will be scrutinized and dealt with
later.

There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.

More changes to the suser() API will come along with the "jail" code.
1999-04-27 11:18:52 +00:00
Dmitrij Tejblum
b079102dc5 Modify the non-i386 version of disable_intr() and enable_intr() so that they
don't produce a warning on every use.
1999-04-24 10:41:21 +00:00
Peter Wemm
f3a865fb76 Merge missing changes from i386/isa/sioreg.h (PC98 related) 1999-04-18 14:37:47 +00:00
Peter Wemm
0dd2ac5462 Tidy up a few things left over from the conversion from i386/isa/sio.c.
Leave two #if 0'd notes about the way things used to be done for reference.
1999-04-18 14:35:28 +00:00
Doug Rabson
e2117e478b Register sio interrupts as fast (fixing some silo overflow messages). 1999-04-18 14:11:01 +00:00
Peter Wemm
007e69315a Merge up to rev 1.234 (nice revision number!) of i386/isa/sio.c. 1999-04-17 01:02:27 +00:00
Peter Wemm
c976cd3849 Merge up to rev 1.226 of i386/isa/sio.c 1999-04-17 00:37:01 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Poul-Henning Kamp
4e2d2aa1cd Use suser() to check for super user rather than examining cr_uid directly.
Use TTYDEF_SPEED rather than 9600 a couple of places.

Reviewed by:	bde, with a few grumbles.
1999-01-30 12:17:38 +00:00
Peter Wemm
d17e4ee67d Update the pccard hooks to use a module style declaration instead. 1999-01-19 00:21:53 +00:00
Steve Price
921543cf2f Add support for another 3COM/USR PNP modem, USR3031. 1998-12-13 23:12:54 +00:00
Doug Rabson
08b6a4cbee * Add hooks to allow the X server to access I/O ports and memory.
* Update drivers to the latest version of the bus interface.

The ISA drivers' use of the new resource api is minimal.  Garrett has
some much cleaner drivers which should be more easily shared between
i386 and alpha.  This has only been tested on cia based machines.  It
should work on lca and apecs but I might have broken something.
1998-11-15 18:25:17 +00:00