Commit Graph

34438 Commits

Author SHA1 Message Date
Justin T. Gibbs
31b6c79691 Add ahc_print_devinfo() to simplify some diagnostic output.
Switch to using the same AHC_SHOW_XXX format as the ahd driver.

Always give the target a MSG_INITIATOR_DET_ERR for unexpected
DT or ST phase errors.

Add AHC_SHOW_SELTO diagnostics.

Force renegotiation whenever an unexpected bus free occurs
to rule out a negotiation mismatch as the cause for the error.

Use "offset != 0" as an intenal indicator of "async" rather than
using a period of 0.

In ahc_fetch_devinfo(), correct a bug in getting "our id" as
target.  We weren't looking at all the SEQ_FLAGS that indicate
that we are still in a selected rather than reselected state.

Add support for the AHC_SHOW_MESSAGES debugging option.

If ahc_parse_msg() tells us to terminate the message loop,
do so without acking the message.  The message may be one
that the sequencer needs to handle on its own.

In ahc_parse_msg() return MSGLOOP_TERMINATED for all messages
the sequencer handles.

Allocate storage for, and track, seeprom contents in our softc.

Touch all SCB bytes to avoid parity errors should one of our
debugging routines read an otherwise uninitiatlized byte.

S/G lists must be 8 byte aligned.  Reflect this in our DMA tag.

"the the" -> "the" in a comment

When pausing the card to perform error recovery, ensure that we
are not in the process of being selected or have just been selected
but have not yet handled that selection.  This leaves only one other
race window, in the command complete handler, that needs to be fixed
to make recovery 100% bullet proof.

Convert a few straglers from bsd u_intX_t to inttypes uintX_t.

Remove unused variables.

Split out searching of the untagged holding queues to its own
routine.  In certain recovery scenarios, we want to just
remove entries in the untagged queue without touching related
transactions that are in the QINFIFO or WAITING queues that are
searched by ahc_search_qinfifo().

Add an implementation of the ahc_print_register() routine which
"pretty prints" registers.  The extra bloat in the form of string
tables for this feature is controlled by the AHC_REG_PRETTY_PRINT
option.

Fix a few bugs in ahc_enable_lun() that could prevent controllers
lacking the multiple-target-id feature from changing "our id" on
the fly.  Add a large comment to this section while I'm here
describing the restrictions on "id switching".
2002-08-31 06:41:37 +00:00
Justin T. Gibbs
b73b70cca7 Pass unparsed serial eeprom information into the driver core.
Honor the extended translation setting for EISA cards now that
I've determined where this information is kept.

Defer card interrupt enabling to the OSM since it may have
some initialization to perform that must occur before interrupts
can be enabled.
2002-08-31 06:40:32 +00:00
Justin T. Gibbs
63183d8c4e Update assembler syntax and assembler to allow generation of register
description tables used for diagnostic "pretty printing".
2002-08-31 06:39:41 +00:00
Bruce Evans
efdfb8fea3 db_ps.c:
Don't attempt to follow null pointers for zombie processes in db_ps().

Style fix: use explicit an comparison with NULL for all null pointer
checks in db_ps() instead of for half of them.

db_interface.c:
Fixed ddb's handling of traps from with ddb on i386's only.

