Commit Graph

43475 Commits

Author SHA1 Message Date
Jake Burkholder
81163455ce Set RB_SERIAL in boothowto if the firmware output-device is ttya or ttyb.
This ensures that uart gets a higher console priority than syscons when
a serial console is being used.  Testing against the "console" environment
variable doesn't make sense since we only have one loader console driver.
2003-11-11 18:01:44 +00:00
Mike Silbersack
20880eabe9 Remove the m_defrag call from if_loop; testing with m_fragment
has shown that the IPv6 stack can clearly handle fragmented
mbuf chains without a problem.

MFC after:	1 week
2003-11-11 17:58:36 +00:00
Sam Leffler
0f9bd73b71 o add locking
o mark isr MPSAFE

Supported by:	FreeBSD Foundation
2003-11-11 17:57:03 +00:00
Sam Leffler
3d0b255a9a o add missing inpcb locking in tcp_respond
o replace spl's with lock assertions

Supported by:	FreeBSD Foundation
2003-11-11 17:54:47 +00:00
Hajimu UMEMOTO
331bf4e6f7 ipsec_esp_auth is unused when IPSEC_ESP is not defined.
Reported by:	Andre Oppermann <oppermann@pipeline.ch>
2003-11-11 17:25:45 +00:00
John Baldwin
da17811e64 Enable HTT CPUs by default instead of halting them by default. Users
should now only have HTT CPUs if they have explicitly asked for them
either by enabling HyperThreading in the BIOS or by using the
MPTABLE_FORCE_HTT kernel option.
2003-11-11 17:16:15 +00:00
John Baldwin
f9dbba5c4e Disable probing of HTT CPUs by default for the MP Table case. HTT CPUs
should only be used if they are enabled in the BIOS.  Now that we support
enumerating CPUs using the ACPI MADT, any HTT machine using ACPI should
respect the BIOS setting.  For HTT machines with ACPI disabled in the
kernel, the MPTABLE_FORCE_HTT kernel option can be used to try to probe HTT
CPUs like have done in the past for the MP Table case.  This option should
only be enabled if HTT is enabled in the BIOS.
2003-11-11 17:14:26 +00:00
Ruslan Ermilov
80476bacd8 MFS: Change interface name from "nge" to "ngeth" to avoid conflict
with nge(4).
2003-11-11 16:12:05 +00:00
John Baldwin
d1ccde5545 - Remove empty rogue SMP hardware section.
- Add some additional comments about 'device apic' to note that it can be
  used in both UP and SMP kernels but is required for SMP kernels.
2003-11-11 15:52:31 +00:00
John Baldwin
7e42a90bf6 Use the same style of paragraph indention that the rest of NOTES uses in
the SMP section.
2003-11-11 15:49:37 +00:00
John Baldwin
20694d64a2 Axe rotted comment about MP Tables and PCI cards with built in bridges.
Now that we properly route PCI interrupts for the apic case, these cards
are no longer a problem.
2003-11-11 15:47:44 +00:00
Søren Schmidt
1bebf0fbc9 Centralise mode setting. Instead of doing it in all subdrivers, do
it in ata-all.c where it belongs.

Prime controller HW by always setting PIO mode first in attach.
2003-11-11 14:55:36 +00:00
Ruslan Ermilov
e20480bfb6 Use a single style of multiple inclusion protection for Netgraph headers.
Reviewed by:	archie, harti, emax
2003-11-11 12:30:37 +00:00
Marcel Moolenaar
a5ba2b5cc4 Save and restore the high FP registers in {g|s}_mcontext(). Note
that we currently do not keep track of whether the thread has
actually used the high FP registers before. If not, we should
not save them in the context which automaticly means that we
also would not restore them from the context. For now, do it
unconditionally so that we can reach functional completeness.
2003-11-11 09:53:37 +00:00
Marcel Moolenaar
9d52656a5a Fix a nasty bug that got exposed when the sendsig() and sigreturn()
functions switched to using {g|s}et_mcontext(). The problem is that
sigreturn(), being a syscall, can be given an async. context (i.e.
one corresponding to an interrupt or trap). When this happens, we
try to return to user mode via epc_syscall_return with a trapframe
that can only be used to return to user mode via exception_restore.

To fix this, we check the frame's flags immediately prior to
epc_syscall_return and branch to exception_restore for non-syscall
frames. Modify the assertion in set_mcontext() to check that if
there's a mismatch, it's because of sigreturn().
2003-11-11 09:25:19 +00:00
Joseph Koshy
a5896914f0 Bound the number of iterations a thread can perform inside
ktr_resize_pool(); this eliminates a potential livelock.

Return ENOSPC only if we encountered an out-of-memory condition when
trying to increase the pool size.

