Peter Wemm [Sun, 1 Jun 1997 09:27:03 +0000 (09:27 +0000)]
Update the sleep(3)/usleep(3) code to use signanosleep(2) if compiled with
-DUSE_NANOSLEEP. Also, seperate the code for _THREAD_SAFE so that it uses
the simpler threaded nanosleep() call in libc_r.. We don't go to the same
extremes for emulating traditional sleep semantics (ie: eating any SIGALRM
that might happen) which things like apache seem to depend on.
Peter Wemm [Sun, 1 Jun 1997 09:05:19 +0000 (09:05 +0000)]
oops, fix a braino that I noticed during the commit.. Don't verify the
remaining time pointer if it's NULL, since we don't write back in that
case! (*blush*!)
Peter Wemm [Sun, 1 Jun 1997 09:01:07 +0000 (09:01 +0000)]
- implement signanosleep(2) by moving common code from nanosleep() into a
shared function.
- use p->p_sleepend to try and get more accurate "time remaining" results
when the time has been adjusted.
- verify writeability of return address so that we can fail before sleeping
if the address for the result is bogus.
Peter Wemm [Sun, 1 Jun 1997 08:52:38 +0000 (08:52 +0000)]
New syscall, signanosleep(), which is a hybrid of sigsuspend(2) and
nanosleep(2). It sleeps until either the time expires, or a signal
permitted by the supplied mask arrives (eg: SIGALRM if appropriate)
Peter Wemm [Sun, 1 Jun 1997 08:49:49 +0000 (08:49 +0000)]
New field: p_sleepend; so that settime() can adjust the expected wakeup
time for things like nanosleep. These sleep in terms of "ticks" and
calculate the elapsed time relative to the expected wakeup time and do
not return good results when the system time is adjusted.
Brian Somers [Sat, 31 May 1997 16:37:19 +0000 (16:37 +0000)]
Remove "set mtu ..." ability. Currently, this is an
"alias" for "set mru ...", but there's no such thing
as setting your mtu in the ppp protocol (rfc1661).
Peter Wemm [Sat, 31 May 1997 10:13:46 +0000 (10:13 +0000)]
Bruce mentioned to me that Paul Traina had noticed that the ppp_tty
interrupt mask hackery wasn't happening when being modloaded via the
if_ppp lkm. It seems that the lkm system doesn't particularly like having
two sets of load/unload/etc routines. :-] This really should be fixed
by having a seperate if_ppp and ppp_tty lkm, but that requires that ppp_tty
is loaded after if_ppp, and needs to be able to link with symbols in
if_ppp. This gets messy, it is a better task for the in-kernel linker.
(if_ppp is generic, ppp_tty is a tty-specific bottom end for if_ppp, it's
not _too_ hard to have another "provider" (such as a hdlc sync card)
connected to if_ppp)
Peter Wemm [Sat, 31 May 1997 09:43:22 +0000 (09:43 +0000)]
Add prototypes for the spl* funcs and add externs for *_imask. Leaving
the *_imask down in the isa machine dependent layers requires code changes
to all pci drivers, but the interrupt registration mechanism is in flux
at the moment. These can go away when the interface is cleaned and settled.
Peter Wemm [Sat, 31 May 1997 09:33:29 +0000 (09:33 +0000)]
s/intrmask/intrmask_t/g
remove warning about ICU_LEN > 32, it's not likely to happen like this,
and besides, ICU_LEN is not the ideal indicator of "number of interrupts".
Peter Wemm [Sat, 31 May 1997 09:27:31 +0000 (09:27 +0000)]
Include file updates.. <machine/spl.h> -> <machine/ipl.h>, add
<machine/ipl.h> to those files that were depending on getting SWI_*
implicitly via <machine/cpufunc.h>
Peter Wemm [Sat, 31 May 1997 09:16:36 +0000 (09:16 +0000)]
move spl.h to ipl.h, minus the inline spl macros. The inline spl
implementation is now in isa/ipl_funcs.c (at least for the time being),
leaving the definitions of the SWI_* and cpl/idelayed/ipending.
Peter Wemm [Sat, 31 May 1997 09:07:36 +0000 (09:07 +0000)]
move intrhand2_t from isa_device.h to machine/types.h - it's used far more
than in the isa dependent code.
create intrmask_t in machine/types.h (replaces "intrmask" typedef from
sys/interrupt.h)
Peter Wemm [Sat, 31 May 1997 09:03:52 +0000 (09:03 +0000)]
Store the macro values for SWI_TTY_MASK and SWI_NET_MASK in variables to
that lkm's can use them for fiddling the masks without being dependent on
which mode the kernel is compiled in (SMP or UP). This is particularly
for ppp_tty.c which has some domain crossing between the net and tty
subsystems. The values are not used in the spl code, they are for
reference only (ie: the compiled code uses immediate values rather than
an indirect 32 bit address and 32 bit data fetch).
Peter Wemm [Sat, 31 May 1997 08:59:51 +0000 (08:59 +0000)]
The SWI_NET_MASK and SWI_TTY_MASK handlers are now back adjacent to the
top of the hardware interrupt handlers. Apparently this is slightly
faster with the bit scanning instruction that looks these up - this set of
changes reverts the original change.
Peter Wemm [Sat, 31 May 1997 08:57:05 +0000 (08:57 +0000)]
Bruce's original implementation of the splxxx() routines, but as C code
rather than inlines. These are compiled with -fomit-frame-pointer and
work out pretty close to the original routines, but it might be a fraction
slower. The reason for doing this is to prevent the SWI_* and HWI_* values
from being compiled into drivers and lkms etc which is one of the things
that prevents the same lkm from being used on both SMP and UP kernels.
This gives us a lot more scope for experimenting with the splxxx
implementaton for SMP parallelism etc.
KATO Takenori [Sat, 31 May 1997 08:45:24 +0000 (08:45 +0000)]
- Use `6x86MX' instead of `M2'. Cyrix officially use `6x86MX' for the
CPU code-named `M2'.
- Use the result of cpuid instruction instead of DIR to identify
6x86MX cpu. DIR0 and DIR1 are not documented in the data sheet, and
cpuid instruction is enabled at reset time.
- Add a function, init_6x86MX() to initialize 6x86MX cpu. It supports
CPU_SUSP_HLT and CPU_IORT options. It always sets NC1 (640K - 1M is
not cached.), and enables L1 cache in write-back mode.
Gene Stark [Sat, 31 May 1997 02:39:32 +0000 (02:39 +0000)]
Submitted by: Rich Murphey (ages ago) and Gene Stark
Hopefully I've done the proper magic to merge changes between 1.17 and
1.17.2.1 into the main trunk. Description of those changes follows:
Brought in changes sent to me in late 1995 by Rich Murphey.
I cleaned up a few things and am currently running these under
2.2-970205-GAMMA.
The changes deal with software debouncing apparently necessary on
todays faster hardware, and also some problems with the use of the -Select
line for the TW-523 sync. This driver allows use of +PaperEnd as an
alternative.
Steve Passe [Thu, 29 May 1997 05:58:41 +0000 (05:58 +0000)]
Code such as apic_base[APIC_ID] converted to lapic__id
Changes to pmap.c for lapic_t lapic && ioapic_t ioapic pointers,
currently equal to apic_base && io_apic_base, will stand alone with the
private page mapping.
Steve Passe [Thu, 29 May 1997 05:57:43 +0000 (05:57 +0000)]
apic.h now has structure definitions for both the local APIC and io APIC.
apic.h has defines like:
#define lapic__id lapic->id
Once private pages and "known virtual addr" mapping of the APICs is
ready all 'lapic__XXX' will be changed to 'lapic.XXX', and the defines
will be removed.
Changes to smp.h for lapic_t lapic && ioapic_t ioapic pointers,
currently equal to apic_base && io_apic_base, will stand alone with the
private page mapping.
Bill Paul [Wed, 28 May 1997 16:38:35 +0000 (16:38 +0000)]
Fix other small things that got lost in the merge:
- bde's change to includes section in getrpcent.3
- Lost comment in svc_run.c (the code here was actually the same since
I had fixed the 'fds + 1' bug in my stuff at home before mailing
Peter about it, but I didn't notce that he'd made a change to the
comment right above the changed line).
Bill Paul [Wed, 28 May 1997 15:44:22 +0000 (15:44 +0000)]
Import of the keyserv daemon needed for Secure RPC.
This version supports both the keyserv v1 and v2 protocols. It uses the
new AF_LOCAL transport so that only local processes can use it for
storing/retrieving keys, and it uses the SCM_CREDS kernel hack for
authentication. With these two modifications, we don't need the keyenvoy
program normally used with RPC 4.0.
Note that if libdes.so.3.x is present on the system when keyserv
is started, Secure RPC will run with normal DES encryption. If not,
everything falls back to RC4 with a 40 bit key.
Stefan Eßer [Wed, 28 May 1997 10:10:02 +0000 (10:10 +0000)]
Add consistency check to the functions that map port or memory ranges:
Return failure, if the enable bit corresponding to the map type has not
been set in the command register. This feature was requested by Justin
Gibbs, who pointed out that some early PCI to PCI bridges do not correctly
support memory windows (I assume because of the risk of deadlocks that
have been taken care of in the PCI 2.2 spec) and that some BIOS clears
the memory address decode enable bit in the command register of the PCI
device, if it finds them behind such a bridge.
Stefan Eßer [Wed, 28 May 1997 10:01:03 +0000 (10:01 +0000)]
Two minor changes to the code that builds the pci map array:
1) Stop at the first map register that contains a zero value.
2) When testing for the map size work up from low values, since
this works around a bug in some BusLogic SCSI card, which has
the 16 upper port base address bits hardwired to zero.
The config register dump printed in the bootverbose case has
been slightly rearranged.
Bill Paul [Wed, 28 May 1997 05:05:31 +0000 (05:05 +0000)]
Resolve conflicts.
This concludes tonight's entertainment. Once I'm sure I haven't destroyed
the world with all these changes, I'll import the utilities. Everything
should continue to work as before. If it doesn't let me know.
Special thanks to Mark Murray for running a test 'make world' for me to
shake out the bugs, which, hopefully, I have fixed.