Commit Graph

11697 Commits

Author SHA1 Message Date
Andrzej Bialecki
309290c72b This implements retrieving the contents of message buffer via sysctl(3)
as "machdep.msgbuf". It's needed in case of using stripped kernels, where
normal dmesg (which has to use kvm) doesn't work.

The buffer is unwound, meaning that the data will be linear, possibly
with some leading NULLs.

Reviewed by:	Jordan K. Hubbard <jkh@freebsd.org>
1998-09-14 11:47:40 +00:00
KATO Takenori
db6f50bf50 Sync with sys/i386/isa/syscons.c revision 1.277. 1998-09-14 11:37:58 +00:00
KATO Takenori
cabd14ebb6 Sync with sys/i386/isa/if_ed.c and sio.c revisions 1.145 and 1.215,
respectively.
1998-09-14 11:37:29 +00:00
Jordan K. Hubbard
ac80870e0b Decouple genassym flags from CFLAGS.
Submitted by:	jhay
1998-09-14 11:32:17 +00:00
KATO Takenori
3031fd3097 Sync with sys/i386/conf/majors.i386 revision 1.48. 1998-09-14 10:43:26 +00:00
Robert Nordier
4cbf0238eb Add BTX startup/interface code. 1998-09-14 10:37:00 +00:00
Søren Schmidt
c77c6e0cbb Make /dev/vga a softlink to /dev/ttyv0 under DEVFS using /etc/rc.devfs
Remove the hack from syscons that added a /dev/vga node in DEVFS
it broke root acces on ttyv0 because dev_mkdb screwed up.
1998-09-14 09:14:46 +00:00
John Polstra
22d4b0fb41 Add provisions for variant core dump file formats, depending on the
object format of the executable being dumped.  This is the first
step toward producing ELF core dumps in the proper format.  I will
commit the code to generate the ELF core dumps Real Soon Now.  In
the meantime, ELF executables won't dump core at all.  That is
probably no less useful than dumping a.out-style core dumps as they
have done until now.

Submitted by:	Alex <garbanzo@hooked.net> (with very minor changes by me)
1998-09-14 05:36:51 +00:00
Eivind Eklund
dfef928b1c Support PnP compatibility IDs. This allow e.g. the ed driver to pick
up any PnP NE2000 compatible card, instead of forcing us to always
update ID lists.

Submitted by:	Ugo Paternostro <paterno@dsi.unifi.it>
1998-09-13 22:15:44 +00:00
Nicolas Souchu
41990851b8 invalid printf call fixed -> compile time warning removed 1998-09-13 20:57:06 +00:00
Nicolas Souchu
bf492ef4c8 unused function removed (byte_1284_inbyte) 1998-09-13 20:44:55 +00:00
Nicolas Souchu
7dcba2c8a1 Lowlevel i/o routines for ZIP+ support. Mostly written with microseq
mechanism
1998-09-13 18:28:15 +00:00
Nicolas Souchu
54ad6085b1 ppbus enhanced to support ZIP+ : microseq improved 1998-09-13 18:26:44 +00:00
Nicolas Souchu
24ef1eb143 ppbus enhanced to support ZIP+ : 1284 code added, microseq improved +
some bugs corrected in vpoio.
1998-09-13 18:26:26 +00:00
Nicolas Souchu
15cc1109dc add immio.c for ZIP+ support 1998-09-13 18:24:38 +00:00
Dmitrij Tejblum
5d3e2869e5 Remove unused variable.
Pointed out by:	bde
1998-09-13 15:40:31 +00:00
Dmitrij Tejblum
e27b047ccf Fix a bug related to renaming in root directory. This bug reported by
Cejka Rudolf <cejkar@dcse.fee.vutbr.cz> on freebsd-current in Messaage-Id
<199807141023.MAA09803@kazi.dcse.fee.vutbr.cz>.

