Commit Graph

2122 Commits

Author SHA1 Message Date
nyan
42ff9b4a07 MFi386: revisions 1.539, 1.540 and 1.541. 2002-10-08 12:53:26 +00:00
nyan
8d204bd6cb Merged from sys/isa/fd.c revisions 1.224 and 1.241. 2002-10-07 13:05:45 +00:00
phk
951c3e53b2 NB: This commit does *NOT* make GEOM the default in FreeBSD
NB: But it will enable it in all kernels not having options "NO_GEOM"

Put the GEOM related options into the intended order.

Add "options NO_GEOM" to all kernel configs apart from NOTES.

In some order of controlled fashion, the NO_GEOM options will be
removed, architecture by architecture in the coming days.

There are currently three known issues which may force people to
need the NO_GEOM option:

boot0cfg/fdisk:
        Tries to update the MBR while it is being used to control
        slices.  GEOM does not allow this as a direct operation.

SCSI floppy drives:
        Appearantly the scsi-da driver return "EBUSY" if no media
        is inserted.  This is wrong, it should return ENXIO.

PC98:
        It is unclear if GEOM correctly recognizes all variants of
        PC98 disklabels.  (Help Wanted!  I have neither docs nor HW)

These issues are all being worked.

Sponsored by:	DARPA & NAI Labs.
2002-10-05 16:35:33 +00:00
phk
6bb5f004e1 Don't use dkunit() to find our softc when we can hang it off the dev_t.
This removes yet a dependency on the old disklabel stuff.

Sponsored by:	DARPA & NAI Labs.
2002-10-05 15:49:39 +00:00
phk
de27611d21 Merge the last couple of my changes to fd.c into the pc98 version.
Sponsored by:	DARPA & NAI Labs
2002-10-05 15:15:43 +00:00
phk
19150ba4f8 Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.

These two new copies are still intact copies of disklabel.h and
therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them
in programs which already include <sys.disklabel.h> is currently a
no-op.

This commit adds a number of such #includes.

Once I have verified that I have fixed all the places which need fixing,
I will commit the updated versions of the three #include files.

Sponsored by:   DARPA & NAI Labs.
2002-10-01 07:24:55 +00:00
nyan
f298368d20 Call bus_set_resource() to set the ioport resource. 2002-09-30 16:41:47 +00:00
nyan
7ce1df07a8 Added some buggy PC-98 PnP cards support. 2002-09-29 13:31:26 +00:00
nyan
eb3a3f6072 Merged from sys/isa/fd.c revision 1.238. 2002-09-29 11:43:14 +00:00
nyan
c047d90fa9 Merged from sys/dev/syscons/syscons.c revision 1.389. 2002-09-29 11:42:36 +00:00
nyan
58532be080 Merged from sys/dev/sio/sio.c revisions 1.380 and 1.381. 2002-09-29 11:41:48 +00:00
nyan
e52a22a75a MFi386: revisions 1.127, 1.128 and 1.129. 2002-09-24 03:17:38 +00:00
nyan
300259934b Move the com_emr register definition to sioreg.h. 2002-09-24 02:35:57 +00:00
nyan
c17fef1a4e Merged from sys/dev/sio/sio.c revision 1.379. 2002-09-24 02:26:55 +00:00
nyan
8146a5ddd7 MFi386: revisions 1.536 and 1.538. 2002-09-24 02:22:35 +00:00
alfred
ac315391ce use __packed. 2002-09-23 18:54:32 +00:00
phk
bb47c7e317 Remove #ifdef/#endif 3 years after the stuff they protected was removed.
Spotted by:	peter.
2002-09-21 08:00:01 +00:00
phk
57a346a213 (This commit touches about 15 disk device drivers in a very consistent
and predictable way, and I apologize if I have gotten it wrong anywhere,
getting prior review on a patch like this is not feasible, considering
the number of people involved and hardware availability etc.)

If struct disklabel is the messenger: kill the messenger.

Inside struct disk we had a struct disklabel which disk drivers used to
communicate certain metrics to the disklayer above (GEOM or the disk
mini-layer).  This commit changes this communication to use four
explicit fields instead.

Amongst the benefits is that the fields do not get overwritten by
wrong or bogus on-disk disklabels.

Once that is clear, <sys/disk.h> which is included in the drivers
no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in,
the few places that needs them, have gotten explicit #includes for
them.

