Commit Graph

344 Commits

Author SHA1 Message Date
peter
d20363a259 Move the MSG* and SEM* options to opt_sysvipc.h
Remove evil allocation macros from machdep.c (why was that there???) and
use malloc() instead.
Move paramters out of param.h and into the code itself.
Move a bunch of internal definitions from public sys/*.h headers (without
#ifdef _KERNEL even) into the code itself.

I had hoped to make some of this more dynamic, but the cost of doing
wakeups on all sleeping processes on old arrays was too frightening.
The other possibility is to initialize on the first use, and allow
dynamic sysctl changes to parameters right until that point. That would
allow /etc/rc.sysctl to change SEM* and MSG* defaults as we presently
do with SHM*, but without the nightmare of changing a running system.
2000-05-01 13:33:56 +00:00
nyan
9135264441 Clean up MAXMEM routine.
Submitted by:	"K.Magara" <magara@maizuru-ct.ac.jp>
2000-04-30 08:52:47 +00:00
nyan
4b5a063f2f machine/random.h -> sys/random.h 2000-04-27 13:13:43 +00:00
phk
fe2c3527f6 Complete the bio/buf divorce for all code below devfs::strategy
Exceptions:
        Vinum untouched.  This means that it cannot be compiled.
        Greg Lehey is on the case.

        CCD not converted yet, casts to struct buf (still safe)

        atapi-cd casts to struct buf to examine B_PHYS
2000-04-15 05:54:02 +00:00
phk
6746c7cf0d Move B_ERROR flag to b_ioflags and call it BIO_ERROR.
(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.
2000-04-02 15:24:56 +00:00
peter
4ace50a779 Make sysv-style shared memory tuneable params fully runtime adjustable
via sysctl.  It's done pretty simply but it should be quite adequate.
Also move SHMMAXPGS from $machine/include/vmparam.h as the comments that
went with it were wrong... we don't allocate KVM space for the pages so
that comment is bogus..  The only practical limit is how much physical
ram you want to lock up as this stuff isn't paged out or swap backed.
2000-03-30 07:17:05 +00:00
kato
ca58b744cc Merged from sys/i386/i386/userconfig.c revision 1.179. 2000-03-28 15:07:28 +00:00
kato
72790a030b Merged from sys/i386/i386/machdep.c revision 1.387. 2000-03-28 15:04:29 +00:00
phk
f6b69faae4 Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new
field in struct buf: b_iocmd.  The b_iocmd is enforced to have
exactly one bit set.

B_WRITE was bogusly defined as zero giving rise to obvious coding
mistakes.

Also eliminate the redundant struct buf flag B_CALL, it can just
as efficiently be done by comparing b_iodone to NULL.

Should you get a panic or drop into the debugger, complaining about
"b_iocmd", don't continue.  It is likely to write on your disk
where it should have been reading.

This change is a step in the direction towards a stackable BIO capability.

A lot of this patch were machine generated (Thanks to style(9) compliance!)

Vinum users:  Greg has not had time to test this yet, be careful.
2000-03-20 10:44:49 +00:00
kato
7148133828 Merged from sys/i386/i386/userconfig.c rev 1.178. 2000-03-19 14:46:22 +00:00
nyan
055a6d41a7 Sync with sys/i386/i386/userconfig.c revision 1.175 and 1.176. 2000-03-17 12:24:59 +00:00
nyan
432c2c3ce0 Fixed to probe extended memory for over 256M or under 64M.
Submitted by:   chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-16 12:14:00 +00:00
kato
5dc1d2ae4a Merged from sys/i386/i386/userconfig.c revision 1.174. 2000-03-01 08:55:23 +00:00
kato
dd74612e62 Merged from sys/i386/i386/machdep.c revisions 1.384 and 1.385. 2000-03-01 08:53:59 +00:00
kato
89aa5d1e59 Synced with sys/i386/i386/userconfig.c rev 1.173. 2000-02-17 14:45:05 +00:00
peter
dd4b87e5a8 Clean up some loose ends in the network code, including the X.25 and ISO
#ifdefs.  Clean out unused netisr's and leftover netisr linker set gunk.
Tested on x86 and alpha, including world.

Approved by:	jkh
2000-02-13 03:32:07 +00:00
peter
d1505f3899 Zap isa_device -> id_conflicts. The sole user of it (userconfig) never
actually used it since the only device that specified it (vga0) was marked
as "FLG_INVISIBLE" in userconfig and therefore never shown.

Suggested by:	bde
2000-01-29 18:01:10 +00:00
peter
59cdfdbf7f Clean up some more loose ends..
isa_device->id_ri_flags and RI_FAST were not implemented and did nothing.
The two drivers that were mistakenly thinking this was working were
cy.c and loran.c - these should be converted to newbus.
GC (garbage collect) isa_device->id_alive
GC userconfig.c references to isa_device->id_scsiid (!).
2000-01-23 11:50:43 +00:00
peter
099985f531 GC isa_device->id_reconfig - it's not referenced anywhere anymore.
GC reconfig_isadev() - it's not used anymore.
2000-01-23 11:26:49 +00:00
kato
4dc628d880 Synced with sys/i386/i386/userconfig.c rev 1.169. 2000-01-20 08:35:32 +00:00
kato
63fd45dfa2 Synced with sys/i386/i386/userconfig.c rev 1.168. 2000-01-14 13:07:16 +00:00
kato
9288b189cd Synced with sys/i386/i386/userconfig.c rev 1.166. 2000-01-05 12:34:10 +00:00
kato
b85c91f294 Synced with sys/i386/i386/userconfig.c rev 1.165. 2000-01-03 05:37:01 +00:00
kato
ecd674ca69 - Cut down amount of memory in 64MB when BIOS tells the amount of
memory >= 64MB.
- Don't perform destructive memory inspection for 15 - 16MB system
  area.

Submitted by:	NOKUBI Hirotaka <hnokubi@yyy.or.jp>
		chi@bd.mbn.or.jp (Chiharu Shibata)
1999-12-26 04:22:27 +00:00
kato
0bb2879022 Remove ze and zp drivers. 1999-12-10 14:02:48 +00:00
kato
c5b32fb8d2 Merge from sys/i386/i386/userconfig.c rev 1.162 & 1.163. 1999-12-07 09:16:52 +00:00
luoqi
e1482a2b30 User ldt sharing. 1999-12-06 04:53:08 +00:00
nyan
374b493c6a Sync with sys/i386/i386/machdep.c revision up to 1.381. 1999-12-04 12:35:05 +00:00
nyan
84aa06cad4 Sync with sys/i386/i386/machdep.c revision up to 1.378. 1999-11-25 12:43:07 +00:00
archie
b600a98c28 Change the prototype of the strto* routines to make the second
parameter a char ** instead of a const char **.  This make these
kernel routines consistent with the corresponding libc userland
routines.

Which is actually 'correct' is debatable, but consistency and
following the spec was deemed more important in this case.

Reviewed by (in concept):	phk, bde
1999-11-24 01:03:08 +00:00
phk
70a7037341 s/p_cred->pc_ucred/p_ucred/g 1999-11-21 12:38:21 +00:00
nyan
da9be50a9f Sync with sys/i386/i386/machdep.c revision 1.375. 1999-11-12 12:00:35 +00:00
nyan
1532d3eb9e Sync with sys/i386/i386/machdep.c revision 1.371. 1999-11-03 08:25:40 +00:00
phk
53952016e3 Remove two private copies of strtoul()
Spotted by:	bde
1999-11-02 09:34:09 +00:00
alc
5a8d695b5b The useracc() calls in osigreturn() and sigreturn() should specify
VM_PROT_READ rather than VM_PROT_WRITE.  (This mistake predates
the B_READ/B_WRITE -> VM_PROT_READ/VM_PROT_WRITE change.)

Submitted by:	bde
1999-10-31 19:39:51 +00:00
phk
a383540c58 Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for the
"rw" argument, rather than hijacking B_{READ|WRITE}.

Fix two bugs (physio & cam) resulting by the confusion caused by this.

Submitted by:   Tor.Egge@fast.no
Reviewed by:    alc, ken (partly)
1999-10-30 06:32:05 +00:00
phk
664ff4bcbf useracc() the prequel:
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>.  This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.

This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
1999-10-29 18:09:36 +00:00
kato
a503d2c42f Sync with sys/i386/i386/machdep.c revision 1.370. 1999-10-13 11:03:41 +00:00
luoqi
4081a7f93f Add a per-signal flag to mark handlers registered with osigaction, so we
can provide the correct context to each signal handler.

Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK
as we did before the linuxthreads support merge (submitted by bde).

Move ps_sigstk from to p_sigacts to the main proc structure since signal
stack should not be shared among threads.

Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag.
Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag.

Reviewed by:	marcel, jdp, bde
1999-10-11 20:33:17 +00:00
marcel
8084a846fc Synchronize with i386 rev 1.367 1999-10-08 09:20:56 +00:00
marcel
972d9133f9 Re-introduction of sigcontext.
struct sigcontext and ucontext_t/mcontext_t are defined in such
a way that both (ie struct sigcontext and ucontext_t) can be
passed on to sigreturn. The signal handler is still given a
ucontext_t for maximum flexibility.

For backward compatibility sigreturn restores the state for the
alternate signal stack from sigcontext.sc_onstack and not from
ucontext_t.uc_stack. A good way to determine which value the
application has set and thus which value to use, is still open
for discussion.

NOTE: This change should only affect those binaries that use
      sigcontext and/or ucontext_t. In the source tree itself
      this is only doscmd. Recompilation is required for those
      applications.

This commit also fixes a lot of style bugs without hopefully
adding new ones.

NOTE: struct sigaltstack.ss_size now has type size_t again. For
      some reason I changed that into unsigned int.

Parts submitted by: bde
sigaltstack bug found by: bde
1999-10-04 19:33:58 +00:00
kato
5258aa10b1 Sync w/ sys/i386/i386/machdep.c revision 1.364. 1999-10-01 12:46:08 +00:00
marcel
63378f3f5b sigset_t change (part 3 of 5)
-----------------------------

By introducing a new sigframe so that the signal handler operates
on the new siginfo_t and on ucontext_t instead of sigcontext, we
now need two version of sendsig and sigreturn.

A flag in struct proc determines whether the process expects an
old sigframe or a new sigframe. The signal trampoline handles
which sigreturn to call. It does this by testing for a magic
cookie in the frame.

The alpha uses osigreturn to implement longjmp. This means that
osigreturn is not only used for compatibility with existing
binaries. To handle the new sigset_t, setjmp saves it in
sc_reserved (see NOTE).

the struct sigframe has been moved from frame.h to sigframe.h
to handle the complex header dependencies that was caused by
the new sigframe.

NOTE: For the i386, the size of jmp_buf has been increased to hold
      the new sigset_t. On the alpha this has been prevented by
      using sc_reserved in sigcontext.
1999-09-29 15:06:27 +00:00
kato
0d3cde37a3 Sync with sys/i386/i386/userconfig.c revision 1.159. 1999-09-22 11:59:14 +00:00
kato
3b221ce292 Merge from sys/i386/i386/machdep.c revision 1.361. 1999-09-09 09:58:05 +00:00
kato
07be80c5ed Merge from sys/i386/i386/userconfig.c revisions 1.157 & 1.158. 1999-09-07 12:11:52 +00:00
kato
dd6a139d59 Sync with sys/i386/i386/userconfig.c revision 1.156. 1999-09-02 13:44:52 +00:00
nyan
7275c838e2 - The old printer driver is renamed 'olpt'.
- Added the gdc driver.
1999-08-28 15:17:25 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
kato
efaa9a1d52 Merge from sys/i386/i386/userconfig.c revision 1.153. 1999-08-23 13:41:00 +00:00
kato
263f5e3372 Merge from sys/i386/i386/machdep.c revision 1.359. 1999-08-18 08:22:10 +00:00
kato
3b05cb224b Sync with sys/i386/conf/userconfig.c revision 1.152. 1999-08-10 08:35:57 +00:00
phk
192b6d4a54 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
kato
e2a8dc92a4 Sync with sys/i386/i386/machdep.c revision 1.357. 1999-07-30 11:42:05 +00:00
kato
4b411290bc Sync with sys/i386/i386/userconfig.c revision up to 1.150. 1999-07-26 12:14:59 +00:00
kato
4a87130406 Sync with sys/i386/i386/machdep.c revision 1.356. 1999-07-26 12:14:00 +00:00
kato
17bb6dec2b Sync with sys/i386/i386/userconfig.c revision 1.148. 1999-07-09 12:52:09 +00:00
kato
28ab6db671 Sync with sys/i386/i386/machdep.c revision 1.355. 1999-07-09 12:51:11 +00:00
kato
2451dd4093 Sync with sys/i386/i386/machdep.c revision up to 1.354. 1999-07-08 12:48:53 +00:00
msmith
86b465bec9 Move the initialisation/tuning of nmbclusters from param.c/machdep.c
into uipc_mbuf.c.  This reduces three sets of identical tunable code to
one set, and puts the initialisation with the mbuf code proper.

Make NMBUFs tunable as well.

Move the nmbclusters sysctl here as well.

Move the initialisation of maxsockets from param.c to uipc_socket2.c,
next to its corresponding sysctl.

Use the new tunable macros for the kern.vm.kmem.size tunable (this should have
been in a separate commit, whoops).
1999-07-05 08:52:54 +00:00
kato
b7863bd520 Sync with sys/i386/i386/machdep.c revision 1.349. 1999-07-03 08:31:32 +00:00
kato
231de2f5dd Sync with sys/i386/i386/userconfig.c revision 1.147. 1999-06-30 13:30:58 +00:00
kato
e2ce5fc5b4 Sync with sys/i386/i386/machdep.c revision 1.345. 1999-06-30 13:30:10 +00:00
kato
2dc1880100 Sync with sys/i386/i386/userconfig.c revision 1.146. 1999-06-28 13:10:03 +00:00
kato
d11e8857d0 Sync with sys/i386/i386/machdep.c revision 1.344. 1999-06-28 13:08:59 +00:00
kato
9ac46a1365 Sync with sys/i386/i386/machdep.c revision 1.342. 1999-06-21 11:14:27 +00:00
kato
9a29dc4060 Sync with sys/i386/i386/machdep.c revision up to 1.341. 1999-06-17 11:09:39 +00:00
kato
5d423fad45 Sync with sys/i386/i386/machdep.c revision 1.339.
New function getmemsize_pc98 is added in this commit, since PC98 is
quite different in obtaining memory size from IBM-PC.  Many lines of
this function is shareable with IBM-PC's getmemsize function, but
sharing needs many #ifdef PC98 statements.  Therefore, I gave up
sharing code with IBM-PC's and just added new function.
1999-06-03 13:49:52 +00:00
kato
87f01fc1bb Sync with sys/i386/i386/userconfig.c revision 1.145. 1999-05-25 10:32:10 +00:00
kato
a66981a7b5 Sync with sys/i386/i386/userconfig.c revision 1.144. 1999-05-17 12:09:07 +00:00
kato
69f7e94a87 Sync with sys/i386/i386/userconfig.c revision 1.143. 1999-05-14 10:05:55 +00:00
luoqi
82cd8924f6 Unbreak VESA on SMP. 1999-05-12 21:39:07 +00:00
kato
001d422970 Sync with sys/i386/i386/usercnofig.c revision 1.142. 1999-05-11 08:36:12 +00:00
kato
e6f4750a60 Sync with sys/i386/i386/userconfig.c revision 1.141. 1999-05-09 04:30:08 +00:00
kato
029047fb52 Sync with sys/i386/i386/userconfig.c revision 1.138. 1999-05-06 09:15:20 +00:00
luoqi
7a87284792 Initialize dblfault_tss.tss_fs to the per-cpu private data segment selector. 1999-05-06 00:54:54 +00:00
luoqi
a82ef47430 Do not set curproc until proc0 is fully initialized (in proc0_init()). 1999-05-06 00:39:00 +00:00
kato
a7e2968508 Sync with sys/i386/i386/machdep.c revision 1.332. 1999-04-28 08:03:54 +00:00
kato
50a769dd9a Sync with sys/i386/i386/userconfig.c revision 1.137. 1999-04-25 04:06:43 +00:00
kato
ab81f5679a Sync with sys/i386/i386/userconfig.c revision 1.136. 1999-04-20 09:10:47 +00:00
kato
d92e93f615 Sync with sys/i386/i386/machdep.c revision 1.330. 1999-04-20 09:08:51 +00:00
kato
618d63af7d Sync with sys/i386/i386/userconfig.c revision 1.135. 1999-04-19 11:06:08 +00:00
kato
1b1ffe3d25 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
5adedfe6ea Sync with sys/i386/i386/userconfig.c revision 1.133. 1999-04-10 04:44:33 +00:00
jdp
d459e4e237 Restore support for executing BSD/OS binaries on the i386 by passing
the address of the ps_strings structure to the process via %ebx.
For other kinds of binaries, %ebx is still zeroed as before.

Submitted by:	Thomas Stephens <tas@stephens.org>
Reviewed by:	jdp
1999-04-03 22:20:03 +00:00
kato
dea5a54d57 Sync with sys/i386/i386/machdpe.c revision 1.327. 1999-03-06 09:43:01 +00:00
kato
085ad6b74a Sync with sys/i386/i386/userconfig.c revision 1.132. 1999-02-25 11:05:50 +00:00
kato
4923975c19 Sync with sys/i386/i386/machdep.c revision 1.326. 1999-02-16 11:07:06 +00:00
kato
147416bc97 Sync with sys/i386/i386/machdep.c revision 1.325. 1999-02-12 09:15:33 +00:00
kato
80e076856a Sync with sys/i386/i386/userconfig.c revision 1.130. 1999-02-10 13:02:38 +00:00
kato
002f0881b3 Sync with sys/i386/i386/userconfig.c revision 1.129. 1999-02-04 13:58:44 +00:00
kato
a894112ccc Sync with sys/i386/i386/machdep.c revision 1.324. 1999-02-04 09:55:42 +00:00
kato
6d1219bba6 Sync with sys/i386/i386/userconfig.c revision 1.128. 1999-01-31 17:44:06 +00:00
kato
b68fa72213 Sync with sys/i386/i386/machdep.c revision 1.323. 1999-01-29 10:43:09 +00:00
kato
6f9d55c742 Sync with sys/i386/i386/userconfig.c revision 1.127. 1999-01-28 09:13:20 +00:00
kato
e5fb4f3da7 Sync with sys/i386/i386/userconfig.c revision 1.126. 1999-01-18 11:01:57 +00:00
kato
441d10187c Sync with sys/i386/i386/machdep.c revision up to 1.125. 1999-01-16 11:39:08 +00:00
kato
bc2b56db7c Sync with sys/i386/i386/machdep.c revision up to 1.322. 1999-01-16 11:38:03 +00:00
kato
363838f218 Sync with sys/i386/i386/userconfig.c revision up to 1.120. 1999-01-08 16:05:27 +00:00
kato
c55acc95d8 Sync with sys/i386/i386/machdep.c revision 1.320. 1999-01-08 16:04:20 +00:00