Commit Graph

53 Commits

Author SHA1 Message Date
Robert Noland
cfd7bacef2 Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.
This replaces d_mmap() with the d_mmap2() implementation and also
changes the type of offset to vm_ooffset_t.

Purge d_mmap2().

All driver modules will need to be rebuilt since D_VERSION is also
bumped.

Reviewed by:	jhb@
MFC after:	Not in this lifetime...
2009-12-29 21:51:28 +00:00
Ed Schouten
6bfa9a2d66 Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
2008-09-27 08:51:18 +00:00
Wojciech A. Koszek
9336e0699b Replace explicit calls to video methods with their respective variants
implemented with macros. This patch improves code readability. Reasoning
behind vidd_* is a sort of "video discipline".

List of macros is supposed to be complete--all methods of video_switch
ought to have their respective macros from now on.

Functionally, this code should be no-op. My intention is to leave current
behaviour of touched code as is.

No objections:	rwatson
Silence on:	freebsd-current@
Approved by:	cognet
2007-12-29 23:26:59 +00:00
Ruslan Ermilov
44e09d2fa2 Fix -Wundef warnings from compiling GENERIC and LINT kernels of
all architectures.
2005-12-06 11:19:37 +00:00
Yoshihiro Takahashi
42244f27c2 Remove EPSON PC-386 note A/W/AE/WR support. 2005-09-14 12:39:06 +00:00
Yoshihiro Takahashi
d1725ef7ff Change a directory layout for pc98.
- Move MD files into <arch>/<arch>.
  - Move bus dependent files into <arch>/<bus>.
Rename some files to more suitable names.

Repo-copied by:	peter
Discussed with:	imp
2005-05-10 12:02:18 +00:00
Poul-Henning Kamp
e70377df79 Use dynamic major number allocation. 2005-02-27 22:16:30 +00:00
Warner Losh
e253961839 In my last commit, I'd assumed that LINE30 was always defined. It
turns out that LINE30_ROW was always defined, not LINE30.  I confused
this for LINE30 and did the unifdef -DLINE30 using that mistaken
belief.  This corrects that problem.

Submitted by: nyan-san
2005-01-09 22:17:39 +00:00
Warner Losh
75a323c107 LINE30 is always defined now, so unifdef -DLINE30 for clarity. 2005-01-08 22:29:53 +00:00
Warner Losh
60727d8b86 /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
Warner Losh
28384b60be Include vm/vm_param.h to pull in KERNBASE now. This should fix the
pc98 tinderbox breakage.
2004-06-13 20:17:44 +00:00
Poul-Henning Kamp
bbc8ceda71 Add missing <sys/module.h> includes. 2004-06-07 06:04:27 +00:00
Poul-Henning Kamp
dc08ffec87 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
Poul-Henning Kamp
405f776c83 Typo in last commit: missing ')' 2003-09-26 12:13:35 +00:00
Poul-Henning Kamp
4866f95d76 Change fb_attach() and fb_detach() to take a integer unit number rather
than a dev_t.

All of the dev_t's passed were bogusly created with makedev()
2003-09-26 10:41:44 +00:00
Yoshihiro Takahashi
6b6ee1e771 Supported the gdc_clear function.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2003-07-21 13:00:09 +00:00
Jake Burkholder
227f9a1c58 - Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
  with PAE.
- Use this to represent physical addresses in the MI vm system and in the
  i386 pmap code.  This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
  detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by:	DARPA, Network Associates Laboratories
