]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoMFi386: mp_topology().
Peter Wemm [Wed, 28 Jan 2004 23:51:16 +0000 (23:51 +0000)]
MFi386: mp_topology().

20 years agoMFi386: add THERMTRIP msr values
Peter Wemm [Wed, 28 Jan 2004 23:47:22 +0000 (23:47 +0000)]
MFi386: add THERMTRIP msr values

20 years agoDiff reduction with i386
Peter Wemm [Wed, 28 Jan 2004 23:46:48 +0000 (23:46 +0000)]
Diff reduction with i386

20 years agoRegen
Peter Wemm [Wed, 28 Jan 2004 23:45:48 +0000 (23:45 +0000)]
Regen

20 years agoAdd getitimer swab stub
Peter Wemm [Wed, 28 Jan 2004 23:45:37 +0000 (23:45 +0000)]
Add getitimer swab stub

20 years agoDocument NO_BLUETOOTH knob
Maksim Yevmenkin [Wed, 28 Jan 2004 22:46:39 +0000 (22:46 +0000)]
Document NO_BLUETOOTH knob

Reviewed by: imp (mentor), ru

20 years ago- Removed more bitrot (the "while" loops).
Ruslan Ermilov [Wed, 28 Jan 2004 22:44:17 +0000 (22:44 +0000)]
- Removed more bitrot (the "while" loops).
- Factored out common parts of dofs_vn() and dofs_md().

20 years agoAdd debug.mutex.prof.reset.
Robert Watson [Wed, 28 Jan 2004 22:21:04 +0000 (22:21 +0000)]
Add debug.mutex.prof.reset.

20 years agoAdd a reset sysctl for mutex profiling: zeros all of the mutex
Robert Watson [Wed, 28 Jan 2004 22:11:53 +0000 (22:11 +0000)]
Add a reset sysctl for mutex profiling: zeros all of the mutex
profiling buffers and hash table.  This makes it a lot easier to
do multiple profiling runs without rebooting or performing
gratuitous arithmetic.  Sysctl is named debug.mutex.prof.reset.

Reviewed by: jake

20 years agoFix for those lost interrupts on probe on lots of controller types.
Søren Schmidt [Wed, 28 Jan 2004 21:54:40 +0000 (21:54 +0000)]
Fix for those lost interrupts on probe on lots of controller types.

Note to self, just because an idea is good, it doesn't apply everywhere.

20 years ago- Catch up to new boot floppies targets.
John Baldwin [Wed, 28 Jan 2004 21:07:36 +0000 (21:07 +0000)]
- Catch up to new boot floppies targets.
- Update description of release.4 to mention KERNELS variable.
- Update field width for make release targets.

20 years agoMFi386: change an outb to a DELAY()
Peter Wemm [Wed, 28 Jan 2004 20:46:31 +0000 (20:46 +0000)]
MFi386: change an outb to a DELAY()

20 years agoMove the loadav() callout into its own kthread since it uses allproc_lock
John Baldwin [Wed, 28 Jan 2004 20:44:41 +0000 (20:44 +0000)]
Move the loadav() callout into its own kthread since it uses allproc_lock
which is a sleepable lock and thus is not safe to acquire from a callout
routine.

20 years agoOptimize the i386 interrupt entry code to not reload the segment registers
John Baldwin [Wed, 28 Jan 2004 20:44:08 +0000 (20:44 +0000)]
Optimize the i386 interrupt entry code to not reload the segment registers
if they already contain the correct kernel selectors.

Reviewed by: peter
Suggested by: peter

20 years agoRework witness_lock() to make it slightly more useful and flexible.
John Baldwin [Wed, 28 Jan 2004 20:39:57 +0000 (20:39 +0000)]
Rework witness_lock() to make it slightly more useful and flexible.
- witness_lock() is split into two pieces: witness_checkorder() and
  witness_lock().  Witness_checkorder() determines if acquiring a specified
  lock at the time it is called would result in a lock order.  It
  optionally adds a new lock order relationship as well.  witness_lock()
  updates witness's data structures to assume that a lock has been acquired
  by stick a new lock instance in the appropriate lock instance list.
- The mutex and sx lock functions now call checkorder() prior to trying to
  acquire a lock and continue to call witness_lock() after the acquire is
  completed.  This will let witness catch a deadlock before it happens
  rather than trying to do so after the threads have deadlocked (i.e. never
  actually report it).
- A new function witness_defineorder() has been added that adds a lock
  order between two locks at runtime without having to acquire the locks.
  If the lock order cannot be added it will return an error.  This function
  is available to programmers via the WITNESS_DEFINEORDER() macro which
  accepts either two mutexes or two sx locks as its arguments.
