Commit Graph

6755 Commits

Author SHA1 Message Date
Nate Williams
7323d74ac0 Changed magic # 0xa0000 -> ISA_HOLE_START since it's now defined. 1997-01-08 05:56:55 +00:00
Nate Williams
22d0d81b71 - Added PCIC resume function
- Cleaned up VLSI-PCIC work-around code

Submitted by:	nate & the Nomads
1997-01-08 00:22:58 +00:00
Garrett Wollman
1158dfb736 Checkpoint the beginnings of the new kernel interface for
multicast group memberships.  This is not actually operative
at the moment (a lot of other code still needs to be changed), but
this seemed like a useful reference point to check in so that
others (i.e. Bill Fenner) have fair warning of where we are going.
1997-01-07 19:15:32 +00:00
Nate Williams
58eb96aa43 > The extra include of <sys/time.h> is because apm uses microtime() and my
> <sys/param.h> doesn't include <sys/time.h>
>
> I removed the NAPM check since it's wasteful to check twice.  apmprobe()
> checks the unit number, and that's the right check.

Submitted by:	bde
1997-01-07 15:36:34 +00:00
Bruce Evans
71fa328eb5 Made minimal changes to make this work again (it depended on devconf).
swapgeneric.c hasn't had anything to do with swapping for some time.
It just makes the -a boot option actually work, and breaks the static
configuration of rootdev and dumpdev.  It should be reorganized to
only support -a.
1997-01-07 01:12:18 +00:00
Andrey A. Chernov
4dd9faf9ba Use rlim_t for rlim_cur, rlim_max as supposed 1997-01-06 18:22:28 +00:00
Søren Schmidt
7c4eadc07b Fix typo.. 1997-01-06 13:51:15 +00:00
Nate Williams
16d2ae1333 - Cleanup up the driver (remove un-needed parameters, white-space,
etc..), plus add a better display suspend function.
- Changed the Copyright's to reflect the new 'jp.FreeBSD.org' email
  address.

Submitted by:	nate & HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
1997-01-06 06:02:03 +00:00
Stefan Eßer
4fe8838383 Fix NetBSD pr kern/3067, which also applies to FreeBSD:
NCR driver dies when "xmcd" accesses the CD-ROM drive

Restrict cacheing of INQUIRY results to LUN 0.

Thanks to Dave Huang <khym@bga.com> for reporting the problem
and suggesting a fix, though I chose a slightly different one.
1997-01-05 23:10:23 +00:00
David Nugent
7431589cd8 Move typedef for rlim_t into sys/types.h (as per NetBSD). 1997-01-05 18:32:00 +00:00
KATO Takenori
1a6a2fcd2d Undo RCS keyword change to keep the original `$NetBSD$'.
Pointed out by:	j@uriah.heep.sax.de (J Wunsch)
1997-01-05 07:10:19 +00:00
Nate Williams
f0b608a75e Minor white-space and comment cleanups. No functional change.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-01-05 06:50:22 +00:00
Nate Williams
99642b0121 Fix for PR/2333 - psm0 panics if no mouse attached:
The problem is that `psmopen()' doesn't validate a pointer before
  using it.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-01-05 06:29:40 +00:00
KATO Takenori
a4e2f35f5a Synchronize with sys/i386/isa/npx.c revision 1.36 (reenable
i586_optimized_copyin/out).
1997-01-05 05:05:43 +00:00
KATO Takenori
c6ee180260 Fix collapse code included in #ifdef WDDEBUG: add `;' at the end of the
line, and `"' at the end of first argument of printf().

Submitted by:	Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
1997-01-04 20:13:41 +00:00
KATO Takenori
d01d65d47a Fix cursor address calculation.
Submitted by:	Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
1997-01-04 18:02:18 +00:00
Bruce Evans
639cfb9f88 Reenabled i586_optimized_copyin/out yet again. 1997-01-04 13:57:17 +00:00
Bruce Evans
363e4cc182 Fixed context switching of FPU state after a fault in
i586_optimized_copyin/out.
1997-01-04 13:56:18 +00:00
Bruce Evans
ab372207b2 Fixed botched tables:
- the operands for bt, bts, arpl and `enter' were reversed.
- btr was reported as bts (with the correct operand order).
- cmpxchg was misplaced.  It was misplaced differently in the
  comments.  It is misplaced differently again in the i486 manual.
  I put it where the i586 manual and gas say it is.
