Commit Graph

9334 Commits

Author SHA1 Message Date
bde
67ac522ce5 Fixed multiple definitions of boothowto.
Fixed bitrot in the read-only access to kern.boottime.
1997-11-24 18:35:04 +00:00
bde
c447676070 Added a sysctl (machdep.cputime_clock) to select the clock used by
"high resolution" profiling.  The available clocks are:
- the i8254 clock
- on non-SMP i586's and i686's: the TSC
- on systems with I586_PMC_GUPROF configured, and PERFMON configured
  and available: all the performance counters.
This is unfinshed (there are problems with locking out the PERFMON
device driver, and with losing calibration after switching the clock),
but better than static configuration or writing to kmem.

Changed ifdefs to avoid generating code for non-working option
combinations.
1997-11-24 18:16:23 +00:00
bde
f48794b9f5 Fixed overflow in ufs_getblns(). For ufs on systems with 32-bit ints,
triple indirect blocks only worked for block sizes of 4K, since
MNINDIR(ump)**3 overflows for larger block sizes (e.g.,
(8192/4)**3 = 2**33 > INT_MAX).  This fix is not the obvious one of
changing some types to 64 bits.  It rearranges the code to avoid some
unnecessary 64-bit calculations.

Reviewed by:	Kirk McKusick <mckusick@McKusick.COM>
1997-11-24 16:33:03 +00:00
bde
17589a0467 Removed all traces of P_IDLEPROC. It was tested but never set. 1997-11-24 15:15:33 +00:00
bde
c729ff1df2 Don't #define max() to get a version that works with vm_ooffset's.
Just use qmax().

This should be fixed more generally using overloaded functions.
1997-11-24 15:03:13 +00:00
bde
a323d6696a Don't call malloc(..., M_WAITOK) at splnet(). Doing so is often
a mistake (since softnet interrupts may occur if malloc() waits),
and doing it harmlessly but unnecessarily here interfered with
detection of the mistaken cases.
1997-11-24 14:18:00 +00:00
bde
62082c7f65 Unstaticized rn_delete() and rn_lookup(). They are used in dark corners
of netatalk (if NETATALKDEBUG is configured).

Removed stray semicolons.
1997-11-24 13:50:24 +00:00
bde
48ccf62b8e Fixed some #include messes.
Hid the check of the user %cs in syscall() under `#ifdef DIAGNOSTIC'.
1997-11-24 13:25:37 +00:00
ahasty
f43c396ac1 Fixed poll related problem which was exhibited by running
amp (audio mpeg player) and with cards such as SB.
1997-11-24 07:31:20 +00:00
dyson
0c60b939c7 Avoid manipulating the buffer map at interrupt time by deferring bfreekva
to getnewbuf, and remove from brelse.
Reviewed by:	dg@root.com
1997-11-24 06:18:27 +00:00
dyson
99ebdb0835 Fix the buffer flag frobbing. Note: It is invalid to gratuitiously modify
b_flags, and this patch removes unneeded modifications.  Only the needed b_flags
bits are modified now.  (Specifically, it is usually wrong to zero b_flags.)
Submitted by:	bde@freebsd.org
1997-11-24 04:14:21 +00:00
ahasty
e67a68e115 Fixed an acquired dma problem with respect to sb cards only. 1997-11-23 22:49:50 +00:00
ahasty
07652281b5 minor code clean up to sb_dsp.c and fix compile error with uart6850.c 1997-11-23 20:31:20 +00:00
ahasty
122f3728bc Missing part of my last sb_dsp.c sb16_dsp.c commit. 1997-11-23 19:05:01 +00:00
bde
608663aedf Fixed a missing conversion of retval to p_retval in disabled code.
Fixed overflow of FFLAGS() in fcntl(F_SETFL, ...).  This was not
a security hole, but gave wrong results for silly flags values.
E.g., it make fcntl(F_SETFL, -1) equivalent to fcntl(F_SETFL, 0).
POSIX requires ignoring the open mode bits in fcntl() (even if
they would be invalid for open()).
1997-11-23 12:24:59 +00:00
bde
f885907fbd Fixed misuse of O_ACCMODE. Cosmetic.
Not fixed in:	sound driver
1997-11-23 11:56:18 +00:00
bde
97507ffc6d Fixed the sector size frobbing in sd_strategy() at least not to
break for the usual sector size.  dscheck() adjusts b_bcount to
handle EOF, so we must scale it and not preserve it.  i/o beyond
the end of partitions has been broken since rev.1.96.

Not fixed in:	od driver
1997-11-23 11:30:42 +00:00
bde
6c224bdd6e Fixed duplicate definitions of M_FILE (one static). 1997-11-23 10:43:49 +00:00
bde
4f5d10af43 Fixed some style bugs in the poll() code.
Removed dead code to "Avoid inadvertently sleeping forever".  hzto()
never returns 0.
1997-11-23 10:30:50 +00:00
ahasty
eadfeb14ed Fixed acquired dma channel problem. 1997-11-23 07:35:06 +00:00
jmg
348887306a update of Luigi's sound drivers...
this updates to 971117 plus a small sb change that was after that release..
1997-11-23 07:03:21 +00:00
bde
975c3797b1 Staticized. 1997-11-22 08:35:46 +00:00
bde
3304eb82bb Unremoved prtrealloc and the declaration of ffs_clusteralloc(). These
are used in the `#ifdef notyet' case :-).  This case is used except in
the `#if !defined (not_yes)' case :-|.  This has something to do with
the `#ifdef notyet_block_reallocation_enabled' case in vfs_cluster.c :-(.
1997-11-22 07:00:40 +00:00
bde
7c364505b9 Ifdefed a conditionally used #include.
Staticized.
1997-11-22 06:45:57 +00:00
bde
241618cb5b Staticized.
Use OID_AUTO instead of a magic number for the debug.syncprt sysctl.
(This sysctl doesn't actually work.  FreeBSD nuked it, but parts
of it were mismerged from Lite2.  It is not very good, but better
than nothing.)
1997-11-22 06:41:21 +00:00
msmith
1b51cd0c3c Add Winbond W89C940 ID to the list.
Submitted by:	Micha Class <michael_class@hpbbse.bbn.hp.com>
1997-11-22 06:19:59 +00:00
bde
6f8218994c Fixed some style and contents bugs in comments. Copied comments are
usually wrong.
1997-11-22 06:18:54 +00:00
bde
7b2acd5a85 Fixed rev.1.81. mp->mnt_kern_flag was restored in the non-error case of
`mount -u'.  This only matters for `mount -u' competing with unmounts.
If I understand the locking correctly: if mount() blocks, then unmount()
may run and set mp->kern_flag for the same mp.  Then unmount() blocks
waiting for mount() to finish.  When unmount() continues, its MNTK flags
(MNTK_UNMOUNT and MNTK_MWAIT) may have been clobbered.

