Commit Graph

35191 Commits

Author SHA1 Message Date
Peter Wemm
e30c8e45bc I cannot win. I still managed to use #define<space> twice instead of
#define<tab> in spite of trying to make sure I didn't do this.
2002-09-23 06:19:31 +00:00
Jonathan Mini
d7f94a7a0e Don't use compatability syscall wrappers in emulation code.
This is needed for the COMPAT_FREEBSD3 option split.

Reviewed by:	alfred, jake
2002-09-23 06:17:54 +00:00
Julian Elischer
253fdd5ba9 slightly clean up the thread_userret() and thread_consider_upcall() calls.
also some slight changes for TDF_BOUND testing and small style changes
Should ONLY affect KSE programs

Submitted by:	davidxu
2002-09-23 06:14:30 +00:00
Peter Wemm
a7865fc147 Add a __section(x) macro as well. Use this in linker_set.h. ie:
static void const * const __set_##set##_sym_##sym
 __attribute__((__section__("set_" #set),__unused__)) = &sym
becomes:
static void const * const __set_##set##_sym_##sym
 __section("set_" #set) __unused = &sym
Like the other macros, these #define away for unrecognized compilers or
lint.

Also, fix the argments in the previous commit for the non-gcc case. lint
might be a bit happier about that.  Note that the gcc <= 2.6 case
needs some research.
2002-09-23 06:11:29 +00:00
Julian Elischer
acb460624e Add code to create > 1 KSe per process.
(support code not yet complete)

Submitted by:	davidxu
2002-09-23 06:10:24 +00:00
Peter Wemm
c692fbe091 At great personal risk, add a __packed and __aligned(x) define that
expand to __attribute__((packed)) and __attribute__((aligned(x)))
respectively.  Replace the handful of gcc-ism's that use
__attribute__((aligned(16))) etc around the kernel with __aligned(16).

There are over 400 __attribute__((packed)) to deal with, that can come
later.  I just want to use __packed in new code rather than add more
gcc-ism's.
2002-09-23 05:55:10 +00:00
Jeff Roberson
155974701d - Automatically generate and insert KTR points in all VOPs. 2002-09-23 05:50:07 +00:00
Julian Elischer
33c06e1d3e Indentation does not define a block.. you need breces {} as well..
also add a mutex assert.  (threaded path only)

Submitted by:	davidxu
2002-09-23 05:27:30 +00:00
Matt Jacob
77e22cb706 Wads more cleanup...
In mpttimeout, call mpt_intr just on the offchance that we missed
an interrupt. We can check to see whether or not the command that
is timing out got completed.

When we *do* decide to timeout a command, set the command state to
REQ_TIMEOUT and then invoke another timeout (hz/10)- mpttimeout2.
This allows us to catch a couple cases we've seen where the command
we timed out on in fact is ready to be completed by the firmware.
In any case, it's only after mpttimeout2 is called that we actually
take down the private state and free the request itself. CAM has
been notified in mpttimeout anyway. This whole area should be redone,
but that will take 105% of my available game time for this month.

Fix a couple of missing (and not useful, at presnet) CAMLOCK_2_MPTLOCK
and MPTLOCK_2_CAMLOCK locations.

Split mpt_notify into mpt_ctlop, which handles all reply completions
that have 0x800000000 or'd into the ContextID. This function can, in
fact, call mpt_event_notify_reply, which handles the traditional
async event notifications. While we're at it, put in the extremely
important (but currently untested) code that send back an Ack to
an Event Notification (if the Event Notification is marked with
AckRequired). Note that an Ack also generates another ctlop completion,
tra la.

Fix up mpt_done substantially to try and get how we plug into CAM
correctly done. Remove bogus CAM_RELEASE_SIMQ settings.

Do some cleanups in mpt_action that are related to speed negotiation
for Ultra4 cards. This is an area that is still quite fragile and
worrisome as config data being read back often doesn't make sense or
jibe with the documentation.

At any rate, after these changes were done, I was finally able to
get Lars Eggert's dual 320M disk system to stay up under load all
weekend- hopefully we're in good enough for now shape.

MFC after:	1 week
2002-09-23 05:25:59 +00:00
Jeff Roberson
9e9256e252 - Hold the credential of the caller and use it in all subsequent vn ops.
- Get rid of the ill conceived aq_td field.

Suggested by:	rwatson
2002-09-23 05:20:00 +00:00
Matt Jacob
aca01e3897 Recognize the single channel 2Gb card (FC919)- thanks to LSI Logic for
pointing this out.

In mpt_intr, don't try and pop a reply queue element out *unless*
the interrupt status says you might have one.

MFC after:	1 week
2002-09-23 05:16:00 +00:00
Matt Jacob
daa46fadd9 We do not need to expose mpt_notify outside of mpt_freebsd.c.
MFC after:	1 week
2002-09-23 05:14:38 +00:00
Matt Jacob
0424fb537e When freeing a request, zero out the sequence number.
Define the CFG_DAGA_OFF offset as 128 bytes instead of 40- gives us
a more reasonable headroom.

When reading a config page, zero out the entire request area- not just
the length of the request. This is because we cleverly (cheezily) return
configuration data back into the allocated request area, so it's nice
to make sure we start with a clean area to write on.

MFC after:	1 week
2002-09-23 05:14:02 +00:00
Matt Jacob
66cbe912a9 Remove ISP_DMA_ADDR_T definition.
Instead, based upon whether ISP_DAC_SUPPORTED is defined, typedef
isp_dma_addr_t appropriately.

If ISP_DAC_SUPPORTRED is defined, the DMA_WD2/DMA_WD3 macros do something
useful, else they define to '0'.
2002-09-23 05:09:23 +00:00
Matt Jacob
7e4bd1688b Add MBOX_INIT_REQ_QUEUE_A64/MBOX_INIT_RES_QUEUE_A64 definitions.
Define ispreq64_t to be the same as ispreqt3_t.
2002-09-23 05:04:16 +00:00
Peter Wemm
79af999017 Delete a whole bunch of compatability defines that we dont use anymore. 2002-09-23 05:04:05 +00:00
Matt Jacob
f777264584 Redo dma tag creation to correctly reflect the boundary and segment
limitations inherent to the isp1000 on SBus cards.
2002-09-23 05:03:34 +00:00
Matt Jacob
435a93378f Re-specify the bus space creation such that if we have ISP_DAC_SUPPORTED
defined, we set the address space limitation to BUS_SPACE_UNRESTRICTED,
otherwise to BUS_SPACE_MAXADDR_32BIT.

If we have a 1240, ULTRA2 or better, or an FC card, the boundary limit
is BUS_SPACE_UNRESTRICTED and segment limit is BUS_SPACE_MAXADDR_32BIT.

The older 1020/1040 cards have boundary and segment limits of
BUS_SPACE_MAXADDR_24BIT.
2002-09-23 05:02:53 +00:00
Matt Jacob
9f06346c13 Fix buglet in A64 CTIO3 structure copy. 2002-09-23 05:00:37 +00:00
Matt Jacob
6ce5711b35 Remove ISP_DMA_ADDR_T define (see ispvar.h)
Add in commented out:

+/* #define     ISP_DAC_SUPPORTED       1 */
2002-09-23 05:00:14 +00:00
Matt Jacob
caec294571 If we have a 1240 or an ULTRA2 or better card, use MBOX_INIT_RES_QUEUE_A64
(preparation for DAC/A64 support)
2002-09-23 04:59:42 +00:00
Matt Jacob
16c5c386eb A SCSI_DELAY of zero is a legitimate value to have.
The notion that you must "always" have a delay is at best misinformed.
2002-09-23 04:56:35 +00:00
Matt Jacob
78900a835d Note that the large Hitachi's are also CAM_QUIRK_HILUNS 2002-09-23 04:55:32 +00:00
Mike Barcroft
c0d4804d67 Be careful not to define GCC-specific optimizations in the non-GCC
case.
2002-09-23 04:32:17 +00:00
Jeff Roberson
8c33eced01 - Correct the name in the header guards.
Spotted by:	rwatson
2002-09-23 00:29:31 +00:00
Scott Long
c57c56c4a1 The ahc driver should only have one devclass, not one for each bus
attachment.

Submitted by:	too many people to count
MFC after:	3 days
2002-09-22 23:03:31 +00:00
John Polstra
62f1ea9c96 Fix a couple of longstanding typos which would have made a
statement fail to compile if it weren't inside "#ifdef
__brokenalpha__".

Submitted by:	Birger Toedtmann <birger@takatukaland.de>
MFC after:	2 weeks
2002-09-22 19:27:07 +00:00
John Polstra
ea13bdd522 Follow the lead of recent changes in the 3com Linux driver by
disabling memory write invalidate unconditionally.  It looks like
they've decided that MWI just doesn't work with these devices.
Also, remove now-irrelevant code that set PCI write boundary values
based on the cache line size.

MFC after:	2 weeks
2002-09-22 18:58:58 +00:00
John Polstra
8287860e04 Set up the BCM570x chip's DMA Read/Write Control register more
correctly.  This fixes the "watchdog timeout -- resetting" errors
seen on Dell 2650 systems.

MFC after:	1 month
2002-09-22 18:27:29 +00:00
Ian Dowse
ac11ad13fb Attempt to fix the error reported by the alpha tinderbox. A pointer
was being cast to an integer as part of a hash function, so just
add an intptr_t cast to silence the warning.
2002-09-22 13:25:57 +00:00
Peter Grehan
a0c6726472 Initialize fwsectors/fwheads to allow the DIOCGFWSECTORS and
DIOCGFWHEADS ioctls to return meaningful values to disklabel/newfs

Approved by: phk
2002-09-22 10:07:18 +00:00
Don Lewis
1c4ccf09cd Fix misspellings, capitalization, and punctuation in comments. Minor
comment phrasing and style changes.
2002-09-22 08:54:17 +00:00
Poul-Henning Kamp
c8423e9702 Move the com_scr register address definition over with the other seven.
Approved by:	bde
2002-09-22 08:51:31 +00:00
Matthew N. Dodd
4a2eca23ca Modify vm_map_clean() (and thus the msync(2) system call) to support
invalidation of cached pages for objects of type OBJT_DEVICE.

Submitted by:	Christian Zander <zander@minion.de>
Approved by:	alc
2002-09-22 08:22:32 +00:00
Jeff Roberson
5bf6b6538e - Hook ALQ up to the build. 2002-09-22 07:19:37 +00:00
Jeff Roberson
4b124a4b8e - Add options ALQ and KTR_ALQ. 2002-09-22 07:14:27 +00:00
Jeff Roberson
abee588b36 - Add support for logging KTR via ALQ. This is optional and enabled by the
KTR_ALQ config option.
2002-09-22 07:13:45 +00:00
Jeff Roberson
c76e20451c - Tell witness about ALQ's spin lock. 2002-09-22 07:11:57 +00:00
Jeff Roberson
9405072a95 - Add an asynchronous fixed length record logging mechanism called
ALQ (Asynch. Logging Queues).  ALQ supports many seperate queues with
   different record and buffer sizes.  It opens and logs to any vnode so
   it can be used with character devices as well as regular files.

Reviewed in part by:	phk, jake, markm
2002-09-22 07:11:14 +00:00
Jake Burkholder
95f5cd52bc Call trap directly for exceptional cases that need more processing on
return to usermode, rather than branching back to a label before the
original call.
2002-09-22 06:51:41 +00:00
Jake Burkholder
98f93c07a5 Removed unneeded include (missed in last revision). 2002-09-22 06:05:23 +00:00
Jake Burkholder
e3b6e33c07 Moved netisr code from kern/kern_intr.c to net/netisr.c as threatened in a
comment.
2002-09-22 05:56:41 +00:00
Mike Silbersack
f8f4148236 Remove all DELAY(1) calls around MII operations in the XL driver.
According to the MII specification, the delay produced by our
reads alone are sufficient for correct operation.

This reduces the time mii_tick takes from 10ms to ~1ms here.  That's
still a lot, but much better than before.

Submitted by:	Harti Brandt <brandt@fokus.gmd.de>
MFC after:	3 weeks
2002-09-22 04:48:30 +00:00
Peter Wemm
eb1443c8dd Create inlines for ltr(sel), lldt(sel), lidt(addr) rather than
functions that have one instruction.
2002-09-22 04:45:21 +00:00
Alan Cox
e94ce82689 o Update some comments. 2002-09-22 04:33:43 +00:00
Mike Silbersack
c1c36a2c68 Fix issue where shutdown(socket, SHUT_RD) was effectively
ignored for TCP sockets.

NetBSD PR:	18185
Submitted by:	Sean Boudreau <seanb@qnx.com>
MFC after:	3 days
2002-09-22 02:54:07 +00:00
Jake Burkholder
04474d7f0b Remove unneeded opt headers.
Noticed by:	benno
2002-09-22 01:34:33 +00:00
Matthew N. Dodd
e58de9c6bc - Move the init of %gs and pcb_gs before user_ldt_free().
- Always call load_gs()
- Trim comments.

This addresses some of the issues raised by BDE.
2002-09-22 01:32:48 +00:00
Benno Rice
be0e6bfc0b It's Apple GMAC, not HMAC.
Approved by:	jake (for sparc64)
2002-09-22 01:18:06 +00:00
Jake Burkholder
abc370fa85 Moved nfs_diskless setup code from autoconf.c to nfsclient/nfs_diskless.c
so that it is MI.  Allow nfs_mountroot to return an error if the nfs_diskless
struct is not valid, rather than panicing later on.  Call nfs_setup_diskless()
from nfs_mountroot if NFS_ROOT is defined, like bootpc_init().  Removed legacy
root mount support for sparc64, and enabled NFS_ROOT by default.
2002-09-22 00:59:02 +00:00
Bruce Evans
ad6c348105 Whitespace fixes (mainly for many more messes in the definitions of the
rfork() constants).
2002-09-21 22:57:52 +00:00
Jake Burkholder
05ba50f522 Use the fields in the sysentvec and in the vm map header in place of the
constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS.
This is mainly so that they can be variable even for the native abi, based
on different machine types.  Get stack protections from the sysentvec too.
This makes it trivial to map the stack non-executable for certain abis, on
machines that support it.
2002-09-21 22:07:17 +00:00
Mark Murray
a0a95acece Remove #ifdef'ed Giant mutex wrappers round debugging statements. 2002-09-21 21:44:19 +00:00
Nicolas Souchu
44e6ce01b9 Cleanup of amdpm(4).
Add of NVIDIA nForce (nfpm) smbus support.

Obtained from:	Thomas D. Dean <tomdean@speakeasy.org>
2002-09-21 21:43:49 +00:00
Mark Murray
b0186e2c5c No functional change. Fix comments and whitespace. 2002-09-21 21:40:02 +00:00
Robert Watson
7678df4487 Remove another missed trailing space. 2002-09-21 19:50:28 +00:00
Alan Cox
60b09ad43c o Remove an initialized but unused variable from pmap_remove_all(). 2002-09-21 19:42:11 +00:00
Robert Watson
5784b0a22d Trim trailing whitespace from the ends of lines. 2002-09-21 19:26:59 +00:00
Robert Watson
13763f5074 Continue cleanup and sync of mac_biba and mac_mls policies to the
TrustedBSD MAC Perforce tree.  Remove unused functions
mac_biba_equal_range and mac_mls_equal_range, which determined if the
ranges in two range-enabled labels were equal.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-21 19:20:01 +00:00
Mark Murray
0a7d7bdc02 Wrap GNUish asm() code in #ifdef __GNUC__ 2002-09-21 19:12:59 +00:00
Mark Murray
181cb2165a Use a function instead of a non-portable, GCC-specific asm() entry. 2002-09-21 19:03:42 +00:00
Mark Murray
e40ab3e98e A good dose of style.9. No functional change. 2002-09-21 19:02:17 +00:00
Robert Watson
164634351b Remove mac_biba_high_single() check for interface renaming: we now
use the notion that a subject range of (low-high) connotes Biba
privilege rather than a single of high.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-21 19:01:44 +00:00
Mark Murray
38a4de7905 Code tidy-up. ISOfy, turn a macro into an inline for lint(1) (perhaps
this needs to go to cpufunc.h?), de-register.
2002-09-21 18:53:58 +00:00
Mark Murray
bebe1b92bd Use a function instead of embedding non-portable asm() constructs
in C code.
2002-09-21 18:51:19 +00:00
Mark Murray
39ae7d0dc4 Sort includes. 2002-09-21 18:30:12 +00:00
Robert Watson
728fbeea52 As INVARIANTS isn't supported for code that loads only as a kernel
module and is not linked into the base system, two KASSERT's rotted.
Fix them by fixing variable names.  It would be really nice if
opt_global.h was used when building modules as part of a buildkernel.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-21 18:29:37 +00:00
Mark Murray
d7ee442578 Provide in inline function for the (GNUC) assembler "hlt" instruction. 2002-09-21 18:26:53 +00:00
Mark Murray
c7c7312f2c Wrap GCC-specific asm() code in #ifdef __GNUC__ 2002-09-21 18:19:51 +00:00
Maxime Henrion
f30120c393 Don't include opt_bus.h here, it breaks stuff trying to
include machine/bus.h.

Reviewed by:	tmm
2002-09-21 18:12:00 +00:00
Mark Murray
bda9921d3f Constify to kill some warnings. 2002-09-21 17:29:36 +00:00
Mark Murray
963b82c64c Everywhere else, an argument passed to a device containing flags
is called "flags". Make it so here.
2002-09-21 17:28:17 +00:00
Hidetoshi Shimokawa
bddcb995cd Firewire can be built on other than i386 after sbp.c fix.
Tested on: Alpha (beast.freebsd.org)
2002-09-21 15:22:09 +00:00
Hidetoshi Shimokawa
ba68cdd304 don't include bus_dma.h which doesn't need. 2002-09-21 15:05:22 +00:00
Hidetoshi Shimokawa
b24db4ddd9 remove unused code. 2002-09-21 14:48:07 +00:00
Poul-Henning Kamp
668b05c376 Remove empty #if*/#endif clauses. 2002-09-21 08:44:51 +00:00
Poul-Henning Kamp
e48fb743d8 Remove #ifdef/#endif 3 years after the stuff they protected was removed.
Spotted by:	peter.
2002-09-21 08:00:01 +00:00
Poul-Henning Kamp
bc8c3c3e37 Fix a 3 year old oversight: Remove the #ifdef/#endif pair now that there
is nothing between them anymore.

Spotted by:	peter.
2002-09-21 07:59:06 +00:00
Alan Cox
8aadcc5368 Reduce namespace pollution.
Submitted by:	bde
2002-09-21 07:51:44 +00:00
Garrett Wollman
a790f5b889 Claim to be 1003.1-2001. We're not quite, yet, but that's a more useful
target than any pre-C99 POSIX (which we could never have conformed to
under our ia32 ABI).

Document why HOST_NAME_MAX (and hopefully other similar constants in the
future) is not defined.

Define in <sys/unistd.h> all 1003.1-2001 option and option group constants
which did not meet the standard for inclusion in <unistd.h>.  Delete from
<sys/unistd.h> all sysconf(3) constants and those option constants which
were moved to <unistd.h>.  pathconf(3) keys remain here as pathconf() is
implemented directly as a system call.  Add a comment noting brokenness
in some .1e additions here.  Fix whitespace in definition of constants for
rfork().

(5 of 5)
2002-09-21 02:19:03 +00:00
Robert Watson
0c7fb5347c Insert a missing call to MAC protection check for delivering an
mbuf to a bpf device.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
Submitted by:	phk
2002-09-21 00:59:56 +00:00
Peter Grehan
601385b7ca Add missing semicolon 2002-09-20 23:26:07 +00:00
Poul-Henning Kamp
66cdbc28d0 Assert my copyright on this file (using the default 2-clause BSD).
The vast majority of the contents is from my keyboard and no
significant pieces remain of the former copyright holders code.
2002-09-20 22:26:27 +00:00
Poul-Henning Kamp
7812d86f03 (This commit touches about 15 disk device drivers in a very consistent
and predictable way, and I apologize if I have gotten it wrong anywhere,
getting prior review on a patch like this is not feasible, considering
the number of people involved and hardware availability etc.)

If struct disklabel is the messenger: kill the messenger.

Inside struct disk we had a struct disklabel which disk drivers used to
communicate certain metrics to the disklayer above (GEOM or the disk
mini-layer).  This commit changes this communication to use four
explicit fields instead.

Amongst the benefits is that the fields do not get overwritten by
wrong or bogus on-disk disklabels.

Once that is clear, <sys/disk.h> which is included in the drivers
no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in,
the few places that needs them, have gotten explicit #includes for
them.

The disklabel inside struct disk is now only for internal use in
the disk mini-layer, so instead of embedding it, we malloc it as
we need it.

This concludes (modulus any mistakes) the series of disklabel related
commits.

I belive it all amounts to a NOP for all the rest of you :-)

Sponsored by:   DARPA & NAI Labs.
2002-09-20 19:36:05 +00:00
Matthew N. Dodd
27830d1e8e Remove NVIDIA ioctl bits. They will be provided in a kernel module. 2002-09-20 19:19:58 +00:00
John Baldwin
fe4663379e Axe unused include. 2002-09-20 19:16:41 +00:00
Hajimu UMEMOTO
a62f34e3c4 mistakenly set IFF_UP by SIOCSIFPHYADDR.
Obtained from:	KAME
2002-09-20 18:21:46 +00:00
Poul-Henning Kamp
812967db72 This file does not <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 18:15:40 +00:00
Poul-Henning Kamp
c6ff03e2df Remove unused #includes: <sys/disk.h> <sys/devicestat.h> and <sys/sysctl.h>
Sponsored by:	DARPA & NAI Labs.
Approved by:	sos
2002-09-20 18:08:57 +00:00
Poul-Henning Kamp
f00e97684b We need neither <sys/diskslice.h> nor <sys/disklabel.h> here.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:59:09 +00:00
Poul-Henning Kamp
d734859c2a Put an XXX comment here to point somebody in the right direction. 2002-09-20 17:55:47 +00:00
Mike Barcroft
ef02ea6e40 Fix various style(9) bugs:
o Unusual order of #ifndef _FOO_H_, followed by license.
o Missing tabs in typedef.
o Missing tabs in struct between types and member names.
o Unaligned, unordered function prototypes.
o Reversed comment for #endif.
2002-09-20 17:54:34 +00:00
Poul-Henning Kamp
6fb3d70418 For reasons now lost in historical fog, the bounds_check_with_label()
function were put in i386/i386/machdep.c from where it has been
cut and pasted to other architectures with only minor corruption.

Disklabel is really a MI format in many ways, at least it certainly
is when you operate on struct disklabel.

Put bounds_check_with_label() back in subr_disklabel.c where it belongs.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 17:51:00 +00:00
Poul-Henning Kamp
2e45c1b191 We don't need the <sys/disklabel.h> include for alpha anymore.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:45:44 +00:00
Poul-Henning Kamp
301147cd6a #include <sys/disk.h> to get disk_err() prototype.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:40:49 +00:00
Poul-Henning Kamp
29c02e22c3 Reduce <sys/disklabel.h> poisoning a bit.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:14:48 +00:00
Poul-Henning Kamp
af820f158f Remove unneeded #include <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:00:24 +00:00
Poul-Henning Kamp
6d8e16f322 Include <sys/ioccom.h> directly, rather than indirectly through
<sys/disklabel.h>

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:59:14 +00:00
Poul-Henning Kamp
aa5330bbb4 Remove even more Copy&Pasted sets of #includes. 2002-09-20 16:53:19 +00:00
Poul-Henning Kamp
dbd2c365c9 Remove unused #includes. Looks amacingly like the exact same set
as I just removed from ncr53c500_pccard.c.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:51:09 +00:00
Poul-Henning Kamp
90bf37e5e9 Remove #include of <sys/disklabel.h> (and a few other unused #includes I
noticed while here).

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:49:36 +00:00
Poul-Henning Kamp
cf09d67418 We don't need to #include <sys/disklabel.h>.
We don't need to #include <sys/disklabel.h> second time either.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:42:33 +00:00
Poul-Henning Kamp
2fb81ca352 Remove needless <sys/disklabel.h> and <sys/diskslice.h> #includes.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:37:15 +00:00
Poul-Henning Kamp
78bc4b68cc Don't call dkunit() to find our unit number, it is in our softc.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:26:12 +00:00
Poul-Henning Kamp
34e63814be Don't use dkunit() to find out unit, we already have our softc pointer
where we can find it.

Don't call dkpart() just to print the result, it is constant.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:25:16 +00:00
Martin Blapp
351267c186 Fix the support for the AN985/983 chips, which do not set the
RXSTATE to STOPPED, but to WAIT. This should fix hangs which
could only be solved by replugging the cable.

Submitted by:	jhb
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:18:13 +00:00
Martin Blapp
7e346229db Enable the automatic TX underrun recovery for the ADMtek chips.
This solves cvsup update on my laptop which aborts after a while
without this patch.

PR:		34236
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:16:06 +00:00
Poul-Henning Kamp
2382fb0a84 Make FreeBSD "struct disklabel" agnostic, step 312 of 723:
Rename bioqdisksort() to bioq_disksort().
Keep a #define around to avoid changing all diskdrivers right now.

Move it from subr_disklabel.c to subr_disk.c.
Move prototype from <sys/disklabel.h> to <sys/bio.h>

Sponsored by:   DARPA and NAI Labs.
2002-09-20 14:14:37 +00:00
John Baldwin
fc028b4e24 fork_trampoline() marks a trap frame.
Submitted by:	bde
2002-09-20 13:58:21 +00:00
John Baldwin
6beff25eed Use proper type for a variable used as a DDB symbol. 2002-09-20 13:56:11 +00:00
John Baldwin
f4684dbc23 Trim includes.
Submitted by:	bde
2002-09-20 13:54:45 +00:00
John Baldwin
9c89a3d5b5 Various style fixes, including moving db_print_backtrace() out of the
middle of the watchpoint code.

Submitted by:	bde
2002-09-20 13:53:33 +00:00
Poul-Henning Kamp
f90c382c0c Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.

Drop the by now entirely useless struct disklabel argument.

Add a flag argument for new-line termination.

Fix a couple of printf-format-casts to %j instead of %l.

Correctly print the name of all bio commands.

Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.

Use the new disk_err() throughout, #include <sys/disk.h> as needed.

Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.

Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 12:52:03 +00:00
Poul-Henning Kamp
837c5e5c2b Remove unused variable. 2002-09-20 09:33:30 +00:00
Poul-Henning Kamp
46714777f5 Retire now unused DIOCGDVIRGIN kludge.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 09:31:14 +00:00
Warner Losh
fe7d45f8f8 Current uses struct thread *td rather than struct proc *p. 2002-09-20 04:30:00 +00:00
John Baldwin
c0193e5382 Fix last commit so that it actually works:
- Get test for valid trace request contents right.
- You don't use 'stq' to move a value from one register to another,
  use 'mov' to read sp.  Also, can't use nice names for registers
  in in-line asm in gcc.
- pc is not a publically accessible register, instead, create a label
  in the asm code and use 'lda' to load the address of that label into
  the pc field of the trace request.
- Use correction function name for db_print_backtrace().
2002-09-19 20:40:26 +00:00
John Baldwin
118ee2b4d5 Use correct function name in previous commit.
Submitted by:	jake
Pointy hat to:	jhb
2002-09-19 19:51:56 +00:00
Matthew N. Dodd
c5afa58784 Pass flags to msync() accounting for differences in the definition of
MS_SYNC on FreeBSD and Linux.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 19:02:54 +00:00
Matthew N. Dodd
21ed01faf3 This patch extends the FreeBSD Linux compatibility layer to support
NVIDIA API calls; more specifically, it adds an ioctl() handler for
the range of possible NVIDIA ioctl numbers.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 18:56:55 +00:00
Maxime Henrion
e2587e98e5 Switch to using strlcpy() in several places. It seems there
were cases where we could get unterminated strings before.
2002-09-19 18:54:22 +00:00
Matthew N. Dodd
12f20b19da This patch enables FreeBSD i686 MTRR support on Intel Pentium
4/XEON processors, which are not currently recognized.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 18:53:49 +00:00
John Baldwin
0be15dec9a Ahem, actually add the DDB_TRACE option and finish changing DDB_UNATTENDED
to use its own header.
2002-09-19 18:52:37 +00:00
John Baldwin
e485b64b08 Add ability to dump stacktraces on kernel panics when DDB is compiled into
the kernel.  By default this is turned off since otherwise it could scroll
valuable panic messages off of the screen.  This option can be turned on
by the DDB_TRACE kernel option as well as the debug.trace_on_panic sysctl.

Also, fix the DDB_UNATTENDED option to use its own header instead of
abusing opt_ddb.h.  This way turning that one option on or off doesn't
force you to recompile all of ddb.

Requested by:	many (1), bde (2*)

* - I know bde prefers !abusing option headers in general but can't
    remember if he as brought up this specific case.
2002-09-19 18:49:46 +00:00
John Baldwin
c79408a059 Implement db_print_backtrace() if DDB is compiled into the kernel. This
MD function is just a wrapper around db_stack_trace_cmd() that prints out
a backtrace of curthread.  Currently, this function is only implemented
on i386 and alpha (and the alpha version isn't quite tested yet, will do
that in a bit).  Other changes:

- For i386, fix a bug in the raw frame address case.  The eip we extract
  from the passed in frame address does not match the frame we received.
  Thus, instead of printing a bogus frame with the wrong eip, go ahead
  and advance frame down to the same frame as the eip we are using.
- For alpha, attempt to add a way of doing a raw trace for alpha.  Instead
  of passing a frame address in 'addr', pass in a pointer to a structure
  containing PC and KSP and use those to start the backtrace.  The alpha
  db_print_backtrace() uses asm to read in the current PC and KSP values
  into such a request.

Tested on:	i386
Requested by:	many
2002-09-19 18:46:29 +00:00
Matthew N. Dodd
37ee08bcab From Christian Zander:
This patch addresses a bug that can cause a GPF in the kernel - if a
process makes use of i386_set_ldt to install a LDT entry, then loads
a corresponding segment descriptor into %gs, forks, and if the child
execs.

In this scenario, setregs executes user_ldt_free and then determines
how to reset the %gs register:

    /* reset %gs as well */
    if (pcb == curpcb)
        load_gs(_udatasel);
    else
        pcb->pcb_gs = _udatasel;

This is insufficient in the fork/exec case, since pcb will be equal
to curpcb when the child execs; load_gs will reset %gs to _udatasel
but it doesn't reset pcb->pcb_gs; upon return from the system call,
cpu_switch_load_gs will thus attempt to restore %gs from pcb->pcb_gs
and trigger a GPF since all LDT entries have already been cleared.

The fix is to always reset pcb->pcb_gs to _udatasel.

Submitted by:	Christian Zander <zander@minion.de>
Reviewed by:	jake
2002-09-19 18:46:25 +00:00
Yoshihiro Takahashi
5438009281 MFi386: Remove a.out support. 2002-09-19 13:47:18 +00:00
Yoshihiro Takahashi
209238dc3c Remove -elf option. 2002-09-19 13:43:02 +00:00
Yoshihiro Takahashi
ef46d97a45 MFi386: revisions 1.534 and 1.535. 2002-09-19 13:42:11 +00:00
Don Lewis
fa288043e2 VOP_FSYNC() requires that it's vnode argument be locked, which nfs_link()
wasn't doing.  Rather than just lock and unlock the vnode around the call
to VOP_FSYNC(), implement rwatson's suggestion to lock the file vnode
in kern_link() before calling VOP_LINK(), since the other filesystems
also locked the file vnode right away in their link methods.  Remove the
locking and and unlocking from the leaf filesystem link methods.

Reviewed by:	rwatson, bde  (except for the unionfs_link() changes)
2002-09-19 13:32:45 +00:00
Peter Grehan
26eed6e9a2 Updated to somewhat match sparc64/conf/GENERIC
Approved by: benno
2002-09-19 11:20:13 +00:00
Julian Elischer
4a3276d4a4 While well intentionned the check to see it there is a packet
header and return that length, was misguided.

The check itself didn't take into account the fact that the
mbuf pointer pased in may be null, and the function is
defined specifically for cases where the caller knows what it wants.
Rather than fix the check I'm removing it as phk suggested.

Submitted by:	 phk@freebsd.org
2002-09-19 08:28:41 +00:00
Jeff Roberson
f461cf2297 - Use my freebsd email alias in the copyright.
- Remove redundant instances of my email alias in the file summary.
2002-09-19 06:05:32 +00:00
Peter Grehan
e1f89baeaa - added macio and psim files
- removed unused extintr.c

Approved by: benno
2002-09-19 05:11:15 +00:00
Peter Grehan
5f705a14b9 psim device support
Approved by: benno
2002-09-19 05:09:27 +00:00
Peter Grehan
8860e8c607 Support files and a h/w tree description for the PSIM ppc simulator
Approved by: benno
2002-09-19 04:57:10 +00:00
Peter Grehan
11b370b1bb Driver for the macio south bridge, and ATA cell contained within.
Approved by: benno
2002-09-19 04:52:07 +00:00
Peter Grehan
51478d84b7 softc and register defs for the UniNorth chip
Approved by: benno
2002-09-19 04:50:30 +00:00
Peter Grehan
d48bbef30d - probe the UniNorth chip in addition to the PCI bridges
- enable GEM ethernet cell if present
 - allow sparse address mapping for devices

Approved by: benno
2002-09-19 04:49:58 +00:00
Peter Grehan
d889f46119 Removed osigframe. No need for COMPAT_43 signal bin-compat in PPC.
Approved by: benno
2002-09-19 04:46:36 +00:00
Peter Grehan
c94c0cf8de psim device support
Approved by: benno
2002-09-19 04:45:58 +00:00
Peter Grehan
a379a1422d <machine/types.> -> <sys/types.h>
Approved by: benno
2002-09-19 04:45:32 +00:00
Peter Grehan
50122aa981 Fix clearing of recoverable exception MSR bit when disabling
interrupts

Approved by: benno
2002-09-19 04:45:06 +00:00
Peter Grehan
663a6cc057 Additional machdep sysctl constants needed for userland utils
Approved by: benno
2002-09-19 04:44:35 +00:00
Peter Grehan
6dfada4cca Added sparse address support, required by the macio ATA device
Approved by: benno
2002-09-19 04:44:04 +00:00
Peter Grehan
6e1073f023 Fixed branch labels
Approved by: benno
2002-09-19 04:39:59 +00:00
Peter Grehan
4eae112d86 - bring vm_mapbuf/unmapbuf in line with other archs
- update for recent KSE changes

Approved by: benno
2002-09-19 04:39:28 +00:00
Peter Grehan
07f8023285 - make sure recoverable interrupts are re-enabled in the trap handler
- turn on ast() loop to enable signal delivery

Approved by: benno
2002-09-19 04:39:04 +00:00
Peter Grehan
44b14a299f - worked around 32-bit big-endian syscall return value problem
- syscall register spills weren't copied in correctly
 - removed VM_PROT_READ from the fault type on write protect faults

Approved by: benno
2002-09-19 04:38:35 +00:00
Peter Grehan
f57e8a452b Add sync before isync for G4 cpus
Obtained from: NetBSD
Approved by: benno
2002-09-19 04:37:39 +00:00
Peter Grehan
89eccf4647 - use symbol for user-context offset
- fix szsigcode size declaration

Approved by: benno
2002-09-19 04:36:44 +00:00
Peter Grehan
32bc78460d - use BAT registers to map device space and physical memory
- remove test in pmap_activate that prevented vmspace sharing (v/rfork)
 - always sync icache in pmap_enter until problems are sorted
 - fix incorrect use of regions in pmap_kenter
 - bring in pmap_release from NetBSD
 - fix overwrite of bootstrap flag in pmap_pvo_enter

Approved by: benno
2002-09-19 04:36:20 +00:00
Peter Grehan
6f1808faf4 - psim device support
- comment out re-enabling of interrupts until problems are sorted

Approved by: benno
2002-09-19 04:32:25 +00:00
Peter Grehan
1ce0c6b147 Clear on-demand BAT entries to properly restore OpenFirmware's
address space

Approved by: benno
2002-09-19 04:31:39 +00:00
Peter Grehan
d6ce71e50a psim device support
Approved by: benno
2002-09-19 04:31:04 +00:00
Peter Grehan
81a6d01d1c - implemented sendsig/sigreturn
- sysctl for cacheline size, required by libc/rtld
 - init'd more exception vectors
 - fixed problem with register overwrite in exec_setregs
 - removed redundant NetBSD code

Approved by: benno
2002-09-19 04:30:43 +00:00
Peter Grehan
3f3331903d - moved intrcnt/intrnames to locore.s to fix sysctl -a panic
Approved by: benno
2002-09-19 04:29:59 +00:00
Peter Grehan
ae3ad2c6c0 - rationalised includes
- added sigframe offset

Approved by: benno
2002-09-19 04:29:07 +00:00
Peter Grehan
d3dce63c13 - removed unnecessary includes
- converted inline asm to C for int enable
 - shifted clearing of 'cold' to end of routine

Approved by: benno
2002-09-19 04:28:45 +00:00
Peter Wemm
ea5d4bd842 Repo copied to <sys/smbus/smb.h> 2002-09-19 04:13:43 +00:00
Peter Wemm
37e255de3f Repo copied to <sys/iicbus/iic.h> 2002-09-19 04:13:29 +00:00
David E. O'Brien
47a561263d intmax_t is printed with %jd, not %lld. 2002-09-19 03:55:30 +00:00
Peter Wemm
78ff825835 simos.c needs a to be updated from the old pci shims. Yell loudly but
stop breaking alpha LINT.
2002-09-19 03:40:17 +00:00
Peter Wemm
a72f2b1a91 Add Yet Another Duplicate of the font.h and ukbdmap.h rules. Remove
the font8x16.o glue, since that appears to have died ages ago and has
no remaining references.
2002-09-19 03:36:25 +00:00
Peter Wemm
531facba39 move <machine/iic.h> and <machine/smb.h> to <dev/iicbus/iic.h> and
<dev/smbus/smb.h> - there is nothing MD about these ioctl definitions.
2002-09-19 03:25:46 +00:00
Julian Elischer
4a49235b89 fix style.. Return in the kernel always has () around the arguments. 2002-09-19 03:18:44 +00:00
Julian Elischer
1494277d50 Compiler was correct:
m WAS being used uninitialized..
2002-09-19 03:15:39 +00:00
Peter Wemm
db2cfa1f86 move wl (isa wavelan card, not "wi") to i386-only 2002-09-19 03:10:23 +00:00
Peter Wemm
6938800ee2 move "profile 2" to i386 2002-09-19 03:04:07 +00:00
Peter Wemm
b80ad83e76 move ncv, nsp, stg to i386-only section (there is no pc98-specific version) 2002-09-19 03:02:42 +00:00
Peter Wemm
2b412989fe Move dgb to the i386 section 2002-09-19 02:58:41 +00:00
Darren Reed
e62497713c If M_PKTHDR is set then we don't need to do a loop to find the total length. 2002-09-19 01:21:24 +00:00
Alfred Perlstein
3ffb9fadc8 Regen for added syscalls. 2002-09-19 00:48:57 +00:00
Alfred Perlstein
6d5dec35b7 Add the rest of the kernel support for the sem_ API in kern/uipc_sem.c.
Option 'P1003_1B_SEMAPHORES' to compile them in, or load the "sem" module
to activate them.

Have kern/makesyscalls.sh emit an include for sys/_semaphore.h into sysproto.h
to pull in the typedef for semid_t.

Add the syscalls to the syscall table as module stubs.
2002-09-19 00:43:32 +00:00
Alfred Perlstein
efaa658806 Bring in my implementation of kernel support for posix realtime semaphores
that are shareable between processes.

There will be a cleanup shortly along with the necessary changes made to
libc, libc_r, libpthread as well as the hooks into sys/conf and sys/modules.
2002-09-18 22:47:42 +00:00
Robert Watson
cc51a2b55e Remove un-needed stack variable 'ops'.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-18 22:35:02 +00:00
Bosko Milekic
bd395ae8f6 style nit: unsigned -> u_int in the kernel, particularly to
stay consistent in this file, and keep m_length() and m_fixhdr()
consistent with their prototypes in mbuf.h

Inspired by: bde
2002-09-18 22:33:52 +00:00
Bosko Milekic
589b704f4e more style fixes: 'unsigned' should be 'u_int' in this file.
Submitted by: bde
2002-09-18 22:29:33 +00:00
Doug Ambrisko
724b7a2be2 Clarify comment to "Code borrowed from if_fxp.c" to deal with running
out of fragments.

Suggested by:	jhb
2002-09-18 21:32:48 +00:00
Nate Lawson
86ed6d45ac Remove any VOP_PRINT that redundantly prints the tag.
Move lockmgr_printinfo() into vprint() for everyone's benefit.

Suggested by: bde
2002-09-18 20:42:04 +00:00
Bosko Milekic
219c875a46 style fixes to mbuf.h
Submitted by: bde
2002-09-18 20:28:58 +00:00
Poul-Henning Kamp
2201e1b039 Optimize the way we call BPF a tiny bit: If we chop the ether-header off
ourselves, call bpf before we do so, rather than re-construct the entire
thing afterwards.

Sponsored:	http://www.babeltech.dk/
2002-09-18 19:50:48 +00:00
Poul-Henning Kamp
f0e2422b1b Use m_length() instead of home-rolled.
In bpf_mtap(), if the entire packet is in one mbuf, call bpf_tap()
instead since it is a tad faster.

Sponsored by:	http://www.babeltech.dk/
2002-09-18 19:48:59 +00:00
Poul-Henning Kamp
7ed60de837 Use m_length() instead of home-rolled versions. 2002-09-18 19:44:14 +00:00
Poul-Henning Kamp
a5554bf05b Use m_fixhdr() rather than roll our own. 2002-09-18 19:43:01 +00:00
Poul-Henning Kamp
4e4425d486 Make m_length() and m_fixhdr() return unsigned.
Suggested by:	arr
2002-09-18 19:42:06 +00:00
Poul-Henning Kamp
ac6e585d24 Introduce the m_length() function which will return the accumulated
length of an mbuf-chain and optionally a pointer to the last mbuf.
2002-09-18 14:57:35 +00:00
Poul-Henning Kamp
9f86067a9c Add missing #include <sys/mbuf.h> 2002-09-18 14:21:52 +00:00
Poul-Henning Kamp
3f2e06c5e1 Move m_fixhdr() from "mbchain" to "mbuf" where it belongs. 2002-09-18 13:41:37 +00:00
Boris Popov
44f3878ecb Always open file in the DENYNONE mode and let the server to decide what is
good for this file.
This should allow read only access to file which is already opened on server.
2002-09-18 09:54:16 +00:00
Søren Schmidt
cea0b8e060 Add support for the VIA 8235.
Submitted by: Jason Dambrosio <jason@wiz.cx>
2002-09-18 09:39:37 +00:00
Boris Popov
3c2f5c3cc8 Implement additional SMB calls to allow proper update of file size as some
file servers fail to do it in the right way.

New NFLUSHWIRE flag marks pending flush request(s).

NB: not all cases covered by this commit.

Obtained from:	Darwin
2002-09-18 09:27:04 +00:00
Jeff Roberson
99571dc345 - Split UMA_ZFLAG_OFFPAGE into UMA_ZFLAG_OFFPAGE and UMA_ZFLAG_HASH.
- Remove all instances of the mallochash.
 - Stash the slab pointer in the vm page's object pointer when allocating from
   the kmem_obj.
 - Use the overloaded object pointer to find slabs for malloced memory.
2002-09-18 08:26:30 +00:00
Boris Popov
994ad1809e Permit an empty username which is useful for browsing. 2002-09-18 07:43:21 +00:00
Boris Popov
3c30400408 Increase send/receive queue to accomodate large readx/writex requests.
Receive packets in a small pieces (NB_SORECEIVE_CHUNK), so TCP slowstart will
get its ACKs faster.

Obtained from:	Darwin
2002-09-18 07:38:10 +00:00
Mitsuru IWASAKI
076ef4620b Restore status register A of RTC at resume time.
This should fix the 'too many RTC interrupts and statclock seems
broken after resume' problem.

MFC after:	1 week
2002-09-18 07:34:04 +00:00
Mike Barcroft
86954511d2 Implement C99's va_copy() macro. 2002-09-18 07:33:16 +00:00
Mike Barcroft
f4a1f909c6 Move definition of nl_item type to <sys/_types.h>, so that it can be
shared.
2002-09-18 05:51:23 +00:00
Robert Watson
ca7850c313 Add a toggle to disable VM enforcement.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-09-18 02:02:08 +00:00
Robert Watson
b88c98f6b1 At the cost of seeming a little gauche, make use of more traditional
alphabetization for mac_enforce_pipe sysctl.

Obtained from:	TrustedBSD Project
Sponsored by:	DAPRA, NAI Labs
2002-09-18 02:00:19 +00:00
Robert Watson
289c6dea76 Don't call VOP_LEASE() while holding the accounting mutex. 2002-09-18 01:56:13 +00:00
Mike Barcroft
83fe67e385 o Add typedefs for mode_t, off_t, pid_t rather than including
<sys/types.h>.
o Use the relatively new visibility primitives for conditionals.
o Make O_SYNC an alias for O_FSYNC.
o Mark the F* names as deprecated.
o Add some comments to note missing POSIX requirements or options.
2002-09-17 22:22:50 +00:00
Matthew Dillon
fa55172bc0 Guido reported an interesting bug where an FTP connection between a
Windows 2000 box and a FreeBSD box could stall.  The problem turned out
to be a timestamp reply bug in the W2K TCP stack.  FreeBSD sends a
timestamp with the SYN, W2K returns a timestamp of 0 in the SYN+ACK
causing FreeBSD to calculate an insane SRTT and RTT, resulting in
a maximal retransmit timeout (60 seconds).  If there is any packet
loss on the connection for the first six or so packets the retransmit
case may be hit (the window will still be too small for fast-retransmit),
causing a 60+ second pause.  The W2K box gives up and closes the
connection.

This commit works around the W2K bug.

15:04:59.374588 FREEBSD.20 > W2K.1036: S 1420807004:1420807004(0) win 65535 <mss 1460,nop,wscale 2,nop,nop,timestamp 188297344 0> (DF) [tos 0x8]
15:04:59.377558 W2K.1036 > FREEBSD.20: S 4134611565:4134611565(0) ack 1420807005 win 17520 <mss 1460,nop,wscale 0,nop,nop,timestamp 0 0> (DF)

Bug reported by: Guido van Rooij <guido@gvr.org>
2002-09-17 22:21:37 +00:00
Jake Burkholder
9cf08dec12 Fix standard kse breakge of non-x86 platforms. sigh.
Pointy hat to:	kse
2002-09-17 16:21:48 +00:00
Hajimu UMEMOTO
f26b2d5bf2 - increment interface output counter. sync w/ netbsd-current
- increase if_oerrors.  sync w/netbsd

Obtained from:	KAME
2002-09-17 14:25:19 +00:00
Katsushi Kobayashi
a9c9b6989c Firewire device support for Apple eMac with PPC kernel.
Contributed by Peter Grehan <grehan@freebsd.org>
2002-09-17 12:50:43 +00:00
Poul-Henning Kamp
1e77ed827e Add /dev/soekris-errled device to control the Error-LED on Soekris cards/boxes.
# turn LED off
    echo '0' > /dev/soekris-errled

    # turn LED on
    echo '1' > /dev/soekris-errled

    # flash LED (5 hz)
    echo 'f' > /dev/soekris-errled

    # flash LED (4/2 = 2 hz), syntax: "f[1-9]" -> .5 -> 4.5 Hz
    echo 'f4' > /dev/soekris-errled

    # flash digits 1,3 and 7, syntax: "d[1-9]*"
    echo 'd137' > /dev/soekris-errled

Characters not understood are ignored.
2002-09-17 11:47:38 +00:00
Maxim Sobolev
563a9b6ecb Remove __RCSID().
Submitted by:	bde
2002-09-17 11:31:41 +00:00
Maxim Konovalov
1cf4349926 Explicitly clear M_FRAG flag on a mbuf with the last fragment to unbreak
ip fragments reassembling for loopback interface.

Discussed with:	bde, jlemon
Reviewed by:	silence on -net
MFC after:	2 weeks
2002-09-17 11:20:02 +00:00
Maxim Konovalov
e079ba8d93 In rare cases when there is no room for ip options ip_insertoptions()
can fail and corrupt a header length. Initialize len and check what
ip_insertoptions() returns.

Reviewed by:	archie, silence on -net
MFC after:	5 days
2002-09-17 11:13:04 +00:00
Maxim Sobolev
3ac0ac9ea8 Don't reference cpu_fxsr unless CPU_ENABLE_SSE is defined. This fixes kernel
in !CPU_ENABLE_SSE case.
2002-09-17 11:12:10 +00:00
Hajimu UMEMOTO
ce9d7b2f1a - reject SIOCSIFADDR if embedded address is in private address range
- reject packets from private address range.  from hitachi

Obtained from:	KAME
2002-09-17 10:45:51 +00:00
Peter Wemm
d223099401 Make netatm/spans compile in the kernel without depending on userland
include files to provide functions for kernel source (spans_kxdr.c)
2002-09-17 08:57:52 +00:00
Peter Wemm
2480d1854f Add stub function for cpu_set_upcall_kse() 2002-09-17 07:49:40 +00:00
Peter Wemm
28487340f2 #if 0 out the following functions:
cpu_export_context()
  cpu_set_args()
  cpu_free_kse_mdstorage()
  cpu_export_context()
2002-09-17 07:47:10 +00:00
Peter Wemm
b069d4207c Make this compile after the last kse commit. 2002-09-17 07:44:28 +00:00
Peter Wemm
acaa156683 Argh. I've been reading makefiles for too long. Change comment to a
C-style comment.
2002-09-17 07:41:30 +00:00
Peter Wemm
1e19df3303 Stub out the calls to get_mcontext and set_mcontext which only exist on
i386.  This stuff should not be prototyped in MD inludes if the interface
is expected to be MI.
2002-09-17 07:40:15 +00:00
Peter Wemm
1822cdcafe It seems I accidently committed a change that removed the userland includes
from the kernel build.  This broke linux_genassym on the alpha.  For the
kernel, the correct place to get offsetof() is not in /usr/include/stddef.h
but rather <sys/types.h>
2002-09-17 07:22:23 +00:00
Mike Barcroft
117f87fe9f Include <sys/types.h> directly rather than depending on <sys/fcntl.h>
to include it.  This could be avoided by adding the necessary typedefs
here, or by making users of <sys/file.h> include <sys/types.h> first.
2002-09-17 05:14:09 +00:00
Mike Barcroft
f0771a984f pid_t will be shared with at least <fcntl.h>. 2002-09-17 05:05:14 +00:00
Jennifer Yang
4a03a8a8c7 Tempary fix for inet6. The final fix is to change in6_pcbnotify to take pcbinfo instead
of pcbhead. It is on the way.
2002-09-17 03:19:43 +00:00
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Jonathan Mini
a3ad85e51b Add kernel support needed for the KSE-aware libpthread:
- Use ucontext_t's to store KSE thread state.
	- Synthesize state for the UTS upon each upcall, rather than
	  saving and copying a trapframe.
	- Save and restore FPU state properly in ucontext_t's.
	- Deliver signals to KSE-aware processes via upcall.
	- Rename kse mailbox structure fields to be more BSD-like.
	- Store the UTS's stack in struct proc in a stack_t.

Reviewed by:	bde, deischen, julian
Approved by:	-arch
2002-09-16 19:28:01 +00:00
Jonathan Mini
c76e33b681 Add kernel support needed for the KSE-aware libpthread:
- Use ucontext_t's to store KSE thread state.
	- Synthesize state for the UTS upon each upcall, rather than
	  saving and copying a trapframe.
	- Deliver signals to KSE-aware processes via upcall.
	- Rename kse mailbox structure fields to be more BSD-like.
	- Store the UTS's stack in struct proc in a stack_t.

Reviewed by:	bde, deischen, julian
Approved by:	-arch
2002-09-16 19:26:48 +00:00
Jonathan Mini
30abe507c0 Add kernel support needed for the KSE-aware libpthread:
- Maintain fpu state across signals.
	- Save and restore FPU state properly in ucontext_t's.

Reviewed by:	bde, deischen, julian
Approved by:	-arch
2002-09-16 19:25:59 +00:00
Jonathan Mini
9ba1547929 Add kernel support needed for the KSE-aware libpthread:
- Maintain fpu state across signals.
	- Save and restore FPU state properly in ucontext_t's.

Reviewed by:	deischen, julian
Approved by:	-arch
2002-09-16 19:25:41 +00:00
Jonathan Mini
575525a000 Add kernel support needed for the KSE-aware libpthread:
- Maintain fpu state across signals.
	- Use ucontext_t's to store KSE thread state.
	- Synthesize state for the UTS upon each upcall, rather than
	  saving and copying a trapframe.
	- Save and restore FPU state properly in ucontext_t's.

Reviewed by:	deischen, julian
Approved by:	-arch
2002-09-16 19:25:08 +00:00
Poul-Henning Kamp
7b08810243 Add a cast to make this file compile in userland on sparc64 without
warnings.
2002-09-16 18:45:18 +00:00
Boris Popov
209ec6ada5 Reserve a transport parameter name and number for Darwin.
Obtained from:	Darwin
MFC after:	2 weeks
2002-09-16 10:57:13 +00:00
Boris Popov
70f9b9d94f Implement support for mixed case passwords.
Obtained from:	Darwin
MFC after:	2 weeks
2002-09-16 10:50:38 +00:00
Boris Popov
e2a70cff10 Add support for large readx and writex functions if server supports them.
Obtained from:	Darwin
MFC after:	2 weeks
2002-09-16 10:18:34 +00:00
Bruce Evans
127686220a Include include "opt_atalk.h" so that the NETATALK support can work.
Removed unused includes.

Removed used includes of <sys/queue.h> and <sys/time.h>, since these are
standard pollution (especially the latter).

Reviewed by:	sobomax
2002-09-16 10:10:18 +00:00
Boris Popov
ab93c874b4 Enable browsing of NetApp servers (use ascii mode).
Obtained from:	Darwin (PR-3002667)
MFC after:	2 weeks
2002-09-16 09:51:58 +00:00
Søren Schmidt
568f03ed88 Fix the clockprobe test on the Sil 680 2002-09-16 09:37:26 +00:00
Boris Popov
8341a67def Add more constants for future use in kernel and userland.
Obtained from:	Darwin
2002-09-16 09:26:07 +00:00
Yoshihiro Takahashi
3729f1a5a4 Don't build unneeded modules for pc98. 2002-09-16 08:32:48 +00:00
Yoshihiro Takahashi
5d52e42381 Merged from sys/isa/fd.c revisions 1.234, 1.235 and 1.236. 2002-09-16 07:39:47 +00:00
Yoshihiro Takahashi
d145f81713 MFi386: revision 1.178. 2002-09-16 07:19:43 +00:00
Yoshihiro Takahashi
63d2c90b87 MFi386: revisions 1.417 and 1.418. 2002-09-16 07:17:43 +00:00
Yoshihiro Takahashi
14955691c1 Merged from sys/dev/sio/sio.c revision 1.378. 2002-09-16 07:14:02 +00:00
Yoshihiro Takahashi
49e387d30b Merged from sys/isa/syscons_isa.c revision 1.18. 2002-09-16 07:11:43 +00:00
Peter Grehan
5268fdfbec geom_aes.c requires rijndael crypto
Approved by: phk, benno
2002-09-16 04:13:48 +00:00
Garrett Wollman
fdfc048b89 Reformat an overly-wide comment. 2002-09-16 03:22:06 +00:00
Thomas Moestl
dde1c2c0d6 fcntl(..., F_SETLKW, ...) takes a pointer to a struct flock just like
F_SETLK does, so it also needs this structure copied in in fnctl() before
calling kern_fcntl().
2002-09-16 01:05:15 +00:00
Julian Elischer
4f0db5e08c Allocate KSEs and KSEGRPs separatly and remove them from the proc structure.
next step is to allow > 1 to be allocated per process. This would give
multi-processor threads. (when the rest of the infrastructure is
in place)

While doing this I noticed libkvm and sys/kern/kern_proc.c:fill_kinfo_proc
are diverging more than they should.. corrective action needed soon.
2002-09-15 23:52:25 +00:00
Josef Karthauser
56c4ff5427 Deprecate the USB_SETDEBUG IOCTL as debug levels can now be set
using sysctl.
2002-09-15 22:35:58 +00:00
Bruce Evans
1d47f58a3d Garbage-collected __ELF__ ifdefs.
Fixed some style bugs (mainly unused includes).
2002-09-15 22:28:39 +00:00
Bruce Evans
2ac73c2ce3 Don't use the ELF symbol type to summarily reject symbols in
X_db_search_symbol().  Otherwise we don't see important symbols in
non-verbosely written assembler code.

NetBSD already has this.  The kld version already has a stronger form
of it without really trying -- linker_ddb_search_symbol() doesn't
support ddb's symbol search strategy parameter, so the kld
X_db_search_symbol() doesn't pass the parameter to linker_ddb...() and
linker_ddb...() doesn't make distinctions based on the symbol type.

db_elf.c now works better than db_kld.c when it works (which is essentially
when there are no modules except the kernel).  It works after booting
with -d.  db_kld.c doesn't work until lots of SYSINIT()s have run.
2002-09-15 22:17:40 +00:00
Bruce Evans
abd368f09a Made this work on i386's at least. It wants ELF section headers for
symbol table sections.  Reconstruct the necessary section headers from
(ksym_start, ksym_end).  This was much easier than converting to use
module metadata, and just works for static symbols, unlike db_kld when
there is no module metadata.  Initialize (ksym_start, ksym_end) from
bootinfo on i386's only.

The boot loader should load section headers for all sections that it
loads, and apparently did this for at least the symbol table sections
when this file last worked under FreeBSD (on alphas only) and always
did this under NetBSD (where this file was obtained from).  At least
on i386's, boot2 discards the section headers (except for converting
them to (bootinfo.bi_symtab, bootinfo.bi_esymtab), and as far as I can
tell, loader(8) discards them apart from converting them to the bootinfo
values and module metadata.
2002-09-15 21:49:13 +00:00