The disklabel inside struct disk is now only for internal use in
the disk mini-layer, so instead of embedding it, we malloc it as
we need it.

This concludes (modulus any mistakes) the series of disklabel related
commits.

I belive it all amounts to a NOP for all the rest of you :-)

Sponsored by:   DARPA & NAI Labs.
2002-09-20 19:36:05 +00:00
phk
d376fc4110 For reasons now lost in historical fog, the bounds_check_with_label()
function were put in i386/i386/machdep.c from where it has been
cut and pasted to other architectures with only minor corruption.

Disklabel is really a MI format in many ways, at least it certainly
is when you operate on struct disklabel.

Put bounds_check_with_label() back in subr_disklabel.c where it belongs.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 17:51:00 +00:00
phk
82a79f8c8f #include <sys/disk.h> to get disk_err() prototype.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:40:49 +00:00
phk
1919170e90 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
6f6cc1a641 MFi386: revisions 1.534 and 1.535. 2002-09-19 13:42:11 +00:00
peter
a51c9b6627 Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
nyan
2d1ef1927d Merged from sys/isa/fd.c revisions 1.234, 1.235 and 1.236. 2002-09-16 07:39:47 +00:00
nyan
cb30d5a6d9 Merged from sys/dev/sio/sio.c revision 1.378. 2002-09-16 07:14:02 +00:00
nyan
879fee156b Merged from sys/isa/syscons_isa.c revision 1.18. 2002-09-16 07:11:43 +00:00
julian
c7e9e7e892 Allocate KSEs and KSEGRPs separatly and remove them from the proc structure.
next step is to allow > 1 to be allocated per process. This would give
multi-processor threads. (when the rest of the infrastructure is
in place)

While doing this I noticed libkvm and sys/kern/kern_proc.c:fill_kinfo_proc
are diverging more than they should.. corrective action needed soon.
2002-09-15 23:52:25 +00:00
jmallett
8fa852ab6c Fill out two fields (si_pid, si_uid) in the siginfo structure handed back
to userland in the signal handler that were not being iflled out before, but
should and can be.

This part of sendsig could be slightly refactored to use an MI interface, or
ideally, *sendsig*() would have an API change to accept a siginfo_t, which
would be filled out by an MI function in the level above sendsig, and said MI
function would make a small call into MD code to fill out the MD parts (some
of which may be bogus, such as the si_addr stuff in some places).  This would
eventually make it possible for parts of the kernel sending signals to set up
a siginfo with meaningful information.

Reviewed by:	mux
MFC after:	2 weeks
2002-09-07 19:12:53 +00:00
jmallett
f77e5caa9d Diff reduction in comments for filling the siginfo structure - refer to
filling in the POSIX parts, when doing the same thing in every port of
FreeBSD.
2002-09-07 18:56:18 +00:00
peter
fa099d1548 Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions)
if compiling with I686_CPU as a target.  CPU_DISABLE_SSE will prevent
this from happening and will guarantee the code is not compiled in.

I am still not happy with this, but gcc is now generating code that uses
these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher.
2002-09-07 07:02:12 +00:00
peter
385431ebc4 Take a shot at fixing up a whole stack of style and other embarresing
unforced errors that Bruce identified.  I have not yet addressed all of
his concerns.
2002-08-31 03:33:32 +00:00
peter
c3bdd669c3 Change hw.physmem and hw.usermem to unsigned long like they used to be
in the original hardwired sysctl implementation.

The buf size calculator still overflows an integer on machines with large
KVA (eg: ia64) where the number of pages does not fit into an int.  Use
'long' there.

Change Maxmem and physmem and related variables to 'long', mostly for
completeness.  Machines are not likely to overflow 'int' pages in the
near term, but then again, 640K ought to be enough for anybody.  This
comes for free on 32 bit machines, so why not?
2002-08-30 04:04:37 +00:00
jake
821a548da7 Renamed poorly named setregs to exec_setregs. Moved its prototype to
imgact.h with the other exec support functions.
2002-08-29 06:17:48 +00:00
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
nyan
a81e61d839 Merged from sys/dev/syscons/scvtb.c revision 1.9. 2002-08-22 13:24:00 +00:00
nyan
c2733acc80 Merged from sys/dev/syscons/syscons.c revision 1.388. 2002-08-22 13:23:15 +00:00
nyan
6cd21c7a13 Merged from sys/dev/syscons/syscons.c revisions 1.386 and 1.387. 2002-08-20 14:39:29 +00:00
peter
238c22491c remove unit counts from atkbdc, pckbd, sc 2002-08-20 00:10:22 +00:00
peter
6c52efa2a1 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
92f62a6fd1 MFi386: revisions 1.354 and 1.356.
Remove the mpt driver entry.
2002-08-13 12:25:01 +00:00
mjacob
d8202a09a4 Add support for the LSI-Logic Fusion/MP architecture.
This is an architecture that present a thing message passing interface
to the OS. You can query as to how many ports and what kind are attached
and enable them and so on.