- fucompp was misplaced.
- the rr table for(s) some versions of fstp, fcom and fcomp was non-null.
  This caused some invalid opcodes to be reported as "" instead of as
  "<bad instruction>".
- the word and long versions of the fi* instructions were reversed.
- aaa and daa were reversed.

Fixed bugs involving unusual operand sizes:
- 32-bit registers weren't always forced for bswap or for moves to and
  from special registers.
- the operand sizes weren't reported for [l]call or [l]jmp.
- displacements weren't truncated mod 2^16 when the operand size was
  16-bit.
- too-large displacements and offsets were fetched, and too-large
  offsets were reported, when the operand size was 16-bit.
- sign extended immediate bytes were extended too far when the operand
  size was 16-bit.

Fixed bugs involving usual operand sizes:
- 8-bit source registers weren't forced for mov[sz]b[wl].
- 16-bit source registers weren't forced for mov[sz]w[wl].
- immediate bytes were sometimes reported as sign extended even for
  byte operations.  Same for immediate words in word operations.
- the immediate byte was not reported as sign extended for `push'.

Finished Pentium support:
- cpuid, cmpxchg8b and rsm were missing.

Finished i287 support:
- fneni, fndisi and fsetpm were missing.  These are harmless nops on
  later FPUs.

Improvements:
- report invalid opcodes 0xd6 and 0xf1 using .byte.  They are special
  in not causing invalid operand exceptions when executed.
- report the immediate byte for unusual aam and aad instuctions.
  Immediate bytes other than 0x0a always worked and are documented to
  work on Pentiums.
1997-01-04 13:47:30 +00:00
KATO Takenori
55c32b9f4f Delete collapse code to avoid overflow of the number of cylinders.
This should be in 2.2 after src/sys/i386/isa/wdreg.h revsion 1.15
(short -> u_short change) is merged.
1997-01-04 10:57:45 +00:00
KATO Takenori
74649f8e8f Change types of wdp_cylinders, wdp_heads and wdp_sectors in struct
wdparams from short into u_short.  If wdp_cylinders is short, it
overflows and cause serious sign extension bug when large IDE HDD is
used.  These members are only used for initialization of u_long
variables in both 3.0-current and RELENG_2_2 branch.

I believe this should be in 2.2.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
1997-01-04 10:28:01 +00:00
KATO Takenori
0000fd92fd (1) Change iomem of SMIT transfer mode from 0xdd000 (BIOS ROM base
address+0x1000) into 0xdc000 (BIOS ROM base address).
(2) Add sample line for Logitec LHA-20x SCSI card.
(3) Change I/O port address of ed8 (C-NET(98) card) from 0x00d0 into
0x03d0 (vendor default).

Submitted by:	Michio "Karl" Jibo <karl@marcer.nagaokaut.ac.jp>
1997-01-04 09:01:57 +00:00
KATO Takenori
d3191c67bf Clean-up.
Submitted by:	Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
1997-01-04 08:32:33 +00:00
KATO Takenori
f825359008 Staticize dma_bouncebuf. This variable was kept global because sbic
driver used it.  The sbic driver has been obsoleted now, so the
variable can be static as that in isa.c.
This is a 2.2 candidate.
1997-01-04 06:48:28 +00:00
KATO Takenori
1cd7883776 Correct I/O port address table for ELECOM LD-BDN ethernet card.
Should be in 2.2.
1997-01-04 06:42:43 +00:00
KATO Takenori
a2aded7b8e Add `#ifdef PC98' to include PC98-specific code. Add declaration of the
function rtc_outb().
This is a 2.2 candidate.
1997-01-04 06:38:46 +00:00
Garrett Wollman
c41ac00245 Expose more of these structures to tthe user so that netstat
doesn't walk around with its KERNEL exposed.

