Commit Graph

5100 Commits

Author SHA1 Message Date
hsu
ec30a51e15 From Lite2: moved acct_process() prototype over to acct.h.
Reviewed by:	davidg & bde
1996-03-11 02:27:53 +00:00
hsu
c98ab0ae07 Merge in Lite2: add whiteout flags to namei parameter descriptors
add function prototype for relookup()
Spruce up number formatting.
Reviewed by:	davidg & bde
1996-03-11 02:25:04 +00:00
hsu
6003bbba35 Merge in Lite2: buf fix with comparison of wrong field against EXTPROC.
Did not accept change of second argument to ioctl from int to u_long.
Reviewed by:	davidg & bde
1996-03-11 02:24:39 +00:00
hsu
d457fd91fe From NetBSD: add #include <sys/acct.h> for acct_process() prototype.
Reviewed by:	davidg & bde
1996-03-11 02:24:21 +00:00
hsu
5a0d9381db From Lite2: add typedef for register_t.
Reviewed by:	davidg & bde
1996-03-11 02:23:56 +00:00
hsu
2976fbf587 Merge in Lite2: add function prototype.
Note: Lite2 struct sysent changes need to go in FreeBSD sysent.h instead.
Leave out prototype for nosys() until convert makesyscalls.sh
  over to Lite2 format, if we ever do so.
Reviewed by:	davidg & bde
1996-03-11 02:23:33 +00:00
hsu
cd9494f8e3 Merge in Lite2: use machine-independent types
add kernel function prototype
Reviewed by:	davidg & bde
1996-03-11 02:22:58 +00:00
hsu
29549bcae1 Merge in Lite2: use machine-independent types.
Reviewed by:	davidg & bde
1996-03-11 02:22:40 +00:00
hsu
1a9d00f299 Merge in Lite2: clean up function prototypes.
Did not accept change of second argument to ioctl from int to u_long.
Reviewed by:	davidg & bde
1996-03-11 02:22:23 +00:00
hsu
9fc728e37b From Lite2: change code parameter to u_long and initialize ps_sig.
Reviewed by:	davidg & bde
1996-03-11 02:22:02 +00:00
hsu
5a39b702f3 Change type of code argument to sendsig from unsigned to u_long to make it
consistent w/ signalvar.h and kern_sig.c.
Reviewed by:	davidg & bde
1996-03-11 02:21:42 +00:00
hsu
5c18dc0fa7 Merge in Lite2: add function prototypes
remove bogus function prototype for issig()---no such function
		fix comment
Lite2 changed type of ps_code from int to long.  We change it to u_long
  to make it consistent w/ its usage in kern_sig.c.
Did not accept type change to ps_addr field.  Delete it instead as it is
  not used anywhere.
Reviewed by:	davidg & bde
1996-03-11 02:21:04 +00:00
hsu
bd5ab20405 Merge in Lite2: cosmetic indentation change.
We already have the other Lite2 changes, which consists of additional
  function prototypes.
Reviewed by:	davidg & bde
1996-03-11 02:20:13 +00:00
hsu
3e5254600b Merge in Lite2: use fixed-width types.
Did not accept changes to types of off_t and pid_t.  See
  <machine/ansi.h> for explanation.
Did not accept changes to major and minor macros upon bde's review.
  These changes are unnecessary.
Did not accept type change to fd_mask upon bde's review.
  This change is unnecessary as long as sizeof(fd_mask) divides FD_SETSIZE.
Reviewed by:	davidg & bde
1996-03-11 02:19:02 +00:00
hsu
17af060880 From Lite2: rename fs to vfs.
Reviewed by:	davidg & bde
1996-03-11 02:18:23 +00:00
hsu
57d0ae7f6b Merge in Lite2: rename fs to vfs.
Reviewed by:	davidg & bde
1996-03-11 02:17:53 +00:00
hsu
2dda423ea7 Merge in Lite2: LIST replacement for f_filef, f_fileb, and filehead.
Did not accept change of second argument to ioctl from int to u_long.
Reviewed by:	davidg & bde
1996-03-11 02:17:30 +00:00
hsu
130a0c4eb9 Merge in Lite2: LIST replacement for f_filef, f_fileb, and filehead.
Reviewed by:	davidg & bde
1996-03-11 02:17:11 +00:00
hsu
e41d5d4490 Merge in Lite2: no changes required. Just update CSRG id.
Our changes since Lite1 include all the added functionality of Lite2.
Reviewed by:	davidg & bde
1996-03-11 02:16:19 +00:00
hsu
0412bb25eb Merge in Lite2: use fixed-width types.
Reviewed by:	davidg & bde
1996-03-11 02:15:32 +00:00
hsu
a50b481094 Merge in Lite2: use fixed-width types
add POSIX compatibility
		add union fs defines
