marcel [Sat, 10 Nov 2001 07:24:09 +0000 (07:24 +0000)]
Avoid using the .align directive to skip to the next vector offset.
It doesn't help us catch overflowing vector entries at compile time.
Instead use the .org directive. The last entry in the IVT doesn't
strictly need to be limited to 256 bytes, but doing so allows the
the VHPT to be placed immediately following the IVT without wasting
any space due to alignment.
iedowse [Fri, 9 Nov 2001 23:58:07 +0000 (23:58 +0000)]
Properly sanity-check the old msgbuf structure before we accept it
as being valid. Previously only the magic number and the virtual
address were checked, but it makes little sense to require that
the virtual address is the same (the message buffer is located at
the end of physical memory), and checks on the msg_bufx and msg_bufr
indices were missing.
Submitted by: Bodo Rueskamp <br@clabsms.de>
Tripped over during a kernel debugging tutorial given by: grog
Reviewed by: grog, dwmalone
MFC after: 1 week
dillon [Fri, 9 Nov 2001 21:34:45 +0000 (21:34 +0000)]
Fix deadlock introduced in 1.73 (Jan 1998). The paging-in-progress count
on a vnode-backed object must be incremented *after* obtaining the vnode
lock. If it is bumped before obtaining the vnode lock we can deadlock
against vtruncbuf().
tmm [Fri, 9 Nov 2001 20:19:58 +0000 (20:19 +0000)]
Add support for the Sun psycho/sabre UPA-PCI bridge, some OpenFirmware
PCI support code, and a driver for the Sun APB PCI-PCI bridge.
Partly ported from NetBSD.
ache [Fri, 9 Nov 2001 17:09:42 +0000 (17:09 +0000)]
Back out switching from libreadline to libedit:
1) It is capabilities degradation: f.e. libedit can't process ~/.inputrc files
2) It have no sense to try to un-GNU GNU program.
dfr [Fri, 9 Nov 2001 13:25:14 +0000 (13:25 +0000)]
* Make sure we increment pm_stats.resident_count in pmap_enter_quick
* Re-organise RID allocation so that we don't accidentally give a RID
to two different processes. Also randomise the order to try to reduce
collisions in VHPT and TLB. Don't allocate RIDs for regions which are
unused.
* Allocate space for VHPT based on the size of physical memory. More
tuning is needed here.
* Add sysctl instrumentation for VHPT - see sysctl vm.stats.vhpt
* Fix a bug in pmap_prefault() which prevented it from actually adding
pages to the pmap.
* Remove ancient dead debugging code.
* Add DDB commands for examining translation registers and region
registers.
The first change fixes the 'free/cache page %p was dirty' panic which I
have been seeing when the system is put under moderate load. It also
fixes the negative RSS values in ps which have been confusing me for a
while.
With this set of changes the ia64 port is reliable enough to build its
own kernels, even with a 20-way parallel build. Next stop buildworld.
dcs [Fri, 9 Nov 2001 10:17:44 +0000 (10:17 +0000)]
The algorithm that computes the tables used in the BM search algorithm sometimes
access an array beyond it's length. This only happens in the last iteration of
a loop, and the value fetched is not used then, so the bug is a relatively
innocent one. Fix this by not fetching any value on the last iteration of said
loop.
imp [Fri, 9 Nov 2001 07:33:54 +0000 (07:33 +0000)]
o Try to do 3.3V support better for the 6722 and 6729/30.
o Bite the bullet and create controller types for the 6729 and also for
the 673x. Rename the 672x to 6722.
o Define minimal extended register info (just register 0xa for reading VS[12]).
# I think the last version may have broken 673x controllers, but this should
# fix them.
Tested on the 6722, but not the 6729.
Ideas from: Chiharu Shibata-san's article in bsd-nomads:15866
imp [Fri, 9 Nov 2001 06:26:57 +0000 (06:26 +0000)]
Fix the 3.3V support for Cirrus Logic CL-PD6710. This appears to work
on my CL-PD6722, but won't work on the CL-PD6729. The latter two need
more sophisticated detection of 3.3V cards than I'm up to at the
moment. Also, only a few of the ISA chipsets that support 3.3V will
likely work at the moment.
It appears that for 3.3V cards we must detect them and adjust the
pwr.vcc value from 50 to 33. Give a strong hint to automatically
power up the card for PD_POWER cards.
This makes my SMC 2602W (the 3.3V version of the 2632W) work on my
Fujitsu Stylistic 500.
SMC 3.3V card donated by: Ryan Losh
Thanks to: bsd-nomads for reviews of past 3.3V code
marcel [Fri, 9 Nov 2001 05:18:45 +0000 (05:18 +0000)]
Implement os_boot_rendez. Application processors are initialized
and brought to a point where kernel specific initializations can
be done. That will be the next step...
rwatson [Fri, 9 Nov 2001 02:23:05 +0000 (02:23 +0000)]
o nvi failed to correctly handle EINTR returned from tcsetattr(), exiting
instead of recovering, which happens in particular during a rapid series
of SIGWINCH's. This change forces nvi to loop on the call in the event
that the call is interrupted.
Interestingly, I submitted this bug report in 1998, and a solution was
posted shortly thereafter by Matthias Buelow; it's been sitting in the
PR database ever since.
Note: this takes this file off the vendor branch. If and when we find
a vendor for this code, the fix should be given back to them.
wollman [Thu, 8 Nov 2001 22:01:35 +0000 (22:01 +0000)]
Actually, arc4random() returns a uint32_t, not an int. Use the correct
constant, just in case uint32_t turns into a `short' ten years from now.
If this is MFC'd it will be necessary to hard-code the constant since
-stable doesn't have UINT32_MAX.
alfred [Thu, 8 Nov 2001 10:37:32 +0000 (10:37 +0000)]
leverage fixed fifo implementation (rev 1.56 of
src/sys/fs/fifofs/fifo_vnops.c) to serve locks better, my previous
workaround for lack of decent fifo system wasn't cutting it,
particularly the kernel would send a message down the fifo and
immediately close it, this would lead to delayed unlock requests
being seen by the lockd causing all sorts of badness.
Basically, don't reopen the fifo, just select(2) on it.
alfred [Thu, 8 Nov 2001 10:28:32 +0000 (10:28 +0000)]
Switch behavior of fifos to more closely match what goes on in other OSes.
Basically FIFOs become a real pain to abuse as a rendevous point without
this change because you can't really select(2) on them because they always
return ready even though there is no writer (to signal EOF).
rwatson [Thu, 8 Nov 2001 02:13:18 +0000 (02:13 +0000)]
o Replace reference to 'struct proc' with 'struct thread' in 'struct
sysctl_req', which describes in-progress sysctl requests. This permits
sysctl handlers to have access to the current thread, permitting work
on implementing td->td_ucred, migration of suser() to using struct
thread to derive the appropriate ucred, and allowing struct thread to be
passed down to other code, such as network code where td is not currently
available (and curproc is used).
o Note: netncp and netsmb are not updated to reflect this change, as they
are not currently KSE-adapted.
peter [Thu, 8 Nov 2001 00:23:06 +0000 (00:23 +0000)]
kern.ps_arg_max_cache is a long, not an int. I believe this is half of
what broke ps on ia64. It probably also broke on alpha, but the fallback
method of using lseek/read on /proc/*/mem to read ps_strings seems to
work there. It doesn't on ia64 yet.
tegge [Wed, 7 Nov 2001 23:00:05 +0000 (23:00 +0000)]
Don't call setvar() with the VTEXTFIXED flag. A copy is created by
setvar() and passed to setvareq(). When the VTEXTFIXED flag is set,
that copy is never freed, causing a memory leak.
rwatson [Wed, 7 Nov 2001 19:15:19 +0000 (19:15 +0000)]
o When "-n" is used with watch, it disables the use of <control-X> to
change terminals being watched. This change makes watch pass the
<control-X> through to the terminal if it's not being intercepted--
previously, the keypress would simply be dropped.
fenner [Wed, 7 Nov 2001 17:53:25 +0000 (17:53 +0000)]
Initialize first to -1; this will create a (nearly) empty file on failure,
instead of looping until the disk is full. This kind of failure can
especially happen when a version of awk that doesn't support POSIX
character classes is used.
Submitted by: David Wolfskill <david@catwhisker.org>
peter [Wed, 7 Nov 2001 02:51:25 +0000 (02:51 +0000)]
Fix printf format bugs introduced in rev 1.34 for printing times.
quad_t cannot be printed with %lld on 64 bit systems.
Dont waste cpu to round user and system times up to long long, it is
highly improbable that a process will have accumulated 68 years of
user or system cpu time (not wall clock time) before a reboot or
process restart.
fenner [Wed, 7 Nov 2001 00:33:56 +0000 (00:33 +0000)]
Update the nsswitch.conf -> host.conf generator to handle criteria,
continuation lines, extra whitespace, and to use the last matching
line in the file. This syncs the host.conf generation with how
the nsswitch.conf is parsed.
Only print " host.conf" instead of a multi-line message, since this
happens on every boot.
Recover from parse errors by looking for the end of a line; this
allows entries without errors to still be parsed even if there is
an erroneous entry earlier in the file.
ume [Tue, 6 Nov 2001 22:45:29 +0000 (22:45 +0000)]
Fixed the behavior when there is no inbound policy for the ipsec
tunneled packet.
When there is no suitable inbound policy for the packet of the ipsec
tunnel mode, the kernel never decapsulate the tunneled packet
as the ipsec tunnel mode even when the system wide policy is "none".
Then the kernel leaves the generic tunnel module to process this
packet. If there is no rule of the generic tunnel, the packet
is rejected and the statistics will be counted up.
jhb [Tue, 6 Nov 2001 22:31:10 +0000 (22:31 +0000)]
- Change the f_isdir field of struct file to be a flags field and two
new flags: F_ROOTDIR and F_RR (Rock Ridge present).
- Cache the SUSP LEN_SKP parameter in struct file as well.
- If we open() '/', then force a read of the directory's contents so we
can examine the directory record of '.' to see if Rock Ridge is present.
- If Rock Ridge extensions are present, lookup Rock Ridge names in
readdir().
tmm [Tue, 6 Nov 2001 20:22:18 +0000 (20:22 +0000)]
Add a special OpenFirmware entry point for terminating the kernel (in
this case, the firmware trap table needs to be restored). Make use of
it in cpu_halt() and cpu_reset(), and make cpu_reset() reboot the kernel
that was used previously insead of behaving like cpu_halt().
Add a shutdown_final event handler that turns the power off if requested.
tmm [Tue, 6 Nov 2001 20:13:44 +0000 (20:13 +0000)]
Add code to emulate unimplemented (non-fp) instructions and to fixup
unaligned accesses, and instr.h, which contrains definitions for the
sparc64 instruction set (partly from NetBSD).
Make use of some definitions from instr.h in db_disasm.c.
rwatson [Tue, 6 Nov 2001 19:56:58 +0000 (19:56 +0000)]
o Remove double-indentation of sysctl_kern_securelvl. This change is
consistent with the one other function in the file, and prevents long
lines in up-coming changes. This nominally pulls kern_mib.c a little
further down the long path to style(9) compliance.
jhb [Tue, 6 Nov 2001 17:13:05 +0000 (17:13 +0000)]
Switch to using ANSI function declarations and add missing function
prototypes. I'm tired of getting stupid bugs from changing function
parameters and not getting warnings from the compiler when I goof it up.
green [Tue, 6 Nov 2001 17:00:40 +0000 (17:00 +0000)]
Correctly unlock the target process if /proc/$foo/mem is open()ed by
another process which cannot p_candebug() it. The bug was introduced
in rev. 1.100.
iwasaki [Tue, 6 Nov 2001 15:00:30 +0000 (15:00 +0000)]
Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.
- Add S4BIOS sleep implementation. This will works well if MIB
hw.acpi.s4bios is set (and of course BIOS supports it and hibernation
is enabled correctly).
- Add DSDT overriding support which is submitted by takawata originally.
If loader tunable acpi_dsdt_load="YES" and DSDT file is set to
acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml),
ACPI CA core loads DSDT from given file rather than BIOS memory block.
DSDT file can be generated by iasl in ports/devel/acpicatools/.
- Add new files so that we can add our proposed additional code to Intel
ACPI CA into these files temporary. They will be removed when
similar code is added into ACPI CA officially.