Commit Graph

2644 Commits

Author SHA1 Message Date
Søren Schmidt
e1743d02cd 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
Justin T. Gibbs
9dfa2063d5 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
Justin T. Gibbs
58a8ca6a4d 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
Justin T. Gibbs
e4f25ddc16 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
Jordan K. Hubbard
3873c27840 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
Rodney W. Grimes
46ed21d1a7 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
John Dyson
9212ebc656 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
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
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
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
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
Peter Wemm
a1ebcbfb76 Minor touch-up... make two functions static, and add missing $Id$ 1996-03-02 21:00:11 +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
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
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
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
Justin T. Gibbs
6398c75dc7 Fix media type determination. 1996-02-28 17:19:04 +00:00
Nate Williams
f2b04a2396 Fix for 3C589C model. This patch allows people with the new models to work and
doesn't break support for the older models (tested with my 3C589B).

Reviewed by:    Joshua Gahm <jgahm@BBN.COM>
Submitted by:   hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi)
1996-02-28 16:23:36 +00:00
Andrey A. Chernov
79dd972e3e Fix re-sense code
Remove unused part of close code
1996-02-27 19:08:39 +00:00
Andrey A. Chernov
f4cb715ffe rmcd0c: now several ioctls (eject/close/debug/reset/etc.) works
even not CD sensed. Open of this device without CD sensed allowed too.
Other ioctls re-sense CD for this device.
1996-02-27 18:53:50 +00:00
Justin T. Gibbs
eea817fc73 Clean up the 3c5x9 driver and add an eisaconf probe to it. This should
prevent it from conflicting with other drivers (like the aic7xxx driver).
Most of the work was in spliting out common portions of the driver and
making them generic enough to be called from the eisaconf probe.
1996-02-26 01:05:36 +00:00
Justin T. Gibbs
76e002c102 3c5x9.c:
The eisaconf probe for the 3Com 3c579 and the 3c509 when in eisa
configuration mode.

aha1742.c aic7770.c bt74x.c:
Only call eisa_registerdev after the probe is successfully.

eisaconf.c:
Increase kdc->kdc_datalen during the eisa_reg* functions instead of
in the eisa_add* functions since eisa_registerdev has already been
called and we have a kdc to manipulate.
1996-02-26 01:01:41 +00:00
Justin T. Gibbs
de0d93f53f Add i386/eisa/3c5x9.c, the eisaconf probe for the 3Com 3c579 and the
3c509 when in eisa configuration mode.
1996-02-26 00:58:38 +00:00
Bruce Evans
3b3bedbc0e Added some delays to the probe. This might fix some incompatible UARTs
(the ones that take more than a few hundred nsec and less than 1 msec to
switch their IRQ output).
1996-02-25 21:10:54 +00:00
Bruce Evans
8335c1b8ae Don't turn off the motor on active drives. The motor timeout may
occur while a command is in progress if the system is overloaded
or was stopped at a debugger breakpoint.
1996-02-25 21:01:31 +00:00
John Dyson
d6673cba8a Re-insert a missing pmap_remove operation. 1996-02-25 05:08:57 +00:00
John Dyson
3eb77c8302 Fix a problem with tracking the modified bit. Eliminate the
ugly inline-asm code, and speed up the page-table-page tracking.
1996-02-25 03:02:53 +00:00
Poul-Henning Kamp
e7319bab6b Big sweep over the IPFIREWALL and IPACCT code.
Close the ip-fragment hole.
Waste less memory.
Rewrite to contemporary more readable style.
Kill separate IPACCT facility, use "accept" rules in IPFIREWALL.
Filter incoming >and< outgoing packets.
Replace "policy" by sticky "deny all" rule.
Rules have numbers used for ordering and deletion.
Remove "rerorder" code entirely.
Count packet & bytecount matches for rules.

Code in -current & -stable is now the same.
1996-02-23 15:47:58 +00:00
Joerg Wunsch
2e899e8a02 . move out the error and status register def's for wt into
<machine/wtio.h>, so mt(1) can print them,

. cosmetics: put the return type and the function name onto
  different lines.
1996-02-22 00:31:49 +00:00
Nate Williams
b2e8253ac3 Updated PC-CARD support to contain most of the code from the latest
Japanese BSD-Nomad release.

Reviewed by:    phk
Submitted by:   hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
1996-02-21 23:22:27 +00:00
Justin T. Gibbs
ef83c41f6d Return immediately in our interrupt handler if there is nothing to do.
This allows shared interrupts to work.

Submitted by: greg@greg.rim.or.jp
1996-02-18 07:45:36 +00:00
Peter Wemm
5297fc55c8 This is an extract of changes from what I am currently running...
- Optimise the linux a.out loading and uselib system calls so they
  take advantage of some of John's recent interface improvements.
  Basically, this means they make far less map changes than before.
- Attempt to plug some potentially nasty kernel_map memory leaks..
- Improve support for QMAGIC libs (I only use QMAGIC (ie: a.out libraries from
  the slackware 3.0 dist) but this depends on other changes to enhance
  the /compat/linux support)
- uselib goes out through a single exit as part of the resource tracking
  that I did when closing the resource leaks on errors.  This could be
  cleaner than what I did, but making a 30-deep nested if/else was not my
  idea of fun, neither did I want to repeat the same code 30 times over for
  each failure possibility.  I guess this function needs to be split into
  smaller functions to solve this.

I've been running the Linux Netscape-2.0 (with Java) to test this, and apart
from the long-standing problem with the missing scrollbars, it appears to
still work as before with ZMAGIC libs (and the leaks)..  However, I've
been using it with mods for the signal trampoline code for native linux stack
frames on signals and exterminated the blasted sigreturn printf() problem,
so I can't be certain that there is not a dependency on something else.
1996-02-16 18:40:50 +00:00
Justin T. Gibbs
34b72528fe Allow I/O port ranges above the standard ISA one so the PCI probe will succeed.
Reviewed by:  Richard J Kuhns <rjk@sparcmill.grauel.com>
1996-02-16 17:24:19 +00:00
Garrett Wollman
dc915e7cfc Kill XNS.
While we're at it, fix socreate() to take a process argument.  (This
was supposed to get committed days ago...)
1996-02-13 18:16:31 +00:00
Justin T. Gibbs
162b7f0ac2 - Properly set the watchdog timer only during transmits.
- Clean up the access to our ifnet structure by caching a pointer
  to it instead of always digging through our softc structure.

Submitted by: Watchdog fixes by Serge A. Babkin <babkin@hq.icb.chel.su>
1996-02-13 15:55:33 +00:00
Poul-Henning Kamp
01a3e1a590 use devfs_add_devswf and avoid local variable. 1996-02-13 14:15:13 +00:00
Poul-Henning Kamp
d0cb65474e Correct & Update the printing of CPU features. We have printed rubbish
since version 1.117 when Garrett made the switch to %b.  Updated to
reflect Intel AP-485 (241618-004).
1996-02-13 10:30:36 +00:00