Commit Graph

505 Commits

Author SHA1 Message Date
nyan
1a777f137b Move the com_emr register definition to sioreg.h. 2002-09-24 02:35:57 +00:00
nyan
afb696c21c Merged from sys/dev/sio/sio.c revision 1.379. 2002-09-24 02:26:55 +00:00
phk
ca965d32d0 Remove #ifdef/#endif 3 years after the stuff they protected was removed.
Spotted by:	peter.
2002-09-21 08:00:01 +00:00
phk
10f5b58778 #include <sys/disk.h> to get disk_err() prototype.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:40:49 +00:00
phk
c003c05d8c Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.

Drop the by now entirely useless struct disklabel argument.

Add a flag argument for new-line termination.

Fix a couple of printf-format-casts to %j instead of %l.

Correctly print the name of all bio commands.

Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.

Use the new disk_err() throughout, #include <sys/disk.h> as needed.

Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.

Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 12:52:03 +00:00
nyan
649a100d88 Merged from sys/isa/fd.c revisions 1.234, 1.235 and 1.236. 2002-09-16 07:39:47 +00:00
nyan
11966693b5 Merged from sys/dev/sio/sio.c revision 1.378. 2002-09-16 07:14:02 +00:00
nyan
7891ca3f73 Merged from sys/isa/syscons_isa.c revision 1.18. 2002-09-16 07:11:43 +00:00
charnier
b6a9884512 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
nyan
0f5c98bdc9 Merged from sys/dev/syscons/scvtb.c revision 1.9. 2002-08-22 13:24:00 +00:00
peter
541eb8b4cb de-count pckbd for pc98. This file is only compiled if NPCKBD was 1,
so the conditional compile should never have been used.
2002-08-20 00:05:41 +00:00
nyan
f6b95ca9c1 Check return status from fd_in() function. 2002-07-16 14:34:38 +00:00
nyan
6fd8f4d0cb Merged from sys/dev/sio/sio.c revisions 1.376 and 1.377. 2002-06-24 15:24:42 +00:00
kato
bffdb1222c MFi386: sys/i386/isa/clock.c revision 1.187. 2002-06-24 08:04:47 +00:00
nyan
9a959cd5d4 Backout previous change and merge from sys/dev/sio/sio.c revision 1.375. 2002-06-19 13:20:20 +00:00
nyan
d9c537f7f8 Merged from sys/isa/fd.c revision 1.233. 2002-06-19 13:17:43 +00:00
n_hibma
f1757a1102 Make the speed used by gdb over serial settable in the kernel configuration.
This facilitates the use in circumstances where you are using a serial
console as well. GDB doesn't support anything higher than 9600 baud (19k2
if you are lucky), but the console does.
2002-06-18 21:30:37 +00:00
schweikh
1b3e9a3b79 Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by:	des
MFC after:	3 weeks
2002-06-02 20:05:59 +00:00
nyan
06fc83dcf1 Merged from sys/isa/fd.c revisions from 1.229 to 1.232. 2002-05-14 12:30:52 +00:00
phk
ca2769132d Don't export timecounter structures under debug. with sysctl, they
contain no truly interesting data anymore.
2002-04-30 19:34:31 +00:00
peter
7b7ba9f1e2 Tidy up some loose ends.
i386/ia64/alpha - catch up to sparc64/ppc:
- replace pmap_kernel() with refs to kernel_pmap
- change kernel_pmap pointer to (&kernel_pmap_store)
  (this is a speedup since ld can set these at compile/link time)
all platforms (as suggested by jake):
- gc unused pmap_reference
- gc unused pmap_destroy
- gc unused struct pmap.pm_count
(we never used pm_count - we track address space sharing at the vmspace)
2002-04-29 07:43:16 +00:00
phk
ab26f54be4 Simplify the RFC2783 and PPS_SYNC timestamp collection API. 2002-04-26 20:24:28 +00:00
phk
a80d5b3d3d Remove the tc_update() function. Any frequency change to the
timecounter will be used starting at the next second, which is
good enough for sysctl purposes.  If better adjustment is needed
the NTP PLL should be used.
2002-04-26 10:06:26 +00:00
nyan
f67bcd3239 Merged from sys/isa/fd.c revision 1.228. 2002-04-06 06:43:55 +00:00
nyan
4362a79991 Merged from sys/dev/sio/sio.c revisions 1.370 and 1.371. 2002-04-06 06:19:10 +00:00
jhb
5a4577c2f0 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
jhb
e3cbbf9804 Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
dillon
621ffb376c Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt
disablement assumptions in kern_fork.c by adding another API call,
cpu_critical_fork_exit().  Cleanup the td_savecrit field by moving it
from MI to MD.  Temporarily move cpu_critical*() from <arch>/include/cpufunc.h
to <arch>/<arch>/critical.c (stage-2 will clean this up).

