Commit Graph

29480 Commits

Author SHA1 Message Date
Jake Burkholder
5e857a1806 intr_handlers is an array of function pointers, not small structures.
Assert at compile time that structures which need to be a power of 2
in size really are.
2001-12-29 07:24:57 +00:00
Jake Burkholder
22a59ab32d Add .register directive for gcc3.
Enforce in hardware the non-use of floating point in the kernel.
2001-12-29 07:22:27 +00:00
Jake Burkholder
2ba03674d0 1. Make this more name space friendly (* -> emul_*).
2. Don't whine about unaligned fixups by default.
3. Adapt to removal of mmuframe.

Submitted by:	tmm (1, 2)
2001-12-29 07:20:20 +00:00
Jake Burkholder
274ee4b819 Be paranoid about the sizeof passed to db_get_value, not all trapframe
fields are u_long.
Print useful information about traps in backtraces.
GC some dead code.
2001-12-29 07:16:45 +00:00
Jake Burkholder
f5832be731 Implement dcache_inval_phys, which shoots the cache lines that correspond
to a specific physical address.  This is used for page copy and zero
routines which use physical addresses directly.

Submitted by:	tmm
2001-12-29 07:14:07 +00:00
Alfred Perlstein
21d56e9c33 Make AIO a loadable module.
Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO
will use at_exit(9).

Add functions at_exec(9), rm_at_exec(9) which function nearly the
same as at_exec(9) and rm_at_exec(9), these functions are called
on behalf of modules at the time of execve(2) after the image
activator has run.

Use a modified version of tegge's suggestion via at_exec(9) to close
an exploitable race in AIO.

Fix SYSCALL_MODULE_HELPER such that it's archetecuterally neutral,
the problem was that one had to pass it a paramater indicating the
number of arguments which were actually the number of "int".  Fix
it by using an inline version of the AS macro against the syscall
arguments.  (AS should be available globally but we'll get to that
later.)

Add a primative system for dynamically adding kqueue ops, it's really
not as sophisticated as it should be, but I'll discuss with jlemon when
he's around.
2001-12-29 07:13:47 +00:00
Jake Burkholder
eddb1f8617 Rename definitions to better match the hardware wstate fields.
Don't include WSTATE_TRANSITION in WSTATE_NORMAL_MASK.
2001-12-29 07:12:30 +00:00
Jake Burkholder
f9a756b838 Add definitions for TSTATE_MM_* and TSTATE_{I,X}CC_*.
Implement TSTATE_SECURE in terms of PSTATE_SECURE.
2001-12-29 07:11:00 +00:00
Jake Burkholder
529110b963 Rename and renumber trap types to comply with the user trap types as
specified by the sparc abi.  We use numerically higher values for all
internal kernel types.
Remove soft trap types which need to be exposed to userland.  They will
move to utrap.h.
2001-12-29 07:09:50 +00:00
Jake Burkholder
4339fe0983 1. Certain tlb operations need to be atomic, so disable interrupts for
their duration.  This is still only effective as long as they are
   only used in the static kernel.  Code in modules may cause instruction
   faults which makes these break in different ways anyway.
2. Add a load bearing membar #Sync.
3. Add an inline for demapping an entire context.

Submitted by:	tmm (1, 2)
2001-12-29 07:07:35 +00:00
Jake Burkholder
871e39a240 jmpbuf is no longer a ucontext_t since it does not need to be passed
to sigreturn.
Add definitions for array offsets.
2001-12-29 07:03:09 +00:00
Jake Burkholder
65f152dbf9 Add fprs to struct fpreg. 2001-12-29 07:02:12 +00:00
Jake Burkholder
ecb8e79ca8 Define PSTATE_MM_MASK in terms of PSTATE_MM_SIZE.
Implement PSTATE_SECURE.
2001-12-29 07:01:34 +00:00
Jake Burkholder
df52646bb5 Remove pcb_y. It has moved to trapframe. 2001-12-29 07:00:30 +00:00
Jake Burkholder
ded2ba2017 Don't concatentate __func__.
Make page size constants explicitly long and unsigned.
Add a macro for compile time assertions.
2001-12-29 07:00:04 +00:00
Jake Burkholder
dc551940fc Make it clear that IH_SHIFT is expected to be that of a pointer.
Make intr_handlers an array of function pointers instead of
small structures.
2001-12-29 06:57:55 +00:00
Jake Burkholder
8c3d8ad946 Add definitions for magic numbers used in asm.
Bloat trapframe with many extra fields so we don't need extra structures.
Use small data types where possible.
Remove second copy of TF_DONE.
Remove mmuframe.
2001-12-29 06:56:11 +00:00
Jake Burkholder
5a99bf0775 Change fpblock to be an array of ints instead longs.
Change fp_init_thread to take a thread instead of a pcb so we
can get at the trapframe.
2001-12-29 06:53:19 +00:00
Jake Burkholder
f664fe9075 Add "memory" to the clobber list for membars.
Submitted by:	tmm
2001-12-29 06:51:50 +00:00
Jake Burkholder
7bb428295f Implement CLKF_USERMODE so that user time is accounted properly.
Submitted by:	tmm
2001-12-29 06:51:14 +00:00
Jake Burkholder
812a805e24 Add definitions for the number of bits in the icc and xcc fields
of the ccr, as well as the shifts and masks for each.