More commits to follow...
1997-01-03 19:53:35 +00:00
Garrett Wollman
9cb3aff230 Move the ethertypes from <netinet/if_ether.h> to <net/ethernet.h>.
Many programs need the numbers but don't need the internals of ARP.

More commits to follow...
1997-01-03 19:51:54 +00:00
Garrett Wollman
19ff91c6b0 Separate kernel-internal data structures from exposed user interface
to interfaces.  (Amazing nobody had done this!)

More commits to fix up user-land to follow.
1997-01-03 19:50:26 +00:00
John Dyson
106031ef73 Undo the collapse breakage (swap space usage problem.) 1997-01-03 17:02:28 +00:00
KATO Takenori
674d08dbc0 Oops, delete extra push %edi and push %esi in memsize().
Submitted by:	Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
1997-01-03 16:21:08 +00:00
KATO Takenori
c4948ba6a1 Change IMR of master PIC from 0x7f into 0xff in isa_defaultirq().
This is a 2.2 candidate.
1997-01-03 07:45:41 +00:00
Stefan Eßer
8c39a12760 Add code to copy the LDT, if required.
This code was sent to me by Bruce Evans, and seems to fix some
possible kernel panic in case of an execution error. It did not
cause any problems on my system, but I did never observe the
problem this patch is supposed to fix, anyway.

This patch is a NOP, unless the kernel is built with "options
USER_LDT", and doesn't affect the GENERIC kernel for this reason.

I want to have it in 2.2: it fixes a bug ...

Submitted by:	bde
1997-01-02 01:43:09 +00:00
Stefan Eßer
d794fbe35c Add Intel VX chip set specific detection and register dump code.
Submitted by:	brianc@netrover.com (Brian Campbell)
1997-01-02 01:23:17 +00:00
Poul-Henning Kamp
4dd8ff7e43 Make it possible to test kernel code in a userland harness, even if it
uses MAKE_SET or derivatives and <sys/time.h> at the same time...
1997-01-01 21:07:15 +00:00
John Dyson
3c018e7214 Guess what? We left alot of the old collapse code that is not needed
anymore with the "full" collapse fix that we added about 1yr ago!!!  The
code has been removed by optioning it out for now, so we can put it back
in ASAP if any problems are found.
1997-01-01 04:45:05 +00:00
John Dyson
8cc7e047a3 A very significant improvement in the management of process maps
and objects.  Previously, "fancy" memory management techniques
such as that used by the M3 RTS would have the tendancy of chopping
up processes allocated memory into lots of little objects.  Alan
has come up with some improvements to migtigate the sitution to
the point where even the M3 RTS only has one object for bss and
it's managed memory (when running CVSUP.)  (There are still cases where the
situation isn't improved when the system pages -- but this is much much
better for the vast majority of cases.)  The system will now be able
to much more effectively merge map entries.

Submitted by:	Alan Cox <alc@cs.rice.edu>
1996-12-31 16:23:38 +00:00
Bill Paul
1b4a7d506f Fix (properly, I hope) 'panic: sillyrename dir' crash that can happen
if you do:

% cd /nfsdir
% mkdir -p foo/foo
% mv foo/foo .

nfs_sillyrename() self-destructs if you try to sillyrename a directory,
however nfs_rename() can be coerced into doing just that by the above
sequence of commands. To avoid this, nfs_rename() now checks that
v_type of the 'destination' vnode != VDIR before attempting the
sillyrename. The server correctly handles this particular situation
by returning ENOTEMPTY on the rename() attempt.

I asked if this was the correct fix for this on -hackers but nobody
ever answered.

