Commit Graph

117807 Commits

Author SHA1 Message Date
stefanf
e924b3caca While revision 1.26 fixed the code to really subtract 3600 due to
daylight-saving, this was actually wrong because mktime() already does that for
us.
2005-08-18 08:18:02 +00:00
iedowse
11293f3595 Add a "comconsole_speed" loader variable that can be used to change
the serial console speed (i386 and amd64 only). If the previous
stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE)
then the default speed is determined from the current serial port
speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED
at compile time.

This makes it possible to set the serial port speed once in
/boot.config and the setting will propagate to boot2, loader and
the kernel serial console.
2005-08-18 01:39:43 +00:00
iedowse
1161399eef Add the ability to specify the boot2 serial console speed in
/boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
and required a few other small changes to limit the size impact.
This changes only affects boot2; there are further loader changes
to follow.
2005-08-18 00:42:45 +00:00
pjd
352b6c307b Add VIA/ACE "PadLock" support as a crypto(9) driver.
HW donated by:			Mike Tancsa <mike@sentex.net>
Most of the code obtained from:	OpenBSD
MFC after:			3 days
2005-08-18 00:30:22 +00:00
rodrigc
b9a94147ea Rename variables:
r_gdt -> saved_gdt
r_idt -> saved_idt
r_ldt -> saved_ldt

in order to prevent clashes with variables with same names
defined in <machine/segments.h>.  This fixes compilation of this
file with GCC 4.0.

Reviewed by:	njl
2005-08-18 00:28:25 +00:00
stefanf
5b1426ccf5 Document umask's -S option. 2005-08-17 19:44:15 +00:00
brooks
b39261ae82 Remove an unnecessicary bzero that was zeroing the softc's struct ifnet
pointer.

Submitted by:	brueffer
Reviewed by:	dfr
2005-08-17 18:53:06 +00:00
keramida
ead946f89d Typo: s/adverisement/advertisement/.
Submitted by:	Fredrik Lindberg <fli+freebsd@shapeshifter.se>
PR:		docs/85050
2005-08-17 18:43:07 +00:00
jhb
3477a18ba6 - Use htole32() instead of using bswap32() conditional on #if BYTE_ORDER.
- Don't set IFF_ALLMULTI in our ifnet's if_flags if we end up allowing
  all multicast due to limits in the MAC receive filters in hardware.

Requested by:	rwatson (2)
2005-08-17 17:46:51 +00:00
jhb
cb9509b4ac Remove the unused TULIP_CSR_{READ,WRITE}BYTE macros. 2005-08-17 17:45:19 +00:00
jhb
a4568a681a Use callout_init_mtx() to simplify the stats callout.
MFC after:	3 days
2005-08-17 17:44:58 +00:00
jhb
dd48b0ad7c Add callout_drain()'s to foo_detach() after calling foo_stop() to make sure
that if softclock is running on another CPU and is blocked on our driver
lock, we will wait until it has acquired the lock, seen that it was
cancelled, dropped the lock, and awakened us so that we can safely destroy
the mutex.

MFC after:	3 days
2005-08-17 17:44:32 +00:00
jhb
f453d156ac Fix locking in el(4) and mark mpsafe.
- Add locked variants of el_init and el_start.
- Don't initialize the mutex and lock it during el_probe().
- Do initialize the mutex during attach.  (el_probe() did destroy the mutex
  to cleanup, so this meant the driver was always using a destroyed mutex
  when it was running.)
- Setup the interrupt handler after ether_ifattach().
- Fix locking in el_detach() and el_ioctl().

Note: Since I couldn't actually find anyone with this hardware, I'm going
ahead and committing these changes so they won't be lost.  I'll remove the
driver in a week (real purpose of the MFC after below) unless someone pipes
up to test this.

MFC after:	1 week
Tested by:	gcc(1)
2005-08-17 17:36:47 +00:00
ume
08f3334229 don't raise cpu speed over the value when passive cooling is in
effect.  since CPU speed is restored by degrees, we cannot use
the facility of saving cpu speed by CPUFREQ_set() effectively.
so, we need to save the value when passive cooling is in effect.

Repoeted by:	Kevin Oberman <oberman__at__es.net>
2005-08-17 17:01:25 +00:00
ume
d73a48f4b8 - fix race condition using sx lock.
- use TAILQ_FOREACH() for readability.

