Commit Graph

4959 Commits

Author SHA1 Message Date
John Dyson
c68f9c929b Add a missing initialization of the hold_count for device pager ficticiouse
pages.
1996-03-09 06:54:41 +00:00
John Dyson
6ac5bfdb3a Fix a calculation for a paging parameter. 1996-03-09 06:53:27 +00:00
John Dyson
67cc64f4c7 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
John Dyson
65bc79b85f Set the page valid bits in fewer places, as opposed to being scattered
in various places.
1996-03-09 06:48:26 +00:00
John Dyson
18ff64943e 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
John Dyson
e5fadd05f2 Put the "free vnode isn't" check back in the right place. 1996-03-09 06:43:19 +00:00
John Dyson
0f20dc9443 Remove a now unnecessary function prototype. 1996-03-09 06:42:15 +00:00
Andrey A. Chernov
f7163ba751 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
Bruce Evans
bb859b2bb8 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
Bruce Evans
cc494d0cce 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
Bruce Evans
27253a3d9c 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
Bruce Evans
0ae65c1a2b 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
Bruce Evans
c50f3ecf5a 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
John Dyson
45952afcc7 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 Wemm
dbc09a6375 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 Wemm
4613eba388 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
Poul-Henning Kamp
6ec922bb91 Validate the length before we trust it.
Submitted by:	Andrew.Gordon@net-tel.co.uk
1996-03-04 15:58:25 +00:00
Peter Wemm
daf818451b 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
John Dyson
8a02c104f9 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
John Dyson
836e5d1360 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 Wemm
185dc76169 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
John Dyson
ef5dc8a96d 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 Wemm
4f735d8edb 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 Wemm
5e004bea6f 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 Wemm
d9c682305a Add missing prototype for newly public vn_vmio_open function, next to
vn_vmio_close.
1996-03-03 18:51:33 +00:00
Peter Wemm
af6646cdc5 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
Jordan K. Hubbard
0dbf6d736f 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
John Dyson
c735bcf57d 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
John Dyson
e188690a50 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
John Dyson
847a3ba792 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 Wemm
a1ebcbfb76 Minor touch-up... make two functions static, and add missing $Id$ 1996-03-02 21:00:11 +00:00
Garrett Wollman
992d89b7ed Add RCS Id. 1996-03-02 20:35:51 +00:00
Peter Wemm
785d64c46a 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
Peter Wemm
d66a506616 Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff.  The scrollbars are now
working, at least on my machine. (whew! :-)

I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.

The main changes:

COMPAT_LINUX is *GONE*.  Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself.  The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code.  All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first.  Like IBCS2, you can statically compile it in with "options LINUX".

A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality().  The Linux-ELF libraries want
to use some of these.

linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.

Quite a few bugs removed, including incorrect arguments being used in
syscalls..  eg:  mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.

The build for the code has changed.  i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.

Supporting changes elsewhere in the kernel:

The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS).  This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.

The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only.  This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.

makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code.  It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)

At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area.  This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
Peter Wemm
9a074e93b5 A new syscalls table for the Linux emulator. This is processed by
makesyscalls.sh to generate the rest of the tables.
1996-03-02 19:04:16 +00:00
Peter Wemm
d375be0e82 This file is "obsolete" and no longer used or referenced. 1996-03-02 18:55:41 +00:00
Peter Wemm
4bd4912865 Add more options into the conf/options and i386/conf/options.i386 files
and the #include hooks so that 'make depend' is more useful.  This
covers most of the options I regularly use (but not all) and some other
easy ones.
1996-03-02 18:24:13 +00:00
Peter Wemm
68da53c92e Remove redundant comment about the 'int len' variables that should be
changed to size_t's.
1996-03-02 17:42:34 +00:00
Peter Wemm
9154ee6aec Oops.. I nearly forgot the actual core of the length/rounding/etc fixes
that Bruce asked for.

These still are not quite perfect, and in particular, it can get
upset on extreme boundary cases (addr = 0xfff, len = 0xffffffff,
which would end up mapping a single page rather than failing), but
this is better code that I committed before.

(note, the VM system does not (apparently) support single mmap segment
sizes above 0x80000000 anyway)
1996-03-02 17:14:09 +00:00
Peter Wemm
bad4352830 reran makesyscalls.sh after "int len" -> "size_t len" changes. 1996-03-02 17:01:36 +00:00
Peter Wemm
ce06b86652 Change madvise prototype from 'int len' to 'size_t len'. All the other
m* syscalls were prototyped as size_t already.  Add missing mincore() and
minherit() prototypes, as suggested by bde.
1996-03-02 16:55:26 +00:00
Peter Wemm
3f7efdf30d Change the 'int len' args in the mmap/msync/mincore/etc class syscalls
to 'size_t' as per bde's request.
1996-03-02 16:51:25 +00:00
Jordan K. Hubbard
6380fb9d12 Hopefully, this will fix the problems that some people have been having with
the S-Video input.  It also has code in the driver for the meteor RGB support
and some other bug fixes.  I don't have a meteor RGB but I have been told
that it works.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-03-02 06:08:53 +00:00
John Dyson
6538dda3dc 1) Fix a bug that a buffer is removed from a queue, but the
queue type is not set to QUEUE_NONE.  This appears to have
	caused a hang bug that has been lurking.
2)	Fix bugs that brelse'ing locked buffers do not "free" them, but the
	code assumes so.  This can cause hangs when LFS is used.
3)	Use malloced memory for directories when applicable.  The amount
	of malloced memory is seriously limited, but should decrease the
	amount of memory used by an average directory to 1/4 - 1/2 previous.
	This capability is fully tunable.  (Note that there is no config
	parameter, and might never be.)
4)	Bias slightly the buffer cache usage towards non-VMIO buffers.  Since
	the data in VMIO buffers is not lost when the buffer is reclaimed, this
	will help performance.  This is adjustable also.
1996-03-02 04:40:56 +00:00
Paul Traina
9d2baf5cdf Update the Connectix QuickCam driver to match my current work.
- split driver into FreeBSD specific and camera specific portions
  (qcamio.c can run in user mode, with a Linux "driver top" etc,
   and qcam.c should be trivial to port to NetBSD and BSDI.)
- support for 4bppand bidirectional transfers working better
- start of interleaved data-transfers byte-stream decodes (some of this
  stuff has been pulled out for the moment to make it easier to debug)

At this point, anyone who wants to port it to other platforms should feel
free to do so.  Please feed changes directly back to me so that I can produce
a unified distribution.
1996-03-02 03:48:19 +00:00
John Dyson
91477adc6e Enable VMIO for non-VDIR metadata and block device. 1996-03-02 03:45:12 +00:00
John Dyson
de5f6a7765 1) Eliminate unnecessary bzero of UPAGES.
2) Eliminate unnecessary copying of pages during/after forks.
3) Add user map simplification.
1996-03-02 02:54:24 +00:00
John Dyson
33309c7fc0 More b_flags fixes. 1996-03-02 01:49:51 +00:00
John Dyson
f5d1e6dae6 Fix a bug that b_flags was getting unnecessarily modified by
the slice code.  The effect up to now has been insignficant, but
improved buffer allocation code will break with this problem.
1996-03-01 19:01:04 +00:00
Gary Palmer
5ccab2afa9 Add a new option: DDB_UNATTENDED. Stops machine dropping into DDB
when it panics, but leaving activation of DDB from the console
unaffected.
1996-02-28 21:42:15 +00:00