Reviewed by:	bde
1998-09-13 15:39:01 +00:00
Robert V. Baron
d3459488ae Finish conversion of cfs -> coda 1998-09-13 13:57:59 +00:00
Robert Nordier
38c931abc7 Enable client entry point support. 1998-09-13 13:28:07 +00:00
Luigi Rizzo
cb1e41ca65 Bring in files for bridging support. 1998-09-12 22:07:47 +00:00
Luigi Rizzo
2655eb498f Bring in new files for dummynet support 1998-09-12 22:03:21 +00:00
Garrett Wollman
65d1dabbd1 Define the Posix.1g names for the howto argument to shutdown(2). 1998-09-12 21:14:25 +00:00
Poul-Henning Kamp
649c00db71 various nits that didn't make it through the brucefilter. 1998-09-12 20:21:54 +00:00
Søren Schmidt
8b90e70e77 Enable the vn device under DEVFS without SLICE.
This was apparently missed when all the #ifdef SLICE gunk was put in.
1998-09-12 18:46:06 +00:00
Bruce Evans
9164000766 Don't dereference an uninitialized pointer in dead code. The dead
code gets executed if it is compiled without optimization.
1998-09-12 14:46:15 +00:00
Doug Rabson
48ef3c652b Provide the correct definition of ELF64_R_INFO. 1998-09-12 08:36:09 +00:00
Robert Nordier
b0923a2edc Add btxldr, a BTX loader for ELF clients. 1998-09-12 06:30:26 +00:00
Robert Nordier
aa7af79537 BTX (aka the boot extender) is an i386 kernel that hosts 32-bit
bootstrap programs, and provides page-level protection, hardware
interrupt reflection, a virtual-8086 mode interface to BIOS, etc.
1998-09-12 04:29:23 +00:00
Robert V. Baron
9afcea2f4a All the references to cfs, in symbols, structs, and strings
have been changed to coda.  (Same for CFS.)
1998-09-11 18:50:17 +00:00
Garrett Wollman
80ab7c0ed8 Fix RST validation.
PR:		7892
Submitted by:	Don.Lewis@tsc.tdk.com
1998-09-11 16:04:03 +00:00
Doug Rabson
a6ee6725b1 Machine dependant relocations for KLD. 1998-09-11 08:47:02 +00:00
Doug Rabson
fe3db7c7c7 Implement dynamic loading for ELF. 1998-09-11 08:46:15 +00:00
Doug Rabson
9386468ef8 Avoid a possible memory leak. 1998-09-11 08:45:32 +00:00
Kazutaka YOKOTA
6fa64a7e93 Pass the correct argument to npxsave(), otherwise vm86pcb will be
overwritten.
1998-09-10 12:16:06 +00:00
Søren Schmidt
6773d00e66 Oops missed a line in the previous commit 1998-09-10 11:23:08 +00:00
Doug Rabson
945aa40deb Ensure that m_nextpkt is set to NULL after reassembling fragments. 1998-09-10 08:56:40 +00:00
Søren Schmidt
a9c5b8d027 Update info on the bt848 driver.
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
1998-09-10 08:20:46 +00:00
Søren Schmidt
d32ef285bc Changed METEORSINPUT for Hauppauge cards with bt878.
Also fixed video_open defines and 878 support.

Submitted by: Fred Templin <templin@erg.sri.com>
1998-09-10 08:01:10 +00:00
Søren Schmidt
11e29cc90f Correct SECAM B-Delay and add XUSSR channel set.
Submitted by: Vsevolod Lobko <seva@alex-ua.com>
1998-09-10 07:52:30 +00:00
Tor Egge
a58915fc10 Don't keep the underlying directory locked while performing the file
system specific VFS_MOUNT operation.
PR:		1067
1998-09-10 02:27:52 +00:00
Bruce Evans
5d207357db Fixed the usual missing permissions checks in mount(). As for cd9660,
the damage was limited by the default of 0 for vfs.usermount.