Suggested by:	jhb
2005-08-17 16:46:55 +00:00
joel
f8d92d59db Bump .Dd before someone notice.
Approved by:	brueffer (mentor)
2005-08-17 16:45:54 +00:00
joel
2903564136 Be more specific about supported chipsets.
Approved by:	brueffer (mentor)
2005-08-17 16:36:07 +00:00
joel
f7017f60f4 Remove a few items from the hardware list. This support is already
covered in the manual pages for each bridge device driver.

Approved by:	brueffer (mentor)
2005-08-17 16:24:57 +00:00
cperciva
afe2192571 Remove the dates from these files. They serve no purpose and result in
these files spuriously changing each time they are built.

Also, add $FreeBSD$ tags, because cvs is unhappy otherwise.
2005-08-17 15:56:04 +00:00
cperciva
563a2851b1 Repeatability is Considered Good when building this library, too. (And
I think this is the last one which needs it.)
2005-08-17 15:46:18 +00:00
pjd
e00e4fe291 Update manual page (now dedicated kernel thread is always started).
MFC after:	3 days
2005-08-17 15:27:23 +00:00
pjd
653998193b Always run dedicated kernel thread (even when we have hardware support).
There is no performance impact, but allows to allocate memory with
M_WAITOK flag.
As a side effect this simplify code a bit.

MFC after:	3 days
2005-08-17 15:25:57 +00:00
pjd
768e62bfca We should now return 0. 2005-08-17 15:12:34 +00:00
sos
1a7d21ba0c Add support for working around controllers that cannot do DMA in 48bit mode.
The workaround use PIO mode above ~137GB to allow using the disk.
Add the Acer chips with rev < 0xc4 as first candidate.
2005-08-17 15:00:33 +00:00
sos
705a1ddfe6 Use the bio field instead of the driver field as intended. 2005-08-17 14:50:18 +00:00
jhb
34f889adae Use device_printf() and if_printf() and remove ste_unit from the softc. 2005-08-17 14:37:39 +00:00
pjd
b5aaabac19 Even if crypto_dispatch() return an error, request is not canceled and
our callback will still be called, just to tell us that requested
failed...

Reported by:	Mike Tancsa <mike@sentex.net>
MFC after:	3 days
2005-08-17 14:34:52 +00:00
jhb
c79357de04 Catch up to ic_curchan changes by making the same change here that was made
in ipw(4) in the earlier ic_curchan mega commit.

Submitted by:	Øyvind Kolbu oyvind at kolbu dot ws
Tested by:	Stefan Ehmann shoesoft at gmx dot net
2005-08-17 14:08:52 +00:00
pjd
8e698f8cb4 We don't need to clear allocated memory. This will speed-up things a bit.
MFC after:	3 days
2005-08-17 14:08:50 +00:00
murray
0425964369 Correct birthdate for Meriwether Lewis. He was born before the
declaration of independence, not after the first world war.
2005-08-17 13:32:18 +00:00
keramida
3e1de19087 Add a small paragraph that describes how the current environment
settings can be displayed, near the end of the DESCRIPTION section,
immediately after the paragraph that describes how they can be set.

Add a reference to printenv(1) too (and the ``printenv'' csh builtin).

Submitted by:   Gary W. Swearingen <garys@opusnet.com>
PR:             docs/85008
2005-08-17 13:02:47 +00:00
tjr
3e6c619383 Fix a boundary condition error in slow() and fast() in multibyte locales:
we must allow the character beginning at "p" to be converted to a wide
character for the purposes of EOL processing and word-boundary matching.
2005-08-17 11:37:38 +00:00
tjr
92f771be39 Document the fact that word-boundary matching does not work
properly in multibyte locales.
2005-08-17 11:21:15 +00:00
iedowse
67b0f0cb38 In the ufsdirhash_build() failure case for corrupted directories
or unreadable blocks, make sure to destroy the mutex we created.
Also fix an unrelated typo in a comment.

