Thomas Moestl [Mon, 11 Mar 2002 03:18:17 +0000 (03:18 +0000)]
Fix some bugs that would prevent %fsr to be set correctly, and add
support for fcmp and fcmpe instructions with a condition code
specification other than %fcc0.
This (primarily the first part) seems to fix a lot of problems that
people were seeing, e.g. perl and gawk failures.
Thomas Moestl [Mon, 11 Mar 2002 02:53:03 +0000 (02:53 +0000)]
Save/restore the %y register around calls to the C user trap handler;
gcc emits the deprecated sparc v8 instructions that use this register
when optimizing for UltraSparc machines because they are apparetly
faster then their v9 counterpars there.
David Malone [Sun, 10 Mar 2002 23:12:43 +0000 (23:12 +0000)]
Don't assign strcmp to a variable called err and then compare it
with zero, just compare strcmp with zero. This fixes the same bug
which Maxim just fixed and fixes some odd style too.
Eivind Eklund [Sun, 10 Mar 2002 21:52:48 +0000 (21:52 +0000)]
- Remove a number of extra newlines that do not belong here according to
style(9)
- Minor space adjustment in cases where we have "( ", " )", if(), return(),
while(), for(), etc.
- Add /* SYMBOL */ after a few #endifs.
Luigi Rizzo [Sun, 10 Mar 2002 20:08:44 +0000 (20:08 +0000)]
Export a (machine dependent) kernel variable bootdev as
machdep.guessed_bootdev, and add code to sysctl to parse its value
and give a (not necessarily correct) name to the device we booted
from (the main motivation for this code is to use the info in the
PicoBSD boot scripts, and the impact on the kernel is minimal).
NOTE: the information available in bootdev is not always reliable,
so you should not trust it too much. The parsing code is the same
as in boot2.c, and cannot cover all cases -- as it is, it seems to
work fine with floppies and IDE disks recognised by the BIOS. It
_should_ work as well with SCSI disks recognised by the BIOS.
Booting from a CDROM in floppy emulation will return /dev/fd0 (because
this is what the BIOS tells us).
Booting off the network (e.g. with etherboot) leaves bootdev unset so
the value will be printed as "invalid (0xffffffff)".
Finally, this feature might go away at some point, hopefully when we
have a more reliable way to get the same information.
Maxim Sobolev [Sun, 10 Mar 2002 19:20:01 +0000 (19:20 +0000)]
Fix a breakage introduced in rev.1.75 (supposedly style cleanup), which results
in "missing dependencies" error when loading some kld modules. It is sad to
see how often these days style cleanus break doesn't broken things. Perhaps
people should recall good old principle: "don't fix it if it isn't broken".
Robert Watson [Sun, 10 Mar 2002 15:20:36 +0000 (15:20 +0000)]
/var/log/security gets almost no (if not no) activity on many FreeBSD
systems due to sshd not using the security log class. Tweak syslog.conf
so that /var/log/security also gets a useful set of
authentication-related logging.
Dima Dorfman [Sun, 10 Mar 2002 09:21:50 +0000 (09:21 +0000)]
Link scbus(4) to scsi(4). Most of the other CAM devices have their
own manual pages, but this is better than nothing until someone writes
a real scbus(4).
PR: 35641
Submitted by: Gary W. Swearingen <swear@blarg.net>
__FreeBSD__ is a compiler predefine,
__FreeBSD_version is defined in <sys/param.h> .
Given that in this case (and all others in sys/dev/usb and sys/i4b)
the goal is to adapt to a different kernel interface, and not to
a compiler feature, I believe the correct form is the second one
(in the best case the two are synonyms so the change does not break
anything anyways).
Mike Barcroft [Sun, 10 Mar 2002 06:42:27 +0000 (06:42 +0000)]
o Add INET_ADDRSTRLEN and INET6_ADDRSTRLEN defines to <arpa/inet.h>
for POSIX.1-2001 conformance.
o Add magic to <netinet/in.h> and <netinet6/in6.h> to prevent
redefining INET_ADDRSTRLEN and INET6_ADDRSTRLEN.
o Add a note about missing typedefs in <arpa/inet.h>.
Jake Burkholder [Sat, 9 Mar 2002 23:35:50 +0000 (23:35 +0000)]
Increase VM_KMEM_SIZE to 16 megs from 12. Define VM_KMEM_SIZE_SCALE so that
the number of physical pages per KVA page allocated scales properly with
memory size. This fixes problems with kmem_map being too small.
Change back to using vfork() now that execvp() is vfork()-safe. If execvp()
fails, errno is saved to a volatile variable that the parent later inspects.
PR: bin/34898
Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au>
MFC after: 1 week
Don't deref NULL mutex pointer when pipeclose()'ing a pipe that is not
fully instaniated.
Revert the logic in pipeclose so that we don't have the entire function
pretty much under a single if() statement, instead invert the test and
just return if it fails.
Submitted (in different form) by: bde
Don't use pool mutexes for pipes. We can not use pool mutexes
because we will need to grab the select lock while holding a pipe
lock which is not allowed because you may not aquire additional
mutexes when holding a pool mutex.
Instead malloc(9) space for the mutex that is shared between the
pipes.
Thomas Moestl [Sat, 9 Mar 2002 21:52:31 +0000 (21:52 +0000)]
Set the busmaster enable bit in the PCI command register, as the firmware
of sparc64 machines will not do this for us if the interface is not used
for booting over the network.
Mike Barcroft [Sat, 9 Mar 2002 21:02:16 +0000 (21:02 +0000)]
o Don't require long long support in bswap64() functions.
o In i386's <machine/endian.h>, macros have some advantages over
inlines, so change some inlines to macros.
o In i386's <machine/endian.h>, ungarbage collect word_swap_int()
(previously __uint16_swap_uint32), it has some uses on i386's with
PDP endianness.
Submitted by: bde
o Move a comment up in <machine/endian.h> that was accidentially moved
down a few revisions ago.
o Reenable userland's use of optimized inline-asm versions of
byteorder(3) functions.
o Fix ordering of prototypes vs. redefinition of byteorder(3)
functions, so that the non-GCC (libc asm) case has proper
prototypes.
o Add proper prototypes for byteorder(3) functions in <sys/param.h>.
o Prevent redundant duplicate prototypes by making use of the
_BYTEORDER_PROTOTYPED define.
o Move the bswap16(), bswap32(), bswap64() C functions into MD space
for platforms in which asm versions don't exist. This significantly
reduces the complexity of some things at the cost of duplicate code.
Luigi Rizzo [Sat, 9 Mar 2002 20:16:06 +0000 (20:16 +0000)]
Lots of updates on the install process, detailing how to
install PicoBSD on hard disks and CDROM images, and on the
bootstrap sequence and the places where you can customise
a PicoBSD image.
Now if some of the -doc guys want to put this stuff in a nice
handbook page, that would be extremely useful!
Luigi Rizzo [Sat, 9 Mar 2002 18:27:02 +0000 (18:27 +0000)]
Remove host.conf, and introduce a way to override the content
of selected files (at the moment /etc/host.conf and /etc/resolv.conf)
from /etc/rc.conf , so the number of places to customize is
reduced.
Tor Egge [Sat, 9 Mar 2002 16:24:27 +0000 (16:24 +0000)]
Revert change in revision 1.53 and add a small comment to protect
the revived code.
vm pages newly allocated are marked busy (PG_BUSY), thus calling
vm_page_delete before the pages has been freed or unbusied will
cause a deadlock since vm_page_object_page_remove will wait for the
busy flag to be cleared. This can be triggered by calling malloc
with size > PAGE_SIZE and the M_NOWAIT flag on systems low on
physical free memory.
A kernel module that reproduces the problem, written by Logan Gabriel
<logan@mail.2cactus.com>, can be found in the freebsd-hackers mail
archive (12 Apr 2001). The problem was recently noticed again by
Archie Cobbs <archie@dellroad.org>.