Commit Graph

10998 Commits

Author SHA1 Message Date
kato
c69a165391 Sync with sys/i386/conf/Makefile.i386 revision 1.114. 1998-06-17 16:30:53 +00:00
kato
710cd6d310 Sync with sys/i386/i386/machdep.c revision 1.300. 1998-06-17 16:30:16 +00:00
kato
f9b71ab04e Sync with sys/i386/isa/if_ed.c revision 1.142. 1998-06-17 16:29:27 +00:00
bde
d84d1291cb The isa device configuration hook was especially useless here. 1998-06-17 15:55:22 +00:00
bde
a88f5a7ab1 Don't generate declarations for isa device structs in "ioconf.h".
Don't generate declarations for isa interrupt handlers at all.
Isa interrupt handlers are now declared in <i386/isa/isa_device.h>
but should be converted take a `void *' arg and staticized as
soon as possible.

Updated CONFIGVERS.  New configs are very incompatible with
previous versions.
1998-06-17 15:16:53 +00:00
bde
5b4fe8b2d8 Don't declare isa device structs or isa interrupt handlers in <sys/conf>,
and don't depend on them being declared there.  This will cause lots of
warnings for a few minutes until config is updated.  Interrupt handlers
should never have been configured by config, and the machine generated
declarations get in the way of changing the arg type from int to void *.
1998-06-17 14:58:04 +00:00
bde
d1142f36c4 Added used include of "ioconf.h" - don't depend on pollution in
<sys/conf.h>.  I'm fixing isa interrupt handler configuration and
this is just a quick fix to keep SCSI configuration unharmed.
1998-06-17 14:13:15 +00:00
bde
9116039620 Include <i386/isa/pnp.h> after including its prerequisite
<i386/isa/isa_device.h> - don't depend on pollution in <sys/conf.h>
including the prerequisite earlier.
1998-06-17 14:01:00 +00:00
bde
9f5b4510b7 Added used include of <i386/isa/isa_device.h> - don't depend on
pollution in <sys/conf.h>
1998-06-17 13:54:59 +00:00
bde
27a6669449 Fixed a misdeclaration. This unhides type mismatches which will be
fixed soon.
1998-06-17 12:14:55 +00:00
kato
737a71ec26 Sync with sys/i386/isa/sio.c revision 1.207. 1998-06-17 09:27:15 +00:00
kato
bf2e59c9df Sync with sys/i386/isa/conf/files.i386 revision 1.198. 1998-06-17 09:26:23 +00:00
bde
09cb129f5c Backed out rev.1.183, which had nothing to do with its log message.
It was to support a half-baked optimization of certain long long
divisions in gcc-2.8 and/or egcs.  We now avoid these divisions.
1998-06-16 14:55:27 +00:00
bde
0acfbe93e0 Use copyout() instead of bcopy() to copy the image to user space.
bcopy() caused panics under heavy paging (not quite as suspected -
the kernel stack seemed to get corrupted).

Fixed long lines.

Reviewed by:	phk
1998-06-16 14:36:40 +00:00
bde
c24e5244ea Don't log "unexpected" events on never-opened devices. Events left
over from the probe are now expected for incompatible UARTs that
deliver IRQs as a strobe (low) instead of a level (high).

Discard events on going-away devices too.  Endless loops may have
been possible when an active pccard was removed.
1998-06-16 11:05:59 +00:00
kato
42f48bbfdc Sync with sys/i386/isa/syscons.c revision 1.263. 1998-06-15 13:06:33 +00:00
bde
eb6080f2d7 Oops, uoff_t can't be used here yet. 1998-06-15 04:50:55 +00:00
julian
6bd091e6b8 fix another typo 1998-06-15 00:35:47 +00:00
julian
4e225f424a Oops
left a "break;" out of the last patch
it complains for every loopback packet..
1998-06-14 23:53:43 +00:00
julian
bdc5365af2 Try narrow down the culprit sending undefined packet types through the loopback 1998-06-14 20:58:17 +00:00
ahasty
2336d7ef33 Reviewed by: Amancio
Submitted by:	Randall Hopper <rhh@ct.picker.com>
    The patch supports using the X10 Mouse Remote in both stand-alone and
pass-through configurations, so you can plug your mouse and remote into the
same serial port, use the mouse for X, and use the remote for other apps
like Fxtv. For instance, we can now control fxtv via the remote control
just like a TV : change channels, mute, increase volume, zoom video,
freeze frame 8)

     The mouse events are channeled through the syscons/sysmouse I/F like
normal, and the remote buttons are "syphoned off" to a UNIX-domain stream
socket (defined as _PATH_MOUSEREMOTE in <machine/mouse.h>) for a
remote-aware app to grab and use.

For further info on the X10 Mouse Remote see:
http://www.x10.com/products/x10_mk19a.htm
1998-06-14 20:05:27 +00:00
julian
62b55f0d8d Slight change to directory cleanup
Makes soft updates a bit cleaner. Eliminates some warnings about
'corrupted directories' from fsck.
1998-06-14 19:31:28 +00:00
julian
4f577ae848 Horrible hack to allow newfs to work again in SLICE kernels.
Real fix in the making but requires editing 60+ files. (every damn driver)
1998-06-14 19:00:12 +00:00
dfr
e6f772a5f1 Oops, wrong file again. 1998-06-14 17:35:55 +00:00
gibbs
bc5dd784f1 Add support for the Storage Dimensions SDC3222F.
PR: 6261
Submitted by: "Matthew N. Dodd" <winter@jurai.net>
1998-06-14 16:41:57 +00:00
bde
9beca6bfbc Avoid an egcs pessimization for 64-bit signed division on i386's.
Pre-2.8 versions of gcc generate a call to __divdi3() for all 64-bit
signed divisions, but egcs optimizes them to a shift and fixup when
the divisor is a constant power of 2.  Unfortunately, it generates
a call to __cmpdi2() for the fixup, although all except possibly
ancient versions of gcc and egcs do ordinary 64-bit comparisons
inline.
1998-06-14 15:52:00 +00:00
bde
aad60fab24 Added uoff_t. 1998-06-14 15:26:03 +00:00
bde
b3a029c994 Removed LOCORE ifdef. This header isn't used for locore stuff.
Use uoff_t instead of `unsigned long long' for unsigned offsets.

