Commit Graph

8601 Commits

Author SHA1 Message Date
Stefan Eßer
2841b4feff Prepare for 64bit programming environment (e.g. Alpha):
Use "ncrcmd" or "u_int32_t" instead of "u_long", where appropriate.

Submitted by:	Gerard Roudier <groudier@club-internet.fr>
1997-08-31 19:42:31 +00:00
Stefan Eßer
7d4936dc38 Remove debug printf() that had been ommited by accident. 1997-08-31 19:36:56 +00:00
Stefan Eßer
71b8fb2a93 Fix problem with early revision 53c825a and 53c875 chips, which
could cause a solid system lockup in the driver attach:

These chips do not abort an access to the internal SRAM, when
the driver set the software reset bit in the istat register. But
the chip will never acknowledge the requested PCI bus transfer
in the situation, causing an infinite wait and a lockout of other
bus-masters.

The problem has been reported for rev 0x11 of the 53c825a and
rev 0x01 of the 53c875.
Revisions 0x13 of the 53c825a and 0x03 of the 53c875 are known
to support SRAM accesses, even in the software reset state.
1997-08-31 19:35:52 +00:00
Poul-Henning Kamp
a051452ae2 Change the 0xdeadb hack to a flag called VDOOMED.
Introduce VFREE which indicates that vnode is on freelist.
Rename vholdrele() to vdrop().
Create vfree() and vbusy() to add/delete vnode from freelist.
Add vfree()/vbusy() to keep (v_holdcnt != 0 || v_usecount != 0)
  vnodes off the freelist.
Generalize vhold()/v_holdcnt to mean "do not recycle".
Fix reassignbuf()s lack of use of vhold().
Use vhold() instead of checking v_cache_src list.
Remove vtouch(), the vnodes are always vget'ed soon enough
  after for it to have any measuable effect.
Add sysctl debug.freevnodes to keep track of things.
Move cache_purge() up in getnewvnodes to avoid race.
Decrement v_usecount after VOP_INACTIVE(), put a vhold() on
  it during VOP_INACTIVE()
Unmacroize vhold()/vdrop()
Print out VDOOMED and VFREE flags (XXX: should use %b)

Reviewed by:		dyson
1997-08-31 07:32:39 +00:00
Poul-Henning Kamp
e6dcdf4dd1 Remove pbzero(), things we load zero their own bss.
Make VESA_SUPPORT default
1997-08-31 06:11:26 +00:00
Steve Passe
2645264a72 Debug version of simple_lock. This will store the CPU id of the
holding CPU along with the lock.  When a CPU fails to get the lock
it compares its own id to the holder id.  If they are the same it
panic()s, as simple locks are binary, and this would cause a deadlock.

Controlled by smptests.h: SL_DEBUG, ON by default.

Some minor cleanup.
1997-08-31 03:17:48 +00:00
Steve Passe
adc91a77c1 Created a private simple_lock to control accesses to com data structs
and hardware.
There is now another simple_lock around clock data/hardware accesses in
clock.c and microtime.s.  It is my belief that this is the only area
sio/cy might stumble into during an unblocked INTerrupt.  Thus I separated
the sio/cy code from the generic disable_intr()/enable_intr() routines.

Controlled by smptests.h: USE_COMLOCK, ON by default.
1997-08-31 03:17:18 +00:00
Steve Passe
c10b70dbdc Added clock_lock protection to microtime. 1997-08-30 19:02:56 +00:00
Peter Wemm
bf9380893a Define some machine characteristics using symbol naming on conventions
in place in the other BSD's.
1997-08-30 18:59:48 +00:00
Peter Wemm
087c83fe7d Collect a few missing symbols from the OpenBSD elf includes. (The OpenBSD
includes use the formal elf names like us, NetBSD have different symbols)

Obtained from: OpenBSD
1997-08-30 18:58:31 +00:00
Peter Wemm
54f42e4ba0 Allow non-page aligned file offset mmap's, providing that the system is
allowed to choose the address, or that the MAP_FIXED address has the same
remainder when modulo PAGE_SIZE as the file offset.  Apparently this is
posix1003.1b specified behavior.  SVR4 and the other *BSD's allow it too.
It costs us nothing to support and means we don't get EINVAL on some mmap
code that works perfectly elsewhere.

