Commit Graph

11305 Commits

Author SHA1 Message Date
bde
57a5f9023d Centralized and optimized handling of large sectors. Centralized
checking of transfer sizes and alignments.

Old version tested with 2K-sectors on od disks by: Shunsuke Akiyama
<akiyama@kme.mei.co.jp>.
1998-07-29 11:15:54 +00:00
bde
1d3cccd929 Use the slice-relative blkno in all parts of the label write
protection checks.  Using the partition-relative blkno in some
parts broke the write protection for partitions at unusual
offsets (only for partitions at offset 1 on i386's).
1998-07-29 08:24:23 +00:00
kjc
bd9e5f5f5b update ATM driver. (base version: midway.c 1.67 --> 1.68)
several new features are added:
	- support vc/vp shaping
	- support pvc shadow interface

code cleanup:
	- remove WMAYBE related code.  ENI WMAYBE DMA doen't work.
	- remove updating if_lastchange for every packet.
	- BPF related code is moved to midway.c as it should be.
	  (bpfwrite should work if atm_pseudohdr and LLC/SNAP are
	  prepended.)
	- BPF link type is changed to DLT_ATM_RFC1483.
	  BPF now understands only LLC/SNAP!! (because bpf can't
	  handle variable link header length.)
	  It is recommended to use LLC/SNAP instead of NULL
	  encapsulation for various reasons.  (BPF, IPv6,
	  interoperability, etc.)

the code has been used for months in ALTQ and KAME IPv6.

OKed by phk long time ago.
1998-07-29 05:35:16 +00:00
joerg
d4df58a7bc Make the logging of abnormally exiting processes optional by a sysctl.
PR:		kern/1711
Submitted by:	Nick Sayer <nsayer@kfu.com>
1998-07-28 22:34:12 +00:00
brian
ac693bacd1 pseudo-device ssc requires su.c (pseudo-device su)
Submitted by: woods@zeus.leitch.com (Greg A. Woods)
PR: 7413
1998-07-28 22:06:16 +00:00
bde
8f59e52f08 Set bp->b_resid for failed transfers in dscheck(). This is the
best place to set it, and the wd and wfd strategy routines don't
set it (for failed transfers) because they expect dscheck() to
initialize everything necessary.  dscheck() has always set B_ERROR,
but this is not quite sufficient, because b_resid is used by physio()
to decide how much of a B_ERROR'ed i/o was done.
1998-07-28 19:39:09 +00:00
bde
f60ba2125f Set the disk type to SCSI in the in-core label for the whole disk. 1998-07-28 18:59:49 +00:00
bde
0c1764387c Used daddr_t's, not ints, to store disk block numbers. Updated printf
formats and args to match.  Fixed old printf format errors (all related;
most were hidden by calling printf indirectly).

This change somehow avoids compiler bugs for 64-bit longs on i386's,
although it increases the number of 64-bit calculations.
1998-07-28 18:25:51 +00:00
bde
959a234634 Set p->p_switchtime to switchtime instead of to the current time in
fork_trampoline() if switchtime is valid.  This fixes not accounting
for the time between the previous context switch and and the current
time (when the forked child starts up here) in most cases - the time
is now counted in the child's runtime.  I think it actually fixes
all cases, and switchtime is always valid here, since there must have
been a context switch just before the forked child starts up.  Some
code should be removed if this is correct.  The check that switchtime
is valid sometimes gives a false negative because the check isn't
correct until the after the first context switch after the system
has been up for >= 1 second.
1998-07-28 17:55:37 +00:00
bde
09a9db632f Micro-optimized and cleaned up the clearing of switchtime in idle().
Cleaned up the conditionals in the disgusting SMP ifdef in idle().
1998-07-28 17:35:09 +00:00
bde
d7aa77e789 Fixed two spl nesting bugs. They caused (at least) the entire pageout
daemon to run at splvm() forever after swap_pager_putpages() is called
from vm_pageout_scan().

Broken in: rev.1.189 (1998/02/23)
1998-07-28 15:30:01 +00:00
jlemon
f3f6e5cc39 u_int --> unsigned int, remove (now unneeded) <sys/types.h> 1998-07-28 15:22:51 +00:00
dfr
ebdd0888b1 Record the new physical address of the pcb in pmap_swapin_proc.
Third attempt at pmap_remove().  This one actually works properly :-).
1998-07-28 09:34:50 +00:00
phk
f59d8bb706 I have a PD drive (Matsushita PD/CD Drive LF-1600).
The machine can not recognize this PD drive
as neither PD drive nor CD-ROM Drive.
So I can not use CD-ROMs and PDs from FreeBSD.

PR:		7423
Reviewed by:	phk
Submitted by:	Takura Koyama <takura@popweb.ne.jp>
1998-07-28 09:03:37 +00:00
jlemon
f4995111a0 Add wrappers for i386_*_ioperm, i386_vm86 so userland code does
not have to call sysarch() directly.
Added man pages for above, as well as sysarch()
1998-07-28 03:33:27 +00:00
jlemon
93c5ad9d9e Fix an off-by-one error when setting the iomap bits.
Change struct i386_*_iomap to use ints instead of shorts/chars.
  (pointed out by bde long ago, prodded into action by msmith)
1998-07-28 03:29:32 +00:00
alex
d48cc1feee Style fixes and a bug fix: don't remove the exit handler if unmount
fails.

Submitted by:	bde
1998-07-27 22:47:17 +00:00
bde
d3ce1542c8 Fixed double counting of runtime after a process exits. The last
timeslice of the exiting process was counted for both the exiting
process and the next process to run if the next process runs
immediately.