A less grand view is that this is just another way to package SCSI (SPI or
FC) and FC-IP into a one-driver interface set.

This driver support the following hardware:

LSI FC909:	Single channel, 1Gbps, Fibre Channel (FC-SCSI only)
LSI FC929:	Dual Channel, 1-2Gbps, Fibre Channel (FC-SCSI only)
LSI 53c1020:	Single Channel, Ultra4 (320M) (Untested)
LSI 53c1030:	Dual Channel, Ultra4 (320M)

Currently it's in fair shape, but expect a lot of changes over the
next few weeks as it stabilizes.

Credits:

The driver is mostly from some folks from Jeff Roberson's company- I've
been slowly migrating it to broader support that I it came to me as.

The hardware used in developing support came from:

	FC909: LSI-Logic, Advansys (now Connetix)
	FC929: LSI-Logic
	53c1030: Antares Microsystems (they make a very fine board!)

MFC after:	3 weeks
2002-08-11 23:34:20 +00:00
brooks
a59a8c94a5 Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
blackend
9c8ad2f838 Fix the link to the Handbook 2002-08-01 17:21:18 +00:00
peter
501a9e51e5 gethints.awk is a machine-specific 4.x->5.x transition aid. We cannot
use a common one because pc98 has got very different values.  This only
needs to exist on platforms that existed under 4.x.
2002-07-26 03:52:30 +00:00
peter
0d8fe1f3c6 de-count pci 2002-07-23 06:38:47 +00:00
peter
2544700029 Add units to card, wdc, wcd, wst and wfd 2002-07-21 23:29:00 +00:00
peter
0e1289a90e Add explicit unit count on 'device pci' for ahc/ahd 2002-07-21 23:07:31 +00:00
peter
cc2882c16b Use pmap_kenter() rather than vtopte() and bashing the page tables
directly.
2002-07-18 00:42:53 +00:00
nyan
f6f2365013 MFi386: revision 1.524. 2002-07-17 12:43:52 +00:00
nyan
cda0b0612f MFi386: revision 1.350. 2002-07-17 12:42:37 +00:00
nyan
970ceb7d6e Check return status from fd_in() function. 2002-07-16 14:34:38 +00:00
markm
8b9e48e9c0 Retire the perl gethints.conf in favour of an awk version. Move
the awk version to a central place for maintenance.

Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
2002-07-16 09:28:25 +00:00
kato
b095d5165e MFi386: sys/i386/i386/machdep.c revision 1.522. 2002-07-14 09:33:26 +00:00
alfred
b349285ecb Move COMPAT_FREEBSD4 to arch-neutral sys/conf/NOTES.
Add COMPAT_FREEBSD4 to GENERIC for arches that existed in FreeBSD 4's time,
not just i386. (alpha and pc98)

Requested by: bde
2002-07-13 16:43:53 +00:00
peter
477d844890 s/procrunnable/kserunnable/ in a comment 2002-07-08 01:52:55 +00:00
nyan
d171267e15 MFi386: revision 1.521 2002-06-30 09:34:10 +00:00
rwatson
3e3677e3e3 Remove ALT_BREAK_TO_DEBUGGER. This was inconsistent (both in form
and function) with existing configuration choices.  Arguably if
ALT_BREAK_TO_DEBUGGER was present, so should have been
BREAK_TO_DEBUGGER.  Regardless, it broke the option sort order in
these kernel configuration files.