Fixed some style bugs.
1998-06-14 15:21:27 +00:00
bde
ac85665153 Define 64-bit types in terms of __int64_t and __uint64_t.
Define an unsigned version of off_t (uoff_t) if KERNEL is defined.
This is useful for micro-optimizing expressions involving off_t's
where you know that the values are non-negative but the compiler
doesn't know it.

Fixed a gratuitous ANSIism.
1998-06-14 14:08:21 +00:00
bde
bf3385e888 Added typedefs for __int64_t and __uint64_t. These will be used to avoid
explicit use of `[unsigned] long long' and `[u]quad_t'.

Fixed disorder of and lack of comments for the types added in the previous
two commits.  Improved some comments.  The comments should be elswhere
(not duplicated in every MD file).
1998-06-14 14:00:47 +00:00
dfr
ad37175983 Declare zs_cnattach. 1998-06-14 13:58:57 +00:00
dfr
be71e3fc23 [Add missing files from previous commit]
Major changes to the generic device framework for FreeBSD/alpha:

* Eliminate bus_t and make it possible for all devices to have
  attached children.

* Support dynamically extendable interfaces for drivers to replace
  both the function pointers in driver_t and bus_ops_t (which has been
  removed entirely.  Two system defined interfaces have been defined,
  'device' which is mandatory for all devices and 'bus' which is
  recommended for all devices which support attached children.

* In addition, the alpha port defines two simple interfaces 'clock'
  for attaching various real time clocks to the system and 'mcclock'
  for the many different variations of mc146818 clocks which can be
  attached to different alpha platforms.  This eliminates two more
  function pointer tables in favour of the generic method dispatch
  system provided by the device framework.

Future device interfaces may include:

* cdev and bdev interfaces for devfs to use in replacement for specfs
  and the fixed interfaces bdevsw and cdevsw.

* scsi interface to replace struct scsi_adapter (not sure how this
  works in CAM but I imagine there is something similar there).

* various tailored interfaces for different bus types such as pci,
  isa, pccard etc.
1998-06-14 13:53:12 +00:00
dfr
2421adb0ea Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have
  attached children.

* Support dynamically extendable interfaces for drivers to replace
  both the function pointers in driver_t and bus_ops_t (which has been
  removed entirely.  Two system defined interfaces have been defined,
  'device' which is mandatory for all devices and 'bus' which is
  recommended for all devices which support attached children.

* In addition, the alpha port defines two simple interfaces 'clock'
  for attaching various real time clocks to the system and 'mcclock'
  for the many different variations of mc146818 clocks which can be
  attached to different alpha platforms.  This eliminates two more
  function pointer tables in favour of the generic method dispatch
  system provided by the device framework.

Future device interfaces may include:

* cdev and bdev interfaces for devfs to use in replacement for specfs
  and the fixed interfaces bdevsw and cdevsw.

* scsi interface to replace struct scsi_adapter (not sure how this
  works in CAM but I imagine there is something similar there).

* various tailored interfaces for different bus types such as pci,
  isa, pccard etc.
1998-06-14 13:46:10 +00:00
bde
3f8a26c387 Don't define away __attribute__() for the non-gcc and old-gcc cases.
Using __attribute__() in non-ifdefed code is just wrong if it changes
the semantics, and there is no way to ignore __attribute__() only in
the benign cases.

Don't use __attribute__ in non-ifdefed code here.  It was a benign
case, but we already have a macro (__unused) for this case.

Expanded comment about gotchas for __CONCAT() in the non-ANSI case.
1998-06-14 13:40:01 +00:00
dfr
5f7f2203d5 Elf64_Shdr.sh_size should be Elf64_Size not Elf64_Word. 1998-06-14 13:24:09 +00:00
bde
234cb0a134 Avoid a 64-bit division in procfs_readdir(). Fixed related overflows.
Check args using the same expression as in fdesc and kernfs.  The check
was actually already correct, modulo overflow.  It could be tightened
up to either allow huge (aligned) offsets, treating them as EOF, or
disallow all offsets beyond EOF.

Didn't fix invalid address calculation &foo[i] where i may be out of
bounds.

Didn't fix shooting of foot using a private unportable dirent struct.
1998-06-14 12:53:39 +00:00
bde
c3a832be31 Avoid a 64-bit division in kernfs_readdir(). Fixed related overflows
and arg checking.
1998-06-14 12:34:42 +00:00
bde
418ebedbb0 Avoid 64-bit divisions and modulos. Fixed related overflows for weird
args.

This driver should not be used, since it calls uiomove() with interrupts
disabled.
1998-06-14 10:52:52 +00:00
bde
57d2b7248f Avoid a 64-bit division in fdesc_readdir(). Fixed related overflows
and missing arg checking.

Panic instead of returning bogus error codes or forgetting to check
all cases if fdesc_readdir() gets called for a non-directory.  This
can't happen.
1998-06-14 08:46:41 +00:00
steve
9a139a2379 Add a macro tweak.
PR:		6932
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-13 19:36:22 +00:00
steve
34a1da1cdf Add a symlink from /dev/vga to /dev/ttyv0 when using DEVFS
for programs like doscmd.

PR:		6920
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
1998-06-13 18:53:22 +00:00
peter
7403c0f1cd Merge changes from vendor branch;
- connector selection values (should fix aui/bnc),
- non-shifting version of crc calculation using a table,
- interrupt mask adjustments,
- add some brackets where a #ifdef could break an if(),
- don't reset the card unless it's up.
1998-06-13 17:20:03 +00:00
phk
ede37fcd49 Introduce std_pps_ioctl() to automagically DTRT.
Add scaling capability to timex.offset, ntpd-4.0.73 will support this.
1998-06-13 09:30:26 +00:00
julian
837f68ce08 Allow a protocol to specify that it does NOT want to be looped back
even if it looks like it should (backwards compatibility with
old broken code) should get rid of some annoying messags.
1998-06-13 02:27:10 +00:00
phk
b877114620 Update to draft-mogul-pps-api-02.txt as submitted to IETF 1998-06-12 23:15:53 +00:00
julian
7618cf95f3 Note which version of Kirk's sources this corresponds to. 1998-06-12 21:21:26 +00:00
julian
83d0c40d08 Fix the case when renaming to a file that you've just created and deleted,
that had an inode that has not yet been written to disk, when the inode of the
new file is also not yet written to disk, and your old directory entry is not
yet on disk but you need to remove it and the new name exists in memory
but has been deleted but the transaction to write the deleted name to disk
exists and has not yet been cancelled by the request to delete the non
existant name.  I don't know how kirk could have missed such a glaring
problem for so long. :-) Especially since the inconsitency survived on
the disk for a whole 4 second on average before being fixed by other code.
This was not a crashing bug but just led to filesystem inconsitencies
if you crashed.

Submitted by: Kirk McKusick (mckusick@mckusick.com)
1998-06-12 20:48:30 +00:00
julian
07abe5540a Remove 3 occurances of __FUNCTION__ 1998-06-12 20:03:26 +00:00
dg
85eb4e5ef1 Increased MAXTSIZ to 128MB...there are binaries that get quite large.
Increased DFLDSIZ to 128MB, as it is a better default.
Reviewed by:	jkh
1998-06-12 09:10:22 +00:00
julian
e6febbec0e Go through the loopback code with a broom..
Remove lots'o'hacks.
looutput is now static.

Other callers who want to use loopback to allow shortcutting
should call the special entrypoint for this, if_simloop(), which is
specifically designed for this purpose. Using looutput for this purpose
was problematic, particularly with bpf and trying to keep track
of whether one should be using the charateristics of the loopback interface
or the interface (e.g. if_ethersubr.c) that was requesting the loopback.
There was a whole class of errors due to this mis-use each of which had
hacks to cover them up.

Consists largly of hack removal :-)
1998-06-12 03:48:19 +00:00
julian
0c0a792891 include opt_ipdivert.h so we get correct options 1998-06-12 02:48:47 +00:00
julian
80b9cdec4f Allow diverted packets from the transmit side to remember if they
had a recv interface and allow that state to be available
after re-injection for further tests.
1998-06-12 01:54:29 +00:00
julian
9ab92044d4 Add B_NOCACHE to several cases where BSD4.4 only required a B_INVAL.
Change worked out by john and kirk in consort.
1998-06-11 17:44:32 +00:00
dfr
bc8c67d496 Reimplement spl*() as function calls. Implement software interrupts. 1998-06-11 11:51:27 +00:00
dfr
ac844baa28 Only build this on i386 for now. I may use it for the alpha later but
currently it doesn't compile.
1998-06-11 07:23:59 +00:00
dfr
85046d2eed Add missing Id keywords. 1998-06-11 07:15:55 +00:00
julian
31ed1ea4ee Replace 'sleep()' with 'tsleep()'
Accidentally imported from Kirk's codebase.

