Thomas Moestl [Thu, 17 Oct 2002 18:16:21 +0000 (18:16 +0000)]
When entering the firmware mappings into the kernel tlb, clear all 'soft'
bits that might be set in the firmware tte data field, and set the soft
flag TD_EXEC to mark the page executable. Failing to do the latter would
cause fatal instruction faults in the prom in certain situations.
Sam Leffler [Thu, 17 Oct 2002 18:02:27 +0000 (18:02 +0000)]
Strip splash, tun, and COMPAT_FREEBSD4 from the config used to build
the BOOTMFS kernel. These help reduce the kernel size so things fit
in a floppy image. There are more low-hanging fruit to be had here
if things fail to fit again.
Sam Leffler [Thu, 17 Oct 2002 18:00:30 +0000 (18:00 +0000)]
Mark more drivers as going on the (nonexistent) drivers.flp floppy
to reduce the size of the bootstrap kernels. This is needed to make
stuff fit in primary floppy images. Specific drivers moved: RAID
support, tx Ethernet, and wi (wireless). Probably want to revisit
at least the last two drivers before release.
Sam Leffler [Thu, 17 Oct 2002 17:28:57 +0000 (17:28 +0000)]
fix kldload error return when a module is rejected because it's statically
linked in the kernel. When this condition is detected deep in the linker
internals the EEXIST error code that's returned is stomped on and instead
an ENOEXEC code is returned. This makes apps like sysinstall bitch.
Robert Drehmel [Thu, 17 Oct 2002 15:52:42 +0000 (15:52 +0000)]
- Allocate only enough space for a temporary buffer to hold
the path including the terminating NUL character from
`struct sockaddr_un' rather than SOCK_MAXADDRLEN bytes.
- Use strlcpy() instead of strncpy() to copy strings.
Mitsuru IWASAKI [Thu, 17 Oct 2002 13:55:39 +0000 (13:55 +0000)]
1. Fix a comment. Locking _is_ needed (but not done).
2. Update a comment. We now restore much more than RTC updates and
interrupts.
3. Order change. Stop interrupts by writing to RTC_STATUSB,
restore rate bits for the interrupts by writing to RTC_STATUSA,
then enable interrupts again.
This seems to be done perfectly backwards in startrtclock().
Otherwise, the idea for this change was obtained from
startrtclock().
4. Don't stop the clock (RTCB_HALT). We only program some control bits
and don't want to stop the clock.
5. (Not really related.) Add caveats to the comment about timer_restore().
The update is non-atomic since locking is not done.
On locking:
6. rtcin() and writertc() are locked() adequately by splhigh() in RELENG_4,
but this locking is null in -current.
7. Doing things in the correct order in (3) combined with (6) is probably
enough locking for rtcrestore() in RELENG_4. In -current, the
writertc()'s race with rtcintr() unless the BIOS disables RTC interrupts.
Ruslan Ermilov [Thu, 17 Oct 2002 13:48:13 +0000 (13:48 +0000)]
Added the new variable CTAGS which, if set to "ctags", reverts
to creating the tags file using ctags(1). Defaults to "gtags".
Made GTAGSFLAGS and HTAGSFLAGS overrideable, added CTAGSFLAGS.
Folded bsd.prog.mk version of `tags' into bsd.dep.mk.
Bruce Evans [Thu, 17 Oct 2002 13:47:31 +0000 (13:47 +0000)]
Fixed the quoting of the value of SC_CUT_SEPCHARS. The double quotes
needed to be quoted (to get a C string literal), not the value itself.
Fixed the value of SC_CUT_SEPCHARS. Setting this value would have had no
effect even if it were used, since the value was the same as the default.
The above bugs had no effect except to set bad examples, since test
coverage of SC_CUT_SEPCHARS is broken by enabling a negative option.
Removed (unquoted) double quotes for all options. They were all bogus
since they had no effect except to make non-strings look like strings.
Most of the non-strings were expressions. The value of INIT_PATH is
a non-string since it is stringified later (unlike SC_CUT_SEPCHARS).
Fixed parenthesization errors inside bogus quotes (parenthesize values
if they have more than one token in them but don't parenthesize single
tokens).
Tim J. Robbins [Thu, 17 Oct 2002 12:02:36 +0000 (12:02 +0000)]
The field width for single-byte string conversions (%c, %s, %[) is the
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
Marcel Moolenaar [Thu, 17 Oct 2002 03:45:34 +0000 (03:45 +0000)]
Suppress the uninitialized variable warning on ia64 introduced by
the previous commit by initializing i and j. These initializations
will normally be eliminated by the compiler.
Bosko Milekic [Wed, 16 Oct 2002 19:59:08 +0000 (19:59 +0000)]
Fix a fairly subtle bug in mbuf_init() where the reference counter
contiguous space was being allocated from the clust_map
instead of the mbuf_map as the comments indicated. This resulted in
some address space wastage in mbuf_map.
Hajimu UMEMOTO [Wed, 16 Oct 2002 19:49:37 +0000 (19:49 +0000)]
- after gif_set_tunnel(), psrc/pdst may be null. set IFF_RUNNING accordingly.
- set IFF_UP on SIOCSIFADDR. be consistent with others.
- set if_addrlen explicitly (just in case)
- multi destination mode is long gone.
- missing break statement
- add gif_set_tunnel(), so that we can set tunnel address from within the
kernel at ease.
- encap_attach/detach dynamically on ioctls
- move encap_attach() to dedicated function in in*_gif.c
Thomas Moestl [Wed, 16 Oct 2002 17:37:50 +0000 (17:37 +0000)]
Add "pci108e,8000" (psycho) and "pci108e,a000" (US-IIi sabre) to the list of
recognized compat properties. This should make the psycho driver attach
properly on SPARCengine Ultra AX machines.
Switch to a table-driven logic to recognize the ID's, since their number
is now large enough to justify this.
These changes are analogous to those made in NetBSD r.1.35, but
implemented a bit differently.
John Baldwin [Wed, 16 Oct 2002 17:27:11 +0000 (17:27 +0000)]
- Include lock headers on current in this header instead of putting
#if's in all the other ACPI source files.
- Use splhigh() for the ACPI subsystem lock on 4-stable.
John Baldwin [Wed, 16 Oct 2002 17:25:29 +0000 (17:25 +0000)]
- In AcpiOsGetThreadId(), allow for curproc to be NULL on 4-stable systems.
In that case use proc0's pid to return the thread ID.
- For 4-stable, use the generic swi taskqueue for ACPI events rather than
implementing our own.
Thomas Moestl [Wed, 16 Oct 2002 17:03:36 +0000 (17:03 +0000)]
Use a linked list to keep the psycho softcs instead of a statically
sized array.
While being there, deuglify the psycho pair detection loop which became
quite awkward in a previous code reorganization.
Mark Murray [Wed, 16 Oct 2002 14:31:34 +0000 (14:31 +0000)]
Module-ize the 'core' crypto stuff. This may still need to be compiled
into the kernel by default (if required), but other modules can now
depend() on this.
Robert Drehmel [Wed, 16 Oct 2002 14:29:23 +0000 (14:29 +0000)]
- Remove the lsearch() and lfind() functions and their manpage from
the compatibility library libcompat.
- Add new implementations of lsearch() and lfind() which conform to
IEEE Std 1003.1-2001 to libc. Add a new manual page for them and
add them to the makefile.
- Add function prototypes for lsearch() and lfind() to the search.h
header.
Robert Drehmel [Wed, 16 Oct 2002 14:00:46 +0000 (14:00 +0000)]
- Remove the old insque() and remque() functions and their manual
page from the compatibility library.
- Add new implementations of insque() and remque() which conform to
IEEE Std 1003.1-2001 to libc. Add a new manual page for them and
connect them to the build.
- Add the prototypes of insque() and remque() to the search.h
header.
Remove done() which was just exit() so use of warn()/err() can be made. Abort
on allocation failure instead of displaying a warning and deferencing NULL
pointer after. Spelling. Add prototypes. Add list of option in synopsis section
of man page, -d is not referenced because available as a compile option. It
should be made a runtime option btw.
Alexey Zelkin [Wed, 16 Oct 2002 13:17:18 +0000 (13:17 +0000)]
Add locale(1). I have used it for while as useful debugging tool
for locale related things. So, I think it could be useful for
others. It's not yet implement (or implement in different manner)
all POSIX things, but I think it's good enough for start.
POSIX conformance related updates and manpage to follow relatively soon.
Do not repeat option name in its definition. Use .Nm. In the sequence ``~.'',
``.'' is not a sentence termination, it must be escaped to be put inside
quotes.
Abort if execv() fails by adding err(). Do not dot terminate error messages.