Requested by:	bde
2002-06-30 04:12:21 +00:00
kato
d3f2ba39a2 MFi386: sys/i386/i386/machdep.c rev. 1.520. 2002-06-25 09:10:38 +00:00
nyan
2c118c5fbb Merged from sys/dev/sio/sio.c revisions 1.376 and 1.377. 2002-06-24 15:24:42 +00:00
kato
467ba5e6b7 MFi386: sys/i386/isa/clock.c revision 1.187. 2002-06-24 08:04:47 +00:00
nyan
71120b685a MFi386: revisions from 1.342 to 1.344 2002-06-19 13:47:53 +00:00
nyan
b7dd05aa7c Backout previous change and merge from sys/dev/sio/sio.c revision 1.375. 2002-06-19 13:20:20 +00:00
nyan
9caea86019 Merged from sys/isa/fd.c revision 1.233. 2002-06-19 13:17:43 +00:00
n_hibma
90312e83bd 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
28bcbfe85d 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
f4fa5aa9e1 MFi386: revision 1.519 2002-05-14 12:31:47 +00:00
nyan
348895a33a Merged from sys/isa/fd.c revisions from 1.229 to 1.232. 2002-05-14 12:30:52 +00:00
nyan
6567706194 Merged from sys/dev/syscons/syscons.c revision 1.384 2002-05-14 12:29:34 +00:00
jmallett
e977af0eb9 Typo fix: detects -> detect.
Reviewed by:	phk
2002-05-03 17:59:25 +00:00
phk
26ffc19d1e 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
c0e3147cc6 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
0054f0f74b Simplify the RFC2783 and PPS_SYNC timestamp collection API. 2002-04-26 20:24:28 +00:00
phk
f227fb83e6 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
07692a7eda MFi386: revision 1.339. 2002-04-25 13:32:56 +00:00
nyan
c4a3241333 Merged from sys/dev/syscons/syscons.c revision 1.383 2002-04-25 13:25:36 +00:00
mux
a207e41bef Rework the kernel environment subsystem. We now convert the static
environment needed at boot time to a dynamic subsystem when VM is
up.  The dynamic kernel environment is protected by an sx lock.

This adds some new functions to manipulate the kernel environment :
freeenv(), setenv(), unsetenv() and testenv().  freeenv() has to be
called after every getenv() when you have finished using the string.
testenv() only tests if an environment variable is present, and
doesn't require a freeenv() call. setenv() and unsetenv() are self
explanatory.

The kenv(2) syscall exports these new functionalities to userland,
mainly for kenv(1).

Reviewed by:	peter
2002-04-17 13:06:36 +00:00
kato
4c6efe7dae MFi386: revision 1.517. 2002-04-11 09:45:41 +00:00
phk
77e3582887 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
phk
3234f33800 GC the "dumplo" variable, which is no longer used.
A lot of sys/*/*/machdep.c seems not to be.
2002-04-07 21:01:37 +00:00
nyan
8edde879fa Merged from sys/dev/syscons/syscons.c revisions 1.381 and 1.382. 2002-04-06 06:47:23 +00:00
nyan
3596e8cbe3 Merged from sys/isa/fd.c revision 1.228. 2002-04-06 06:43:55 +00:00
nyan
cc9354bb87 Merged from sys/dev/sio/sio.c revisions 1.370 and 1.371. 2002-04-06 06:19:10 +00:00
jhb
db9aa81e23 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
bde
14ae95f735 Moved signal handling and rescheduling from userret() to ast() so that
they aren't in the usual path of execution for syscalls and traps.
The main complication for this is that we have to set flags to control
ast() everywhere that changes the signal mask.

Avoid locking in userret() in most of the remaining cases.

Submitted by:	luoqi (first part only, long ago, reorganized by me)
Reminded by:	dillon
2002-04-04 17:49:48 +00:00
ru
d8ffece3c4 Dike out a highly insecure UCONSOLE option.
TIOCCONS must be able to VOP_ACCESS() /dev/console to succeed.

Obtained from:	OpenBSD
2002-04-03 10:56:59 +00:00
jhb
9d3d63fcbc - Move the MI mutexes sched_lock and Giant from being declared in the
various machdep.c's to being declared in kern_mutex.c.
- Add a new function mutex_init() used to perform early initialization
  needed for mutexes such as setting up thread0's contested lock list
  and initializing MI mutexes.  Change the various MD startup routines
  to call this function instead of duplicating all the code themselves.