- A few simple wrapper macros were added to allow developers to call
  witness_checkorder() anywhere as a way of enforcing locking assertions
  in code that might acquire a certain lock in some situations.  The
  macros are: witness_check_{mutex,shared_sx,exclusive_sx} and take an
  appropriate lock as the sole argument.
- The code to remove a lock instance from a lock list in witness_unlock()
  was unnested by using a goto to vastly improve the readability of this
  function.

20 years agoUse the biotask functionality in GEOM to put finished requests on
Søren Schmidt [Wed, 28 Jan 2004 20:38:51 +0000 (20:38 +0000)]
Use the biotask functionality in GEOM to put finished requests on
instead of taskqueue_swi. This shaves from 1 to 10% of the overhead.

Overhaul the locking once more, there was a few possible races that
are now closed.

20 years agoUse mtx_assert() rather than using a home-rolled version.
John Baldwin [Wed, 28 Jan 2004 20:26:39 +0000 (20:26 +0000)]
Use mtx_assert() rather than using a home-rolled version.

20 years agoThis has been disconnected from the build since May 2003. GC it, as
David E. O'Brien [Wed, 28 Jan 2004 19:29:16 +0000 (19:29 +0000)]
This has been disconnected from the build since May 2003.  GC it, as
bsdlabel and sunlabel are what we use now.

20 years agoUse sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3
Nate Lawson [Wed, 28 Jan 2004 19:04:14 +0000 (19:04 +0000)]
Use sys_nsig instead of the static NSIG.  DragonflyBSD kill.c:1.3

Obtained from: DragonflyBSD

20 years agoUse sys_nsig instead of NSIG for the length of the signal arrays. This
Nate Lawson [Wed, 28 Jan 2004 19:01:10 +0000 (19:01 +0000)]
Use sys_nsig instead of NSIG for the length of the signal arrays.  This
is important if we add new signals later.  From DragonflyBSD:
jobs.c:1.4, trap.c:1.3.

Obtained from: DragonflyBSD

20 years agoRemove the inadvertant HTML additions to this man page.
Wes Peters [Wed, 28 Jan 2004 18:51:24 +0000 (18:51 +0000)]
Remove the inadvertant HTML additions to this man page.
These appear to have been inserted in the PR text by gnatsweb.

Noticed by: des (maintainer)

20 years agoThe PR diff I committed recently had one bug noticed by
Martin Cracauer [Wed, 28 Jan 2004 18:22:19 +0000 (18:22 +0000)]
The PR diff I committed recently had one bug noticed by
Joe Marcus Clarke <marcus@FreeBSD.ORG>, subshells could lose a
non-zero exit status.

This commit is Joe's proposed patch.  Thanks!

I verified that the problem Joe found is fixed and I ran a full world
with this patch.

I don't plan to ever commit language patches to /bin/sh again.  It is
a minefield too big to navigate without a full-time committment, which
I am not willing to do on our /bin/sh.

Under normal circumstances I would recommend using NetBSD's sh which
has a lot of language fixes (like the ones what these patches were
about) but unfortunately they had implemented broken signal behaviour
for shellscript containing interactive programs.  Similar issues apply
to pdksh which is OpenBSD's sh.

From my perspective bash2 is the only really working bourne sh out
there and that one is GPLed.  Oh well.

20 years agoAlways build ext2fs module. There is no written policy preventing the
David E. O'Brien [Wed, 28 Jan 2004 17:20:08 +0000 (17:20 +0000)]
Always build ext2fs module.  There is no written policy preventing the
building of GPL'ed modules.

20 years agoAdd an exclusion list that lists all the files from the original
Hartmut Brandt [Wed, 28 Jan 2004 16:14:49 +0000 (16:14 +0000)]
Add an exclusion list that lists all the files from the original
distribution that we don't need.

20 years agoprotect access to ifnet structure with mutex.
Hajimu UMEMOTO [Wed, 28 Jan 2004 15:01:39 +0000 (15:01 +0000)]
protect access to ifnet structure with mutex.

20 years agoAdd gettext-old to the MINIMALDOCPORTS variable.
Yoshihiro Takahashi [Wed, 28 Jan 2004 14:51:38 +0000 (14:51 +0000)]
Add gettext-old to the MINIMALDOCPORTS variable.

20 years agoFix another typo.
Maxime Henrion [Wed, 28 Jan 2004 13:29:40 +0000 (13:29 +0000)]
Fix another typo.

20 years agoFix typo.
Maxime Henrion [Wed, 28 Jan 2004 13:28:45 +0000 (13:28 +0000)]
Fix typo.

20 years agoGC some old cruft.
Ruslan Ermilov [Wed, 28 Jan 2004 10:58:37 +0000 (10:58 +0000)]
GC some old cruft.