Pointed out by: various.
1998-06-10 22:02:14 +00:00
dfr
6816301f3a Make these files compile. 1998-06-10 21:21:31 +00:00
dfr
770fa22a70 Add my own copyright to this file. In this case not even the comments
resemble the NetBSD source so the NetBSD copyright has been removed.
1998-06-10 20:48:03 +00:00
julian
1e472dc252 Fix for "live inode" panic.
Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Reviewed by: yeah right...
1998-06-10 20:45:46 +00:00
dfr
23d3b9d081 Add my own copyright to this file. The only remnants of NetBSD code here
are in the comments.  As such the NetBSD copyright is included to protect
the valuable intellectual copyright included in those comments.
1998-06-10 20:40:59 +00:00
dfr
a846d700bd Add yet another copyright. If some CVS wizard feels like nuking the versions
that so offend Jason Thorpe then they can.
1998-06-10 20:35:10 +00:00
dfr
13d831fa02 Fix mangled Id keyword. 1998-06-10 20:13:32 +00:00
dfr
6205c573d6 Add Id keyword. 1998-06-10 20:11:16 +00:00
julian
c16287759e Remove buggy debugging code. 1998-06-10 20:03:16 +00:00
dfr
efdc5fb8b9 Add missing copyrights. Thanks to Jason Thorpe for politely noting the
mistake...
1998-06-10 19:59:41 +00:00
alex
751dc534b1 ENOPNOTSUPP --> EOPNOTSUPP
PR:		6906
Submitted by:	Steven G. Kargl <kargl@troutmask.apl.washington.edu>
1998-06-10 19:56:06 +00:00
julian
10bd7912f6 Back out John's changes 1.45 -> 1.46
Kirk confirms that the original semantic was what he wanted...
(well, a very slight difference)
May fix "dangling deps" panic with soft updates.
1998-06-10 19:27:56 +00:00
julian
196a69e39e Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Fix for potential hang when trying to reboot the system or
to forcibly unmount a soft update enabled filesystem.
FreeBSD already handled the reboot case differently, this is however a better
fix.
1998-06-10 18:13:19 +00:00
dfr
57a4a516af I accidentally committed the wrong file, sorry. 1998-06-10 17:54:37 +00:00
dt
99163748e1 Back out previous change. This behavior is at least completely
"susv2"-compliant.
1998-06-10 13:46:46 +00:00
phk
3f4b548a36 When system act as IPX router (sysctl -w net.ipx.ipx.ipxforwarding=1,
running IPXRouted -s) between IPX configured interfaces, it generate
syslog messages "ipx_ctlinput: cmd 15." even if kernel compiled with
IPXPRINTFS=0 and IPX_ERRPRINTFS=0 options.