Tested on:	alpha, i386
2002-04-02 22:19:16 +00:00
jhb
dc2e474f79 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
kato
cf12629bdc MFi386: revision 1.508. 2002-03-31 08:00:35 +00:00
nyan
3ef5867e0b MFi386: revision 1.506. 2002-03-30 11:14:52 +00:00
kato
589fdafe98 MFi386: revision 1.507. 2002-03-27 11:29:40 +00:00
dillon
dc5aafeb94 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
3d1eaf5230 Push BIO_FORMAT into a local hack inside the floppy drivers where
it belongs.
2002-03-26 19:16:37 +00:00
nyan
5beeede622 Merged from sys/dev/sio/sio.c revisions 1.366 and 1.369. 2002-03-25 13:41:06 +00:00
nyan
6ca94509e4 Merged from sys/dev/syscons/syscons.c revision 1.379. 2002-03-25 13:34:37 +00:00
nyan
1a251b4481 Fix style. 2002-03-25 12:44:03 +00:00
kato
b62f36d9ed MFi386: revision 1.65. 2002-03-20 12:28:03 +00:00
kato
471dbdd86d Remove __P. 2002-03-20 12:22:31 +00:00
kato
bb970de1a3 Remove __P. 2002-03-20 11:52:56 +00:00
kato
bb53806a04 MFi386: revision 1.505 (remove __P.) 2002-03-20 11:31:17 +00:00
kato
0e4d29dacb MFi386: revision 1.504. 2002-03-20 11:15:05 +00:00
kato
89c4600244 MFi386: revision 1.503. 2002-03-20 11:13:41 +00:00
nyan
dfdd4c8eb4 Use the dx register for the destination port address. A immediate port
address of outb is only 8 bits.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	3 days
2002-03-13 13:59:41 +00:00
nyan
d58e833adf MFi386: revision 1.502 2002-03-13 13:45:00 +00:00
nyan
8d1e8325c0 Free allocated buffer at siodetach().
MFC after:	3 days
2002-03-10 07:22:42 +00:00
nyan
d16edb37a4 MFi386: revision 1.501 2002-03-10 06:19:37 +00:00
nyan
a3f87581b9 - 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
nyan
a36826905c MFi386: revision 1.125 2002-03-08 11:38:00 +00:00
nyan
0ca2481527 MFi386: revision 1.498. 2002-03-02 13:19:22 +00:00
jhb
3706cd3509 Simple p_ucred -> td_ucred changes to start using the per-thread ucred
reference.
2002-02-27 18:32:23 +00:00
phk
7d2feac7d3 Disksort will not "munge" requests, BIO_ORDERED or not, so remove
use of BIO_ORDERED.
2002-02-22 09:14:06 +00:00
nyan
9b1a7d6a2e MFi386: revision 1.497 2002-02-20 05:09:57 +00:00
nyan
338edfed46 Add bus_space_unmap() and bus_space_free() functions to release
a bus_space_handle allocated by bus_space_subregion().
2002-02-18 13:44:46 +00:00
nyan
1ed4a21d07 - Split the routine to initialize a bus_space_handle into the separate
function.
- Only access a bus_space_handle if the resource type is SYS_RES_MEMORY or
  SYS_RES_IOPORT.
- Add the bus_space_subregion supports.
2002-02-17 09:16:45 +00:00
nyan
a0ebef6b45 MFi386: revisions 1.334 and 1.335 2002-02-16 13:13:22 +00:00
nyan
6ec5b39ebd MFi386: revisions 1.495 and 1.496 2002-02-16 12:59:58 +00:00
nyan
79addeb604 Fall through from AT_TYPE_DIRECT to AT_TYPE_CDROM.
Old ATAPI CD-ROM drives return 0 (direct-access) as the type of the device.

(The ata driver has the same problem.)

MFC after:	3 days
2002-02-11 05:46:25 +00:00
nyan
25bdd1bd55 Cosmetic changes. 2002-02-10 10:27:37 +00:00
nyan
41d18bbb0a - 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
bf52fb4e7a Fixed mouse cursor on a console.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2002-02-10 10:14:39 +00:00
nyan
3ecf840b66 MFi386: revisions 1.493 and 1.494. 2002-02-08 11:14:16 +00:00
julian
b5eb64d6f0 Pre-KSE/M3 commit.
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.

Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
2002-02-07 20:58:47 +00:00
bde
02ad3c7aca Use osigreturn(2) instead of sigreturn(2) plus broken magic for returning
from old signal handlers.  This is simpler and faster, and fixes (new)
sigreturn(2) when %eip in the new signal context happens to match the
magic value (0x1d516).  0x1d516 is below the default ELF text section,
so this probably never broken anything in practice.