20 years agoPut slattach(8) onto the MFS root file system now that we always
Ruslan Ermilov [Wed, 28 Jan 2004 10:18:54 +0000 (10:18 +0000)]
Put slattach(8) onto the MFS root file system now that we always
use the GENERIC kernel for installs which has the sl(4) support.

20 years agoPut slattach(8), camcontrol(8), usbd(8), and usbdevs(8) onto the
Ruslan Ermilov [Wed, 28 Jan 2004 10:15:47 +0000 (10:15 +0000)]
Put slattach(8), camcontrol(8), usbd(8), and usbdevs(8) onto the
MFS root file system now that these architectures always use the
GENERIC kernel for installs.

20 years agoClean up after revision 1.55.
Ruslan Ermilov [Wed, 28 Jan 2004 09:38:40 +0000 (09:38 +0000)]
Clean up after revision 1.55.

20 years agoRevert revision 1.833 -- the reinstallkernel.debug target calls the
Ruslan Ermilov [Wed, 28 Jan 2004 09:19:16 +0000 (09:19 +0000)]
Revert revision 1.833 -- the reinstallkernel.debug target calls the
installkernel.debug target (in the kernel build directory) which is
only defined if the kernel was configured for debugging which it is
not the case for GENERIC kernels on release branches.

20 years agoOnly i386 and Alpha have the compat4x distribution.
Ruslan Ermilov [Wed, 28 Jan 2004 09:12:00 +0000 (09:12 +0000)]
Only i386 and Alpha have the compat4x distribution.

20 years agoBring back the geom_bioqueues, they _are_ a good idea.
Poul-Henning Kamp [Wed, 28 Jan 2004 08:39:18 +0000 (08:39 +0000)]
Bring back the geom_bioqueues, they _are_ a good idea.

ATA will uses these RSN.

20 years agoChange KASSERT() in feed_vchan16() into an explicit test and call to
Don Lewis [Wed, 28 Jan 2004 08:02:15 +0000 (08:02 +0000)]
Change KASSERT() in feed_vchan16() into an explicit test and call to
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change chn_setblocksize() buffer reallocation code to attempt to avoid
the feed_vchan16() buffer overflow by attempting to always keep the
bufsoft buffer at least as large as the bufhard buffer.

Print a diagnositic message
Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE()
if our best attempts fail.  If feed_vchan16() were to be called by
the interrupt handler while locks are dropped in chn_setblocksize()
to increase the size bufsoft to match the size of bufhard, the panic()
code in feed_vchan16() will be triggered.  If the diagnostic message
is printed, it is a warning that a panic is possible if the system
were to see events in an "unlucky" order.

Change the locking code to avoid the need for MTX_RECURSIVE mutexes.

Add the MTX_DUPOK option to the channel mutexes and change the locking
sequence to always lock the parent channel before its children to avoid
the possibility of deadlock.

Actually implement locking assertions for the channel mutexes and fix
the problems found by the resulting assertion violations.

Clean up the locking code in dsp_ioctl().

Allocate the channel buffers using the malloc() M_WAITOK option instead
of M_NOWAIT so that buffer allocation won't fail.  Drop locks across
the malloc() calls.

Add/modify KASSERTS() in attempt to detect problems early.

Abuse layering by adding a pointer to the snd_dbuf structure that points
back to the pcm_channel that owns it.  This allows sndbuf_resize() to do
proper locking without having to change the its API, which is used by
the hardware drivers.

Don't dereference a NULL pointer when setting hw.snd.maxautovchans
if a hardware driver is not loaded.  Noticed by Ryan Sommers
<ryans at gamersimpact.com>.

Tested by: Stefan Ehmann <shoesoft AT gmx.net>
Tested by: matk (Mathew Kanner)
Tested by: Gordon Bergling <gbergling AT 0xfce3.net>

20 years agoAdd an ACPI_FUNCTION_TRACE() to the newly-added acpi_Startup() routine
Peter Pentchev [Wed, 28 Jan 2004 07:48:03 +0000 (07:48 +0000)]
Add an ACPI_FUNCTION_TRACE() to the newly-added acpi_Startup() routine
to get the ACPI_DEBUG case (and LINT in particular) to build.

Reviewed by: jhb, njl
Approved by: jhb

20 years agoIf not in the debugger or if the user requests it with the
Nate Lawson [Wed, 28 Jan 2004 06:51:18 +0000 (06:51 +0000)]
If not in the debugger or if the user requests it with the
debug.ddb_use_printf sysctl, output kernel debugger data to both the
console and kernel message buffer via printf.  This fixes the case where
backtrace() went directly to the console and should help debugging greatly.
Thanks to Ian Dowse for the work, minor edits or any bugs are by myself.

Submitted by: iedowse

