Commit Graph

75 Commits

Author SHA1 Message Date
Poul-Henning Kamp
7ac40f5f59 Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)
2003-03-03 12:15:54 +00:00
Poul-Henning Kamp
6d473442ca NODEVFS cleanup:
Don't call cdevsw_{add,remove}()
Bracket a more correct subset in "#if experimental"
2003-02-26 21:14:39 +00:00
Maxime Henrion
07159f9c56 Cleanup of the d_mmap_t interface.
- Get rid of the useless atop() / pmap_phys_address() detour.  The
  device mmap handlers must now give back the physical address
  without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
  int.  Now we properly pass a vm_offset_t * and expect it to be
  filled by the mmap handler when the mapping was successful.  The
  mmap handler must now return 0 when successful, any other value
  is considered as an error.  Previously, returning -1 was the only
  way to fail.  This change thus accidentally fixes some devices
  which were bogusly returning errno constants which would have been
  considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
  no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with:		alc, phk, jake
Reviewed by:		peter
Compile-tested on:	LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on:	i386
2003-02-25 03:21:22 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Maxime Henrion
aa26768242 Warning fixes. 2002-11-11 10:28:44 +00:00
Maxime Henrion
97be736aca Warning fix. 2002-11-11 10:17:01 +00:00
John Baldwin
3f57c87ebf Fix printf warnings with %j and uintmax_t. 2002-11-08 20:59:23 +00:00
Poul-Henning Kamp
8311f05a45 Fix rare and probably inconsequential memory leak.
Spotted by:	FlexeLint
2002-10-02 20:34:23 +00:00
Alfred Perlstein
4f492bfab5 use __packed. 2002-09-23 18:54:32 +00:00
Philippe Charnier
93b0017f88 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
David E. O'Brien
0301e9c83b Turn on TGA support.
Submitted by:	Andrew M. Miklic <AndrwMklc@cs.com>
2002-04-13 22:34:16 +00:00
Poul-Henning Kamp
2ce7d7a033 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
David E. O'Brien
6e551fb628 Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
Dag-Erling Smørgrav
b1511f4fb5 syscons' set_border() is now named sc_set_border(), so there is no longer
a naming conflict.
2001-11-06 02:36:26 +00:00
David E. O'Brien
2a200695e4 Add the TGA video driver. This is a great accomplishtment and will help
us a lot on older Alphas.
Andrew Gallatin, Thomas V. Crimi, and Peter Jeremy contributed to this
work along with the submitter.

Submitted by:	 Andrew M. Miklic <miklic@home.com>
2001-11-01 08:26:30 +00:00
Marcel Moolenaar
885f6ac360 Make this compile on ia64. 2001-10-06 09:27:43 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Kazutaka YOKOTA
3863b6db4c Fix missing splx(). 2001-08-10 14:26:48 +00:00
Kazutaka YOKOTA
0426db70c6 Include opt_splash.h. 2001-08-02 13:23:17 +00:00
Kazutaka YOKOTA
eac47d67be Add FBIO_BLANK ioctl support. Return ENODEV for yet-to-be-
supported ioctls for now.
2001-08-02 11:26:30 +00:00
Kazutaka YOKOTA
6d1699583d Add some definitions. Their actual support will be added
to video drivers later.
2001-08-02 11:17:38 +00:00
Kris Kennaway
56bded8a29 s/adress/address/
Inspired by:    OpenBSD
MFC After:      1 week
2001-07-23 12:05:27 +00:00
Peter Wemm
f41325db5f With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible.  <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set.  They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>).  Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated.  This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by:	eivind
2001-06-13 10:58:39 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
John Baldwin
b67cb27739 #if 0 out a variable only used in #if 0'd code to quiet a warning. 2001-03-06 03:07:58 +00:00
Peter Wemm
2b12097485 Exterminate the use of PSEUDO_SET() with extreme prejudice. 2001-01-31 07:58:58 +00:00
John Baldwin
5928fa5cc7 #if 0 out local variables only used in #if 0'd code and remove unused
local variables.
2001-01-23 22:02:08 +00:00
Nicolas Souchu
c05aa33cb0 Add the VESA S3 linear framebuffer driver. It works on top of VESA by replacing
the video switch by another. Exactly as VESA does on top of VGA.