Reviewed by:	davidg & bde
1996-03-11 02:15:04 +00:00
hsu
56e22c0fb6 Merge in Lite2: fix comment
optimize TAILQ_INSERT_HEAD
Reviewed by:	davidg & bde
1996-03-11 02:14:38 +00:00
hsu
6a74d1c596 Merge in Lite2: clean up casts for architectures where the size of addresses
are bigger than the size of ints
		add function prototypes
		reorder some fields
Did not add prototype for m_reclaim().  It's only used in kern/uipc_mbuf.c and
  is declared static there.
Reviewed by:	davidg & bde
1996-03-11 02:14:16 +00:00
hsu
051281a9ca Merge in Lite2: stylistic changes to function prototypes
add comments
Did not accept change of second argument of ioctl prototype from int to u_long.
Did not merge in changes to fields in bdevsw and cdevsw.
Reviewed by:	davidg & bde
1996-03-11 02:13:32 +00:00
hsu
077c32adf9 Merge in Lite2: add function prototypes.
Did not accept prototypes for unp_attach(), unp_bind(), unp_connect(),
  unp_detach(), unp_discard(), unp_disconnect(), unp_drop(),
  np_gc(), unp_mark(), unp_scan(), and unp_shutdown().
They are used only in uipc_usrreq.c and declared static there.
Reviewed by:	davidg & bde
1996-03-11 02:12:57 +00:00
hsu
0e0f68e20c Merge in Lite2: change manifest constant values for NOCRED and FSCRED
stylistic changes to function prototypes
Reviewed by:	davidg & bde
1996-03-11 02:11:48 +00:00
hsu
a341ca7283 Merge in Lite2: make timespec struct POSIX.4 compliant
stylistic changes to function prototypes
Reviewed by:	davidg & bde
1996-03-11 02:11:25 +00:00
hsu
a114dfdef4 Merge in Lite2: no changes necessary. Just update CSRG id.
Reviewed by:	davidg & bde
1996-03-11 02:10:41 +00:00
hsu
c646518825 Merge in Lite2: use fixed-width types.
Reviewed by:	davidg & bde
1996-03-11 02:10:14 +00:00
hsu
4c6bf31117 Merge in Lite2: remove u_long cast from B_MAGICMASK and B_DEVMAGIC
cosmetic changes to comments and number formatting
Reviewed by:	davidg & bde
1996-03-11 02:09:55 +00:00
hsu
b2cffebd39 Merge in Lite2: bump BSD date from 199306 to 199506.
Reviewed by:	davidg & bde
1996-03-11 02:09:24 +00:00
hsu
96fd2c2d5c Merge in Lite2: sync up comments.
Reviewed by:	davidg & bde
1996-03-11 02:09:09 +00:00
hsu
cbb96d164d Merge in Lite2: resolve manifest constant numbering in favor of least
required changes and also add parentheses around BUCKETINDX macro body.
Reviewed by:	davidg & bde
1996-03-11 02:08:50 +00:00
hsu
a50b7fec15 Merge in Lite2: only update CSRG id---the one change made in Lite2
to move the key_t typedef to types.h has already been made in a
    previous commit.