Reviewed by:	jhb, bde (style)
2003-11-11 09:09:26 +00:00
Søren Schmidt
b25f2bc835 Update the dump code to flush buffers at the end of the dump
to avoid loosing evt cached data.
2003-11-11 07:49:45 +00:00
Jake Burkholder
cabf3c5279 Remove reference to sio (superseded by uart). 2003-11-11 07:49:13 +00:00
Jake Burkholder
858866e77c Add entries for creator, splash, uart and puc, commented out until they're
made the default.  These are needed to run X.
2003-11-11 07:48:02 +00:00
Jake Burkholder
9c91425b10 Remove references to atkbd, atkbdc, psm and vga. 2003-11-11 07:40:45 +00:00
Jake Burkholder
036913d1be Fix a typo. Allow for the creator not being stdout. 2003-11-11 07:34:08 +00:00
Jake Burkholder
d2f154c95e Add a uart attachment/syscons keyboard driver for sun keyboards. In theory
this will work with any uart backend, currently supported hardware uses
either ns8250 or z8530.
2003-11-11 07:33:24 +00:00
Jake Burkholder
d8c43e4c41 Allow uart to attach to keyboards that are not the firmware's notion of
stdin, such as when using a serial console.  We must recognize these
devices here so that we can override the tty attach routine.
2003-11-11 06:52:04 +00:00
Jake Burkholder
7b9346ced8 Assume that unit 0 is the graphics console initialized by syscons, instead
of testing if the device's firmware node is stdout.  This allows syscons to
be used when the firmware's input and output is the serial console.
2003-11-11 06:47:00 +00:00
Jake Burkholder
0019917542 Fix a bug in the data access error recorvery. Before re-enabling the data
cache after a data access error we must discard all cache lines.  When
disabled existing cache lines are not invalidated by stores to memory, so
we risk reading stale data that was cached before the data access error if
we don't flush them.  This is especially fatal when the memory involved
is the active part of the kernel or user stack.  For good measure we also
flush the instruction cache.

This fixes random crashes when the X server probes the PCI bus through
/dev/pci.
2003-11-11 06:41:54 +00:00
Bruce Evans
129540b834 Include <sys/reboot.h> the definition of RB_BOOTINFO. The previous
commit broke the world because it depended on namespace pollution that
was only in my version of <machine/bootinfo.h>.  The include was removed
in rev.1.63 after the last reference to it went away in rev.1.61.
2003-11-11 06:27:34 +00:00
Jake Burkholder
fe6b8ecd5e Rearrange slightly so that DELAY(9) works during cninit. 2003-11-11 06:08:10 +00:00
Scott Long
42c3555cff Fix sound LOR problems:
dsp_open: rearrange to only hold one lock at a time

dsp_close: ditto

mixer_hwvol_init: delete locking, the only consumer seems to
be the ess driver and it only call it a creation time, I
think the device will be stable across the sleepable malloc.

cmi interrupt routine: Release locks while caller chn_intr,
either this or do what emu10k1 does which is have no locks
at in the interrupt handler.

Submitted by:	mat@cnd.mcgill.ca
2003-11-11 05:38:28 +00:00
Joseph Koshy
b10221ffd9 Have utrace(2) return ENOMEM if malloc() fails. Document this error
return in its manual page.

Reviewed by:	jhb
2003-11-11 04:54:11 +00:00
Alan Cox
e35e0182c3 - Revision 1.469 of vfs_subr.c resulted in the buf's b_object field being
consistency initialized.  Consequently, a number of conditionals that
   checked the validity of b_object before passing it to VM_OBJECT_LOCK()
   and VM_OBJECT_UNLOCK() are no longer needed.
2003-11-11 04:45:37 +00:00
Robert Watson
c8e7bf92ad Whitespace sync to MAC branch, expand comment at the head of the file. 2003-11-11 03:40:04 +00:00
Alfred Perlstein
b46b1a899f Stop using shared locks for nfs vop locks.
The reason this was done was to avoid a race to the root when an
NFS server went down.  However a semi-recent change to the way that
the kernel's lookup() routine traverses mount points prevents this.

Rev 1.39 of vfs_lookup.c changed the ordering of locks such that we
aquire a shared lock on the mount point being accessed and then drop
the directory vnode lock before requesting the target lock.

With that in place we no longer need shared locks for NFS to prevent
race to the root lockups.
2003-11-11 00:32:46 +00:00
Sam Leffler
383df78dc8 use Giant-less callouts when debug_mpsafenet is non-zero
Supported by:	FreeBSD Foundation
2003-11-10 23:29:33 +00:00
Ian Dowse
3ab2096b80 In in_pcbconnect_setup(), don't use the cached inp->inp_route unless
it is marked as RTF_UP. This appears to fix a crash that was sometimes
triggered when dhclient(8) tried to send a packet after an interface
had been detatched.