Didn't fix old bugs:
- restoring mp->mnt_kern_flag is wrong for the same reasons in the error
  case.
- the error case of unmount() seems to be broken too:
  (a) MNTK_UNMOUNT gets clobbered, although another unmount() may have
      set it.  Perhaps it shouldn't be set until after the full lock is
      aquired.
  (b) MNTK_MWAIT isn't honoured.

Fixed a nearby style bug.
1997-11-22 06:10:36 +00:00
brian
13d351d261 const correctness for dl*() 1997-11-22 03:34:46 +00:00
jlemon
1934934619 Correct CPU_CYRIX_NO_LOCK fix.
PR:		5121
Pointed out by:	Matthew Hunt
1997-11-21 22:33:52 +00:00
bde
a1c70f26ad Fixed setting of `safepri'. It should be SWI_AST_MASK most of the
time, but was left at 0.  This caused the "can't happen" case in
splz_swi to happen for panics when tsleep() calls splx(safepri)
and there is a SWI_AST pending.  This was harmless because the
the error handling happens to be right.  Debugging this was tricky
because debugger traps force SWI_AST_MASK on in `cpl'.
1997-11-21 18:27:15 +00:00
bde
63e63c0d00 Moved splhigh()/spl0() calls from isa_configure() to configure() so that
there is a natural place to initialize `safepri' in a future commit.
Spinoffs:
- spl0() gets called in the unlikely event that isa is not configured.
- configure() has better control over enabling interrupts.
- it is now less unclear that interrupts aren't actually enabled early.
  Rev.1.48 of autoconf.c seems to have done the opposite of what was
  intended - moving the isa_configure() call delayed the spl0() side
  effect.
Added some comments about the bogons.  Removed the splhigh() call since
it is a no-op.
1997-11-21 18:14:02 +00:00
yokota
60fadeeab4 Make comp_vgaregs() less strict about VGA register values when
checking the BIOS video mode paramter table.  Now syscons uses the
parameter table even if some bits in the table are different from the
current VGA register settings.

Even if comp_vgaregs() finds that the BIOS video parameter table looks
totally unfamiliar to it, syscons allows the user to change the
current video mode to some modes which are based on the VGA 80x25
mode. They are VGA 80x30, VGA 80x50, VGA 80x60. In this case the user
will be warned, during boot, that video mode switching is only
paritally supported on his machine.

PR: bin/4477
1997-11-21 11:37:07 +00:00
bde
c98d25ed0e Const poisoning from ks_shortdesc. 1997-11-21 11:37:03 +00:00
yokota
37c3c27aaa Fix for a PS/2 mouse model from MouseSystems. It now appears that
this mouse can correctly operate only in the high resolution mode.

If the mouse pointer jumps to the top or left edge or the top-left
corner of the screen, try defining PSM_MSCKLUDGE in the kernel
configuration file. This option will put the mouse in the high
resolution mode during device initialization.
1997-11-21 11:36:21 +00:00
peter
e74dd6943e Previous commit refers to SWAP_PART, which is only defined if the include
file that it's in is #included...
1997-11-21 05:44:07 +00:00
bde
8feb0ae525 Fixed a sloppy common-style definitions. 1997-11-20 20:07:59 +00:00
wollman
390341dca5 Add Matt Dillon's quick fix hack for the self-connect DoS.
PR:		5103
1997-11-20 20:04:49 +00:00
bde
2ba2c6e5da Removed a duplicate (sloppy common-style) definition.
Fixed some style bugs.
1997-11-20 19:41:20 +00:00
bde
d1b702788e Moved some extern declarations to header files (unused ones to /dev/null). 1997-11-20 19:30:35 +00:00
bde
56bbe83370 Avoid passing a `retval' to wait1()
Disallow wait options that are not a combination of the standard POSIX
options WUNTRACED and WNOHANG, as is required by POSIX.  BSD doesn't
have any extensions here, but the code was `#ifdef notyet' for some
reason.
1997-11-20 19:09:43 +00:00
bde
4d907b31d0 Avoid passing some more `retval's. 1997-11-20 18:43:55 +00:00
bde
40314588fd Fixed wrong limits for the kernel text in db_numargs(). The
interval [VM_MIN_KERNEL_ADDRESS, etext] was used instead of
[btext, etext).  Added a comment about this being completely
wrong for LKMs.  This only affects interpreting the instructions
after the return to attempt decide the number of args.  The
attempt usually fails anyway.
1997-11-20 18:24:52 +00:00
bde
dfbf1ec5a9 Fixed write enabling of the kernel text section. The overlap
checking was mostly wrong at the boundaries.  For the lower limit,
VM_MIN_KERNEL_ADDRESS was used instead of btext and there was an
off-by-(`size' - 1) error.  For the upper limit, &etext was used
instead of etext and there was an off-by-1 error.  The bugs were
harmless because `size' is not too large and some memory is mapped
just beyond the ends.  We still depend on the former to avoid
having to handle the case where the memory range covers the whole
text section, and on the latter to prevent problems when we map
just beyond an end to allow writing an address range that overlaps
the end.

Fixed placement of a nearby comment.
1997-11-20 18:09:36 +00:00
bde
dbdea37b84 Don't allow setting the dump device to any partition except the
one traditionally reserved for swap devices.  The restrictions
should now be the same as the ones for dumpsys().  The restriction
on the partition should be removed someday, and dumpsys() shouldn't
repeat all the checks.
1997-11-20 17:07:21 +00:00
bde
2001000d90 Use consistent description strings for M_EXT2NODE. This also fixes a
spelling error in the unused string.
1997-11-20 16:56:25 +00:00
bde
7cd32186da Cleaned up revs.1.19-1.21: 1997-11-20 16:53:23 +00:00
bde
f1a47dd32b Removed unused includes.
Staticized.

Avoid passing a `retval' to fork1().

Fixed some style bugs.
1997-11-20 16:36:17 +00:00
bde
04bace1624 Fixed marking of access time for special files and fifos (don't do
it if the file system is mounted noatime).  Not fixed: the access
time is marked at the start of a read() and not marked on successful
completion.  I think this should be handled at the vfs level.

Print a better panic message for missing vops.  Don't use printf()
before panic(), since the printf()ed part isn't shown by gdb.
This actually loses a little with the current gdb, since gdb just
prints the fmt arg to panic, so %'s aren't expanded.  gdb should
fetch the full message from the message buffer if possible.

Fixed default vop function for vop_getpages_desc.  It needs to
just return EOPNOTSUPP so that the vnode pager can get the pages
in using a general method.  Panicing broke exec'ing of files on
ext2fs file systems.  ffs works because it doesn't use the default.

Fixed nearby style bugs.
1997-11-20 16:08:56 +00:00
nate
35689e7efe - Renamed <pccard/card.h> -> <pccard/cardinfo.h>.
Forgotten by:		me
Reminded by:		Bruce
1997-11-20 15:48:41 +00:00