Obtained from:	Lite2 via the -current ffs_vfsops.c
1998-09-09 20:21:18 +00:00
Nicolas Souchu
acd5ae9acc Major numbers allocated for generic SMB/I2C i/o 1998-09-09 18:57:59 +00:00
Nicolas Souchu
813548fa2c Major number allocated for generic SMB i/o -> 106 1998-09-09 18:57:38 +00:00
Nicolas Souchu
7da75285d5 Major number allocated for generic I2C i/o -> 105 1998-09-09 18:57:24 +00:00
Warner Losh
e8ddcfd6a1 Add dependency for subr_bus.c on bus_if.h and device_if.h so that a make
depend is not required to just build the kernel.

Reviewed by: Doug Rabson
1998-09-09 17:23:25 +00:00
Warner Losh
89afdb2434 Print warning about block size not being optimal once per open rather than
once per offending write.
1998-09-09 17:20:32 +00:00
KATO Takenori
00d11a6a37 Sync with sys/i386/conf/majors.i386 revision 1.47. 1998-09-09 14:40:27 +00:00
KATO Takenori
2663a4af57 Sync with sys/i386/conf/files.i386 revision 1.202. 1998-09-09 14:39:56 +00:00
KATO Takenori
c792da10e3 Sync with sys/i386/conf/options.i386 revision 1.85. 1998-09-09 14:39:20 +00:00
Bruce Evans
05d46b3cd6 Don't forget to initialize the inode lock. This bug caused
surprisingly few problems.  Most fields were initialized to the
correct values by bzero(), but lk_prio was 0 instead of PINOD (=8),
the lk_wmsg was NULL instead of "ext2in", and lk_lockholder was 0
instead of -1.

Obtained from:	Lite2 via the -current ffs_vfsops.c
1998-09-09 13:09:24 +00:00
Bruce Evans
d6c54caabe Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants).
1998-09-09 12:22:17 +00:00
Bruce Evans
405b59bcb5 Turned on -Wformat -fformat-extensions. -fformat-extensions requires a
-current version of gcc.  Without it, -Wformat would complain about all
the nonstandard %[Dbrz] formats in the kernel.
1998-09-09 10:04:58 +00:00
Bruce Evans
355a2610a7 Don't use CTL_VFS at the wrong level. This caused loops in the sysctl
tree if CTL_VFS happened to get assigned as a type number to a vfs that
has some vfs sysctls.
1998-09-09 07:41:41 +00:00
Justin T. Gibbs
e79363ba53 Reserve character major 104 for the CAM Transport Layer Services device. 1998-09-09 03:07:02 +00:00
John Polstra
cfa4d73988 Add a new library function getobjformat(). It checks all the
standard places ("/etc/objformat", ${OBJFORMAT}, argv) for an
indication of the user's preferred object file format.  This
consolidates some code that was starting to be duplicated in more
and more places.

Use the new function in ldconfig.

Note: I don't think that gcc should use getobjformat(), even though
it could.  The compiler should limit itself to functions that are
widespread, to ease porting and cross-compilation.
1998-09-09 01:21:25 +00:00
Bill Paul
9daef026b1 - If the OACTIVE flag is set on entry to xl_start(), check to see if the
transmitter is wedged. If so, try to unwedge it, process any descriptors
  that might need to be free()d, then proceed.

- Disable the 'background' autonegotiation performed during bootstrap.
  What happens currently is that the driver starts an autoneg session,
  the sets a timeout in the ifnet structure and returns. Later, when the
  timer expires, the watchdog routine calls the autoneg handler to check
  the results of the session. The problem with this is that the session
  may not complete until some point after we have started to mount NFS
  filesystems, which can cause the mounts to fail. This is especially
  troublesome if booting with an NFS rootfs: we need the interface up
  and running before reaching the mountroot() code.

  The default behavior now is to do the autoneg synchronously, i.e. wait
  5 seconds for the autoneg to complete before exiting the driver attach
  routine. People who want the old behavior can compile the driver with
  XL_BACKGROUND_AUTONEG #defined. This has no effect on autoneg sessions
  initiated by 'ifconfig xl0 media autoselect.'

  This slows the probe down a little, but it's either that or botching
  NFS mounts at bootup.