locore.s:
In addition, don't build the signal trampoline for old signal handlers
when it is not used.

alpha:
Not fixed, but seems to be even less broken in practice due to more
advanced magic. A false match occurs for register #32 in mc_regs[].
Since there is no hardware register #32, a false match is only possible
for direct calls to sigreturn(2) that happen to have the magic number
in the spare mc_regs[32] field.
2002-02-03 09:13:58 +00:00
bde
10b0acc834 Improve the change in the previous commit: use a stub for osigreturn()
when it is not really used instead of unconditionalizing all of it.
2002-02-03 04:09:02 +00:00
bde
199578d7e8 Compile osigreturn() unconditionally since it will always be needed on
some arches and the syscall table is machine-independent.  It was
(bogusly) conditional on COMPAT_43, so this usually makes no difference.

ia64: in addition:
- replace the bogus cloned comment before osigreturn() by a correct one.
  osigreturn() is just a stub fo ia64's.
- fix the formatting of cloned comment before sigreturn().
- fix the return code.  use nosys() instead of returning ENOSYS to get
  the same semantics as if the syscall is not in the syscall table.
  Generating SIGSYS is actually correct here.
- fix style bugs.

powerpc: copy the cleaned up ia64 stub.  This mainly fixes a bogus comment.

sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
2002-02-01 15:44:03 +00:00
nyan
a5768e878f MFi386: revision 1.489. 2002-01-31 08:35:38 +00:00
nyan
b09c2d2590 Changed iskanji[12] to inline functions. 2002-01-31 08:29:46 +00:00
nyan
1c5563e778 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
95cff18f04 MFi386: revision 1.180 2002-01-31 04:28:52 +00:00
nyan
9e96f2c127 MFi386: revision 1.52 2002-01-31 04:22:20 +00:00
nyan
217835d13e MFi386: revision 1.64 2002-01-18 03:33:52 +00:00
nyan
8ecdb14a69 Merged from sys/dev/sio/sio.c revisions from 1.360 to 1.362. 2002-01-18 03:30:22 +00:00
nyan
26e43e1176 MFi386: revision 1.487 2002-01-18 03:28:02 +00:00
bde
4bc93bce95 Clear the single-step flag for signal handlers. This fixes bogus trace
traps on the first instruction of signal handlers.

In trap.c:syscall(), fake a trace trap if the single-step flag was set
on entry to the kernel, not if it will be set on exit from the kernel.
This fixes bogus trace traps after the last instruction of signal handlers.

gdb-4.18 (the version in FreeBSD) still has problems with the program in
the PR.  These seem to be due to bugs in gdb and not in FreeBSD, and are
fixed in gdb-5.1 (the distribution version).

PR:		33262
Tested by:	k Macy <kip_macy@yahoo.com>
MFC after:	1 day
2002-01-10 11:49:55 +00:00
nyan
6d6bb6e826 Merged from sys/dev/sio/sio.c revisions 1.354 and 1.358. 2002-01-06 09:54:50 +00:00
jhb
1ce407b675 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
6da727f183 Disabled the olpt driver temporarily to avoid 'repeat make_dev' panic. 2001-12-31 09:02:24 +00:00
nyan
a5097c5a66 MFi386: revision 1.178 2001-12-22 01:35:44 +00:00
nyan
d9dbac3752 MFi386: revision 1.124 2001-12-22 01:34:09 +00:00
nyan
943f95c0a8 Merged from sys/dev/syscons/syscons.c revision 1.377. 2001-12-22 01:32:32 +00:00
nyan
f8baad3a31 cosmetic changes. 2001-12-22 01:30:19 +00:00
nyan
db7ffc9554 MFi386: revision 1.179 2001-12-22 00:38:32 +00:00
nyan
560333de36 MFi386: revision 1.486 2001-12-22 00:35:49 +00:00
nyan
1384726539 Merged from sys/isa/{fd.c,fdreg.h} revisions 1.222 and 1.15, respectively. 2001-12-16 09:00:03 +00:00
iedowse
6829d5b143 Enable UFS_DIRHASH in the GENERIC kernel.
Suggested by:	silby
Reviewed by:	dillon
MFC after:	5 days
2001-12-14 16:27:11 +00:00
nyan
8b664dd49d 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
nyan
be7a644187 MFi386: revision 1.485 (the previous commit is not completely) 2001-12-12 12:27:59 +00:00
jhb
21b6b26912 Overhaul the per-CPU support a bit:
- The MI portions of struct globaldata have been consolidated into a MI
  struct pcpu.  The MD per-CPU data are specified via a macro defined in
  machine/pcpu.h.  A macro was chosen over a struct mdpcpu so that the
  interface would be cleaner (PCPU_GET(my_md_field) vs.
  PCPU_GET(md.md_my_md_field)).
