Bruce Evans [Tue, 1 Jul 1997 00:14:39 +0000 (00:14 +0000)]
Enabled some SMP options. LINT is for testing that all code compiles
cleanly, so only negative options should be commented out. Options
should have non-default values.
Bruce Evans [Mon, 30 Jun 1997 23:49:17 +0000 (23:49 +0000)]
Don't depend on gcc's feature of interpreting `int foo(c) char c; ...'
as `int foo(char c) ...' if there is a bogus prototype `int foo(char c);'
in scope.
Bruce Evans [Mon, 30 Jun 1997 23:10:54 +0000 (23:10 +0000)]
Removed -I path to gdb's readline. This didn't do much in -current
because the -I path to config/libreadline had precedence, but in
2.2 it help hide the bug that the -I path to the non-contrib
libreadline was garbage.
Kazutaka YOKOTA [Mon, 30 Jun 1997 14:37:43 +0000 (14:37 +0000)]
options.i386:
- Added the psm options PSM_HOOKAPM and PSM_RESETAFTERSUSPEND.
LINT:
- Added the psm options PSM_HOOKAPM and PSM_RESETAFTERSUSPEND.
- Added comments on the flag 0x20 for syscons.
- Clarified descriptions on the flags (0x02, 0x04) regarding the cursor
shape in syscons.
Kazutaka YOKOTA [Mon, 30 Jun 1997 13:31:49 +0000 (13:31 +0000)]
Fixes annoying behavior and a bug regarding the destructive
cursor (CHAR_CURSOR)
1. Reduced the number of calls to set_destructive_cursor(). The
destructive cursor produced noticeable overhead on the system. It was
caused by draw_cursor_image() calling set_destructive_cursor() every
so often.
set_destructive_cursor() absolutely needs to be called when
a) the character code under the cursor has changed either because
the cursor moved or because the screen was updated or the mouse
pointer overlapped the cursor.
b) Or a new font has been loaded,
c) or the video mode has been changed,
d) or the cursor shape has been changed,
e) or the user switched virtual consoles.
2. Turn off the configuration flag CHAR_CURSOR (destructive cursor) in
scattach() if we have a non-VGA card. The destructive cursor works
only for VGA.
3. Removed redundant calls to set_destructive_cursor() in some places.
4. Fixed the "disappearing mouse pointer" problem. The mouse pointer
looked hidden under the destructive cursor when it overlaped the cursor.
A slightly different version of the patch was reviewd and OKed by
sos and ache.
Bruce Evans [Mon, 30 Jun 1997 12:57:58 +0000 (12:57 +0000)]
gdb.info still needs a near-copy of hsuser.texinfo to avoid the
reference to the programming manual. Use this near-copy of the version
of hsuser.texinfo in contrib/libreadline instead of the stale near-copy
in contrib/gdb.
Kazutaka YOKOTA [Mon, 30 Jun 1997 12:52:57 +0000 (12:52 +0000)]
Add experimental APM support for some laptops.
If the configuration option PSM_HOOKAPM is defined and the APM device
is available, the psm driver will issue the ENABLE command to the
pointing device at the resume APM event if the device was open when
the system went into suspended mode. If the option
PSM_RESETAFTERSUSPEND is specified in addition to PSM_HOOKAPM, the
driver will try to reset the pointing device before sending the
ENABLE command.
Built-in PS/2-type pointing devices in some laptops (all the reports I
heard were about Toshiba models) sometimes don't work immediately
after the system is resumed. The device MAY become available after a
while. The system may exhibit the same symptom in other OS's too
(no, FreeBSD is not the only OS that is suffering :-).
I don't know the correct way of solving this yet, but it's been
reported that issuing the ENABLE command after resumption wakes up the
pointing device.
Without PSM_HOOKAPM, the psm driver behaves in the same way as before.
Problem reported in the bsd-nomads mailing list in Japan.
Bruce Evans [Sun, 29 Jun 1997 22:43:01 +0000 (22:43 +0000)]
Implemented `-c command'.
Fixed bitrot (__dead went away; EOF is now wrong for the getopt failure
value).
Moved sleep command to the end of the main loop to avoid mismatch between
main loop and the report loop. There is an extra iteration that could be
used to calibrate the loop overhead, but was used to report wrong results.
Bruce Evans [Sun, 29 Jun 1997 20:38:38 +0000 (20:38 +0000)]
Prepare to remove the declaration of sys_siglist from <unistd.h>.
It should only be declared in <signal.h> if at all. Modload used
to depend on getting it from <unistd.h> because it only included
<sys/signal.h>.
Bruce Evans [Sun, 29 Jun 1997 16:39:11 +0000 (16:39 +0000)]
Fixed the fix for not using -fomit-frame-pointer with -pg. The previous
fix stopped it being used in all cases, because substitution on unset
variables does not work.
When profiling, put -malign-functions=4 in CFLAGS instead of in PROF.
This fixes the histogram counts for profiling support functions. It
gives bogus but harmless extra alignment for genassym etc.
Kazutaka YOKOTA [Sun, 29 Jun 1997 15:11:40 +0000 (15:11 +0000)]
A fix/work-around for ThinkPad 535.
Add a new configuration flag, KBD_NORESET (0x20) to tell scprobe() not
to reset the keyboard.
IBM ThinkPad 535 has the `Fn' key with which the user can perform
certain functions in conjunction with other keys. For example, `Fn' +
PageUP/PageDOWN adjust speaker volume, `Fn' + Home/End change
brightness of LCD screen. It can also be used to suspend the system.
It appears that these functions are implemented at the keyboard level
or the keyboard controller level and totally independent from BIOS or
OS. But, if the keyboard is reset (as is done in scprobe()), they
become unavailable. (There are other laptops which have similar
functions associated with the `Fn' key. But, they aren't affected by
keyboard reset.)
ThinkPad 535 doesn't have switches or buttons to adjust brightness and
volume, or to put the system into the suspend mode. Therefore, it is
essential to preserve these `Fn' key functions in FreeBSD. The new
flag make scprobe() skip keyboard reset.
If this flag is not set, scprobe() behaves in the same say as before.
(If we only knew a way to detect ThinkPad 535, we could skip keyboard
reset automatically, but...)
Add support for @option preserve - moves existing files out of the way
before replacing them (using pkgname to make this hopefully unique).
Delete also moves them back, if they exist, resulting in a package
which can be "backed out" with reasonable safety.
Paul Traina [Sun, 29 Jun 1997 06:03:42 +0000 (06:03 +0000)]
NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".
NOPIC is used to not generate a shared library, not NOSHARED.
Make NOSHARED advisory where appropriate.
Remove bogus NOSHARED (kbdio).
Paul Traina [Sat, 28 Jun 1997 08:18:29 +0000 (08:18 +0000)]
Attempt to open the device for reading before actually adding the device
to the session list. If the device comes back as unconfigured, just
ignore that line in /etc/ttys. If someone HUP's init, we'll try again.
This change stops getty's from hanging on vty and sio ports that don't
exist, either due to LKM drivers not being loaded, or probes failing.
Reviewed by: bde
Peter Wemm [Sat, 28 Jun 1997 04:19:52 +0000 (04:19 +0000)]
replace the OpenBSD fd_set sizing code with something more efficient.
Only call malloc() if the fd is too big for the compiled in fd_set size,
and don't use calloc either. This should reduce the impact of conflicts
with private malloc implementations etc. When using the fd_set on the
stack, only zero what is needed rather than all 1024 bits like FD_ZERO did.
Steve Passe [Fri, 27 Jun 1997 23:19:43 +0000 (23:19 +0000)]
Added other_cpus to CPU private page.
This variable is a bitmap showing all CPUs present EXCEPT the CPU
owning the variable. In other words, it is equal to the global bitmap
'all_cpus' minus its own bit.
Steve Passe [Fri, 27 Jun 1997 22:27:18 +0000 (22:27 +0000)]
Program lint1 to handle NMIs.
Till now NMIs would be ignored. Now an NMI is caught by the BSP.
APs still ignore NMI, am working on code to allow a CPU to stop other CPUs
via an IPI.
Bill Paul [Fri, 27 Jun 1997 19:10:46 +0000 (19:10 +0000)]
Fix a condition where nfs_statfs() can precipitate a panic. There is
code that says this:
nfsm_request(vp, NFSPROC_FSSTAT, p, cred);
if (v3)
nfsm_postop_attr(vp, retattr);
if (!error)
nfsm_dissect(sfp, struct nfs_statfs *, NFSX_STATFS(v3));
The problem here is that if error != 0, nfsm_dissect() will not be
called, which leaves sfp == NULL. But nfs_statfs() does not bail out
at this point: it continues processing until it tries to dereference
sfp, which causes a panic. I was able to generate this crash under
the following conditions:
1) Set up a machine as an NFS server and NFS client, with amd running
(using NIS maps). /usr/local is exported, though any exported fs
can can be used to trigger the bug.
2) Log in as normal user, with home directory mounted from a SunOS 4.1.3
NFS server via amd (along with a few other NFS filesystems from same
machine).
3) Su to root and type the following:
# mount localhost:/usr/local /mnt
# df
This is a bit kludgy in that nfsmout is a label defined by the nfsm_subs.h
macros, but these macros are themselves more than a little kludgy. This
stops the machine from crashing, but does not fix the overall bug: 'error'
somehow becomes 5 (EIO) when a statfs() is performed on the locally mounted
NFS filesystem. This seems to only happen the first time the filesystem
is accesed: on subsequent accesses, it seems to work fine again.
Now, I know there's no practical use in mounting a local filesystem
via NFS, but doing it shouldn't cause the system to melt down.
Tor Egge [Fri, 27 Jun 1997 15:42:05 +0000 (15:42 +0000)]
Fill in some extra fields in the eproc structure. gdb uses this information
to determine where the data segment in core dumps should be mapped.
Reviewed by: Peter Wemm <peter@spinner.dialix.com.au>
Peter Wemm [Fri, 27 Jun 1997 15:28:54 +0000 (15:28 +0000)]
Don't accept insane values for SO_(SND|RCV)BUF, and the low water marks.
Specifically, don't allow a value < 1 for any of them (it doesn't make
sense), and don't let the low water mark be greater than the corresponding
high water mark.