Commit Graph

80559 Commits

Author SHA1 Message Date
phk
c0477d28f4 Don't use dkunit() to find out unit, we already have our softc pointer
where we can find it.

Don't call dkpart() just to print the result, it is constant.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:25:16 +00:00
archie
207fb06f80 Revert previous commit to unbreak world until we figure out the
right way to do it.
2002-09-20 15:43:26 +00:00
mbr
d4b724dda7 Fix the support for the AN985/983 chips, which do not set the
RXSTATE to STOPPED, but to WAIT. This should fix hangs which
could only be solved by replugging the cable.

Submitted by:	jhb
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:18:13 +00:00
mbr
bca2116b24 Enable the automatic TX underrun recovery for the ADMtek chips.
This solves cvsup update on my laptop which aborts after a while
without this patch.

PR:		34236
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:16:06 +00:00
phk
7fd38535ea Make FreeBSD "struct disklabel" agnostic, step 312 of 723:
Rename bioqdisksort() to bioq_disksort().
Keep a #define around to avoid changing all diskdrivers right now.

Move it from subr_disklabel.c to subr_disk.c.
Move prototype from <sys/disklabel.h> to <sys/bio.h>

Sponsored by:   DARPA and NAI Labs.
2002-09-20 14:14:37 +00:00
jhb
868209c892 fork_trampoline() marks a trap frame.
Submitted by:	bde
2002-09-20 13:58:21 +00:00
jhb
8ba762c99f Use proper type for a variable used as a DDB symbol. 2002-09-20 13:56:11 +00:00
jhb
1deeb25fda Trim includes.
Submitted by:	bde
2002-09-20 13:54:45 +00:00
jhb
a68b84312f Various style fixes, including moving db_print_backtrace() out of the
middle of the watchpoint code.

Submitted by:	bde
2002-09-20 13:53:33 +00:00
tjr
dbed35f068 Lock the file once per call and use the unlocked fgetwc()/fputwc() variants. 2002-09-20 13:25:40 +00:00
tjr
ff2a681918 Lock and unlock the file once per call and use the unlocked version of
ungetc() instead of having ungetc() recurse on the lock.
2002-09-20 13:23:26 +00:00
tjr
124e10a797 Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()
and __fgetwc() which can be used when we know the file is locked.
2002-09-20 13:20:41 +00:00
phk
1919170e90 Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.

Drop the by now entirely useless struct disklabel argument.

Add a flag argument for new-line termination.

Fix a couple of printf-format-casts to %j instead of %l.

Correctly print the name of all bio commands.

Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.

Use the new disk_err() throughout, #include <sys/disk.h> as needed.

Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.

Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 12:52:03 +00:00
ru
b003f2381f Bandaid for a broken world. The real fix is somewhat more
complicated and will be sent for a review.
2002-09-20 12:33:19 +00:00
phk
bccba41c8d Remove unused variable. 2002-09-20 09:33:30 +00:00
phk
806dbaa1e8 Retire now unused DIOCGDVIRGIN kludge.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 09:31:14 +00:00
phk
2f9ce7f609 Construct new disklabels based on the medias stated parameters in
userland, rather than expect all possible GEOMetries to know about
BSD disklabels.

Sponsored by:	DARPA & NAI Labs
2002-09-20 09:18:31 +00:00
mike
a33d7be6d9 Add restrict type-qualifier. 2002-09-20 08:24:01 +00:00
mike
8286a42d54 Fix an error which prevented ssize_t from becoming defined. Add
restrict type-qualifier.
2002-09-20 08:22:48 +00:00
mini
691c400510 Don't peek into MD structures from MI code. The getcontext(3) and
setcontext(3) functions check the validify of the mcontext_t structs.
2002-09-20 08:13:21 +00:00
phk
d605f09966 Straighten out get_params().
Sponsored by:	DARPA & NAI Labs.
2002-09-20 08:12:51 +00:00
imp
42910e6e7c Current uses struct thread *td rather than struct proc *p. 2002-09-20 04:30:00 +00:00
imp
0cbffe62f8 o Don't print devices that aren't attached unless run with the newly
minted -v flag.
o Print devices that don't return a name as 'unknown' in -v mode.

