Commit Graph

80417 Commits

Author SHA1 Message Date
phk
77c3f6a70f Remove unneeded #include <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:00:24 +00:00
phk
a719cfb56b Include <sys/ioccom.h> directly, rather than indirectly through
<sys/disklabel.h>

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:59:14 +00:00
phk
e6d6b3ea37 Remove even more Copy&Pasted sets of #includes. 2002-09-20 16:53:19 +00:00
phk
0c72f48ed7 Remove unused #includes. Looks amacingly like the exact same set
as I just removed from ncr53c500_pccard.c.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:51:09 +00:00
phk
0e79f65347 Remove #include of <sys/disklabel.h> (and a few other unused #includes I
noticed while here).

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:49:36 +00:00
phk
f1b5b39d15 We don't need to #include <sys/disklabel.h>.
We don't need to #include <sys/disklabel.h> second time either.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:42:33 +00:00
phk
8065a2f590 Remove needless <sys/disklabel.h> and <sys/diskslice.h> #includes.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:37:15 +00:00
phk
0d0b20486d Don't call dkunit() to find our unit number, it is in our softc.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:26:12 +00:00
phk
04e808125a 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
7dc4652022 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
2dbd48c162 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
4590476d95 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
501bfd8ac9 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
47e2421c5c fork_trampoline() marks a trap frame.
Submitted by:	bde
2002-09-20 13:58:21 +00:00
jhb
b11ffbee29 Use proper type for a variable used as a DDB symbol. 2002-09-20 13:56:11 +00:00
jhb
e10343b51f Trim includes.
Submitted by:	bde
2002-09-20 13:54:45 +00:00
jhb
ff4d4620fd 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
4a91d13170 Lock the file once per call and use the unlocked fgetwc()/fputwc() variants. 2002-09-20 13:25:40 +00:00
tjr
fd97692951 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
da75bd41a4 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
c003c05d8c 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
0060873825 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
ce3ca627fa Remove unused variable. 2002-09-20 09:33:30 +00:00
phk
f3169d0f73 Retire now unused DIOCGDVIRGIN kludge.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 09:31:14 +00:00
phk
e1155175db 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
f4a51ad4cf Add restrict type-qualifier. 2002-09-20 08:24:01 +00:00
mike
2304e21090 Fix an error which prevented ssize_t from becoming defined. Add
restrict type-qualifier.
2002-09-20 08:22:48 +00:00
mini
2348815a32 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
09f3d3ca41 Straighten out get_params().
Sponsored by:	DARPA & NAI Labs.
2002-09-20 08:12:51 +00:00
imp
6de5d1911e Current uses struct thread *td rather than struct proc *p. 2002-09-20 04:30:00 +00:00
imp
ca00d126b5 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
60d11016c5 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
9c339649f1 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
98a2298419 Update ata(4) supported chipsets. 2002-09-19 22:18:24 +00:00
jhb
d6636c7eba 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
75e692569e Quiet warnings on shutdown. 2002-09-19 20:14:50 +00:00
jhb
997ef4970c Use correct function name in previous commit.
Submitted by:	jake
Pointy hat to:	jhb
2002-09-19 19:51:56 +00:00
archie
0bd9b35ef7 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
7622a47a60 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
2b21905959 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
631f07997f 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
6c70d571f0 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
10c45d7a9a 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
29c1877a0f 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
a0a0b878e7 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
eba5c7937e 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
c972ce0c1e gdb now builds on sparc64. 2002-09-19 17:08:32 +00:00
ru
65635a596b Update for FILE v3.39. 2002-09-19 13:53:17 +00:00
nyan
81a125ba21 MFi386: Remove a.out support. 2002-09-19 13:47:18 +00:00
nyan
68f997cae4 Remove -elf option. 2002-09-19 13:43:02 +00:00