Found by:	Peter Holm's stress tests
Reviewed by:	dwmalone
MFC after:	3 days
2005-08-17 08:48:42 +00:00
phk
fcf6768753 Handle device drivers with D_NEEDGIANT in a way which does not
penalize the 'good' drivers:  Allocate a shadow cdevsw and populate
it with wrapper functions which grab Giant
2005-08-17 08:19:52 +00:00
pjd
bb000dd3d5 Assert proper key size also in userland by defining KASSERT in !_KERNEL case. 2005-08-17 07:59:07 +00:00
phk
2352e07b6f In vop_stdpathconf(ap) also default for _PC_NAME_MAX and _PC_PATH_MAX. 2005-08-17 06:59:23 +00:00
gshapiro
d2cf0c963a Make links for hoststat(8) and purgestat(8) man pages.
PR:		docs/85009
MFC after:	3 days
2005-08-17 02:36:31 +00:00
cperciva
28bdebaa08 Add -frandom-seed=RepeatabilityConsideredGood to CFLAGS. This makes
this library build repeatably.  (This change was made to libstdc++
several months ago; I just realized today that it would help here as
well.)

Approved by:	kan
2005-08-17 01:59:10 +00:00
csjp
faafaf70f1 Ensure that file flags such as schg, sappnd (and others) are honored
by md(4). Before this change, it was possible to by-pass these flags
by creating memory disks which used a file as a backing store and
writing to the device.

This was discussed by the security team, and although this is problematic,
it was decided that it was not critical as we never guarantee that root will
be restricted.

This change implements the following behavior changes:

-If the user specifies the readonly flag, unset write operations before
 opening the file. If the FWRITE mask is unset, the device will be
 created with the MD_READONLY mask set. (readonly)
-Add a check in g_md_access which checks to see if the MD_READONLY mask
 is set, if so return EROFS
-Do not gracefully downgrade access modes without telling the user. Instead
 make the user specify their intentions for the device (assuming the file is
 read only). This seems like the more correct way to handle things.

This is a RELENG_6 candidate.

PR:		kern/84635
Reviewed by:	phk
2005-08-17 01:24:55 +00:00
brooks
e7d53d1ef4 Add two new template sources, /conf/bcast/${ipbca} and /conf/ip/${ip}.
These allow large installations to keep their /conf directory down to a
managable number of entries.

Clean up the handling of dhcp_cookie.
2005-08-17 00:28:38 +00:00
cperciva
bdfa6fbbb1 Unbreak the world build (in sbin/gbde). This file is used by both
kernel and world, so KASSERT() needs to be wrapped within an #ifdef
_KERNEL / #endif pair.

Reported by:	krion, tinderbox
2005-08-17 00:24:20 +00:00
brueffer
0dd6587c94 Clarify how the 'channel' argument should look like and add an
example on how to obtain information on devices on an ata channel.

PR:		84676
Submitted by:	Kevin Oberman <oberman@es.net>
		Jeremie Le Hen <jeremie@le-hen.org>
MFC after:	3 days
2005-08-16 21:14:25 +00:00
jhb
9070151776 Fixup locking in if_my(4) and mark it MPSAFE:
- Add locked variants of my_start() and my_init().
- Assert that the lock is held in several places rather than recursing.
- Overhaul failure case handling in my_attach() so that it will actually
  clean up completely in each of the failure cases.
- Setup the interrupt after ether_ifattach() in my_attach().
- Remove unused callout handle from softc.
- Free the metadata for the descriptors my_in detach() (we leaked it
  before).
- Fix locking in my_ioctl().
- Remove spls.

Tested by:	brueffer
MFC after:	3 days
2005-08-16 20:39:30 +00:00
phk
c1c0b1f44e remove stale comments 2005-08-16 20:03:29 +00:00
ume
69a7276f8f Save cpu level only when priority is greater than PRIO_USER
to make CPUFREQ_SET(NULL, prio) work.
TODO: implement saved_level as stack.

Reviewed by:	njl
2005-08-16 20:03:08 +00:00
ume
0b8c72b90b avoid exclusive sleep mutex. 2005-08-16 19:49:10 +00:00
phk
d6e36cd748 Remove stale comment. 2005-08-16 19:47:42 +00:00
phk
8a3fe94804 Collect the devfs related sysctls in one place 2005-08-16 19:25:02 +00:00
phk
e89ebd4119 Create a new internal .h file to communicate very private stuff
from kern_conf.c to devfs.

For now just two prototypes, more to come.
2005-08-16 19:08:01 +00:00