# Yea!  Now I wont think I have 10 different ISA network adapters in my
# laptop.
2002-09-20 02:26:58 +00:00
imp
a4260bf8f1 Expose the new kernel data structures to libdevinfo:
o Added dd_pnpinfo, dd_location, dd_devflags, dd_flags and dd_state
	o Copy/initialize these as necessary.
	o Document the changes to the interface in devinfo.3.
2002-09-20 02:16:33 +00:00
bmah
b43e53617a New release notes: Firewire support, ata(4) support for Sil 0680 and
VIA 8233/8235 (+ MFC), a.out(5) support in toolchain removal,

Updated release notes:  file(1) 3.39, gcc 3.2.1-prerelease 20020916,
Heimdal Kerberos 0.5-prerelease 20020916.

MFCs noted:  AMD Elan SC520 support.
2002-09-19 22:46:52 +00:00
bmah
b3a8db1a8b Update ata(4) supported chipsets. 2002-09-19 22:18:24 +00:00
jhb
f239fd4894 Fix last commit so that it actually works:
- Get test for valid trace request contents right.
- You don't use 'stq' to move a value from one register to another,
  use 'mov' to read sp.  Also, can't use nice names for registers
  in in-line asm in gcc.
- pc is not a publically accessible register, instead, create a label
  in the asm code and use 'lda' to load the address of that label into
  the pc field of the trace request.
- Use correction function name for db_print_backtrace().
2002-09-19 20:40:26 +00:00
gordon
8fb250553b Quiet warnings on shutdown. 2002-09-19 20:14:50 +00:00
jhb
848d0f0fb4 Use correct function name in previous commit.
Submitted by:	jake
Pointy hat to:	jhb
2002-09-19 19:51:56 +00:00
archie
59b24d359e Fix a problem with the definition of HUGE_VAL causing the gcc warning
"cast increases required alignment of target type" on some platforms.

Reviewed by:	bde
2002-09-19 19:47:27 +00:00
mdodd
0c5a203325 Pass flags to msync() accounting for differences in the definition of
MS_SYNC on FreeBSD and Linux.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 19:02:54 +00:00
mdodd
e6b61cc65a This patch extends the FreeBSD Linux compatibility layer to support
NVIDIA API calls; more specifically, it adds an ioctl() handler for
the range of possible NVIDIA ioctl numbers.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 18:56:55 +00:00
mux
50d0cbdd14 Switch to using strlcpy() in several places. It seems there
were cases where we could get unterminated strings before.
2002-09-19 18:54:22 +00:00
mdodd
b2eb3d57ff This patch enables FreeBSD i686 MTRR support on Intel Pentium
4/XEON processors, which are not currently recognized.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 18:53:49 +00:00
jhb
077f31b2a1 Ahem, actually add the DDB_TRACE option and finish changing DDB_UNATTENDED
to use its own header.
2002-09-19 18:52:37 +00:00
jhb
c3f8f24620 Add ability to dump stacktraces on kernel panics when DDB is compiled into
the kernel.  By default this is turned off since otherwise it could scroll
valuable panic messages off of the screen.  This option can be turned on
by the DDB_TRACE kernel option as well as the debug.trace_on_panic sysctl.

Also, fix the DDB_UNATTENDED option to use its own header instead of
abusing opt_ddb.h.  This way turning that one option on or off doesn't
force you to recompile all of ddb.

Requested by:	many (1), bde (2*)

* - I know bde prefers !abusing option headers in general but can't
    remember if he as brought up this specific case.