Broken in:	mostly in kern_clock.c rev.1.70 (1998/05/28)
1998-07-27 19:16:21 +00:00
jlemon
e2204441ea Extend cpl workaround so that it applies when we are returning to
user-mode as well as vm86 mode.
1998-07-27 16:51:33 +00:00
jlemon
d757cde4ed Re-arrange the page layout used by vm86_bioscall so that we can
potentially re-use the stack page.

Cosmetic cleanup of the code to de-obfuscate it and make it easier
to follow.  There should be no functional changes in this commit.
1998-07-27 16:45:05 +00:00
bde
1881ba1352 Made lazy syncing of timestamps for special files non-optional. 1998-07-27 15:37:00 +00:00
kato
7dbfcf7956 Sync with sys/i386/isa/diskslice_machdep.c revision 1.30. 1998-07-27 09:49:23 +00:00
dfr
93ab89b30e Macros for accessing alpha sparse device ports and memory. 1998-07-27 09:40:35 +00:00
dfr
bd66cc2399 Support the disabled keyword for isa devices. 1998-07-27 09:38:26 +00:00
dg
2b482f824a Only call m_reclaim() if M_WAIT since calling it from an interrupt can
cause problems.
PR:	7403
1998-07-27 03:59:48 +00:00
alex
be85829abc A better solution to the rm_at_exit problem: Register the exit function
during first mount.  Unregister the exit function at last unmount.

Concept by:	sef
Reviewed by:	sef
Implemented by:	alex
1998-07-27 01:07:01 +00:00
dfr
0668f6953d Fix a stupid bug preventing gdb from seeing the right value of 'v0'. 1998-07-26 18:47:47 +00:00
dfr
9c96ae361d Notify pmap when a page is freed on the alpha to allow it to clean up
its emulated modified/referenced bits.
1998-07-26 18:15:20 +00:00
dfr
03ddb15c2b Fix a stupid bug in the new pmap_remove().
Arrange for soft modified/referenced flags to be cleared when a page is freed.
1998-07-26 18:13:28 +00:00
bde
3b18043bd8 Don't pass the label to diskerr(), since the label is being constructed
and may be invalid.  In particular, d_secpercyl may be 0, and diskerr()
divides by it.
1998-07-25 16:35:06 +00:00
alex
4ab63c85e2 Override the default VFS LKM dispatch functions so that a module
unload function can be provided (this is necessary to unregister
the at_exit handler).
1998-07-25 15:52:44 +00:00
alex
4c90ac575d Allow VFS LKMs to override the default module dispatch functions if
VFS_LKM_NO_DEFAULT_DISPATCH is defined.
1998-07-25 15:52:10 +00:00
dfr
1b2d3de986 Make __weak_reference work on the alpha. 1998-07-25 14:37:37 +00:00
mjacob
a3b54b46a3 minphys means something different in FreeBSD than in NetBSD- not needed here and in the way 1998-07-25 04:48:25 +00:00
dfr
f424d5f084 Fix pmap_enter_quick() to stop it hanging when the level 2 pte exists
but isn't valid.

Reimplement pmap_remove() to be much more efficient at removing large
stretches of addresses.

As part of reimplementing pmap_remove() fix pmap_protect() so that it stands
a hope of working.
1998-07-24 09:43:27 +00:00
julian
c77c9fb18b Don't return an error if the magic number is not present.
Failing to probe is not an error, just a negative result.
1998-07-22 19:37:02 +00:00
dg
76fd38da9c Improved pager input failure message. 1998-07-22 09:38:04 +00:00
dfr
8414aaec0d Add a call to a platform-specific irq remapping function for alpha platforms
which don't record the correct irqs in PCI config space.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:40:46 +00:00
dfr
02ecd6d029 On the alpha, ports may be allocated above 64k.
Change the port address argument to pci_map_port to pci_port_t* which is
defined as u_int on the alpha, u_short on i386.  This is a stopgap with a
hopefully limited lifetime.

Discussed with: Stefan Esser <se@freebsd.org>
1998-07-22 08:39:08 +00:00
dfr
a573865db3 Add some very simple support for a compiled in (from config(8)) resource
database.
1998-07-22 08:35:52 +00:00
dfr
953622fb2a Add ISA support.
Remove mcclock hack which was only needed because ISA wasn't done yet.
1998-07-22 08:34:19 +00:00
dfr
15d5de14dc Add some convenience functions for accessing device memory.
Add a DDB command to allow access to inb/inw/inl from the debugger.
1998-07-22 08:33:30 +00:00
dfr
cc3eb8a152 Merge KN20AA support from Andrew Gallatin.
Add support for device memory access.
Add support for ISA irqs.
1998-07-22 08:32:17 +00:00
dfr
f103a50fde Move the mcclock from root to isa. 1998-07-22 08:30:25 +00:00
dfr
eb3dbdd0de Add a simple ISA bus. No support for memory mapped devices or DMA as yet. 1998-07-22 08:29:26 +00:00
dfr
9cb558a8da Add sio support. 1998-07-22 08:28:24 +00:00
dfr
8964f60d8e Add platform functions for manipulating PCI irqs.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:27:56 +00:00
dfr
9bc86e47bd Add declaration of {aquire,release}_timer2(). 1998-07-22 08:26:23 +00:00
dfr
b5978db404 Add macros and chipset support for accessing device i/o memory on the alpha. 1998-07-22 08:25:39 +00:00
dfr
5dfe812895 Add KN20AA support.
Add entries for syscons.
1998-07-22 08:24:39 +00:00