- If xl_setmode_mii() is called and there's an autoneg session in progress,
  cancel it, _then_ set the modes.
1998-09-08 23:42:10 +00:00
Søren Schmidt
eeded4d82e Add new atapi-cd driver that supports atapi CD-R/RW drives.
This is only a stop-gab solution to get atapi burner support into 3.0.
1998-09-08 20:57:47 +00:00
John Polstra
e17ade2b82 Add definitions for the ELF section attribute flags, SHF_*.
Submitted by:	Robert Nordier <rnordier@nordier.com>
1998-09-08 20:38:06 +00:00
Brian Somers
8aa2558802 Make PCIC_RESUME_RESET an proper option.
My laptop (a CTX Cybernote) needs this.  It claims to have a

  PC-Card VLSI 82C146 (5 mem & 2 I/O windows)
1998-09-08 18:09:51 +00:00
Bruce Evans
9754189a91 Oops, don't assume that the environment is normal in devfs_mount().
It isn't for the hidden mountpoint.  The static vfs's haven't been
attached then, so mp->mnt_vfc can't be valid.
1998-09-08 16:59:37 +00:00
KATO Takenori
9df3bd9208 Sync with sys/i386/isa/clock.c revision 1.125. 1998-09-08 09:47:46 +00:00
KATO Takenori
ddf7a8ea87 Sync with sys/i386/i386/userconfig.c revision 1.107. 1998-09-08 09:47:09 +00:00
Luigi Rizzo
ac38e6e338 fix a problem with our definition of SNDCTL_DSP_GETBLKSIZE, to let
the FreeBSD x11amp work (same as in -stable)
1998-09-08 07:21:00 +00:00
John Polstra
5584f22bb3 Make profiling work for ELF. gprof now autodetects the format of
the executable file, so it will work for both a.out and ELF format
files.  I have split the object format specific code into separate
source files.  It's cleaner than it was before, but it's still
pretty crufty.

Don't cheat on your make world for this update.  A lot of things
have to be rebuilt for it to work, including the compiler and all
of the profiled libraries.
1998-09-07 23:32:00 +00:00
Martin Cracauer
62e334347c Load linux emulator lkm only when not already loaded. This avoids
leftover files in /tmp. Script slightly modified from PR version
to use fewer processes.
PR:		i386/7725
Submitted by:	Stefan Eggers seggers@semyam.dinoco.de
1998-09-07 16:15:59 +00:00
Bruce Evans
8994ca3ce9 Removed statically configured mount type numbers (MOUNT_*) and all
references to them.

The change a couple of days ago to ignore these numbers in statically
configured vfsconf structs was slightly premature because the cd9660,
cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number
in their vfsconf struct.
1998-09-07 13:17:06 +00:00
Jordan K. Hubbard
ef949dd17d Add entries for xl0, tlc0 and adv0. Some of these aren't even
in LINT!
1998-09-07 13:00:58 +00:00
Bruce Evans
ff261f16f6 Put the zombie ffs sysctl node in "notyet" state together with its few
remaining children.  Prepare it for MOUNT_UFS going away.
1998-09-07 11:50:19 +00:00
Doug Rabson
dfa8100aec Use Elf_Addr to store addresses instead of Elf_Word. 1998-09-07 07:30:44 +00:00
Doug Rabson
feb6634586 Device framework code now declared in MI code. 1998-09-07 07:29:30 +00:00
Guido van Rooij
a031dfd5e2 Fix problem reported on bugtraq: check permission of device mounted
for non-root users. Fortunately, the default for vfs.usermount is 0.
Tested by:	"Jan B. Koum " <jkb@best.com
1998-09-07 07:20:30 +00:00
Poul-Henning Kamp
21aa768ea1 Make MFS do the default on VOP_FREEBLKS().
XXX: we could deallocate the storage, but somebody else will
have to pick up that task.
1998-09-07 06:52:01 +00:00
Bruce Evans
cae300be0f Made unloading of the nfs LKM sort of work. This is mainly to test
detachment of vfs sysctls.  Unloading of vfs LKMs doesn't actually
work for any vfs, since it leaves garbage pointers to memory
allocation control structures.
1998-09-07 05:42:15 +00:00
Tor Egge
3bfe64f96a Don't go below the low water mark of free pages due to optional prefaulting
of pages.
PR:		2431
1998-09-06 23:04:20 +00:00
Tor Egge
572d053e17 Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.

Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.

Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.