2002-09-19 18:49:46 +00:00
jhb
03dc7bc4a4 Implement db_print_backtrace() if DDB is compiled into the kernel. This
MD function is just a wrapper around db_stack_trace_cmd() that prints out
a backtrace of curthread.  Currently, this function is only implemented
on i386 and alpha (and the alpha version isn't quite tested yet, will do
that in a bit).  Other changes:

- For i386, fix a bug in the raw frame address case.  The eip we extract
  from the passed in frame address does not match the frame we received.
  Thus, instead of printing a bogus frame with the wrong eip, go ahead
  and advance frame down to the same frame as the eip we are using.
- For alpha, attempt to add a way of doing a raw trace for alpha.  Instead
  of passing a frame address in 'addr', pass in a pointer to a structure
  containing PC and KSP and use those to start the backtrace.  The alpha
  db_print_backtrace() uses asm to read in the current PC and KSP values
  into such a request.

Tested on:	i386
Requested by:	many
2002-09-19 18:46:29 +00:00
mdodd
862a7a0206 From Christian Zander:
This patch addresses a bug that can cause a GPF in the kernel - if a
process makes use of i386_set_ldt to install a LDT entry, then loads
a corresponding segment descriptor into %gs, forks, and if the child
execs.

In this scenario, setregs executes user_ldt_free and then determines
how to reset the %gs register:

    /* reset %gs as well */
    if (pcb == curpcb)
        load_gs(_udatasel);
    else
        pcb->pcb_gs = _udatasel;

This is insufficient in the fork/exec case, since pcb will be equal
to curpcb when the child execs; load_gs will reset %gs to _udatasel
but it doesn't reset pcb->pcb_gs; upon return from the system call,
cpu_switch_load_gs will thus attempt to restore %gs from pcb->pcb_gs
and trigger a GPF since all LDT entries have already been cleared.

The fix is to always reset pcb->pcb_gs to _udatasel.

Submitted by:	Christian Zander <zander@minion.de>
Reviewed by:	jake
2002-09-19 18:46:25 +00:00
obrien
2a2c364d7e gdb now builds on sparc64. 2002-09-19 17:08:32 +00:00
ru
19b228300a Update for FILE v3.39. 2002-09-19 13:53:17 +00:00
nyan
0d814ab74a MFi386: Remove a.out support. 2002-09-19 13:47:18 +00:00
nyan
e28806ee62 Remove -elf option. 2002-09-19 13:43:02 +00:00
nyan
6f6cc1a641 MFi386: revisions 1.534 and 1.535. 2002-09-19 13:42:11 +00:00
truckman
21097d005a The file vnode passed to VOP_LINK() should now be locked before the call. 2002-09-19 13:34:50 +00:00
truckman
f280782003 VOP_FSYNC() requires that it's vnode argument be locked, which nfs_link()
wasn't doing.  Rather than just lock and unlock the vnode around the call
to VOP_FSYNC(), implement rwatson's suggestion to lock the file vnode
in kern_link() before calling VOP_LINK(), since the other filesystems
also locked the file vnode right away in their link methods.  Remove the
locking and and unlocking from the leaf filesystem link methods.

Reviewed by:	rwatson, bde  (except for the unionfs_link() changes)
2002-09-19 13:32:45 +00:00
ru
38695c19fd Added the missing dependencies for openssl/ headers. 2002-09-19 13:24:27 +00:00
nectar
7ac6b7a75f This is Heimdal 0.5. 2002-09-19 12:59:18 +00:00
tjr
a7450cd28a Implement the %ls and %lc conversions for printing wide character strings
and wide characters. These were already documented in the manual page,
with an entry mentioning that they were not implemented yet. The XSI
%S and %C synoyms have not been added.
2002-09-19 12:50:28 +00:00
ru
1564160a1a Bootstrapping aid for systems without <stdint.h>.
(Needed to build mkmagic in build-tools.)
2002-09-19 12:30:34 +00:00
nectar
ffbde8ea6c This is Heimdal 0.5. 2002-09-19 12:12:26 +00:00