20 years agoRemove process lock XXX's, fixed in src/sys/sys/proc.h:1.366.
Robert Watson [Wed, 28 Jan 2004 06:48:31 +0000 (06:48 +0000)]
Remove process lock XXX's, fixed in src/sys/sys/proc.h:1.366.

20 years agoMove the part of the comment which applies to osigsuspend where
Alexander Kabaev [Wed, 28 Jan 2004 06:06:04 +0000 (06:06 +0000)]
Move the part of the comment which applies to osigsuspend where
it belongs. The current sigsuspend syscall does expect a pointer
to the mask as argument.

Submitted by: Igor Sysoev <is at rambler-co dot ru>

20 years agoMerge from NetBSD rev. 1.2 (drochner): Do the address calculations inside
Tim J. Robbins [Wed, 28 Jan 2004 05:55:13 +0000 (05:55 +0000)]
Merge from NetBSD rev. 1.2 (drochner): Do the address calculations inside
the data delivered by SIOCGIFCONF correctly (this isn't a plain array!),
and sort the checks a bit to avoid duplicates in the interface list.

20 years agoAlways build ext2fs module. There is no written policy preventing the
David E. O'Brien [Wed, 28 Jan 2004 04:16:13 +0000 (04:16 +0000)]
Always build ext2fs module.  There is no written policy preventing the
building of GPL'ed modules.

20 years agoMFi386: revision 1.33
Yoshihiro Takahashi [Wed, 28 Jan 2004 04:15:31 +0000 (04:15 +0000)]
MFi386: revision 1.33

PR: kern/62005

20 years agoEnable ndis for AMD64 (for the time that modules are supported)...
David E. O'Brien [Wed, 28 Jan 2004 04:15:10 +0000 (04:15 +0000)]
Enable ndis for AMD64 (for the time that modules are supported)...

20 years agoFix an uninitialized variable bug that caused write_pmbr() to bogusly
Marcel Moolenaar [Wed, 28 Jan 2004 03:38:25 +0000 (03:38 +0000)]
Fix an uninitialized variable bug that caused write_pmbr() to bogusly
return an error value that made Write_Disk() abort.  While on the
subject, improve the initialization of the error variable in read_gpt()
and update_gpt() even though nothing was broken there.

20 years agoAdd NO_BLUETOOTH knob to the build process
Maksim Yevmenkin [Wed, 28 Jan 2004 00:42:51 +0000 (00:42 +0000)]
Add NO_BLUETOOTH knob to the build process

Requested by: phk
Reviewed by: imp (mentor), ru

20 years agoIncrement WARNS.
Ruslan Ermilov [Wed, 28 Jan 2004 00:11:42 +0000 (00:11 +0000)]
Increment WARNS.

20 years agoThe report size is not a local item, so don't clear it when clearing local items.
Maksim Yevmenkin [Wed, 28 Jan 2004 00:05:22 +0000 (00:05 +0000)]
The report size is not a local item, so don't clear it when clearing local items.

PR: misc/58971
Reviewed by: imp (mentor), mdodd
Obtained from: NetBSD

20 years agoRemove trailing white space.
Greg Lehey [Wed, 28 Jan 2004 00:02:10 +0000 (00:02 +0000)]
Remove trailing white space.
Sort SEE ALSO by section number first, not alphabetically.
Remove period at end SEE ALSO to make it look less like a sentence.

Submitted by: ru

20 years agoFixed bogus ${FOO:Mbar} tests where the actual intent is to check
Ruslan Ermilov [Tue, 27 Jan 2004 23:22:15 +0000 (23:22 +0000)]
Fixed bogus ${FOO:Mbar} tests where the actual intent is to check
if the result set is empty.  While here, replaced non-bogus empty
string comparisons with equivalent empty() checks.

20 years agoCorrect the descriptions of the net.inet.{udp,raw}.recvspace sysctls.
Ruslan Ermilov [Tue, 27 Jan 2004 22:17:39 +0000 (22:17 +0000)]
Correct the descriptions of the net.inet.{udp,raw}.recvspace sysctls.

20 years agoSync with Oxford Dictionary. Style (add missing full stops) while I'm here.
Jens Schweikhardt [Tue, 27 Jan 2004 22:15:03 +0000 (22:15 +0000)]
Sync with Oxford Dictionary. Style (add missing full stops) while I'm here.

20 years agoCorrect the description of the net.graph.recvspace sysctl.
Ruslan Ermilov [Tue, 27 Jan 2004 22:02:01 +0000 (22:02 +0000)]
Correct the description of the net.graph.recvspace sysctl.

20 years agoGet rid of all (but one in write.c) static size buffers.
Ruslan Ermilov [Tue, 27 Jan 2004 21:52:52 +0000 (21:52 +0000)]
Get rid of all (but one in write.c) static size buffers.

20 years ago- Added three new interfaces, NgAllocRecvMsg(), NgAllocRecvAsciiMsg(),
Ruslan Ermilov [Tue, 27 Jan 2004 20:25:14 +0000 (20:25 +0000)]
- Added three new interfaces, NgAllocRecvMsg(), NgAllocRecvAsciiMsg(),
  and NgAllocRecvData(), that dynamically allocate buffer for a binary
  message, an ascii message, and a data packet, respectively.  The size
  of the allocated buffer is equal to the socket's receive buffer size
  to guarantee that a message or a data packet is not truncated.

- Get rid of the static size buffer in NgSendAsciiMsg().

OK'ed by: archie, julian

20 years agoSort PFIL_HOOKS.
Marcel Moolenaar [Tue, 27 Jan 2004 20:22:53 +0000 (20:22 +0000)]
Sort PFIL_HOOKS.

20 years agoAllow the use of a stale p_stops value in STOPEVENT(), grabbing
Robert Watson [Tue, 27 Jan 2004 20:21:07 +0000 (20:21 +0000)]
Allow the use of a stale p_stops value in STOPEVENT(), grabbing
the proc lock only if we actually need to perform a stop.  This
avoids two locks and unlocks of the process lock each system call,
and wins me about 20% on a simply system call test (getuid(),
which would otherwise require no locking).  This also has a net
improvement of about 10MB/s on some of the SMP bandwidth tests
I'm running.

Reviewed by: jhb

20 years agoforced commit; the issue that was fixed in the previous commit was
Dag-Erling Smørgrav [Tue, 27 Jan 2004 19:49:19 +0000 (19:49 +0000)]
forced commit; the issue that was fixed in the previous commit was

Pointed out by: Logan Gabriel <gersh@tabby.sonn.com>

20 years agoCleanup malloc() use in if_attach():
Brooks Davis [Tue, 27 Jan 2004 19:35:05 +0000 (19:35 +0000)]
Cleanup malloc() use in if_attach():
 - malloc() returns a void* and does not need a cast
 - when called with M_WAITOK, malloc() can not return NULL so don't
   check for that case.  The result of the check was bogus anyway since
   it would leave the interface broken.

20 years agoStyle nit in previous commit.
Dag-Erling Smørgrav [Tue, 27 Jan 2004 19:28:13 +0000 (19:28 +0000)]
Style nit in previous commit.

20 years agomdoc(7) cleanup.
Ruslan Ermilov [Tue, 27 Jan 2004 19:24:53 +0000 (19:24 +0000)]
mdoc(7) cleanup.

20 years agoFix a reentrancy issue in md5_calc().
Dag-Erling Smørgrav [Tue, 27 Jan 2004 18:57:21 +0000 (18:57 +0000)]
Fix a reentrancy issue in md5_calc().

20 years agoFixed memory leak in NgSendAsciiMsg().
Ruslan Ermilov [Tue, 27 Jan 2004 18:38:22 +0000 (18:38 +0000)]
Fixed memory leak in NgSendAsciiMsg().

20 years agoPreserve acls option on mounts when taking a snapshot.
Kirk McKusick [Tue, 27 Jan 2004 18:28:11 +0000 (18:28 +0000)]
Preserve acls option on mounts when taking a snapshot.

Submitted by: Wiktor Niesiobedzki <freebsd-lists@w.evip.pl>

20 years agoRemove only X[0-9]-lock.
Nate Lawson [Tue, 27 Jan 2004 18:19:32 +0000 (18:19 +0000)]
Remove only X[0-9]-lock.

20 years agoBack out part of 1.21, since it breaks `script interactive-program`. This
Colin Percival [Tue, 27 Jan 2004 17:50:47 +0000 (17:50 +0000)]
Back out part of 1.21, since it breaks `script interactive-program`.  This
re-breaks non-interactive portupgrade (or at least old versions of
portupgrade); I'll see if I can put together a solution which avoids
breaking anything later.

Approved by: rwatson (mentor)
Noticed by: Stefan Farfeleder, Joshua Goodall

20 years agoo add missing break
Sam Leffler [Tue, 27 Jan 2004 17:45:28 +0000 (17:45 +0000)]
o add missing break
o remove extraneous bzero
o add SYSINIT to properly initialize ip4_def_policy

Submitted by: "Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net>
Submitted by: gnn@neville-neil.com

20 years agochange SYSINIT starting point to be consistent with other modules
Sam Leffler [Tue, 27 Jan 2004 17:43:49 +0000 (17:43 +0000)]
change SYSINIT starting point to be consistent with other modules

20 years agoadd spdcachelookup and spdcachemiss to our version of struct ipsecstat so
Sam Leffler [Tue, 27 Jan 2004 17:42:57 +0000 (17:42 +0000)]
add spdcachelookup and spdcachemiss to our version of struct ipsecstat so
netstat works properly

Submitted by: "Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net>

20 years agoFix the example back the way it was. Fix the commentary to say it
Warner Losh [Tue, 27 Jan 2004 16:16:31 +0000 (16:16 +0000)]
Fix the example back the way it was.  Fix the commentary to say it
allocates a 32 byte range of ioports.

20 years agoRename the kern.vm.kmem.size tunable to the more logical vm.kmem_size. To
Dag-Erling Smørgrav [Tue, 27 Jan 2004 15:59:38 +0000 (15:59 +0000)]
Rename the kern.vm.kmem.size tunable to the more logical vm.kmem_size.  To
assure backward compatibility (conditional on !BURN_BRIDGES), look it up
by its old name first, and log a warning (but accept the setting) if it
was found.  If both the old and new name are defined, the new name takes
precedence.

Also export vm.kmem_size as a read-only sysctl variable; I find it hard to
tune a parameter when I don't know its default value, especially when that
default value is computed at boot time.

20 years agoWhile USB keyboards attach as ukbd[0-9]+, the device node created by
Dag-Erling Smørgrav [Tue, 27 Jan 2004 15:40:30 +0000 (15:40 +0000)]
While USB keyboards attach as ukbd[0-9]+, the device node created by
kbd_attach() is called kbd[0-9]+, with a different unit number.  This
makes it impossible to write a devd rule which will automatically
switch to a USB keyboard when one is attached, because there is no way
to guess the correct device node to pass to kbdcontrol.

Therefore, change kbd_attach() to create a device node using the
keyboard device's real name (atkbd0, ukbd0...), and create the
kbd[0-9]+ node as an alias for backward compatibility.

20 years agoThe ataraid device is not needed for pc98.
Yoshihiro Takahashi [Tue, 27 Jan 2004 15:39:32 +0000 (15:39 +0000)]
The ataraid device is not needed for pc98.

20 years agoFixed pc98 partition type.
Yoshihiro Takahashi [Tue, 27 Jan 2004 15:25:33 +0000 (15:25 +0000)]
Fixed pc98 partition type.

20 years ago - Fix for sparc64 to use new __panic() function
Ken Smith [Tue, 27 Jan 2004 15:02:18 +0000 (15:02 +0000)]
- Fix for sparc64 to use new __panic() function

Adapted from patch by: David Cornejo <dcornejo@firetide.com>
Reviewed by: freebsd-sparc64 (harti)
Approved by: rwatson (mentor)

20 years agoAdd an entry for RELENG_5_* to match the RELENG_4_* entry.
Colin Percival [Tue, 27 Jan 2004 14:33:33 +0000 (14:33 +0000)]
Add an entry for RELENG_5_* to match the RELENG_4_* entry.

Reviewed by: nectar
Approved by: rwatson (mentor)
Bikesheds to: nectar

20 years agoTurn uio_resid/uio_offset comments into KASSERTs
Andrey A. Chernov [Tue, 27 Jan 2004 11:28:38 +0000 (11:28 +0000)]
Turn uio_resid/uio_offset comments into KASSERTs

Reviewed by:    bde

20 years agoDon't confuse NULL and 0, use 0 where an integer is expected.
Hartmut Brandt [Tue, 27 Jan 2004 10:46:33 +0000 (10:46 +0000)]
Don't confuse NULL and 0, use 0 where an integer is expected.

20 years agoStyle: add __FBSDID, relocate some { that were on the wrong line,
Hartmut Brandt [Tue, 27 Jan 2004 10:45:37 +0000 (10:45 +0000)]
Style: add __FBSDID, relocate some { that were on the wrong line,
correct some indendation, change __FUNCTION__ to __func__ and remove
a local KASSERT definition.

20 years agoThis should have been checked in as part of the last update to if_ndis.c:
Bill Paul [Tue, 27 Jan 2004 09:08:12 +0000 (09:08 +0000)]
This should have been checked in as part of the last update to if_ndis.c:
add yet another member to the ndis_softc as part of the workaround for
the net80211 dain bramage.

20 years agoSome Windows .INF files are deliberately sabotaged to prevent them from
Bill Paul [Tue, 27 Jan 2004 09:05:52 +0000 (09:05 +0000)]
Some Windows .INF files are deliberately sabotaged to prevent them from
loading on a particular version of Windows. For example, a .INF file
for a Windows 2000 driver may have an empty [foo.NT.5.1] section which
will be ingored on Win2K (whose .INF parser won't look for sections
decorated with .NT.5.1) in favor of a [foo] section. Likewise, a
WinXP file will have an empty [foo] section which will be ignored in
favor of [foo.NT.5.1].

The problem is, we can handle both Win2K and WinXP drivers, and we
don't want to exclude either one.

As a workaround, we try to pretend we are WinXP by default and search
for sections decorated with .NT.5.1, but if we don't turn up any records,
we assume that maybe we're being fooled by a sabotaged .INF file and
make one more pass looking for undecorated sections instead.

This allows us to parse the .INF files for both the Win2K and the WinXP
Centrino wireless drivers.

I'd give anything for 5 minutes alone in a room with whoever wrote
Microsoft's .INF file parser. Just 5 minutes. That's all.

20 years agoImplement NdisVirtualBufferAddress() and NdisVirtualBufferAddressSafe().
Bill Paul [Tue, 27 Jan 2004 08:10:34 +0000 (08:10 +0000)]
Implement NdisVirtualBufferAddress() and NdisVirtualBufferAddressSafe().

The RealTek 8180 driver seems to need this.

20 years agoAdd a kludge to avoid having ndis_init() called needlessly by dhclient
Bill Paul [Tue, 27 Jan 2004 07:57:42 +0000 (07:57 +0000)]
Add a kludge to avoid having ndis_init() called needlessly by dhclient
on an SIOCSIFADDR (by way of brain damage in net80211).

Also, avoid trying to set NDIS_80211_AUTHMODE_AUTO since the Microsoft
documentation I have recommends not using it, and the Centrino driver
seems to dislike being told to use it.

20 years agoAdd TUNABLE_STR to make "hw.acpi.os_name" more correct. However, the call
Nate Lawson [Tue, 27 Jan 2004 06:07:09 +0000 (06:07 +0000)]
Add TUNABLE_STR to make "hw.acpi.os_name" more correct.  However, the call
to getenv_string() still doesn't work.

20 years agoDocument my adventures in newbus land. Clarify some examples, especially
Nate Lawson [Tue, 27 Jan 2004 06:04:15 +0000 (06:04 +0000)]
Document my adventures in newbus land.  Clarify some examples, especially
that count is in bytes, not bits.  There are some drivers that I think make
this mistake.  (I've seen counts of 16 in the tree).

20 years agoDiscontinuation of an action that now fits on one.
David E. O'Brien [Tue, 27 Jan 2004 05:01:08 +0000 (05:01 +0000)]
Discontinuation of an action that now fits on one.

20 years agoStick two XXX's in the syscall() code: we call STOPEVENT() twice for
Robert Watson [Tue, 27 Jan 2004 04:40:19 +0000 (04:40 +0000)]
Stick two XXX's in the syscall() code: we call STOPEVENT() twice for
every system call, and that grabs and release the process lock each
time.  Don't fix it (yet), but document it so we know to fix it.
Also should be a 5.3-RELEASE todo item.

20 years agoClean up macro usage in if_attach():
Brooks Davis [Tue, 27 Jan 2004 03:15:09 +0000 (03:15 +0000)]
Clean up macro usage in if_attach():
 - Use the system offsetof macro rather then making out own.
 - undef ROUND after we use it rather then polluting the whole file.

20 years agoUse the M_BZERO flag with malloc() in a couple of places.
Bill Paul [Tue, 27 Jan 2004 03:14:59 +0000 (03:14 +0000)]
Use the M_BZERO flag with malloc() in a couple of places.

20 years agoUse IFNAMSIZ instead of a magic value for the length of an interface
Brooks Davis [Tue, 27 Jan 2004 01:43:14 +0000 (01:43 +0000)]
Use IFNAMSIZ instead of a magic value for the length of an interface
name.

Prevent the kernel from potentially overflowing the interface name
variable.  The size argument of strlcpy is complex because the name is
not null-terminated in sdl_data.

20 years agoModified release note: Rewrite CVS update note to reflect reality
Bruce A. Mah [Tue, 27 Jan 2004 00:50:21 +0000 (00:50 +0000)]
Modified release note:  Rewrite CVS update note to reflect reality

Submitted by: nectar

20 years agoReorganize the timer code a little and implement NdisInitializeTimer()
Bill Paul [Mon, 26 Jan 2004 21:21:53 +0000 (21:21 +0000)]
Reorganize the timer code a little and implement NdisInitializeTimer()
and NdisCancelTimer(). NdisInitializeTimer() doesn't accept an NDIS
miniport context argument, so we have to derive it from the timer
function context (which is supposed to be the adapter private context).
NdisCancelTimer is now an alias for NdisMCancelTimer().

Also add stubs for NdisMRegisterDevice() and NdisMDeregisterDevice().
These are no-ops for now, but will likely get fleshed in once I start
working on the Am1771/Am1772 wireless driver.

20 years agoFix ~/.hushlogin handling.
Max Khon [Mon, 26 Jan 2004 20:04:47 +0000 (20:04 +0000)]
Fix ~/.hushlogin handling.

PR: 61354
Submitted by: Eugeny Grosbein <eugen (at) kuzbass.ru>

20 years ago*BANG* *BANG* *BANG* *BANG* *BANG* *BANG* *CLICK* *CLICK* *CLICK*
John Baldwin [Mon, 26 Jan 2004 20:02:01 +0000 (20:02 +0000)]
*BANG* *BANG* *BANG* *BANG* *BANG* *BANG* *CLICK* *CLICK* *CLICK*
*BANG* *BANG* *BANG* *BANG* *BANG* *BANG* *CLICK* *CLICK* *CLICK*

Death to the stripped down BOOTMFS kernel for boot floppies and all the
cruft that goes along with it.

20 years agoOverhaul our boot floppy generation system so that it scales better and
John Baldwin [Mon, 26 Jan 2004 19:58:38 +0000 (19:58 +0000)]
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
  FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
  floppies.  Also, cleanup the i386 arch section by not duplicating
  constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
  fit onto 1.44 floppies formatted with UFS1.  Unfortunately, split(1)
  seems to be somewhat buggy, so the files generated are slightly larger
  than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
  floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
  floppies.1 builds the install floppies, floppies.2 builds the fixit
  floppy, and floppies.3 generates the md5 sums and READMEs for the
  floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture.  This
  was more useful when the mfsroot lived inside the kernel rather than
  being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
  installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
  floppies it takes for the boot kernel.  Currently, a stock 5.2 GENERIC
  kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
  onto 2 additional floppies besides the boot floppy with some room to
  spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
  however many floppies are needed.  Currently it is not defined as the
  mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
  was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
  matches what it does now.  We no longer build a custom BOOTMFS kernel for
  each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
  The non-emulated cdboot works for almost everyone who boots off of CD and
  if it doesn't work on a particular machine, the user can always boot from
  the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
  since we now use a stock kernel when booting from floppy.

20 years agoAdd a script to split a single file up into chunks using split along with
John Baldwin [Mon, 26 Jan 2004 19:45:09 +0000 (19:45 +0000)]
Add a script to split a single file up into chunks using split along with
a list file suitable for use with libstand's splitfs filesystem.  The first
chunk of the file is 16k and has an extension of '.boot' and is meant to be
placed on the boot floppy.  This is required because the current
implementations of gzipfs and bzipfs in libstand want to read in the header
of the file each time it is opened.

20 years agoThe problem Makefile rev 1.70 and fbsd-kgdb-i386.h rev 1.4 fixed is that
David E. O'Brien [Mon, 26 Jan 2004 19:40:47 +0000 (19:40 +0000)]
The problem Makefile rev 1.70 and fbsd-kgdb-i386.h rev 1.4 fixed is that
GDB was using the instruction pointer for 'calltrap', rather than the
infinitely more useful instruction pointer where the trap occurred.

Submitted by: Peter Edwards <pmedwards@eircom.net>

20 years ago- Call acpi_Startup() before parsing interrupt-related APIC resources so we
John Baldwin [Mon, 26 Jan 2004 19:34:24 +0000 (19:34 +0000)]
- Call acpi_Startup() before parsing interrupt-related APIC resources so we
  can look at the ACPI tables.  If the startup fails, we panic and tell the
  user to try rebooting with ACPI disabled.  Previously in this case we
  would try to use $PIR interrupt routing which only works for the atpic
  while using the apic to handle interrupts which would result in misrouted
  interrupts and a hang at boot time with no error message.
- Read the SCI out of the FADT instead of hardcoding 9 when checking to see
  if an interrupt override entry is for the SCI.
- Try to work around some BIOS brain damage for the SCI's programming by
  forcing the SCI to be level triggered and active low if it is routed
  to a non-ISA interrupt (greater than 15) or if it is identity mapped with
  edge trigger and active high polarity.  This should fix some of the hangs
  with device apic and ACPI that some people see.

Reviewed by: njl

20 years agoMove the code to initialize ACPI-CA into a separate acpi_Startup() function
John Baldwin [Mon, 26 Jan 2004 19:29:04 +0000 (19:29 +0000)]
Move the code to initialize ACPI-CA into a separate acpi_Startup() function
that other modules can call to initialize ACPI-CA before the new-bus probe
and change acpi_identify() to call it.

Reviewed by: njl

20 years agoImplement pam_sm_close_session().
Dag-Erling Smørgrav [Mon, 26 Jan 2004 19:28:37 +0000 (19:28 +0000)]
Implement pam_sm_close_session().

PR: bin/61657
Submitted by: Joe R. Doupnik <jrd@cc.usu.edu>