Implement interrupt deferral for i386 that allows interrupts to remain
enabled inside critical sections.  This also fixes an IPI interlock bug,
and requires uses of icu_lock to be enclosed in a true interrupt disablement.

This is the stage-1 commit.  Stage-2 will occur after stage-1 has stabilized,
and will move cpu_critical*() into its own header file(s) + other things.
This commit may break non-i386 architectures in trivial ways.  This should
be temporary.

Reviewed by:	core
Approved by:	core
2002-03-27 05:39:23 +00:00
phk
5d1b930ed6 Push BIO_FORMAT into a local hack inside the floppy drivers where
it belongs.
2002-03-26 19:16:37 +00:00
nyan
431064acff Merged from sys/dev/sio/sio.c revisions 1.366 and 1.369. 2002-03-25 13:41:06 +00:00
nyan
2223c50652 Fix style. 2002-03-25 12:44:03 +00:00
kato
565671dd1e Remove __P. 2002-03-20 12:22:31 +00:00
nyan
6908e0bef9 Free allocated buffer at siodetach().
MFC after:	3 days
2002-03-10 07:22:42 +00:00
nyan
9142c1d158 - The pc98_ttspeedtab() function returns an error status instead of a divisor,
and sets a divisor to the third argument.
- The second argument of the pc98_set_baud_rate() function is changed from int
  to u_int.