Don't let an AP enter _cpu_switch before all local apics are initialized.
1998-09-06 22:41:42 +00:00
Robert V. Baron
03507b2123 Clean LINT 1998-09-06 20:01:34 +00:00
Bill Paul
7c76d5ca4e Patch the transmit error handler to avoid following NULL pointers and
generating a trap 12 panic. The code blindly assumed that in the event
of a transmit error, the packet that caused the error would still be
at the head of the driver's transmit queue (sc->xl_cdata.xl_tx_head).
However in the case of error 82 (which indicates that a transmit error
occurred after part of the transmit FIFO memory has been reclaimed)
this is not true: the TX queue has already been flushed, and the
pointer to the head of the queue is NULL, so trying to dereference
the pointer to find the transmit descriptor address causes a crash.

The code now checks for a NULL pointer before trying to reload the
chip's download pointer register. There may still be error messages
printed warning of the transmit error, but no panic should occur.

Note that this eror code is only generated with "cyclone" chipsets
(3c900B, 3c905B, and presumeably the 3c980 server adapter). It should
only appear during periods of heavy traffic, probably only on
non-switched networks.

Problem reported by: Darcy Buskermolen <darcy@ok-connect.com>
1998-09-06 14:58:46 +00:00
Poul-Henning Kamp
19ddafa3b3 RFC 1644 has the status "Experimental Protocol", which means:
4.1.4.  Experimental Protocol

      A system should not implement an experimental protocol unless it
      is participating in the experiment and has coordinated its use of
      the protocol with the developer of the protocol.

Pointed out by:	Steinar Haug <sthaug@nethelp.no>
1998-09-06 08:17:35 +00:00
Andrey A. Chernov
99237364cc Store formatted panic string in static buffer to make it available later
for savecore.
Previous code give only panic format to savecore
1998-09-06 06:25:18 +00:00
John Birrell
85a5d7a93d Change the ELF64_R_SYM() to shift 32 bits instead of 8 bits to match
binutils.

Ensure that three of the structures are the size that binutils writes
them. I just love code that doesn't share header files to avoid
problems like these.

With this change rtld-elf works on alpha.
1998-09-05 23:07:59 +00:00
Bruce Evans
e99ea9ec2b Ignore the statically configured vfs type numbers and assign vfs
type numbers in vfs attach order (modulo incomplete reuse of old
numbers after vfs LKMs are unloaded).  This requires reinitializing
the sysctl tree (or at least the vfs subtree) for vfs's that support
sysctls (currently only nfs).  sysctl_order() already handled
reinitialization reasonably except it checked for annulled self
references in the wrong place.