PR:		6875
Reviewed by:	phk
Submitted by:	Vladimir A. Jakovenko <vovik@ntu-kpi.kiev.ua>
1998-06-10 12:52:11 +00:00
phk
4bfb1c4087 Correct name and number for sxdc modules
PR:		6891
Reviewed by:	phk
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-10 12:49:54 +00:00
dt
537fc5925e Also return EOPNOTSUPP rather than EINVAL for not supported owner and group
changes.
1998-06-10 11:36:01 +00:00
dfr
2d2bf54695 Add initial support for the FreeBSD/alpha kernel. This is very much a
work in progress and has never booted a real machine.  Initial
development and testing was done using SimOS (see
http://simos.stanford.edu for details).  On the SimOS simulator, this
port successfully reaches single-user mode and has been tested with
loads as high as one copy of /bin/ls :-).

Obtained from: partly from NetBSD/alpha
1998-06-10 10:57:29 +00:00
dfr
e8160fea6f 64bit fixes: don't cast pointers to int. 1998-06-10 10:31:08 +00:00
dfr
bc80d6e8ab 64bit fixes: don't cast p->p_retval to an int*. 1998-06-10 10:30:23 +00:00
dfr
d76ea7aa93 64bit fixes: use u_long not int for ioctl command. 1998-06-10 10:29:31 +00:00
dfr
f3398cbed6 64bit fixes: use size_t not u_int for sizes. 1998-06-10 10:28:29 +00:00
dfr
40fabd0aff 64bit fixes: p->p_retval is a register_t[] not an int[]. 1998-06-10 10:27:43 +00:00
kato
922f463eb8 Sync with sys/i386/isa/clock.c revision 1.124. 1998-06-10 08:25:23 +00:00
peter
7f542af96e Don't silently accept attempts to change flags where they are not
supported.
1998-06-10 06:34:57 +00:00
peter
023d110803 Return EOPNOTSUPP rather than EINVAL for flags that are not supported. 1998-06-10 06:30:31 +00:00
brian
cc0e99f1ea Quieten gcc 2.8.1 1998-06-10 00:26:19 +00:00
dt
27d8521067 Fix typo in a comment. 1998-06-09 13:20:29 +00:00
phk
a4298481c9 Add a tc_ prefix to struct timecounter members.
Urged by:	bde
1998-06-09 13:10:54 +00:00
bde
d13943336b Pass lists of possible root devices and their names up to the
machine-independent code and try mounting the devices in the
lists instead of guessing alternative root devices in a machine-
dependent way.