Reviewed by:	davidg & bde
1996-03-11 02:08:16 +00:00
hsu
ba29c3a5a4 Merge in Lite2: use fixed-width types.
Reviewed by: davidg & bde
1996-03-11 02:07:37 +00:00
hsu
36a89341b6 Merge in Lite2: use fixed-width types and reformat comments.
Reviewed by:	davidg & bde
1996-03-11 02:06:30 +00:00
hsu
8d64248f48 Merge in Lite2: use fixed-width types and add whiteout file type.
Reviewed by: davidg & bde
1996-03-11 02:05:52 +00:00
hsu
ad9ba5c065 Merge in Lite2: rename B_APPENDWRITE to B_NEEDCOMMIT.
The other change to b_pfcent is no longer pertinent, since we've
  deleted that field.
Reviewed by: davidg & bde
1996-03-11 02:04:27 +00:00
hsu
a5369c6beb Merge in Lite2: fix typo in comment.
Reviewed by: davidg & bde
1996-03-11 02:03:11 +00:00
peter
23971d11f7 Tweak the data/bss segment page count. The last version worked
with all the test cases I tried, I'm sure this is more correct.

Tweak some prototypes.
1996-03-10 23:44:40 +00:00
peter
36be7861a2 Fix the vm_map_remove and vm_map_protect calls.. Somewhere along the
line, these had got (start, length) arguments instead of (start, end)
args.  This could be the cause of Robert Sanders lockups with ZMAGIC
binaries.
1996-03-10 23:25:17 +00:00
dyson
1762c240c6 Improved efficiency in pmap_remove, and also remove some of the pmap_update
optimizations that were probably incorrect.
1996-03-10 23:06:00 +00:00
peter
8bb0b9e3fc linux_interp now moved into sys/i386/linux/linux_sysvec.c, but still
connected at load and unload time from here.
1996-03-10 22:43:37 +00:00
peter
b77b564f89 Move the elf linux_interp structure from the lkm stub to here so that it
can be referenced when the linux emulator is statically compiled into the
kernel.
1996-03-10 22:42:16 +00:00
peter
c4bb75ca77 Fix some rounding problems.. In some (fairly rare) situtaions it mapped
one page too many, which caused obreak() to fail in vm_map_find() with
ENOMEM because of the conflicting page.
1996-03-10 22:37:34 +00:00
peter
7042ac99f1 Implement rudumentry support for the linux TIOC[SG]ETSERIAL ioctl's.
To complete this, some extra state has to be kept somewhere so that the
B38400 flag in Linux can be correctly translated to/from either 38400,
57600 or 115200.

Submitted by: Robert Sanders <rsanders@mindspring.com>
1996-03-10 22:30:53 +00:00
peter
abd3e18f4a Fix the getdents() emulation, the Linux ELF libraries use this, and
this code was not quite right (linux has a readdir and getdents syscall,
with the same args. readdir only returns one entry and uses a mutant
dirent structure.  This code was also returning the mutant form for
getdents as well.  My fault for missing this before.)
1996-03-10 22:27:51 +00:00
peter
a8eb1245c4 Fix a (mostly harmless) bogon when calculating the start of the stack gap. 1996-03-10 22:24:54 +00:00
peter
0f7637f97d Fix a (mostly harmless) bogon when allocating space above the stack
in the stack gap..
1996-03-10 22:23:51 +00:00
dg
b17813cfc6 More missing int32 -> int32_t... 1996-03-10 18:33:43 +00:00
dg
6bafa8eb11 Fixed some missing int32 -> int32_t 1996-03-10 18:17:54 +00:00
jkh
9053b7cee7 u_int8 -> u_int8_t 1996-03-10 12:52:47 +00:00
sos
c345beb4bb First attempt at FreeBSD & Linux ELF support.
Compile and link a new kernel, that will give native ELF support, and
provide the hooks for other ELF interpreters as well.

To make native ELF binaries use John Polstras elf-kit-1.0.1..
For the time being also use his ld-elf.so.1 and put it in
/usr/libexec.