Fixed sysctls for vfs LKMs.
1998-09-05 17:13:28 +00:00
Bruce Evans
500b04a257 Instantiate `nfs_mount_type' in a standard file so that it is present
when nfs is an LKM.  Declare it in a header file.  Don't forget to use
it in non-Lite2 code.  Initialize it to -1 instead of to 0, since 0
will soon be the mount type number for the first vfs loaded.

NetBSD uses strcmp() to avoid this ugly global.
1998-09-05 15:17:34 +00:00
Bruce Evans
134e06fe71 Fixed bogotification of pseudocode for syscall args by rev.1.53 of
syscalls.master.
1998-09-05 14:30:11 +00:00
Bruce Evans
266ead86bc Sysctl nodes are written to, so don't put them in the text section.
Our write protection of the kernel text on i386's doesn't actually
work in many cases:
- use of the 4MB page completely breaks it.
- CR0_WP isn't set until just before init is started, so the kernel
  text is not write protected during kernel initialization.
1998-09-05 14:13:35 +00:00
Poul-Henning Kamp
0375c9f2b8 Add a new vnode op, VOP_FREEBLKS(), which filesystems can use to inform
device drivers about sectors no longer in use.

Device-drivers receive the call through d_strategy, if they have
D_CANFREE in d_flags.

This allows flash based devices to erase the sectors and avoid
pointlessly carrying them around in compactions.

Reviewed by:	Kirk Mckusick, bde
Sponsored by:	M-Systems (www.m-sys.com)
1998-09-05 14:13:12 +00:00
Bruce Evans
a8b8bc0730 Fixed recently perpetrated printf format errors. 1998-09-05 13:24:39 +00:00
Bruce Evans
6ade4cf7a4 Don't comment out dead code. Remove it.
Fixed disgustingly long lines.

Improved English in some comments.
1998-09-05 12:42:56 +00:00
John Birrell
7cfc8475b8 Add support for MACHINE=pc98. This leaves a single legacy entry for
the old aout bootloader.
1998-09-05 08:27:56 +00:00
John Birrell
b3e7339e37 Add a GENERICupgrade config file for pc98 users to upgrade to elf
in the same way as i386 users. This is a copy of GENERIC98.
1998-09-05 08:14:36 +00:00
KATO Takenori
2bfe25d193 Sync with sys/i386/conf/files.i386 revision 1.201. 1998-09-05 02:36:18 +00:00
KATO Takenori
0e28be212a Sync with sys/i386/conf/Makefile.i386 revision 1.121. 1998-09-05 02:35:21 +00:00
KATO Takenori
6924358493 Increase 'maxusers' to 32. 1998-09-05 02:20:52 +00:00
Luoqi Chen
02c71890cd Make irq forwarding truely functional. 1998-09-04 23:03:04 +00:00
Mike Smith
14b1f19055 Increase 'maxusers' to 32; with the number of people using GENERIC as
their one-size-fits-all kernel, this should help reduce the "out of foo"
reports.

Reviewed by:	jkh
1998-09-04 19:55:51 +00:00
Doug Rabson
26cdc317be Cosmetic changes to the PAGE_XXX macros to make them consistent with
the other objects in vm.
1998-09-04 18:49:35 +00:00
Nicolas Souchu
c498ec5f46 Device registration temporaly removed until major number allocation ok. 1998-09-04 17:53:42 +00:00
Bill Paul
7d8b3c341b Modify the xl_mediacheck() routine to also test for the case where the
XCVR value read from the EEPROM is completely wrong. I've had one report
of a 3c900 card that returns an xcvr value of 14, which is impossible
(the manual states that all vales above 8 are reserved). If the value
is out of the expe

Add PCI vendor ID for the 3c980-TX server adapter card, which apparently
also uses the cyclone chip. Graciously supplied Mats O Jansson
<maja@cntw.com>.

Also noted by Mats, the 10mpbs cyclone adapters should be named 3c900B,
not 3c905B. I haven't actually encountered a 10mbps only cyclone adapter
yet, nor anybody who has one, but this makes sense given the naming
scheme used for the older boomerang adapters.
1998-09-04 16:22:15 +00:00
Andrey A. Chernov
253ab668e2 make sbflush panic messages more descriptive 1998-09-04 13:13:18 +00:00
Andrey A. Chernov
569d43a2bb PAGE_WAKEUP -> vm_page_wakeup 1998-09-04 13:10:34 +00:00
Doug Rabson
e69763a315 Cosmetic changes to the PAGE_XXX macros to make them consistent with
the other objects in vm.
1998-09-04 08:06:57 +00:00