This is a 2.2 candidate.
1996-12-31 07:10:19 +00:00
Jordan K. Hubbard
08cd925b65 A couple of changes for proper mpu401 recognition, and an opl3 patch
taken from the voxware-3.5 distribution.  Also some changes to the SB
and MPU IRQs to reflect more common/default settings.

Submitted-By: Brian Campbell <brianc@netrover.com>
1996-12-30 22:26:26 +00:00
Joerg Wunsch
a32a2879a6 Apply a similar fix as in gsc.c rev 1.23.
Pointed out by:	bde
1996-12-30 21:17:13 +00:00
Joerg Wunsch
effbfcfdc6 Apparently, someone changed the gsc driver to allocate one big buffer
at device attach time, instead of allocating and freeing buffers as
necessary. But he or she forgot to remove the line that invalidated
the buffer when the device is closed. Therefore, after using the
device for the first time, the buffer was incorrectly invalidated and
that caused a page fault on the second, and subsequent uses.

Closes PR # kern/2319: Using Genius GS-4500 scanner...

Submitted by:	jmrueda@diatel.upm.es (Javier Martmn Rueda)
1996-12-30 20:42:47 +00:00
John Hay
885bd8e459 Update our kernel ntp code to the latest from David Mills. The main change
is the addition of the FLL code, which is used by the latest versions of
xntpd. The kernel PPS code is also updated, although I can't test that yet.
1996-12-30 18:26:28 +00:00
Peter Wemm
c3f47ca9fa Add NetBSD/OpenBSD compatable timeradd()/timersub() user-space macros.
These are deliberately not visible to the kernel since we have timevaladd()
and timevalsub() functions there.

Obtained from: NetBSD/OpenBSD
1996-12-30 15:36:56 +00:00
Peter Wemm
c922550c95 Add INADDR_LOOPBACK, moved from <rpc/rpc.h> 1996-12-30 15:34:17 +00:00
Peter Wemm
70de0abf48 First commit of a series of cleanups for the libc rpc code which has been
suffering a bad case neglect for the last few years.

- Add full prototypes, including to function pointers.
- Make the wire protocols 64-bit type safe, eg: 32 bit quantities are
  int32_t, not long.  The orginal rpc code was implemented when an int
  could be 16 bits.

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 13:59:41 +00:00
John Dyson
d0aea04fe0 Let the VM system know that on certain arch's that VM_PROT_READ
also implies VM_PROT_EXEC.  We support it that way for now,
since the break system call by default gives VM_PROT_ALL.  Now
we have a better chance of coalesing map entries when mixing
mmap/break type operations.  This was contributing to excessive
numbers of map entries on the modula-3 runtime system.  The
problem is still not "solved", but the situation makes more
sense.

Eventually, when we work on architectures where VM_PROT_READ
is orthogonal to VM_PROT_EXEC, we will have to visit this
issue carefully (esp. regarding security issues.)
1996-12-30 05:31:21 +00:00
John Dyson
bc0d333478 EEEK!!! useracc and kernacc didn't lock their respective
maps.  Additionally, eliminate the map->hint distortion
associated with useracc.  That may/may-not be the "right"
thing to do -- but time will tell.
Submitted by:	Partially by Alan Cox <alc@cs.rice.edu>
1996-12-30 03:56:11 +00:00
Bruce Evans
2f4b60c5a9 Fixed keeping track of interrupt nesting level across ASTs. It sometimes
became -1, and this recently became fatal if an address error occurs in
copyin/out/etc.
1996-12-29 22:05:23 +00:00
Poul-Henning Kamp
fbc578d4b7 Add
SLIST_EMPTY(head)
	SLIST_FIRST(head)
	SLIST_NEXT(elm, field)

Which do the obvious things while hiding implementation details.
1996-12-29 21:14:06 +00:00
Poul-Henning Kamp
e1fdacbc18 Reserve 4 malloc types for generic geometry handling. 1996-12-29 21:09:41 +00:00