The Linux emulator has been enhanced to also run ELF binaries, it
is however in its very first incarnation.
Just get some Linux ELF libs (Slackware-3.0) and put them in the
prober place (/compat/linux/...).
I've ben able to run all the Slackware-3.0 binaries I've tried
so far.
(No it won't run quake yet :)
1996-03-10 08:42:54 +00:00
gibbs
7bcff6c308 Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.
1996-03-10 07:13:15 +00:00
gibbs
0018fb13de aic7870.c, ncr.c:
Cleanse the SCSI subsystem of its internally defined types
	u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.

aic7870.c:
	Handle Seeprom data a little better.
1996-03-10 07:12:49 +00:00
gibbs
2d58c591c5 bt.c, aic7xxx.c:
Cleanse the SCSI subsystem of its internally defined types
	u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.

aic7xxx.c:
	Fix the reset code.
	Instead of queing up all of the SCBs that timeout during timeout
	processing, we take the first and have it champion the effort.
	Any other scbs that timeout during timeout handling are given
	another lifetime to complete in the hopes that once timeout
	handing is finished, they will complete normally.  If one of
	these SCBs times out a second time, we panic and Justin tries
	again.

	The other major change is to queue flag aborted SCBs during timeout
	handling, and "ahc_done" them all at once as soon as we have the
	controller back into a sane state.  Calling ahc_done any earlier
	will cause the SCSI subsystem to toss the command right back at
	us and the attempt to queue the command will conflict with what
	the timeout routine is trying to accomplish.

	The aic7xxx driver will now respond to bus resets initiated by
	other devices.
1996-03-10 07:11:45 +00:00
gibbs
66c0822374 Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.
1996-03-10 07:04:48 +00:00
gibbs
6615bc2b12 aha1742.c:
Cleanse the SCSI subsystem of its internally defined types
		u_int32, u_int16, u_int8, int32, int16, int8.
		Use the system defined *_t types instead.

eisaconf.c:
	Cosmetic formatting chagnes.
1996-03-10 07:04:27 +00:00
gibbs
ca7dd81ad7 Reset the DMA control register whenever we reset the sequencer.
Clear LASTPHASE on busfree so the kernel driver can tell that the
   sequencer is idle.
Fix some comments to reflect reality.
1996-03-10 07:02:32 +00:00
jkh
37dfe6c84d Don't print DMA busy messages - the sound code apparently runs
afoul of this without actually providing useful information and
works nonetheless.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-03-10 02:10:27 +00:00
wosch
d99c5cd482 [Ee]rrs -> Errs errs, save one process for make clean 1996-03-09 23:48:55 +00:00
rgrimes
7a52395b07 Convert a timeout loop from 100 iterations of 15uS to 50
iterations of 30uS so that really fast systems stop getting
timeout messages from the Riscom driver.

Reviewed by:	ache, peter@nmti.com (Peter da Silva)
1996-03-09 18:59:00 +00:00
peter
648a0b7e64 Fix broken SCSI_DELAY option.. (missing #include "opt_scsi.h")
Pointed out by: Boyd Faulkner <faulkner@asgard.bga.com>
1996-03-09 07:13:57 +00:00
dyson
43a7b8957d Make sure that the zero flag is cleared upon completion of paging I/O. 1996-03-09 07:02:52 +00:00
dyson
3c529ca6f6 Correct some new and older lurking bugs. Hold count wasn't being
handled correctly.  Fix some incorrect code that was included
to improve performance. Significantly simplify the pmap_use_pt and
pmap_unuse_pt subroutines.  Add some more diagnostic code.
1996-03-09 07:01:21 +00:00
dyson
b27dd483bf Delay forking a process until there are more pages available. It was
possible to deadlock with the low threshold that we had used.
1996-03-09 06:57:53 +00:00
dyson
154de7e954 Modify a threshold for waking up the pageout daemon. Also, add a consistancy
check for making sure that held pages aren't freed (DG).
1996-03-09 06:56:39 +00:00
dyson
5202f34cb8 Add a missing initialization of the hold_count for device pager ficticiouse
pages.
1996-03-09 06:54:41 +00:00
dyson
939a056fce Fix a calculation for a paging parameter. 1996-03-09 06:53:27 +00:00
dyson
714d80047d Fix two problems:
The pmap_remove in vm_map_clean incorrectly unmapped the entire
	map entry.
	The new vm_map_simplify_entry code had an error (the offset
	of the combined map entry was not set correctly.)
Submitted by:	Alan Cox <alc@cs.rice.edu>
1996-03-09 06:52:05 +00:00
dyson
60c5f68e66 Set the page valid bits in fewer places, as opposed to being scattered
in various places.
1996-03-09 06:48:26 +00:00
dyson
a412aa1276 Correct handling of dirty pages in I/O buffers. The case where pages
residing in a buffer that had been dirtied by a process was being
handled incorrectly.  The pages were mistakenly placed into the
cache queue.  This would likely have the effect of mmaped page modifications
being lost when I/O system calls were being used simultaneously to
the same locations in a file.
Submitted by: davidg
1996-03-09 06:46:51 +00:00
dyson
c4ea21d5f0 Put the "free vnode isn't" check back in the right place. 1996-03-09 06:43:19 +00:00
dyson
828ab130f4 Remove a now unnecessary function prototype. 1996-03-09 06:42:15 +00:00
ache
8479e04c61 Make user-level PPP on-demand with dynamic IP actually work.
Story so fr:
1) PPP on-demand with static IP works.
2) PPP on-demand with dynamic IP says "Host is down" on any IP request
The problem is that tun driver check its READY state by *first* ifconfig address.
i.e.:
set ifaddr <addr> <addr2>
works (static IP) and
set ifaddr 0 <addr2>
not works (dynamic IP) because first address is equal 0.
Since tun is always POINTOPOINT interface, dst address is more meaningfull.
I change checking to second (dst) address in READY test.
PPP on-demand finally works.
1996-03-08 11:07:07 +00:00
bde
4dce10c889 Saved 14 bytes by avoiding gas braindamage and 8 bytes by better
instruction selection, for a total of 16 bytes after padding.  Whee.
1996-03-08 07:27:52 +00:00
bde
a9f0489545 Probe the keyboard if PROBE_KEYBOARD is defined instead of when `notyet'
is defined and FORCE_COMCONSOLE isn't defined.

Don't compile any keyboard probing code if PROBE_KEYBOARD isn't defined.

Makefile:
Removed -I paths.  They weren't used, and the one to /sys hasn't worked
since the source directory was moved down one level.
1996-03-08 06:29:07 +00:00
bde
68ccf5be29 Made the timeouts in gets() machine-independent. Use the BIOS tick
counter instead of the BIOS time call to save space.

Reworked the anti-noise timeout to avoid duplicating code.  The timeout
in the outer loop is now restarted after every noise timeout, so it is
now possible for the total timeout to be infinite; previously, the maximum
total timeout was 150000 seconds.
1996-03-08 06:11:33 +00:00
bde
f965f7a3cd Load %fs with the flat data segment selector while in protected mode.
This will be used for convenient access to the BIOS variables.
1996-03-08 05:43:46 +00:00
bde
4db3b5c0cd Fixed restoring segment descriptors in prot_to_real(). The descriptors
must have limit 0xffff and attribute G = 0 (byte granularity) as well
as other properties that they already had (see e.g., the Intel i486
manual section 22.5).  Not restoring them broke Ctrl-Alt-Del in the
bootstrap for my ASUS P55TP4XE system, probably because the Award BIOS
does anti-tracing stuff involving inaccessible %esp's.

asm.S:
Don't use lret in prot_to_real().  This reduces the risk of using an
incompletely intialized stack segment and saves space.

Submitted by:	"K.Higashino" <a00303@cc.hc.keio.ac.jp> (on 13 Jan 1995!)
		reworked by me
1996-03-08 05:15:54 +00:00
dyson
6f15916258 Fix a problem in the swap pager that caused some of the pages that
were paged in under low swap space conditions to both loose their
backing store and their dirty bits.  This would cause pages to
be demand zeroed under certain conditions in low VM space conditions
and consequential sig-11's or sig-10's.  This situation was made
worse lately when the level for swap space reclaim threshold was
increased.
1996-03-06 04:31:46 +00:00
peter
79c4709507 update linux_times() and linux_utime() emulation,
fix sigsuspend() (actually back out my recent change there)
and regen the syscall tables..
1996-03-04 21:03:11 +00:00
peter
ced3fed03c Oops.. I was wrong about the change to sigsuspend. The library interface is
different to the syscall under Linux, back this out.

Use correct arg type for linux_utime()
1996-03-04 20:58:47 +00:00
phk
f9dfce55a3 Validate the length before we trust it.
Submitted by:	Andrew.Gordon@net-tel.co.uk
1996-03-04 15:58:25 +00:00
peter
963af51f00 Add support for LINUX_TCSETAW and LINUX_TCSETAF, which Linux-pine uses.
Submitted by: Robert Sanders <rsanders@mindspring.com>
1996-03-04 11:15:19 +00:00
dyson
34db0e1478 Fix a problem that pages in a mapped region were not always
properly invalidated.  Now we traverse the object shadow chain
properly.
1996-03-04 02:04:24 +00:00
dyson
0f439d3855 In order to fix some concurrency problems with the swap pager early
on in the FreeBSD development, I had made a global lock around the
rlist code.  This was bogus, and now the lock is maintained on a
per resource list basis.  This now allows the rlist code to be used for
almost any non-interrupt level application.
1996-03-03 21:11:08 +00:00
peter
657321c850 Deal with NetBSD byte-swapped a.out magic when checking the MID to exclude
linux binaries from the *BSD a.out loader. This is a hack, but lets me run
static NetBSD binaries.  Dynamic binaries are a much bigger problem because
the shared libraries would conflict with our native libraries, so a
/compat/netbsd alternate namespace and translation would be needed.
1996-03-03 20:06:53 +00:00
dyson
1a4ab981c8 Keep fork from over extending the number of processes. Since u_map is
sized exactly for maxproc, the occasional overrunning the maxproc limit
can cause problems.
1996-03-03 19:48:45 +00:00
peter
afa8f5554c Add support for the old-style Linux termio (not termios) TCGETA etc.
Also, LINUX_POSIX_VDISABLE is \0, FreeBSD's is 0xff. Convert between them.

This enables some more programs to run, including the Livingston Portmaster
utilities (PMtools).

Submitted by: Robert Sanders <rsanders@mindspring.com>
1996-03-03 19:07:50 +00:00
peter
66ff95daf2 Remove the #ifdef notyet from the prototype of vm_map_simplify. John
re-enabled the function but missed the prototype, causing a warning.
1996-03-03 18:53:10 +00:00
peter
dc00947807 Add missing prototype for newly public vn_vmio_open function, next to
vn_vmio_close.
1996-03-03 18:51:33 +00:00
peter
b64b26e39b Make the handshake lines do the right thing. This is untested by the author
but others say it's working. (DTR etc)

Closes PR#884

Submitted-by: John Hay <jhay@mikom.csir.co.za>
1996-03-03 08:42:28 +00:00
jkh
42eaf41178 USER_LDT changes for the Willows TwinXPDK toolkit. Only tested with WINE
since that's the only other USER_LDT using code that I know of.
Submitted by:	Gary Jennejohn <Gary.Jennejohn@munich.netsurf.de>
Obtained from: {Origin of diffs may be someone else - I only rec'd them from
Gary}
1996-03-03 01:57:45 +00:00
dyson
2ff13eb1c5 Fix the buffer queue problem differently. The previous fix could panic
with a buffer not on queue panic.
1996-03-03 01:04:28 +00:00
dyson
0d1549a1a4 Fix a problem with the rlist code that it can have virtual pages that
don't really exist yet.  This can break pstat -s.  Jeesh, the rlist
code needs to be cleaned up...
1996-03-02 22:57:45 +00:00
dyson
48fd636ca0 Handle the bogus device that MFS uses as its VBLK device. We now don't
try to VMIO open it on MFS mounts.  This will fix the mfs_badops
panic.
1996-03-02 22:18:34 +00:00
peter
a306e3e115 Minor touch-up... make two functions static, and add missing $Id$ 1996-03-02 21:00:11 +00:00
wollman
f2d6bde36c Add RCS Id. 1996-03-02 20:35:51 +00:00
peter
89cbf58231 Update the linux lkm to use the new file list and build routine.
This is a bit of a kludge and needs more work.
1996-03-02 20:00:35 +00:00