- All references to globaldata are changed to pcpu instead.  In a UP kernel,
  this data was stored as global variables which is where the original name
  came from.  In an SMP world this data is per-CPU and ideally private to each
  CPU outside of the context of debuggers.  This also included combining
  machine/globaldata.h and machine/globals.h into machine/pcpu.h.
- The pointer to the thread using the FPU on i386 was renamed from
  npxthread to fpcurthread to be identical with other architectures.
- Make the show pcpu ddb command MI with a MD callout to display MD
  fields.
- The globaldata_register() function was renamed to pcpu_init() and now
  init's MI fields of a struct pcpu in addition to registering it with
  the internal array and list.
- A pcpu_destroy() function was added to remove a struct pcpu from the
  internal array and list.

Tested on:	alpha, i386
Reviewed by:	peter, jake
2001-12-11 23:33:44 +00:00
obrien
7fd9a6a23a Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
dillon
6fe4980d43 Allow maxusers to be specified as 0 in the kernel config, which will
cause the system to auto-size to between 32 and 512 depending on the
amount of memory.

MFC after:	1 week
2001-12-09 01:57:09 +00:00
des
d7018ca87e PROCFS requires PSEUDOFS. 2001-12-04 11:48:16 +00:00
nyan
8b353ec10a 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
1999b15875 MFi386: revision 1.326. 2001-11-17 13:48:31 +00:00
nyan
e5e59231f1 MFi386: revision 1.483 2001-11-17 13:16:51 +00:00
nyan
a2ed3a17cf Use make_dev_alias() instead of call make_dev() twice. 2001-11-12 13:06:04 +00:00
phk
9bb69cda68 GC userconfig after Peter axed it 15 months ago. 2001-11-05 21:46:35 +00:00
phk
6d85b02e40 Don't call cdevsw_add(). 2001-11-04 09:09:41 +00:00
phk
c665837dfd Rename the top 7 bits if disk minors to spare bits, rather than type bits. 2001-11-04 09:01:07 +00:00
nyan
175300ac14 MFi386: sys/i386/i386/machdep.c revisions 1.481 and 1.482 2001-10-30 00:53:19 +00:00
nyan
743ea98fc5 Removed pmc_isa_identify function. It is not needed.
Submitted by:	takawata
2001-10-28 04:16:50 +00:00
jlemon
86a48bed45 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
d59e014361 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
df2cb205e6 fix broken `compat_atdisk'(replace raw device name with block device's).
Reviewed by:	nyan
MFC after:	3 days
2001-10-23 09:39:09 +00:00
amorita
2d213e18a0 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
ea86fcc299 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
bde
3535bdaf2a Use the i386 version of npx.c. It has been merged with the pc98 version.
Approved by:	nyan
Not tested by:	bde
2001-10-21 06:14:12 +00:00
mjacob
bdff8645a6 Remove wx. 2001-10-20 18:50:31 +00:00
nyan
602d3a5092 MFi386: sys/i386/isa/npx.c revisions from 1.114 to 1.116 2001-10-19 12:30:16 +00:00
nyan
d9186a95fc Changed IO_NPXSIZE to 8 2001-10-19 12:24:45 +00:00
nyan
d201939dde MFi386: sys/i386/isa/clock.c revision 1.177 2001-10-19 11:52:49 +00:00
nyan
579f7ab43b MFi386: sys/i386/isa/pcaudio.c revision 1.63 2001-10-19 11:50:00 +00:00
nyan
83f01c8ad9 Merged from sys/isa/sio.c revisions from 1.344 to 1.347 2001-10-19 11:48:47 +00:00
nyan
4f448401bd MFi386: sys/i386/conf/GENERIC revision 1.320 2001-10-19 11:46:13 +00:00
mjacob
e666e03e1a Make SCSI changer and SES devices standard in generic kernels.
Reviewed by:	ken@kdm.org
2001-10-16 22:22:58 +00:00
nyan
c0f87bdb16 Rewrite the pc98 bus_space stuff.
The type of bus_space_tag_t is now a pointer to bus_space_tag structure,
and the bus_space_tag structure saves pointers to functions for direct
access and relocate access.

Added bsh_bam member to the bus_space_handle structure, it saves access
method either direct access or relocate access which is called by
bus_space_* functions.

Added the mecia device support. If the bs_da and bs_ra in bus tag are set
NEPC_io_space_tag and NEPC_mem_space_tag respectively, new bus_space stuff
changes the register of mecia automatically for 16bit access.

Obtained from:	NetBSD/pc98
2001-10-07 10:04:18 +00:00
rwatson
fe36bed05d o Modify pc98 syscons code to use securelevel_gt() instead of
direct variable checks.  (Yet another API to perform direct hardware I/O).

Obtained from:	TrustedBSD Project
2001-09-26 20:26:32 +00:00
brooks
34d1edd712 The faith(4) device is no longer a count device so don't specify a count. 2001-09-25 18:56:40 +00:00
nyan
6f24794a06 - Added #include <sys/systm.h>
- Cosmetic change
2001-09-24 06:41:06 +00:00
obrien
94003d0787 + Fix misplacement of `txp'
+ Document our -CURRENT debugging bits
2001-09-24 03:23:48 +00:00
peter
85182a8d78 Cleanup and split of nfs client and server code.
This builds on the top of several repo-copies.
2001-09-18 23:32:09 +00:00
jhb
5ee8d7e543 Whitespace fixes. 2001-09-18 21:05:04 +00:00
nyan
71709394dd MFi386: sys/isa/fd.c revision from 1.205 to 1.219. 2001-09-16 12:39:59 +00:00
nyan
d7801d853b Allocate i/o and memory resources using gdc driver. 2001-09-16 12:38:39 +00:00
nyan
3efb3f1278 MFi386: added comment for ed driver. 2001-09-16 05:34:34 +00:00
nyan
6390eef1b3 MFi386: cosmetic changes. 2001-09-16 05:34:05 +00:00
nyan
c6bf00383f 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
d80c40a1b1 MFi386: sys/i386/isa/pcaudio.c revision 1.59 and 1.61. 2001-09-16 05:30:59 +00:00
nyan
d76daa601a MFi386: sys/i386/isa/mse.c revision 1.54 and 1.55. 2001-09-16 05:30:08 +00:00
nyan
0588ccfa1a MFi386: sys/i386/isa/clock.c revision 1.175 and 1.176. 2001-09-16 05:29:27 +00:00
nyan
9313ae499c Added (commented out) ACPI attachment. 2001-09-16 05:28:16 +00:00
nyan
ac453a7645 MFi386: removed IDE_DELAY option. 2001-09-16 05:24:05 +00:00
nyan
84fc83cc31 Merged from sys/i386/isa/pcaudio.c revision 1.62 (KSE changes). 2001-09-15 15:37:52 +00:00
nyan
664c8246d0 Merged from sys/i386/apm/apm.c revision 1.123 (KSE changes). 2001-09-15 15:33:28 +00:00
imp
47b4d88f66 I don't think pc98 has acpi at all, so ifdef the acpi attachments for
now.
2001-09-15 00:03:32 +00:00
imp
58130a1fd0 Merge sys/isa/sio.c 1.343
KSE changes

Reviewed by: julian, bde, jhb
2001-09-14 05:05:08 +00:00
imp
18728e5844 Merge from sys/dev/syscons/syscons.c 1.373
kse changes

# Note: There are a number of trivial and non-trivial diffs between this and
# sys/dev/syscons/syscons.c that I didn't try to account for.

Reviewed by: julian, bde, jhb
2001-09-14 05:02:12 +00:00
imp
82d5083ea4 Merge from sys/i386/isa/sprk.c 1.50, 1.51
KSE changes and acpi attachment

Reviewed by: julian, bde, jhb
2001-09-14 04:58:30 +00:00
imp
a0b86da6e8 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
83dc9aa764 KSE changes for olpt driver
Reviewed by: julian, bde, jhb
2001-09-14 04:50:27 +00:00
imp
97c9cb2b95 Merged sys/i386/isa/npx.c 1.110, 1.111, 1.112 KSE
Reviewed by: julian, bde, jhb
2001-09-14 04:46:57 +00:00
imp
ee0b60ccf1 Changes necessary for KSE world
Reivewed by: julian, bde, jhb
2001-09-14 04:35:50 +00:00