This was mostly fixed in rev.1.27 (by longjmp()'ing back to the top
level) but was completly broken in rev.1.48 (by not unwinding the new
state (mainly db_active) either before or after the longjmp().  This
mostly never worked for other arches, since rev.1.27 has not been ported
and lower level longjmp()'s only handle traps for memory accesses.  All
cases should be handled at a lower level to provided better control and
simplify unwinding of state.

Implementation details: don't pretend to maintain db_active in a nested
way -- ddb cannot be reentered in a nested way.  Use db_active instead
of the db_global_jmpbuf_valid flag and longjmp()'s return value for things
related to reentering ddb.  [re]entering is still not atomic enough.
2002-08-31 04:25:44 +00:00
Peter Wemm
31cdffc6d8 Take a shot at fixing up a whole stack of style and other embarresing
unforced errors that Bruce identified.  I have not yet addressed all of
his concerns.
2002-08-31 03:33:32 +00:00
John Baldwin
ea9b09fef2 Maxmem is a long, so update printf format so this compiles. 2002-08-31 03:21:59 +00:00
Peter Wemm
0b1482d1fd Do not use an object for the pte and pv zones on ia64 because it overrides
the pmap_allocf() function that we provide above.  We still use the limits
via other means.

Submitted by:	jeff
2002-08-31 03:11:20 +00:00
Justin T. Gibbs
621c0e6c92 Tell the user about a failed IRQ mapping rather than fail silently. 2002-08-31 03:04:08 +00:00
Scott Long
f1757c6ee7 Make ficl work on sparc64. The assumption that int == long == void * is
very pervasive in this code.  This fixes a few of those assumptions and
band-aids over some others.

Tested on: ia32 alpha sparc64

Reviewed by:	peter jake (in concept)
2002-08-31 01:04:53 +00:00
Justin T. Gibbs
e211c13e86 Add IDs for upcoming LSI U320 products that use the MegaRAID interface.
Adjust format of one comment so it doesn't wrap at 80 columns.
Submitted by:	"Moore, Eric Dean" <emoore@lsil.com>
2002-08-30 18:28:00 +00:00
Matthew Dillon
cac4515267 Implement data, text, and vmem limit checking in the elf loader and svr4
compat code.  Clean up accounting for multiple segments.  Part 1/2.

Submitted by:	Andrey Alekseyev <uitm@zenon.net> (with some modifications)
MFC after:	3 days
2002-08-30 18:09:46 +00:00
Justin T. Gibbs
817bd00cec Reserve majors 171 and 172 for the "mide" (LSI MegaRAID IDE control device)
and "mided" (LSI MegaRAID IDE disk device).

Submitted by:	"Moore, Eric Dean" <emoore@lsil.com>
2002-08-30 16:54:02 +00:00
John Baldwin
401e7fff61 Revert previous untested revision. The i386 loader consists of three parts:
At the front is btxldr, in the middle is BTX itself (our mini-kernel), and
then the 'client' (loader.bin) which is the actual loader itself.  boot2
just executes a raw ELF or a.out binary with the only setup provided being
that a bootinfo structure is passed on the stack.  Now, since loader.bin
is a BTX client, the loader needs to be able to locate a BTX kernel for
the client to execute in the context.  Thus, just like pxelder, btxldr
uses the a.out header on the loader binary to find the BTX kernel stored
in the loader and set it up.  It does _not_ just reuse the BTX kernel
that boot2 invoked it with.  This is because it can't assume that it will
_have_ a "spare" BTX kernel lying around.  For example, when cdboot
loads the loader there isn't an existing BTX kernel.  In fact, cdboot
will only work with an a.out loader as well since it also "borrows" the
BTX kernel in the loader binary (which it finds by parsing the a.out
header) just as pxeldr does.  The only difference between cdboot and
pxeldr is where they get /boot/loader from.

If we wanted to make /boot/loader be an actual ELF binary we would need
to change the following utilites to handle that (and they all have to be
able to handle locating the BTX kernel inside of an ELF binary somehow):
- btxldr
- pxeldr
- cdboot

If we didn't want to require a flag day but make the transition smooth
then we need to be able to support both a.out and ELF versions of
/boot/loader which isn't exactly trivial since all three of these utilities
are written in assembly.

Pointy-hat to:	peter
2002-08-30 14:59:47 +00:00
Maxim Sobolev
d8afaeb24b Whitespace-only: don't mix tabs and spaces for doing identation. 2002-08-30 14:21:01 +00:00
Maxim Sobolev
25faf49d12 Fix a silly typo in user-setable promisc mode code.
Pointed out by:	Yann Berthier <yb@sainte-barbe.org>
MFC after:	1 day
2002-08-30 13:37:13 +00:00
Mitsuru IWASAKI
6c40705212 s/hint.acpi.0.disable/hint.acpi.0.disabled/
Fix device hints entry for disabling acpi(4).
This also should fix the arbitration with apm(4) when both drivers
are enabled.

Note that your /boot/device.hints needs to be updated if you want to
stop auto-loading acpi.ko or disable acpi(4).
2002-08-30 11:11:07 +00:00
Poul-Henning Kamp
d0e9b8dbc4 Correctly handle setting, getting and deleting EA's with zero length content.
Sponsored by:	DARPA & NAI Labs.
2002-08-30 08:57:09 +00:00
Andrey A. Chernov
692821870b Unbreak kernel build by printing Maxmem using %ld instead of old (now changed)
%u
2002-08-30 06:13:39 +00:00
Scott Long
eb3025b3ed The aac driver needs 256K of contiguous physical memory in order to
attach.  If it can't get that (highly likely if loaded as a module on
a system that's been up for a while), give a more descriptive error
message.
Also clean up some nearby style nits.

MFC after:	2 days
2002-08-30 05:02:07 +00:00
Peter Wemm
447b3772dc Change hw.physmem and hw.usermem to unsigned long like they used to be
in the original hardwired sysctl implementation.

The buf size calculator still overflows an integer on machines with large
KVA (eg: ia64) where the number of pages does not fit into an int.  Use
'long' there.

Change Maxmem and physmem and related variables to 'long', mostly for
completeness.  Machines are not likely to overflow 'int' pages in the
near term, but then again, 640K ought to be enough for anybody.  This
comes for free on 32 bit machines, so why not?
2002-08-30 04:04:37 +00:00
Matt Jacob
d3ecac6617 Sigh. Ken Merry convinced me that my attempts to DTRT were wrong.
Replace dual copyright with a plain BSD style copyright assigned
to LSI Logic. This is still within the intents of express consent
from LSI.

MFC after:	2 days
2002-08-30 03:36:50 +00:00
Matt Jacob
eae4a35f9f Add 909A PCI id.
MFC after:	2 days
2002-08-30 02:35:31 +00:00
Matt Jacob
8d4ee0ece1 Add an additional copyright (with the express consent of LSI Logic) that
specifically allows for (via 'BSD Style' licensing) source && binary
redistribution.

Pointy hat to: Matt, for not getting this done ahead of time.

MFC after: 2 days
2002-08-30 02:34:19 +00:00
Peter Wemm
60e4a5e539 AARGH! btoc() is used in the MI buffer sizing routines to calculate
the minimum of either physmem or KVA.  But.. btoc() casts the address
to (unsigned int).  This is NOT GOOD on 64 bit machines and on alpha and
ia64, this results in a buffer limit of around 500K (not megs).  This
causes extreme disk access problems on alpha and ia64.  Since this cast
is simply to ensure that it is unsigned, use 'vm_offset_t' instead.  This
is available because it is already defined in types.h.

Alpha has been suffering from this for ages. It always felt like the
caching wasn't working, and unfortunately it turned out that way. :-(
2002-08-30 00:29:52 +00:00
Julian Elischer
472be95807 Rejig the code to figure out estcpu and work out how long a KSEGRP has been
idle. What was there before was surprisingly ALMOST correct.

Peter and I fried our brains on this for a couple of hours figuring out
what this actually means in the context of multiple threads.

Reviewed by:	peter@freebsd.org
2002-08-30 00:25:49 +00:00
Peter Wemm
c34fd0a79a Try #2 at having /boot/loader default to ELF. Have pxeldr build its
own a.out version of loader.bin rather than depend on ../loader/loader
being a.out.
2002-08-29 23:37:44 +00:00
Peter Wemm
ee92a1ab51 Actually remove the a.out kld loader. While I am not 100% sure, I believe
it is broken.  It certainly has been suffering neglect.  It is not needed
because we never shipped a.out kld's and they never really worked right.
2002-08-29 23:04:05 +00:00
Peter Wemm
ba568b7e46 Actually remove the stale a.out kld support. This is the stuff that was
never updated for the metadata infrastructure.
2002-08-29 23:02:37 +00:00
Julian Elischer
88151aa3f5 Fix crack-smoking code that was panicing on the quad xeon:
- If either of proc or kse are NULL during thread_exit(), then
          the kernel is going to fault because parts of the function
          assume they aren't NULL.  Instead, just assert they aren't NULL
          (as well as the kse group) and assume they are in all of the
          code.  It doesn't make sense for them to be NULL here anyways.
        - Move the PROC_UNLOCK(p) up above clearing td_proc, etc. since
          otherwise we will panic if the proc's lock is contested.

Submitted by:	jhb@freebsd.org
2002-08-29 19:49:53 +00:00
Scott Long
c02a39a15d Fix a silly off my one error that caused crashes on resume in certain
circumstances.  The problem was only reported with -stable, but it's
obviously wrong in -current also.  MFC is forthcoming.

Submitted by:	doconnor@dsoft.com.au
2002-08-29 15:06:26 +00:00
Darren Reed
1851791868 some ipfilter files that accidently got imported here 2002-08-29 13:27:26 +00:00
Mitsuru IWASAKI
3aea1e1405 Add sanity check seeing if adjusted start address exceeds end address
after boundary and alignment adjustment.
2002-08-29 12:39:21 +00:00
Mitsuru IWASAKI
c4d2c0a1de Fix kernel build breakage when ACPI_DEBUG option is specified. 2002-08-29 08:31:06 +00:00
Jake Burkholder
bafbd49201 Renamed poorly named setregs to exec_setregs. Moved its prototype to
imgact.h with the other exec support functions.
2002-08-29 06:17:48 +00:00
Jake Burkholder
409017e8e1 Fixed printf format errors. 2002-08-29 05:49:04 +00:00
Jake Burkholder
16d7d18097 Minor cleanup. 2002-08-29 02:39:39 +00:00
Peter Wemm
e581f644a4 Initiate deorbit burn of i386 a.out kld "support" in loader. Note that
this was quite broken, it never was updated for metadata support.
The a.out kld file support was never really used, as it wasn't necessary.
You could always load elf kld's, even in an a.out kernel.
2002-08-29 02:02:28 +00:00
Jake Burkholder
0654f7911f Removed legacy signal trampoline. 2002-08-29 01:59:54 +00:00
Jake Burkholder
4fc642a3d9 Removed support for in-kernel signal code. 2002-08-29 01:55:24 +00:00
Mitsuru IWASAKI
d62ab2f4a1 Resolve conflicts arising from the ACPI CA 20020815 import. 2002-08-29 01:52:27 +00:00
Mitsuru IWASAKI
b7a95606db This commit was generated by cvs2svn to compensate for changes in r102550,
which included commits to RCS files with non-trunk default branches.
2002-08-29 01:51:24 +00:00
Mitsuru IWASAKI
2d12e67c7d Vendor import of the Intel ACPI CA 20020815 drop. 2002-08-29 01:51:24 +00:00
Peter Wemm
448a5139d4 Initiate deorbit burn for sys/kern/link_aout.c. We never shipped a.out
kld's anywhere, and it was always possible to load ELF kld's even in an
a.out kernel.  There is no reason for this to exist anymore, and a.out
kld support has been suffering serious bitrot over the years.  They have
not been fully functional for quite some time.
2002-08-29 01:48:09 +00:00
Jake Burkholder
f3bec5d746 Don't require that sysentvec.sv_szsigcode be non-NULL. 2002-08-29 01:28:27 +00:00
Jake Burkholder
b17c50db93 Unrot SPARSE_MAPPING code (vm_map_pageable -> vm_map_wire). 2002-08-29 01:16:14 +00:00
Peter Wemm
d13947c3b0 updatepri() works on a ksegrp (where the scheduling parameters are), so
directly give it the ksegrp instead of the thread.  The only thing it used
to use in the thread was the ksegrp.

Reviewed by:	julian
2002-08-28 23:45:15 +00:00
Peter Wemm
97e2d5fc53 OK, I have had it with losing my console because the AP's print their "I am
alive!" message right as the scsi probe messages happen.  This is a bit
nasty, but it seems to work.  At the point that we unlock the AP's, briefly
wait till they are all done while we hold the console on their behalf.
2002-08-28 23:24:05 +00:00
Poul-Henning Kamp
de7ac779e9 Only try to flush the FIFO of 500 characters, return EIO if that fails.
This at least prevents the total hang of the machine when I open a
PCCARD sio device on -current, but it does not solve the problem.
2002-08-28 22:25:41 +00:00
Archie Cobbs
f2f03122c3 accept(2) on a socket that has been shutdown(2) normally returns
ECONNABORTED. Make this happen in the non-blocking case as well.
The previous behavior was to return EAGAIN, which (a) is not
consistent with the blocking case and (b) causes the application
to think the socket is still valid.

PR:		bin/42100
Reviewed by:	freebsd-net
MFC after:	3 days
2002-08-28 20:56:01 +00:00
Alfred Perlstein
b20ea17938 Allow one to grab the definition of struct ucred by defining _WANT_UCRED
instead of forcing _KERNEL.

Move the include of sys/_label.h in ucred.h under the
_KERNEL || _WANT_UCRED case.
2002-08-28 20:39:48 +00:00