Submitted by:	tmm
2001-12-29 06:50:25 +00:00
Jake Burkholder
a20901cdfd Use ASI_P instead of ASI_N if _KERNEL isn't defined so that these
can be used in userland.

Submitted by:	tmm
2001-12-29 06:48:43 +00:00
Jake Burkholder
bfe6f90832 Add macros for dedicated register variables, for use in assmebler.
Add a PUTS macro.
2001-12-29 06:47:50 +00:00
Jake Burkholder
b22ed16c0b Add device ofw_console so this kernel is usable.
This commit brought to you by a sun ultra 10 running freebsd.
2001-12-29 05:58:07 +00:00
Dag-Erling Smørgrav
c463e1be12 Fix missing comma in previous commit.
Pointy hat to:	jhb
2001-12-28 23:51:48 +00:00
Joerg Wunsch
351fdc3fa9 Convert sppp_params() to use a malloced structure in order to reduce
kernel stack usage.

This effectively merges rev 1.3 of i4b's i4b_ispppsubr.c.

MFC after:	1 month
2001-12-28 23:36:35 +00:00
Joerg Wunsch
47d6b4a644 Fix my breakage to the low-level hardware sync drivers brought by the
inclusion of VJ compression into sppp.

Now, instead of the need to include this and that and everything plus
the kitchensink in each of those drivers, struct sppp uses struct
slcompress as an opaque structure only referenced by a pointer.  The
actual structure is then malloced at initialization time.

While i was at it, also fixed a bug where received VJ packets would only
be recognized if INET6 was defined.
2001-12-28 23:20:12 +00:00
Robert Drehmel
c9f26ad128 Avoid having the text and data sections merged into one program
header table entry by removing the -N flag from the LDFLAGS.
2001-12-28 22:12:38 +00:00
Julian Elischer
3efc30142c Fix ipfw fwd so that it acts as the docs say
when forwarding an incoming packet to another machine.

Obtained from:	Vicor Production tree
MFC after: 3 weeks
2001-12-28 21:21:57 +00:00
Bruce Evans
25bf7324c8 Fixed an apparent typo ("-" before ":") and an English error (comma
splice) in the "already exists" message.

Fixed some minor style bugs (KNFization to "return (foo)" had rotted
in 2 out of 177 cases).
2001-12-28 18:32:13 +00:00
Bruce Evans
fb717773e7 Fixed locking bugs in rev.1.346:
(1) Don't attempt aquire the non-recursive lock sio_lock recursively.
    Doing so caused unbounded recursion in some setups.  E.g., if DDB,
    BREAK_TO_DEBUGGER and WITNESS are configured; if the debugger is
    entered using a break, then WITNESS will actually detect the invalid
    recursion and will add to it attempting to print a message about it.

(2) Don't use sio_lock before it has been initialized.  The old check
    (sio_inited != 0) didn't work when sio_inited was boolean because
    sio_inited was set too early, and became just wrong when sio_inited
    was changed to a tri-state variable in rev.1.348.

Reported and fixed in another way by:	fenner (1)
2001-12-28 18:08:10 +00:00
Joerg Wunsch
5450aa1239 Implement timestamps so i4b/driver/i4b_isppp.c can derive the idle
time from the PPP packets sent.  This effectively merges rev 1.2 of
the old i4b_ispppsubr.c, with the exception that i eventually ended up
in debugging and fixing it so the idle time is now really
detected. ;-)  (The version in i4b simply doesn't work right since it
still accounts for incoming LCP echo packets which it is supposed to
ignore for idle time considerations...)

Obtained from:	i4b
MFC after:	1 month
2001-12-28 15:59:54 +00:00
Joerg Wunsch
39cb697c8c Break out the relevant fields from struct sppp into a struct
sppp_parms that are needed for the SPPPIO[GS]DEFS ioctl commands.
This allows it to keep struct sppp inside #ifdef _KERNEL (where it
belongs), and prevents userland programs that wish to include
<net/if_sppp.h> from including the earth, the hell, and the universe
before the are able to resolve all the kernel-internal stuff that's in
struct sppp.