Discussed with:	re, phk (cdevsw change)
2003-03-25 00:07:06 +00:00
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
Maxime Henrion
b9deb009c2 Convert one more d_mmap_t consumer I missed in my previous commit. 2003-02-25 13:30:50 +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
Yoshihiro Takahashi
d653affd6c Fix compile error with FB_INSTALL_CDEV option. 2003-02-23 13:28:44 +00:00
Philippe Charnier
93b0017f88 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
Akio Morita
5f44a44380 Fix compile error of the case using `LINE30' option.
Reviewed by:	nyan
MFC after:	3 days
2001-10-23 08:54:50 +00:00
Yoshihiro Takahashi
07468e79b7 Allocate i/o and memory resources using gdc driver. 2001-09-16 12:38: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
Yoshihiro Takahashi
65a68d7647 Restore GDC mode to initial mode instead of 24KHz.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-10-28 11:27:56 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Yoshihiro Takahashi
6bf6c91f5d Fixed warnings. 2000-10-15 04:54:17 +00:00
Yoshihiro Takahashi
94be196610 Changed default cursor shape to non-blink mode.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-08-08 09:28:32 +00:00
Yoshihiro Takahashi
ec6d58d33f Fixed PC-9821 NOTE supports with LINE30 mode.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-08-08 09:17:15 +00:00
Yoshihiro Takahashi
d70f8cefa0 Backed out a part of previous commit. The function name conflicts.
Pointed out by:	haro@tk.kubota.co.jp (Munehiro Matsuda)
2000-07-12 10:15:43 +00:00
Yoshihiro Takahashi
2446144f7a Merge from the following changes.
sys/conf/files.i386		1.321
sys/dev/syscons/syscons.c	1.343
sys/i386/isa/spkr.c		1.46
sys/isa/fd.c			1.183 and 1.185
sys/isa/syscons_isa.c		1.14
sys/isa/vga_isa.c		1.18
2000-07-11 12:50:34 +00:00
Yoshihiro Takahashi
d3331668b3 Supported EGC 640x400, PEGC 640x400 and PEGC 640x480 graphics modes.
Submitted by:	Chiharu Shibata <chi@bd.mbn.or.jp> and
		Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-04-27 13:34:32 +00:00
Yoshihiro Takahashi
6566129694 - Supported display suspended mode.
- Switch on/off not only text screen but also graphic screen.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-29 12:29:27 +00:00
Yoshihiro Takahashi
8b838a7ac2 Merge from the following changes.
File				Revision
sys/conf/files.i386		1.303 and 1.304
sys/dev/kbd/atkbd.c		1.23
sys/dev/syscons/scterm-sc.c	1.2
sys/dev/syscons/scvgarndr.c	1.5
sys/dev/syscons/scvtb.c		1.5
sys/dev/syscons/syscons.c	1.335
sys/isa/syscons_isa.c		1.11
sys/isa/vga_isa.c		1.17
2000-03-29 12:26:41 +00:00
Yoshihiro Takahashi
b3ef0af491 - Fixed warnings.
- Removed unnecessary include files.
2000-01-04 04:46:50 +00:00
KATO Takenori
38aee71933 Sync with sys/dev/fb/vga.c rev 1.5.
Submitted by:	yokota
1999-12-09 12:32:50 +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
Yoshihiro Takahashi
35762dce78 Gdc and pckbd driver don't support pnp mode. 1999-09-14 12:57:40 +00:00
KATO Takenori
62fdcb4fc6 Change isa_get/set_flags() to device_get/set_flags().
Submitted by:	dfr
1999-09-07 11:17:09 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
KATO Takenori
3e1a31161c Moved LCD controle routine for certain models of EPSON laptops into
suitable place.

Submitted by:	yokota
1999-07-03 08:44:32 +00:00
KATO Takenori
4b148932c7 PC98 part of the second phase of syscons reorganization.
Submitted by:	yokota
1999-06-24 10:51:40 +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
KATO Takenori
ac2e82dee1 Removed DRIVER_TYPE_TTY field. 1999-05-09 04:56:42 +00:00
KATO Takenori
c55a92c639 Sync with follwing files:
Path				Revision
i386/conf/GENERIC		1.162
i386/conf/Makefile.i386		1.146
i386/conf/files.i386		1.236
i386/conf/options.i386		1.111
i386/i386/machdep.c		1.329
i386/i386/userconfig.c		1.134
i386/isa/fd.c			1.135
i386/isa/if_ed.c		1.151
i386/isa/isa_dam.c		1.1
i386/isa/npx.c			1.67
isa/sio.c			1.224
dev/syscons/syscons.c		1.300
i386/isa/wd.c			1.194
isa/vga_isa.c           1.5
isa/atkbd_isa.c         1.3
isa/syscons_isa.c       1.2

Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-04-18 14:42:20 +00:00
KATO Takenori
24d3fe2bd8 Fix for LINE30 option. This option was not tested under new console
driver.

Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-03-02 12:34:24 +00:00
KATO Takenori
8ffb208fa0 Sync with syscons for i386.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-02-06 09:30:19 +00:00
KATO Takenori
4d8efbff69 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1999-01-28 11:24:36 +00:00