Obtained from: NetBSD
1997-08-30 18:50:06 +00:00
KATO Takenori
bc4534f4cc Synchronize with sys/i386/isa/clock.c and sio.c revisions 1.101 and
i.178, respectively.
1997-08-30 15:47:49 +00:00
Peter Wemm
3931afc2d0 remove global prototype for setsigvec(). It's static inside kern_sig.c
and causes redundant declaration warnings.
1997-08-30 11:24:05 +00:00
Peter Wemm
88d2e69daa Update to include recently added names that are shared between the C and
asm parts of the kernel.  This is to re-enable ELF compile support.
1997-08-30 11:20:02 +00:00
Steve Passe
78292efeef Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel.
UP kernel expects that this is enough to guarantee exclusive access to
regions of code bracketed by these 2 functions.
Add a simplelock to bracket clock accesses in clock.c: clock_lock.

Help from:	Bruce Evans <bde@zeta.org.au>
1997-08-30 08:08:10 +00:00
Steve Passe
579f738316 Moved the SIMPLE_LOCK stuff from machine/param.h to machine/lock.h.
include it here for now.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
1997-08-30 07:59:47 +00:00
Jun-ichiro itojun Hagino
9b95d17f6f Scsi RESERVATION CONFLICT and BUSY support for Tekram scsi cards.
Checked with DC390.  Pls mail me if you have any trouble with this patch.
1997-08-30 05:49:20 +00:00
KATO Takenori
662f9a6987 Move MACHINE_ARCH definition from <machine/param.h> to <machine/cpu.h>.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-08-30 02:52:04 +00:00
Steve Passe
34162fc615 Support for the new FAST_HI algorithm, enabled.
Preliminary support for the INTR_SIMPLELOCK algorithm, disabled.
Note that this code is NOT ready.
1997-08-29 18:45:23 +00:00
Steve Passe
5f642c1666 Support for the new FAST_HI algorithm.
Improved interrupt handling, fewer silo overflows.

With help from:	dave adkins <adkin003@gold.tc.umn.edu>
1997-08-29 18:16:18 +00:00
Steve Passe
57fe49bd03 Introduce FAST_HI option, ON by default.
This options allows a CPU that is blocked spinning for the giant lock
to process FAST_INTR() ISRs, eg. siointr().
1997-08-29 17:58:30 +00:00
KATO Takenori
89325c4349 Synchronize with sys/i386/i386/userconfig.c revision 1.90. 1997-08-29 14:53:18 +00:00
KATO Takenori
24f6ec85ea Use correct member of scsi_cint for scbus. Add a space between lun
and flags.

Reviewed by:	kato
Submitted by:	Chiharu Shibata <chi@rd.njk.co.jp>
1997-08-29 14:47:31 +00:00
KATO Takenori
d3e65fbc89 Fix typo in the comment introduced by me. 1997-08-29 11:01:14 +00:00
KATO Takenori
664f85174a Added a sysctl arg, hw.machine_arch. The hw.machine_arch is "ibm-pc"
on IBM-PC box and is "pc-98" on NEC PC-98 box.  Userland program can
distinguish architecture on which the program runs.
1997-08-29 09:03:40 +00:00
KATO Takenori
4c7bdfd64b Synchronize with sys/i386/conf/files.i386 and sys/i386/i386/trap.c
revisions 1.173 and 1.109, respectively.
1997-08-29 08:15:57 +00:00
Mike Smith
ef6ab9c7ee Make the devfs code actually compile. Oops.
Submitted by:	jkh
1997-08-29 00:30:11 +00:00
Jordan K. Hubbard
b9c72653a1 Patch for 3.0: #include <sys/fcntl.h> instead of <sys/ioctl.h> 1997-08-28 15:23:10 +00:00
Jonathan Lemon
adeb9a12ce Document the VM86 option.
Reminded-by:	John-Mark Gurney
1997-08-28 15:00:05 +00:00
Jonathan Lemon
ad47cbca85 Remove the vm86 LKM. 1997-08-28 14:45:26 +00:00
Jonathan Lemon
5f07393373 Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file.  The LKM was really for
development, and has probably outlived its usefulness.
1997-08-28 14:36:56 +00:00
KATO Takenori
a1b442d74c Synchronize with sys/i386/conf/files.i386 and majors.i386 revisions
1.172 and 1.17, respectively.
1997-08-28 14:21:12 +00:00
Jordan K. Hubbard
866595c01c ISA driver for Comtrol Rocketport serial cards. No PCI probe stub
was submitted to me.
Submitted by:	Amir Farah <amir@comtrol.com>
1997-08-28 12:19:05 +00:00
Jordan K. Hubbard
3b577e1f2f Add entries for Comtrol Rocketport serial card.
Submitted by:	Amir Farah <amir@comtrol.com>
1997-08-28 12:18:09 +00:00
Mike Smith
ca61c52458 Remove bogus timeout_func_t casts.
Remove unused headers.
Remove all but one instance of the device base name.
Prototype some local static functions.
Consistently reference the softc structure as "sc" rather than "lpt".