Discussed with:	hm
MFC after:	1 month
2001-12-27 22:38:50 +00:00
Joerg Wunsch
ea77971c6c Make the LCP restart timer configurable.
This (effectively) merges rev 1.36 of i4b's old if_spppsubr.c, albeit
in a slightly different manner (we export the timer in millisecond
values as exposed to tick values from/to userland).

Obtained from:	i4b
MFC after:	1 month
2001-12-27 21:20:05 +00:00
Alfred Perlstein
58e5d6695d brace by itself after function declaration.
Mandated by: style(9)
Pointed out by: rwatson
2001-12-27 20:16:21 +00:00
Alfred Perlstein
72e7b28173 put function return types on a line by themselves as per style(9) 2001-12-27 20:12:03 +00:00
Matthew Dillon
885d36ce36 nfs_nget() does no locking whatsoever when looking up a vnode. If the
vget() sleeps we have to retry the operation to avoid racing against
a deletion.

MFC maybe: submitted to re's
2001-12-27 19:40:34 +00:00
Joerg Wunsch
1a5d6f5e0b Implement VJ header compression for sppp.
This is the logical merge of rev 1.32 of i4b's old if_spppsubr.c (which
was based on PR misc/11767), plus (i4b) rev 1.6 of i4b's if_ispppsubr.c,
albeit with numerous stylistic and cosmetic changes.

PR:		misc/11767
Submitted by:	i4b, Joachim Kuebart
MFC after:	1 month
2001-12-27 16:49:31 +00:00
Joerg Wunsch
64dce2fedb Don't log RXJ+ protocol rejects unless we are in debug mode. (RXJ-
events are always logged.)  This stops sppp from spamming the syslog
files in case the remote peer is not configured to negotiate IPv6.
2001-12-26 22:36:59 +00:00
Joerg Wunsch
10f461e8cb Fix some pseudo-enumeration constants in the IPv6 implementation so
they are unique and thus actually usable as flagbits.  I wonder how
it even worked so far...

MFC after:	1 week
2001-12-26 22:35:10 +00:00
Joerg Wunsch
248f19ee7b Ignore (and silently conf-ack) conf-reqs for an Async-Control-
Character-Map.  RFC 1662 demands it for the sake of async to sync
PPP protocol converters (like Win9* :).

This merges rev 1.26/1.27 of the old i4b sppp changes.
2001-12-26 22:00:13 +00:00
Joerg Wunsch
572310c609 For SIOCSIFADDR, don't call if_up() since it would attempt to add the
route to the destination twice.  Now that brian has fixed route.c to no
longer accept this second route, this long-standing nuisance became a
showstopper bug for sppp users.

In retrospect, this is the same fix as the one in rev 1.78 of if_sl.c;
most likely the original version of sppp has been cloned from SLIP. ;-)
2001-12-26 20:28:41 +00:00
Brian Feldman
18f29213d4 s/sonewconn3/sonewconn/ forgotten by the modifier. 2001-12-26 18:31:22 +00:00
Søren Schmidt
3afc6bfba4 Add support for even more SiS chipsets.
Misc cosmetics.
2001-12-25 14:44:26 +00:00
Søren Schmidt
069da12b0e Fix yet another fake slave problem for PCCARD devices. 2001-12-25 14:43:08 +00:00
Mitsuru IWASAKI
586cd03a19 Oops, wrong option name. It's should be ACPI_MAX_THREADS,
not ACPI_NO_THREADS.
2001-12-25 06:06:56 +00:00
Matthew Dillon
9dd4281db8 Fix type-o in previous commit (tsleep was using wrong rendezvous point) 2001-12-25 01:23:25 +00:00
Thomas Moestl
ded9ba2253 Add -mcmodel=medlow to COPTS. This is needed to build working kernels. 2001-12-24 13:35:43 +00:00
Jun Kuriyama
470c78a6ea Possibly typo fix (s/FXP_PORT_SOFTWARE_RESET/FXP_PORT_SELECTIVE_RESET/)
in fxp_stop().

Reference:	http://www.freebsd.org/cgi/mid.cgi?id=7md718f0qo.wl@waterblue.imgsrc.co.jp
Submitted by:	Keiichi SHIMA <keiichi@iij.ad.jp>
2001-12-24 05:32:58 +00:00
Seigo Tanimura
5c18b9160d Fix typo first, then controvert. 2001-12-24 01:24:38 +00:00