autoconf.c:
Reject preposterous slice numbers instead of silently converting
them to COMPATIBILITY_SLICE.

Don't forget to force slice = COMPATIBILITY_SLICE in the floppy
device name.

Eliminated most magic numbers and magic device names in setroot().

Fixed dozens of style bugs.

vfs_conf.c:
Put the actual root device name instead of "root_device" in the
mount struct if the actual name is available.  This is useful after
booting with -s.  If it were set in all cases then it could be used
to do mount(8)'s ROOTSLICE_HUNT and fsck(8)'s hotroot guess better.
1998-06-09 12:52:35 +00:00
bde
dfd0b015f8 Updated generated files. 1998-06-09 03:36:59 +00:00
bde
5d51028ec5 Don't generate COMPAT_43 cruft if there are no COMPAT_43 syscalls.
In particular, don't generate an include of "opt_compat.h" if it
wouldn't affect anything we create.  This will fix recent breakage
of the ibcs2 LKM.  The ibcs2 syscall files were not regenerated
properly, so the LKM didn't break immediately when we started
generating this extraneous include.
1998-06-09 03:32:05 +00:00
bde
c342c9a95f Include "opt_compat.h" explicitly instead of depending on
makesyscalls.sh generating it as pollution.

Don't attempt to separate the includes by newlines.  makesyscalls.sh
just ignores newlines.
1998-06-09 03:28:14 +00:00
bde
4b1cf5cb49 Fixed `make depend', which I broke here about a month ago by moving
the null default for `depend' from bsd.dep.mk to bsd.obj.mk.
bsd.kmod.mk included these files in a bad order, so it picked up
the null default.
1998-06-09 02:55:40 +00:00
julian
d2a5a2e4b3 The version of the softdep changes in FreeBSD broke the
(doingdirectory && !newparent) case of ufs_rename().
rename("D1/X/", "D2/Y/") gives a wrong link count for D2.

Submitted by: Bruce Evans <bde@zeta.org.au>
Reviewed by: Kirk McKusick <mckusick@McKusick.COM>
1998-06-08 23:55:33 +00:00
julian
f110ef9950 Don't let ifunit() modify the string passed as an argument.
it may be in the text segment and write protected.
1998-06-08 20:33:29 +00:00
dyson
7133c16d20 Remove some junk left over from a previous commit.
Submitted by:	phk
1998-06-08 18:18:28 +00:00
bde
4c42496690 Updated generated files. 1998-06-08 11:08:35 +00:00
bde
5d6177855a Fixed some style bugs in output (missing tabs and unparenthesized macros).
Fixed some style bugs in source (mostly, superfluous backslashes).
1998-06-08 11:02:00 +00:00
bde
2fe18afefc Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
dfr
f9cc54f52d Fix more of my DDB breakage. 1998-06-08 09:23:24 +00:00
dfr
a4dda8fad0 Fix a typo which prevented i386 elf from working at all (including Linux
emulated elf binaries).
1998-06-08 09:19:35 +00:00
sos
2372462b88 Correct even more ioctl breakage :(
Doesn't people check their code before committing anymore, it could
at least compile  ????
1998-06-08 09:00:28 +00:00