Prompted-by:	bde
1997-08-28 11:12:08 +00:00
Mike Smith
1e505cea7d Remove bogus i386/* includes. 1997-08-28 10:15:20 +00:00
KATO Takenori
27cb053198 Moved include files which are independent of bs driver. 1997-08-28 09:23:57 +00:00
KATO Takenori
0bce7b8410 Synchronize with sys/i386/isa/isa.c revision 1.103. 1997-08-28 09:15:31 +00:00
Mike Smith
1b0b864911 Add prototype for isa_dmastop() 1997-08-28 03:37:46 +00:00
Mike Smith
67fb1e6a0c Here is a patch to alleviate the current problem with the dma interface
and the sound driver which uses auto dma.

The  dma interface functionality remains however it now checks
to see if a dma is operating in auto dma mode and if so it bypasses
the busy flag check . I have modified the sound driver 3.5  to
adjust for this new behavior and tested it under FreeBSD 3.0 -current

This patch also includes the new function isa_dmastop.

Submitted by:	Amancio Hasty <hasty@rah.star-gate.com>
1997-08-28 03:36:40 +00:00
Julian Elischer
7ed8f465e7 Add a per-interface-address pointer to a function that can be supplied
by a protocol, to detirmine if an address matches the net this address
is part of.  This is needed by protocols for which netmasks
"just don't work", for example appletalk.

Also add the code in appletalk to make use of this new feature.
Thsi fixes one of the longest standing bugs in appletalk.
The inability to talk to machines to which the path is via a router
which is on a different net, but the same netrange, as your interface.
Protocols that do not supply this function (e.g. IP) should not be affected.
1997-08-28 01:17:12 +00:00
KATO Takenori
1bf978ce42 Include "opt_ddb.h" only when NULLFS_DIAGNOSTIC is defined. 1997-08-28 00:44:43 +00:00
KATO Takenori
17c008220e Use existing path, even though PC-98 doesn't support each device driver. 1997-08-27 08:47:03 +00:00
KATO Takenori
e958d078c4 Fixed NULLFS_DIAGNOSTIC stuff. 1997-08-27 08:44:43 +00:00
KATO Takenori
6f468ee3e3 Synchronize with sys/i386/i386/machdep.c and trap.c revision 1.258 and
1.108, respectively.
1997-08-27 08:43:21 +00:00
Julian Elischer
139c7c8e2d remove un-needed if statement (now the poul removed the 'then' clause) 1997-08-27 02:58:40 +00:00
Peter Wemm
90bcb528a8 Correct some things I forgot about until it was too late with smp_active.
smp_active = 1 used to indicate that the system had frozen previously
started AP's, while smp_active = 0 was "AP's not yet started".  I have split
this into smp_started (which is set when the AP's come online), and
smp_active is left for turning on/off AP scheduling.
1997-08-26 18:36:15 +00:00
Peter Wemm
9a3b3e8bce Clean up the SMP AP bootstrap and eliminate the wretched idle procs.
- We now have enough per-cpu idle context, the real idle loop has been
revived (cpu's halt now with nothing to do).
- Some preliminary support for running some operations outside the
global lock (eg: zeroing "free but not yet zeroed pages") is present
but appears to cause problems.  Off by default.
- the smp_active sysctl now behaves differently. It's merely a 'true/false'
option.  Setting smp_active to zero causes the AP's to halt in the idle
loop and stop scheduling processes.
- bootstrap is a lot safer.  Instead of sharing a statically compiled in
stack a number of times (which has caused lots of problems) and then
abandoning it, we use the idle context to boot the AP's directly.  This
should help >2 cpu support since the bootlock stuff was in doubt.
- print physical apic id in traps.. helps identify private pages getting
out of sync.  (You don't want to know how much hair I tore out with this!)

More cleanup to follow, this is more of a checkpoint than a
'finished' thing.
1997-08-26 18:10:38 +00:00
Julian Elischer
bdb9147f65 two fixes submitted by Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
fixes problems in unmounting and propogation.
1997-08-26 17:17:52 +00:00
KATO Takenori
c820ec8ab4 Synchronize with sys/i386/isa/syscons.h revision 1.32. 1997-08-26 15:09:36 +00:00