2002-03-08 12:12:46 +00:00
phk
5f6380ee08 Disksort will not "munge" requests, BIO_ORDERED or not, so remove
use of BIO_ORDERED.
2002-02-22 09:14:06 +00:00
nyan
373df32b98 Cosmetic changes. 2002-02-10 10:27:37 +00:00
nyan
362046cd75 - Refine the iskanji1 function.
- Print continuous ascii characters at a time.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2002-02-10 10:15:41 +00:00
nyan
1a2dc62470 Fixed mouse cursor on a console.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2002-02-10 10:14:39 +00:00
nyan
3b4c306636 Changed iskanji[12] to inline functions. 2002-01-31 08:29:46 +00:00
nyan
985921bf36 Merged from sys/dev/sio/{sio.c,sio_isa.c} revisions 1.363 and 1.5,
respectively.
2002-01-31 08:26:45 +00:00
nyan
da47d8fa71 MFi386: revision 1.180 2002-01-31 04:28:52 +00:00
nyan
d293e099af Merged from sys/dev/sio/sio.c revisions from 1.360 to 1.362. 2002-01-18 03:30:22 +00:00
nyan
f33c9933e7 Merged from sys/dev/sio/sio.c revisions 1.354 and 1.358. 2002-01-06 09:54:50 +00:00
jhb
68929e8e5a Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
nyan
f09046c959 MFi386: revision 1.178 2001-12-22 01:35:44 +00:00
nyan
eef8963bce cosmetic changes. 2001-12-22 01:30:19 +00:00
nyan
dfb500ec21 MFi386: revision 1.179 2001-12-22 00:38:32 +00:00
nyan
a07a4f944b Merged from sys/isa/{fd.c,fdreg.h} revisions 1.222 and 1.15, respectively. 2001-12-16 09:00:03 +00:00
nyan
0faafb01e6 Fixed to draw mouse cursor. The syscons driver for PC98 uses different
attributes from i386.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	3 days
2001-12-14 15:27:15 +00:00
obrien
9f689db796 Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
nyan
8770493443 Split the sio driver for pc98 into bus front end and back end.
(merged from the files in sys/dev/sio)
2001-11-26 12:29:53 +00:00
nyan
786fe54fdb Removed pmc_isa_identify function. It is not needed.
Submitted by:	takawata
2001-10-28 04:16:50 +00:00
jlemon
70fedc69f3 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
nyan
20952e6eff Added the pmc driver which supports power management controller of
old NEC PC-98NOTE.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	1 week
2001-10-24 14:46:40 +00:00
amorita
fae9a5e7bf Fix compile error of the case using `LINE30' option.
Reviewed by:	nyan
MFC after:	3 days
2001-10-23 08:54:50 +00:00
imp
1f68057239 First commit after a repo copy of isa/sio* -> dev/sio:
Move sio from isa/sio.c to dev/sio/sio.c.  The next step is to break
out the front end attachments, improve support for these parts on
different busses, and maybe, if we're lucky, merging in pc98 support.
It will also be MI and live in conf/files rather than files.*.

Approved by: bde
Tested with: i386, pc98
2001-10-22 02:48:38 +00:00
nyan
e9415d13e6 Changed IO_NPXSIZE to 8 2001-10-19 12:24:45 +00:00
nyan
750a83c997 MFi386: sys/i386/isa/clock.c revision 1.177 2001-10-19 11:52:49 +00:00
nyan
365804abfc Merged from sys/isa/sio.c revisions from 1.344 to 1.347 2001-10-19 11:48:47 +00:00
nyan
c5d0c002c2 - Added #include <sys/systm.h>
- Cosmetic change
2001-09-24 06:41:06 +00:00
nyan
3ea6caf048 MFi386: sys/isa/fd.c revision from 1.205 to 1.219. 2001-09-16 12:39:59 +00:00
nyan
4387977199 Allocate i/o and memory resources using gdc driver. 2001-09-16 12:38:39 +00:00
nyan
4fef05d4c2 MFi386: sys/isa/sio.c revision 1.301, 1.336, 1.337, 1.338, 1.339 and 1.342.
Removed unnecessary PnP moden entries.
2001-09-16 05:33:07 +00:00
nyan
9bf8e1fe5b MFi386: sys/i386/isa/clock.c revision 1.175 and 1.176. 2001-09-16 05:29:27 +00:00
nyan
6f5ebc5a7b Added (commented out) ACPI attachment. 2001-09-16 05:28:16 +00:00
imp
5935d58c27 Merge sys/isa/sio.c 1.343
KSE changes

Reviewed by: julian, bde, jhb
2001-09-14 05:05:08 +00:00
imp
114995eb4e Merge KSE changes from sys/dev/syscons/scterm-sc.c 1.17
# there are more "trivial" diffs in this file that have accumulated over time
# and I didn't try to fix those.

Reviewed by: julian, bde, jhb
2001-09-14 04:54:38 +00:00
imp
a249259469 KSE changes for olpt driver
Reviewed by: julian, bde, jhb
2001-09-14 04:50:27 +00:00
imp
aad2698eee Merge from sys/isa/fd.c 1.221 and a few minor tweaks to make compile
with the post KSE world.

Reviewed by: julian, bde, jhb
2001-09-14 04:30:39 +00:00
nyan
4c55ea3aef Merged from sys/dev/syscons/scterm-sc.c revision 1.16. 2001-08-07 12:10:17 +00:00
nyan
cbf070a42a Removed PLIP support. 2001-07-31 03:39:35 +00:00
nyan
f75f61c15d Convert the olpt driver to using new-bus stuff. 2001-07-29 11:11:45 +00:00
nyan
3b47353dfe Speed up console driver.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-26 03:07:07 +00:00
nyan
3b06a0b78c Integrate fdc.h into fd.c. 2001-07-23 13:07:24 +00:00
nyan
519913395e Fixed conflict with sys/dev/syscons/syscons.h.
Submitted by:	yokota
2001-07-14 08:07:26 +00:00
nyan
0a50491122 - Refine pc98 supports.
- Use bus_space stuff.
- Rename FDO_* -> FDC_* (obtained from NetBSD/pc98)
2001-07-14 04:19:09 +00:00
nyan
546e50b9d9 Merged from the following changes.
sys/dev/syscons/scvgarndr.c revision  1.11
sys/dev/syscons/scvtb.c     revision  1.8
sys/dev/syscons/syscons.c   revisions 1.361, 1.363, 1.364, 1.365 and 1.366
sys/isa/atkbd_isa.c         revision  1.9
sys/isa/syscons_isa.c       revision  1.17
2001-07-14 03:26:02 +00:00
nyan
a42957e395 Added #include <sys/proc.h>
Submitted by:	Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
2001-07-10 09:59:52 +00:00
dillon
fdb3f001e4 With Alfred's permission, remove vm_mtx in favor of a fine-grained approach
(this commit is just the first stage).  Also add various GIANT_ macros to
formalize the removal of Giant, making it easy to test in a more piecemeal
fashion. These macros will allow us to test fine-grained locks to a degree
before removing Giant, and also after, and to remove Giant in a piecemeal
fashion via sysctl's on those subsystems which the authors believe can
operate without Giant.
2001-07-04 16:20:28 +00:00
nyan
e03eb9af52 Fixed warning message.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-02 10:18:56 +00:00
imp
2a1278cec0 Repo copy i8237.h to dev/ic so we can get rid of some of the final vestiges
of includes of i386 files from non-i386 ports.
2001-06-30 05:29:11 +00:00
nyan
f4a882204c Merged from the following changes.
sys/isa/ppc.c      revisions from 1.27 to 1.34
  sys/isa/ppcreg.h   revisions from 1.10 to 1.15
  sys/isa/isareg.h   revision 1.6
2001-06-26 11:53:12 +00:00
nyan
738c129b56 Merged from sys/isa/sio.c revision 1.335. 2001-06-26 11:48:17 +00:00
nyan
02dbb1eab8 Merged from sys/i386/isa/isa_dma.c revision 1.7. 2001-06-26 11:47:24 +00:00
nyan
a8c1c674be Merged from sys/isa/syscons_isa.c revision 1.16. 2001-06-26 11:46:42 +00:00
nyan
d06faaae4c Merged from sys/dev/syscons/scterm-sc.c revison 1.15. 2001-06-26 11:45:54 +00:00
nyan
b10965c437 Merged from sys/isa/fd.c revisions 1.198, 1.199, 1.200, 1.202 and 1.204. 2001-06-26 11:44:21 +00:00
nyan
3f0e97cca4 Allocate all resources using keyboard controller. 2001-06-17 04:43:28 +00:00
peter
954d31f5da 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
peter
ddc18d87d9 Hints overhaul:
- Replace some very poorly thought out API hacks that should have been
  fixed a long while ago.
- Provide some much more flexible search functions (resource_find_*())
- Use strings for storage instead of an outgrowth of the rather
  inconvenient temporary ioconf table from config().  We already had a
  fallback to using strings before malloc/vm was running anyway.
2001-06-12 09:40:04 +00:00
nyan
a8994de1be Move the files from i386/isa/ic/ to dev/ic/. 2001-06-10 04:28:39 +00:00
joerg
aca913b650 Nuke the various poorly maintained copies of ioctl_fd.h. The file is
not machine-dependant, thus it has been moved out (repo-copied) into
<sys/fdcio.h>.
2001-06-06 06:15:03 +00:00
joerg
42cb92a8f5 Move out the files from src/sys/isa/ic/ to src/sys/dev/ic/, so they
can be made userland-visible as <dev/ic/...>.  Also, those files are
not supposed to contain any bus-specific details at all, so placing
them under .../isa/ has been a misnomer from the beginning.

The files in src/sys/dev/ic/ have been repo-copied from their old
location (this commit is a forced null commit there to record this
message).
2001-06-04 21:04:14 +00:00
jhb
cb5aff89bf Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
kato
a4dc3b58c8 Merged from sys/isa/fd.c revision 1.197. 2001-05-15 08:55:30 +00:00
phk
c9c6ba8bb3 Actually biofinish(struct bio *, struct devstat *, int error) is more general
than the bioerror().

Most of this patch is generated by scripts.
2001-05-06 20:00:03 +00:00
nyan
a9788c8846 Merged from sys/isa/fd.c revision 1.193. 2001-05-06 05:49:11 +00:00
kato
6920aa30b0 Merged from sys/isa/sio.c revision 1.330. 2001-05-02 14:02:16 +00:00
kato
ae73a1dbc1 Merged from sys/isa/fd.c revision 1.195. 2001-05-02 13:59:03 +00:00
kato
0c3aa232d6 Merged from sys/i386/isa/clock.c revisions 1.172 and 1.173. 2001-05-02 13:51:49 +00:00