It adds linear framebuffer to S3 VESA 1.2 cards.

Obtained from:	The original S3 ISA code comes from
                Peter Horton <pdh@colonel-panic.com>
2001-01-05 16:53:10 +00:00
David Malone
7cc0979fd6 Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
Yoshihiro Takahashi
168d542ea5 Disabled EGA/VGA 1bpp/4bpp modes support. This is not real fix, but this comes
back to support 8bpp mode.
2000-10-31 07:58:34 +00:00
Poul-Henning Kamp
53ce36d17a Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
Yoshihiro Takahashi
de103326a4 Removed extra calculation for X position (PC-98 only).
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-10-28 10:59:21 +00:00
Doug Rabson
21c3015a24 * Completely rewrite the alpha busspace to hide the implementation from
the drivers.
* Remove legacy inx/outx support from chipset and replace with macros
  which call busspace.
* Rework pci config accesses to route through the pcib device instead of
  calling a MD function directly.

With these changes it is possible to cleanly support machines which have
more than one independantly numbered PCI busses. As a bonus, the new
busspace implementation should be measurably faster than the old one.
2000-08-28 21:48:13 +00:00
Peter Wemm
993d34823b Unused include: #include "fb.h" 2000-06-10 06:41:11 +00:00
Andrew Gallatin
2727ed91ae Prevent vidcontrol -i from crashing alphas
Reported by: Christian Weisgerber <naddy@mips.inka.de>
Approved by: yokota@FreeBSD.ORG
2000-05-21 01:16:47 +00:00
Poul-Henning Kamp
932a24df3e Peter and I cross-committed: this file needs sys/kernel.h now. 2000-04-29 18:03:52 +00:00
Poul-Henning Kamp
eb95c536ad Remove unneeded #include <sys/kernel.h> 2000-04-29 15:36:14 +00:00
Peter Wemm
36d4f7c197 Stick a module dependency on 'splash' in the saver declaration macro so
that all savers are automatically declared dependent on the splash driver.
2000-04-29 13:33:18 +00:00
Yoshihiro Takahashi
cb4860b709 Added PC-98 supports.
Submitted by:	Chiharu Shibata <chi@bd.mbn.or.jp>,
		Tomokazu HARADA <tkhara@osk4.3web.ne.jp> and
		yokota
2000-04-27 13:37:40 +00:00
Kazutaka YOKOTA
99feb462a4 - Added support for 1bpp and 4bpp BMP files.
(PC98 part of the commit will follow.)

Submitted (50%) by: Chiharu Shibata <chi@bd.mbn.or.jp>
2000-04-24 10:09:42 +00:00
Peter Wemm
bc51803479 Remove #include "vga.h" and #if NVGA > 0 as it's implied by config. 2000-01-29 14:43:47 +00:00
Peter Wemm
25a2c600af Remove #include "splash.h" and #if NSPLASH > 0" - it's implied by config. 2000-01-29 14:42:57 +00:00
Doug Rabson
f0aac6a503 Add a workaround to which allows alphas to reserve a port range which
doesn't conflict with the parallel port on my miata (0x3bc..0x3bf).
The right solution will be to reserve two port ranges in vga, 0x3b0..0x3ba
and 0x3c0..0x3ca.

Reviewed by: yokota
2000-01-24 09:22:51 +00:00
Kazutaka YOKOTA
4d00f04203 Rework the algorithm to detect MDA/CGA/EGA/VGA cards, so that
the vga driver won't be fooled to believe it has a CGA card when
in fact it is a VGA card.
2000-01-10 08:49:49 +00:00
Kazutaka YOKOTA
e066609ffd - Fix typo: CGA40 -> CGA80
- Remove erroneous comments.
2000-01-10 08:47:04 +00:00
Peter Wemm
664a31e496 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 04:46:21 +00:00
Kazutaka YOKOTA
0be0162431 Fix the ioctl CONS_FINDMODE and its underlying subroutine
xxx_query_mode() in the vga and vesa drivers.

- xxx_query_mode() returns 0 (success) and a positive error number.
- Copy mode information on success.
- Remove redundant structure copy.

The bug first found in -STABLE by jmg.
1999-12-07 11:23:58 +00:00
Nick Hibma
d8add747ef Check whether init and term are actually given 1999-10-05 20:32:53 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00