Reviewed by:	sam
2003-11-10 22:45:37 +00:00
Don Lewis
8d0c247562 If fifo_open() is interrupted, fifo_close() may not get called, causing
a resource leak.  Move the resource deallocation code from fifo_close()
to a new function, fifo_cleanup(), and call fifo_cleanup() from
fifo_close() and the appropriate places in fifo_open().

Tested by: 	Lukas Ertl
Pointy hat to:	truckman
2003-11-10 22:21:00 +00:00
John Baldwin
4e478d4521 MFamd64 (via P4, not in CVS yet):
- Use the static boot_address variable directly rather than passing it
  around to several functions.
- Clean up a couple of magic numbers.
2003-11-10 21:24:34 +00:00
Jeffrey Hsu
1ce43e2348 Mark TCP syncache timer as not Giant-free ready yet. 2003-11-10 20:42:04 +00:00
Alfred Perlstein
cd3c61b93d Fix a bug where the taskqueue kproc was being parented by init
because RFNOWAIT was being passed to kproc_create.

The result was that shutdown took quite a bit longer because this
errant "child" would not respond to termination signals from init
at system shutdown.

RFNOWAIT dissassociates itself from the caller by attaching to init
as a parent proc.  We could have had the taskqueue proc listen for
SIGKILL, but being able to SIGKILL a potentially critical system
process doesn't seem like a good idea.
2003-11-10 20:39:44 +00:00
John Baldwin
95020215db Bump APIC ID limits up to 32 since a machine with 16 CPUs will have APIC
IDs for the I/O APICs that are greater than 16.

Reported by:	John Cagle <john.cagle@hp.com>
2003-11-10 19:52:58 +00:00
Bruce Evans
c00209396c Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrong
comment about this flag in rev.1.61.  It is not historical like the
comment said; it is the flag that says that most of what is laboriously
put in the bootinfo struct is actually there.  Newer kernels were
bootable by even the broken boot2 without losing anything except the
symbol table, but older kernels need at least the memory sizes.

Restoring the "|" with RB_BOOTINFO that was lost in rev.1.43 costs 5
bytes.  The fix can be done in only 4 bytes by fixing some code that
was removed in rev.1.61 (put RB_BOOTINFO back in in the initial value
of "opts" and fix RBX_MASK to not clobber it.)
2003-11-10 19:06:09 +00:00
Warner Losh
9b41f0a787 Don't establish the ISR in the sn_activate routine. I've had two
crashes that had sn0 as the irq that's being serviced, when there was
no sn0 in the system.  This seems to prevent them.  Also, we want to
wait until after we've registered with the network layer before we
turn on the interrupt spigot to avoid races.
2003-11-10 16:04:11 +00:00
John Baldwin
4c76854fad Update a comment related to SMP and describe the NO_MIXED_MODE kernel
option.

Requested by:	bde
2003-11-10 15:54:32 +00:00
John Baldwin
c68ec2c20b Update a comment.
Requested by:	bde
2003-11-10 15:48:30 +00:00
Gary Jennejohn
ebb5694a4b Based on an excellent suggestion from tanimura@ define I4BPRI and use it
in place of TTIPRI.
2003-11-10 14:20:34 +00:00
Hidetoshi Shimokawa
9b86b36df8 Reduce debug message. 2003-11-10 14:04:37 +00:00
Gary Jennejohn
84df55b1f4 Fix breakage cuased by the selwakeuppri commit by defining TTIPRI for
recent versions of FreeBSD (based on __FreeBSD_version check).
2003-11-10 14:02:22 +00:00
Ruslan Ermilov
5a4e8b0f24 Don't compile with -g by default; there's a better way to build modules with
debug support.
2003-11-10 12:54:54 +00:00
Hajimu UMEMOTO
db54001806 enable aes-xcbc-mac and aes-ctr, again. 2003-11-10 10:39:14 +00:00
Hajimu UMEMOTO
5129dcfce7 rijndael-alg-fst.[ch]:
- redo updating.

rijndael-api-fst.[ch]:
  - switch to use new low level rijndael api.
  - stop using u8, u16 and u32.
  - space cleanup.

Tested by:	gbde(8) and phk's test program
2003-11-10 10:33:39 +00:00
Tim J. Robbins
541c3b66b5 When there are no free sem_undo structs available in semu_alloc(), only
free one sem_undo with un_cnt == 0 instead of all of them. This is a
temporary workaround until the SLIST_FOREACH_PREVPTR loop gets fixed so
that it doesn't cause cycles in semu_list when removing multiple adjacent
items. It might be easier to just use (doubly-linked) LISTs here instead
of complicated SLIST code to achieve O(1) removals.

This bug manifested itself as a complete lockup under heavy semaphore use
by multiple processes with the SEM_UNDO flag set.

PR:		58984
2003-11-10 07:22:41 +00:00