Commit Graph

57176 Commits

Author SHA1 Message Date
jdolecek
07f9e74b2d change to be just wrapper around MMTA 2002-07-08 22:48:04 +00:00
jdolecek
ee95800a31 g/c COMPAT_13 - there wasn't any 1.3 release of mmeye. According
to removal log of sys/arch/sh3/sh3/compat_13_machdep.c, COMPAT_13 was trace
of i386 port.
2002-07-08 22:14:35 +00:00
drochner
32f7789dd7 there is at least one VGA chip (Silicon Motion Lynx EM+) where fast scrolling
by moving the display offset pointer doesn't work
2002-07-08 19:48:37 +00:00
drochner
2693ad5a05 save quirks in softc, obey VGA_QUIRK_NOFASTSCROLL 2002-07-08 19:45:28 +00:00
drochner
d10ae84f7b save the "quirks" in the softc 2002-07-08 19:43:23 +00:00
mycroft
8a3f8605fb Add a missing DELAY() in the initial GPIO setup for the 21140. 2002-07-08 18:43:54 +00:00
augustss
5059a3264c s/__FUNCTION__/__func__/ 2002-07-08 17:46:23 +00:00
rearnsha
a1614f2bc8 Changes to allow for the fact that the kernel is now mapped at
0xc0200000.  Tidy up to remove dead comments and code.
Allow more than one L1 entry for the kernel space and use the 'spare'
memory below the kernel code for the initial page tables in the same
way that the iq80310 does.
2002-07-08 16:20:07 +00:00
rearnsha
20ea379ed5 Map the low 4M of memory at 0xc0000000. 2002-07-08 16:17:42 +00:00
rearnsha
9fb9bc0c8a Use the Integrator ldscript and build .bin and .srec versions of the
kernel.
2002-07-08 16:15:44 +00:00
rearnsha
165a2e8904 Script file for linking an Integrator kernel image. 2002-07-08 16:14:54 +00:00
rh
8f8b29ff6b Add support for the SMC 2206USB/ETH EZ Connect adapter (Pegasus II) 2002-07-08 09:00:56 +00:00
rh
1825e92eb4 regen for SMC 2206USB/ETH 2002-07-08 08:58:33 +00:00
rh
ad61ce9c89 Add product code for SMC 2206USB/ETH EZ Connect Ethernet adapter 2002-07-08 08:57:33 +00:00
martin
fb950301fe Apply patch from Peter Seebach (in private Mail, similar to the one proposed
in PR kern/17506):

If we reset the mouse and discover a different protocol after the reset
than before, reset it again after one second. This makes protocol detection
after a KVA switched to another machine more reliable and should not affect
the standard situation with one mouse connected to one machine.
2002-07-08 07:43:31 +00:00
fvdl
b0ba7094b2 netbsd32_sysarch moved here. 2002-07-07 23:28:04 +00:00
fvdl
728043f0da Add definitions for 32bit sysarch calls. 2002-07-07 23:27:00 +00:00
fvdl
c1593a7671 Implement a few 32bit sysarch calls. 2002-07-07 23:25:37 +00:00
fvdl
e877145e56 Move netbsd32_sysarch to netbsd32_machdep.c 2002-07-07 23:23:41 +00:00
fredette
c9bdddaac5 Regen. 2002-07-07 23:01:51 +00:00
fredette
f79af764d7 Now include the HPPA trap number in a user backtrace, and display
backtraces for more traps.
2002-07-07 22:52:54 +00:00
augustss
9ee8616e07 Add quirk for ADS HD controller. From Scott Ellis in kern/17495. 2002-07-07 19:52:48 +00:00
augustss
c1367622d6 Regen. 2002-07-07 19:49:09 +00:00
augustss
5fba395c90 Add some Sandburst products. 2002-07-07 19:48:41 +00:00
matt
0d4f94281d Change OFB_ENABLE_CACHE to be enabled. 2002-07-07 19:40:05 +00:00
matt
1a8d29efcb Make the gem driver the default now, not the macppc specific gm. 2002-07-07 19:36:47 +00:00
matt
4577742ff6 Use SR 11 as USER_SR. (12 is used as an I/O BAT). 2002-07-07 19:32:49 +00:00
matt
e64bc5acc1 Allow USER_SR to be overriden on a per-port basis 2002-07-07 19:29:18 +00:00
matt
902fd38614 Update OFB_ENABLE_CACHE to search for a empty bat that does not
conflict the USER_SR or one of the kernel SRs.
2002-07-07 18:35:10 +00:00
oki
33e652ebfd Regen. 2002-07-07 18:07:43 +00:00
oki
52bdeef730 PECOFF version of stat13 and lstat13 couldn't look for
alternative path at first.  Fixed it.
2002-07-07 18:06:02 +00:00
drochner
373b39f1d2 put the "VGA_CONSOLE_SCREENTYPE" parameter into opt_vga.h 2002-07-07 15:09:52 +00:00
briggs
77f5558791 Fix a printf format warning. 2002-07-07 14:29:06 +00:00
drochner
cff6339e49 attach "vesabios"
(well, not really yet)
2002-07-07 13:25:43 +00:00
drochner
2eb946d46c call kvm86's GPF handler 2002-07-07 13:24:36 +00:00
drochner
5641e4d726 Initialize the kernel vm86 code before autoconfiguration, so that
BIOS calls can be used for device probing etc.

And now it's getting nasty:
The kvm86 code needs a TSS, and it is most convenient to use proc0's
instead of doing some static allocation. (We might reconsider this if
we want to use vm86 for console initialization, ie much earlier.)
For the TSS slot to be allocated, we have to move the call to
i386_proc0_tss_ldt_init() up.
Since the npx code twiddles CR0 the corresponding pcb field must
be synchronized later. It would probably be cleaner to do this in
the npx driver.
2002-07-07 13:23:17 +00:00
drochner
bc442c7173 -if APM_USE_KVM86 is set, use BIOS calls in virtual 8086 mode
-make sure the register frame is really cleared before use
 (someone added a field to the frame later which didn't get zeroed)
2002-07-07 13:06:56 +00:00
drochner
da32c6df4a add definitions for the in-kernel vm86 code and vesabios attachment,
add an option APM_USE_KVM86 which does what its name implies
2002-07-07 13:03:47 +00:00
drochner
c359f53282 First cut on VESA BIOS access to get extended video modes and framebuffer
access. For now, there is just probing code.
2002-07-07 12:59:58 +00:00
drochner
3b22d7973b This is a (still experimental) framework to run BIOS code in a virtual
8086 machine. Ifff it works, it is much easier and more elegant than
going to real real mode:
-simpler code
-no need for "identity" memory mappings
-easy passing of buffers for bulk data to functions
-some more control
There is no interrupt support ATM, and it lacks a function to access
random virtual memory of the VM. MP issues to consider.
2002-07-07 12:56:34 +00:00
tron
7db7acdde8 Fix a typo in last commit which caused build failures if
"PCDISPLAY_SOFTCURSOR" is not defined.
2002-07-07 10:52:18 +00:00
junyoung
f73c9efaab No need to include opt_vga.h here, since it is included in vgavar.h. 2002-07-07 07:37:50 +00:00
junyoung
da843e013f There's no function like vga_common_setup. 2002-07-07 07:34:54 +00:00
junyoung
64a231036c Remove __P. 2002-07-07 07:05:40 +00:00
junyoung
798d30c8d5 - ANSI & KNF, notably remove __P.
- Some cosmetic changes.
2002-07-07 06:49:22 +00:00
junyoung
472e54071a Rename vc_ccol and vc_crow in struct pcdisplayscreen to cursorcol
and cursorrow, respectively, to be consistent with other members
in the structure.
2002-07-07 06:36:32 +00:00
matt
140a273f7a Use lvewx/stvewx for VSCR and save ourselves 12 bytes we don't need to load. 2002-07-07 00:46:20 +00:00
dbj
397ff5c82a protect Debugger() call with ifdef DDB 2002-07-07 00:43:11 +00:00
gmcgarry
4b0692e70a Don't invoke MachFPInterrupt() if we're using SOFTFLOAT. 2002-07-07 00:22:18 +00:00
gmcgarry
cc4037a913 Overhaul the emulation facility. We do this by:
- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
  and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
  emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.
2002-07-06 23:59:18 +00:00
gmcgarry
de0c9630a1 Fix console bell. 2002-07-06 23:15:29 +00:00
itojun
c6f53f281c correct tcp header chasing in pp_fastq processing. should fix kern/17491. 2002-07-06 18:33:45 +00:00
matt
263c3cd253 Merge macppc/ofppc locore OFW code and move it here. 2002-07-06 18:01:23 +00:00
matt
51f2834470 Bump max user address to 0xfffff000 (XXX maybe it should be -NBPG?). 2002-07-06 17:15:57 +00:00
fredette
be87bf4822 Fixed the options KDGB_DEVNAME, for recent changes to config(8). 2002-07-06 15:41:38 +00:00
fredette
10d4232908 Fixed a printf argument type. 2002-07-06 15:39:07 +00:00
fvdl
7cc42e6abb Move struct savefpu outside ifdef _KERNEL for the benefit of userland
code that includes <machine/pcb.h>
2002-07-06 10:43:32 +00:00
fvdl
405b1a8bb6 Add mtrr.c 2002-07-06 10:23:06 +00:00
perseant
eaa565b571 Changed size of struct inode; bump version to 1.6D. 2002-07-06 01:31:32 +00:00
perseant
32ae84b188 Deal with fragment size changes better. For each fragment that can
exist on an on-disk inode, we keep a record of its size in struct inode,
which is updated when we write the block to disk.  The cleaner routines
thus have ready access to what size is the correct size for this block,
on disk.

Fixed a related bug: if a file with fragments is being cleaned
(fragments being cleaned) at the same time it is being extended beyond
NDADDR blocks, we could write a bogus FINFO record that has a frag in the
middle; when it was cleaned this would give back bogus file data.  Don't
write the indirect blocks in this case, since there is no need.

lfs_fragextend and lfs_truncate no longer require the seglock, but instead
take a shared lock, which the seglock locks exclusively.
2002-07-06 01:30:11 +00:00
gmcgarry
44e6549da3 Invert test of EPASSTHROUGH. Problem reported by
Bernd Sieker <bsieker@freenet.de>.
2002-07-05 23:43:28 +00:00
matt
685778b53b Peform a rototill over the powerpc-based ports.
Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop.  Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
2002-07-05 18:45:15 +00:00
fvdl
8b6c180747 Previous commit left a piece of old code in that would leak top-level
PTPs; remove it.
2002-07-05 16:52:39 +00:00
tsutsui
0fe49daba1 Add keydescs for swapctrlcaps, and clean up formating. 2002-07-05 14:29:06 +00:00
enami
c7d782764a Add an entry for Avlab Technology, Inc. Low Profile PCI 4 Serial (in Japan,
sold by Kuroutoshikou as SERIAL4P-LPPCI.)
2002-07-05 14:10:32 +00:00
scw
8324df7cf0 Sync the ktrsyscall() arguments with -current reality. 2002-07-05 14:05:58 +00:00
scw
63fd77b84b Sync the sendsig() argument list with -current reality. 2002-07-05 14:04:00 +00:00
enami
76899eae10 Regen. 2002-07-05 14:03:33 +00:00
scw
8aecaeac04 Roll our own CWARNFLAGS. There are some things in MI code which the
SuperH version of gcc barfs over.
2002-07-05 14:02:31 +00:00
enami
d2235ed345 Add vendor id of Avlab technology, Inc. and product id of Low Profile PCI
4 Serial (but not used actually).
2002-07-05 13:59:14 +00:00
joda
d1acc508df add a couple of Analog device names 2002-07-05 13:50:47 +00:00
scw
881a4dcac0 Cast pointers first to uintptr_t before casting to register_t.
On SH-5, sizeof(register_t) is always 8, even if sizeof(void *) is 4
as is the case when compiling for ILP32.
2002-07-05 13:49:26 +00:00
abs
eb73becae2 Ensure all INSTALL config files consistantly include PIPE_SOCKETPAIR,
MALLOC_NOINLINE, and VNODE_OP_NOINLINE. The exceptions are when they
include another config files that already defines the options, or if
they are for an embedded board, just define a few extra options, and
do not already define PIPE_SOCKETPAIR.
2002-07-05 13:40:10 +00:00
scw
59474a8c82 NetBSD, meet the SH-5 cpu.
SH-5, meet NetBSD.

Let's hope this is the start of a long and fruitful relationship. :-)

This code, funded by Wasabi Systems, adds initial support for the
Hitachi SuperH(tm) SH-5 cpu architecture to NetBSD.

At the present time, NetBSD/evbsh5 only runs on a SH-5 core simulator
which has no simulated devices other than a simple console. However, it
is good enough to get to the "root device: " prompt.

Device driver support for Real SH-5 Hardware is in place, particularly for
supporting the up-coming Cayman evaluation board, and should be quite
easy to get running when the hardware is available.

There is no in-tree toolchain for this port at this time. Gcc-current has
rudimentary SH-5 support but it is known to be buggy. A working toolchain
was obtained from SuperH to facilitate this port. Gcc-current will be
fixed in due course.

The SH-5 architecture is fully 64-bit capable, although NetBSD/evbsh5 has
currently only been tested in 32-bit mode. It is bi-endian, via a boot-
time option and it also has an "SHcompact" mode in which it will execute
SH-[34] user-land instructions.

For more information on the SH-5, see www.superh.com. Suffice to say it
is *not* just another respin of the SH-[34].
2002-07-05 13:31:28 +00:00
abs
d38d8c6c75 Regen from GENERIC.in 1.2:
Only difference is that INSTALL now defines VNODE_OP_NOINLINE and MALLOC_NOLINE
2002-07-05 13:27:59 +00:00
abs
a98e1ff5cc Ensure INSTALL media has PIPE_SOCKETPAIR, MALLOC_NOINLINE and VNODE_OP_NOINLINE 2002-07-05 13:18:21 +00:00
abs
7be2718ed4 Use MALLOC_NOINLINE (saves 11K on FOURMEG) 2002-07-05 13:06:45 +00:00
abs
f20c5099f6 Introduce MALLOC_NOINLINE, which mirrors the effect of DIAGNOSTIC
and similar in making MALLOC/FREE not inline. Saves 11k on acorn26
FOURMEG config.
2002-07-05 13:05:14 +00:00
gmcgarry
88d8a7dd2f Protect local variables in MALLOC/FREE to avoid shadowing
arguments.  Problem reported by David Laight: david@l8s.co.uk.
2002-07-05 06:54:45 +00:00
lukem
b8e7104984 be consistent about how va_[acm]time is set to the current time
(inspired by how procfs does it)
2002-07-05 03:24:06 +00:00
lukem
20657af5c3 set vap->va_ctime to vap->va_atime (the current time),
rather than vap->va_ctime (which is a no-op).
2002-07-05 02:02:00 +00:00
thorpej
6a5e35f6cc Return 0, not NULL, when we mean 0. 2002-07-05 00:16:26 +00:00
thorpej
a08a4aecac Regenerate: Added __sigaction_sigtramp at #340. 2002-07-04 23:34:28 +00:00
thorpej
011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
lukem
62e9bafd31 use cdev_mouse_init() for wsmux 2002-07-04 23:24:43 +00:00
thorpej
00e59f25b7 Eliminate two unused sigframe members. 2002-07-04 21:33:43 +00:00
rjs
048edd40f2 Regenerate. 2002-07-04 21:00:32 +00:00
rjs
e97486826e Add Peak System Technik CAN Controller. 2002-07-04 20:51:35 +00:00
thorpej
625abcf84b Eliminate two unused sigframe members. 2002-07-04 20:22:50 +00:00
thorpej
bf7d5bca07 Eliminate 4 unused sigframe members. 2002-07-04 19:20:01 +00:00
scottr
c509ab3f19 Add (unimplemented) cases to handle the 68020 and 68030 to
bus_dmamap_sync().  This corrects a fatal bug on at least some 68030-
based Macs. Closes PR 17180.
2002-07-04 18:09:59 +00:00
scottr
ee8f37fa3f Add support for DHCP network configuration. 2002-07-04 17:59:33 +00:00
junyoung
c8d459a985 alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 17:58:02 +00:00
junyoung
98edf775dc Rename rasops_alloc_cattr and rasops_alloc_mattr to
rasops_allocattr_color and rasops_allocattr_mono, respectively.
2002-07-04 17:15:28 +00:00
thorpej
fe53f433d8 The signal trampoline runs in userspace; do not profile it. 2002-07-04 16:44:10 +00:00
thorpej
9759b269b6 Add ENTRY_NOPROFILE(). 2002-07-04 16:43:21 +00:00
junyoung
3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
fvdl
cf9727c9c6 Uncomment x86_64_iopl args. 2002-07-04 10:49:33 +00:00
fvdl
105d80aaa0 The double fault exception doesn't push an error. 2002-07-04 10:47:02 +00:00
fvdl
9fe7e89bfe Use a seperate stack for the double fault trap. 2002-07-04 10:46:21 +00:00
fvdl
860a1c9ae6 Enable the iopl syscall. 2002-07-04 10:44:00 +00:00
fvdl
03068e0f6f Print a little more info for unhandled traps. For the time being,
halt the CPU, don't call panic() (until DDB is done).
2002-07-04 10:42:00 +00:00
fvdl
9ec0782af4 Make this look a little more like -current i386 pmap.c 2002-07-04 10:38:26 +00:00
fvdl
4839f70ff2 Fix parameter passed to init_x86_64. 2002-07-04 10:34:22 +00:00
fvdl
ffb9c17b1c Match parameter decl of init386 with reality. 2002-07-04 10:22:20 +00:00
gson
63dd492c1a Mask MCCB interrupts since they are not currently handled
and it is not clear how they should be handled.  Fixes
kern/17071.
2002-07-04 02:20:22 +00:00
thorpej
584c5c23d3 During signal delivery, arrange to have the signal handler invoked
directly, using the trampoline only for the return path.  Saves a
"jsr" in the trampoline.

Reviewed, tested and OK'd by Steve Woodford.
2002-07-04 01:50:39 +00:00
thorpej
2807c6789c Rename SB_UPDATE_TAIL() to SB_EMPTY_FIXUP(), per suggestion from
Jonathan Stone.
2002-07-03 21:39:40 +00:00
thorpej
668640a43d Rename sbappend_stream() to sbappendstream(), per suggestion from
Jonathan Stone.
2002-07-03 21:36:57 +00:00
matt
25036f6b2d Properly compensate for rounding the start of a mem_region up. 2002-07-03 20:41:20 +00:00
thorpej
3590793675 Apply rev. 1.68 of uipc_socket.c to kttcp_soreceive():
Fix 2 bugs with MSG_WAITALL.  The first is to not block forever if one is
trying to MSG_PEEK for more than the socket can hold.  The second is that
before sleeping waiting for more data, upcall the protocol telling it you
have just received data so it can kick itself to re-fill the just drained
socket buffer.
2002-07-03 19:36:52 +00:00
thorpej
6b3c143231 Bump the OS version to 1.6C: socket buffer structure changed. 2002-07-03 19:11:41 +00:00
thorpej
0585ce1489 Make insertion of data into socket buffers O(C):
* Keep pointers to the first and last mbufs of the last record in the
  socket buffer.
* Use the sb_lastrecord pointer in the sbappend*() family of functions
  to avoid traversing the packet chain to find the last record.
* Add a new sbappend_stream() function for stream protocols which
  guarantee that there will never be more than one record in the
  socket buffer.  This function uses the sb_mbtail pointer to perform
  the data insertion.  Make TCP use sbappend_stream().

On a profiling run, this makes sbappend of a TCP transmission using
a 1M socket buffer go from 50% of the time to .02% of the time.

Thanks to Bill Sommerfeld and YAMAMOTO Takashi for their debugging
assistance!
2002-07-03 19:06:47 +00:00
msaitoh
37c7dda3e2 regen 2002-07-03 16:51:36 +00:00
msaitoh
e8a90d330f add ServerWorks CMIC LE, CMIC SL and CIOB-X2 2002-07-03 16:51:02 +00:00
simonb
c19a094675 Don't include <malloc.h> - no memory management style functions are use
in any of the MII drivers.
2002-07-03 06:25:49 +00:00
yamt
7b17e9ce50 add KSTACK_CHECK_DR0. 2002-07-03 02:46:11 +00:00
lukem
325dbd3d1b add reminder to check share/tmac/doc-common as well 2002-07-03 00:49:55 +00:00
yamt
d96bff0e27 add KSTACK_CHECK_MAGIC. discussed on tech-kern. 2002-07-02 20:27:44 +00:00
wrstuden
a7f2b918d3 Fix cscope and mkid targets so that they work even when the kernel
compile directory is not under /usr/src/sys (i.e. when 'S' is not
'../../../..'). Pointed out by Robert Elz in PR 17384.

Thanks again to Andrew Brown for figuring out how to rip .depend apart.
2002-07-02 19:52:16 +00:00
yamt
d566a58b5e fix printf format for DEBUG_LFS. 2002-07-02 19:07:03 +00:00
drochner
8ae04c4b2c consider all ATI cards broken wrt font handling, as suggested by
Bang Jun-Young <junyoung@mogua.com>, but do it in way which allows
single cards to be declared O.K. in case we find one
2002-07-02 18:17:30 +00:00
itojun
0a9d2ad2d7 provide KERN_URND, which extracts sizeof(int) random number from the kernel
(similar to /dev/urandom, for use within chroot jail).
2002-07-02 17:06:17 +00:00
thorpej
11bb3d047b Avoid NULL pointer dereference. kern/17438, xs@kittenz.org. 2002-07-02 16:22:28 +00:00
thorpej
f055878614 Fix using poll(2) on systrace descriptors. 2002-07-02 16:16:33 +00:00
matt
af8dc59949 Add AltiVec routines for save_vec/enable_vec/init_vec. 2002-07-02 15:22:47 +00:00
itojun
5092dd2653 wsdisplay needs wsevent.c. PR 17456 2002-07-02 12:59:39 +00:00
thorpej
7ff40c446d Fix multicast filter programming. 2002-07-01 22:42:47 +00:00
itojun
fb05cd3dd3 new copyright boilerplate from CMU. from openbsd 2002-07-01 22:09:31 +00:00
itojun
390ee363bd check AF_INET6 socketes when IPv4 "too big" messages arrive.
PR 17448
2002-07-01 20:51:25 +00:00
matt
708f4c7b9b Add VRSAVE. 2002-07-01 20:11:05 +00:00
bjh21
3763adaefd Avoid leaving junk in the top half of R0 on return.
This fixes port-arm/17440.
2002-07-01 19:07:18 +00:00
drochner
3680345a91 simplify console initialization a bit, avoid wasting
memory in attach(), and add some commemts
2002-07-01 16:56:09 +00:00
christos
61a86a83fe add a couple more dependencies so that we can build a kernel without
make depend.
2002-07-01 16:37:08 +00:00
ragge
779789e94f Protect biodone() with spl7(). Found by art@openbsd, but fixed in the
wrong way.
2002-07-01 16:20:35 +00:00
thorpej
f3ae1a786e In ex_shutdown(), call ex_enable() to make sure the interface is
powered up and the PCI configuration registers restored.  If we
don't do this, the firmware on some machines gets REALLY confused.
2002-07-01 16:16:37 +00:00
thorpej
2555837833 Also save/restore the PCI_INTERRUPT_REG. 2002-07-01 16:15:35 +00:00
fredette
cfd4248d21 Made the signal trampoline PLABEL-aware.
Added a missing comma to the pmap_redzone() call.
2002-07-01 16:10:02 +00:00
christos
dad84218d6 Fix iplog problem on sparc64 [from Tomi Nylund]
1. size_t is 64 bits, so use a u_32_t for iplused
	2. microtime() and friends expect a struct timeval,
	   passing the first of two unsigned longs will not cut it.
2002-07-01 13:55:35 +00:00
christos
2a01227008 Add example use of WSDISPLAY_CHARFUNCS, from Julio Merino 2002-07-01 13:19:05 +00:00
christos
63a19c881d more cleanups from Julio Merino. 2002-07-01 13:17:48 +00:00
thorpej
0ba2c1b425 When delivering a signal, arrange for the signal handler to be invoked
directly, using the trampoline only for the return path.
2002-07-01 03:10:01 +00:00
thorpej
47506c123a Add kttcp device. 2002-06-30 23:30:07 +00:00
thorpej
10c252ba47 Changes to allow the IPv4 and IPv6 layers to align headers themseves,
as necessary:
* Implement a new mbuf utility routine, m_copyup(), is is like
  m_pullup(), except that it always prepends and copies, rather
  than only doing so if the desired length is larger than m->m_len.
  m_copyup() also allows an offset into the destination mbuf, which
  allows space for packet headers, in the forwarding case.
* Add *_HDR_ALIGNED_P() macros for IP, IPv6, ICMP, and IGMP.  These
  macros expand to 1 if __NO_STRICT_ALIGNMENT is defined, so that
  architectures which do not have strict alignment constraints don't
  pay for the test or visit the new align-if-needed path.
* Use the new macros to check if a header needs to be aligned, or to
  assert that it already is, as appropriate.

Note: This code is still somewhat experimental.  However, the new
code path won't be visited if individual device drivers continue
to guarantee that packets are delivered to layer 3 already properly
aligned (which are rules that are already in use).
2002-06-30 22:40:32 +00:00
thorpej
8eb0145183 Add a table of known-64-bit DP83820-based cards. Use this table
to enable 64-bit data transfers on 64-bit cards when plugged into
a 64-bit slot.  Right know the Asante GigaNIX is listed in that
table.

Sigh, there is an EEPROM bit that can be used to detect 64-bit vs
32-bit cards.  Unfortunately, at least 2 vendors of 32-bit cards
fail to clear the "DATA64_EN" bit in the EEPROM, which causes the
card to lose badly, because it still manages to detect that it's
plugged into a 64-bit PCI slot.  Yay, stupid hardware vendors.
2002-06-30 20:36:06 +00:00
thorpej
145fa4de8a Load configuration data from the EEPROM on the DP83820 differently: rather
than grovel the EEPROM directly, initiate an "EEPROM load" in the PCI
test register, and fetch the values from the CFG register.
2002-06-30 20:04:43 +00:00
thorpej
b77065a9a2 Update the TODO list: We have some Tx interrupt mitigation now, so
we need to do Rx interrupt mitigation next.
2002-06-30 19:13:46 +00:00
thorpej
c9983ba67f Be more aggressive in giving descriptors to the chip in the transmit
path: Instead of waiting for the if_snd queue to be drained before
giving ownership of the frist descriptor to the chip, do it after
sync'ing all the descriptors for a single packet.
2002-06-30 19:11:40 +00:00
thorpej
6caa2f6db1 Implement a sliding interrupt delay window for Tx interrupts. 2002-06-30 18:52:21 +00:00
thorpej
0f2cbd0361 * Give symbolic names to the CFG bits in the EEPROM.
* Get CFG_M64ADDR, CFG_T64ADDR, and CFG_DATA64_EN from the EEPROM.
  Note, we still disable CFG_M64ADDR and CFG_T64ADDR later (XXX need
  PCI bus capability flags for these).
* Print a message if we're in a 64-bit slot and 64-bit data is
  disabled in the EEPROM.  Make sure CFG_DATA64_EN is disabled if
  we're not in a 64-bit slot.
2002-06-30 18:04:12 +00:00
bjh21
c1ba727b47 Version times() so that programs compiled before the recent change to make
sysconf(_SC_CLK_TCK) return hz will work.

In detail:
__times13() returns values scaled by hz.
times() returns values scaled by 100.
<sys/times.h> renames times() to __times13().

_SC_CLK_TCK has changed from 3 to 39.
sysconf(3) returns 100.
sysconf(39) returns hz.
CLK_TCK is defined as sysconf(39).
2002-06-30 09:45:39 +00:00
scottr
9765c0afdf Before reading the (new) Apple Partition Map laid out by sysinst, be sure
to clear the disk label. From Bob Nestor; part 2 of 2 of a fix for
PR 15528.
2002-06-29 19:44:52 +00:00
matt
76c24da31d Add kttcp device. 2002-06-29 19:04:45 +00:00
chs
cfefc92864 rearrange a few lines to appease an assertion. 2002-06-29 18:27:30 +00:00
itojun
3973cdf049 typo in name 2002-06-29 12:33:33 +00:00
rafal
4a563f551c Allow this work work without a DRQ for PCNet parts mapped into ISA space
but which are connected to a local bus and do their own bus-mastering.
This has to be turned on via `flags 1' on the nele? device specification.
Gets one of my boxes working again with -current again.
2002-06-29 05:30:44 +00:00
rafal
fc0c4eac18 Pass bus_space_map() an address then a size, rather than size twice, so this
has a hope of working.
2002-06-29 05:20:15 +00:00
yamt
58077442ae split logging code in order to reduce maximum stack usage. 2002-06-29 04:13:21 +00:00
eeh
c05c5884e6 Turn on parity checking for the PCI bus. 2002-06-29 02:35:22 +00:00
thorpej
7f2925365c Add the kttcp device. 2002-06-28 23:29:26 +00:00
thorpej
473e69750b This is the "kttcp" network throughput testing pseudo-device. From
the block comment at the top of the file:

      This module provides kernel support for testing network
      throughput from the perspective of the kernel.  It is
      similar in spirit to the classic ttcp network benchmark
      program, the main difference being that with kttcp, the
      kernel is the source and sink of the data.

      Testing like this is useful for a few reasons:

      1. This allows us to know what kind of performance we can
         expect from network applications that run in the kernel
         space, such as the NFS server or the NFS client.  These
         applications don't have to move the data to/from userspace,
         and so benchmark programs which run in userspace don't
         give us an accurate model.

      2. Since data received is just thrown away, the receiver
         is very fast.  This can provide better exercise for the
         sender at the other end.

      3. Since the NetBSD kernel currently uses a run-to-completion
         scheduling model, kttcp provides a benchmark model where
         preemption of the benchmark program is not an issue.

There is a companion "kttcp" user program which uses the kttcp
pseudo-device.

Largely written by Frank van der Linden, with some modifications
from me.
2002-06-28 23:27:13 +00:00
drochner
ac1165c19c whitespace 2002-06-28 22:32:58 +00:00
drochner
9b3975fd12 clean up font handling:
-treat the builtin font like any other font at runtime
-for that, copy it to malloc()'d memory during attach()
-in early console initialization, if we have to consider a broken card
 (VGA_CONSOLE_ATI_BROKEN_FONTSEL), copy the builtin font to another
 location in font ram; the attach() code will do the rest
put the "quirk" code into effect again
2002-06-28 22:24:11 +00:00
thorpej
969b2f1817 Fix a comment. 2002-06-28 18:46:46 +00:00
thorpej
9066ce1621 When stopping the various functional blocks of the chip, clear the
bit and then read it back in a loop (with appropriate delays) waiting
for it to read back clear.

This fixes a problem where the bus would hang when bringing down
the interface or changing interface flags on a system with a
sufficiently fast CPU (e.g. 2GHz P4 Xeon).
2002-06-28 18:44:45 +00:00
fvdl
50ade28e9b Rearrange alignment code a bit. 2002-06-28 18:39:45 +00:00
tsutsui
cb383cb5db Define MSGBUFSIZE here only if it's not specified by options(4). 2002-06-28 17:40:20 +00:00
yamt
ec594e3ef5 do previous differently for wddump case. 2002-06-28 16:50:30 +00:00
yamt
2d80988a26 - remove big buffers on stack. discussed on tech-kern.
- constify.
2002-06-28 16:40:50 +00:00
yamt
5154ea5e5b constify diskerr(). 2002-06-28 16:37:20 +00:00
briggs
1b3d605b4e Remove complaint: bus_dmamap_destroy() called for map with valid
mappings bus_dma(9) states: "In the event that the DMA handle contains
a valid mapping, the mapping will be unloaded via the same mechanism
used by bus_dmamap_unload()."  And some drivers do mean to skip the
unload step.
2002-06-28 15:21:00 +00:00
junyoung
a52db40372 Do the necessaries when the builtin font gets saved in slot 1. 2002-06-28 03:38:13 +00:00
matt
3043c05326 Add common routines to do BAT initialization, trap vector setup,
interrupt vector installation, VM initialization, core-dumps (stubbed),
and network soft interrupts.  Also kvtop and mapiodev.
2002-06-28 02:32:16 +00:00
matt
f7a6553147 Add common syscall dispatcher. Also put child_return in here. 2002-06-28 02:30:06 +00:00
itojun
67c6a98161 disallow ktrace on P_SUGID. from openbsd 2002-06-28 01:59:36 +00:00
thorpej
6abec8e2a2 Increase previously added delays from 2us to 10us. 2002-06-28 01:10:06 +00:00
thorpej
90bf67b885 * Only set the jumbo frame capability if we are able to allocate
jumbo frame buffers.
* Garbage-collect some stuff we don't need.
* Fix timeout detection in the firmware handshake.
2002-06-28 00:55:20 +00:00
thorpej
7778c16e7c Use a table to match BCM570x products. 2002-06-27 23:56:20 +00:00
thorpej
b7af161065 Don't call m_aux_find() in the inner loop when creating the Tx
descriptor list.  Instead, call it once and remember the result,
and only call it looking for VLAN tags if VLANs are configured
on the interface.
2002-06-27 23:21:34 +00:00
thorpej
68be8ecae4 Put some delay in the loops that poll for MII transaction
completion.  Without this, reading the PHY can hang the bus
on a sufficiently fast CPU.
2002-06-27 22:31:30 +00:00
fvdl
8a454b46d0 Disable TCP/UDP checksums on the receive side again. 2002-06-27 22:10:11 +00:00
matt
511223b674 If ALTIVEC is not defined, treat EXC_VEC|EXC_USER exceptions as PGM
exceptions.  [Note that we still can't trap these due to issues in
trap_subr.S which are (yet) fixed]
2002-06-27 21:15:35 +00:00
pooka
c558b464ba Assign COPTS instead of adding to it, avoids situation where -mi386
is mixed with -march=something_incompatible

suggested by thorpej
2002-06-27 20:44:08 +00:00
drochner
3825b247fb Only allow the bus_dmamem_alloc() code to sleep if no physically contigous
pages are insisted in.
Atm, the pglistalloc code does the same automatically, but this might change.
2002-06-27 18:37:10 +00:00
ross
686a24e882 add bktr 2002-06-27 18:34:32 +00:00
drochner
e14af78731 Big cleanup and speed improvements to pglist_alloc code:
-pass vm_physseg* instead of physseg index, and PFN (int) instead
 of physical address (could be done even more)
-simplify detection of boundary crossing and behave more intelligently
 in this case
-take stuff out of the inner loops, or put into "#ifdef DEBUG"
 (because we move along physsegs we don't need to check that the
  pages are physically contigous)
-make the "simple" and "contigous" branches look more uniform; at
 least the outer loops might coalesce one day
2002-06-27 18:05:29 +00:00
itojun
2169d69bcf correct %d/%u mismatch. sync w/kame 2002-06-27 14:39:45 +00:00
christos
c96f693db0 PR/17407: Jim Wise: Systrace does not work without procfs.
FIX: use process_domem as thorpej suggested.
2002-06-27 13:22:54 +00:00
itojun
d7006267f3 reduce kernel stack usage by separating struct secasindex. sync w/kame
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
2002-06-27 12:12:49 +00:00
pooka
48e1ffa97b regen 2002-06-27 09:52:53 +00:00
pooka
107e651a5f two AVM isdn interfaces 2002-06-27 09:50:06 +00:00
gmcgarry
f7458b82ef Back out part of revision 1.20 which was causing PROM re-entry
to fail.  Reported by Jarle Greipsland <jarle@uninett.no>.
2002-06-27 08:45:25 +00:00
junyoung
75cfc612c3 Whitespace KNF. 2002-06-27 06:44:17 +00:00
junyoung
db4ede9522 Add VGA_CONSOLE_ATI_BROKEN_FONTSEL (disabled by default). 2002-06-27 06:34:23 +00:00
junyoung
754342aeb8 - Work around a hardware bug that loaded fonts don't work, which is
found on many (all?) of PCI-based ATI graphics cards. It is fully optional
  and can be enabled by adding `options VGA_CONSOLE_ATI_BROKEN_FONTSEL'
  to config file.
- Temporarily remove `quirk' mechanism. Similar code already exists
  in pci_quirks.c.
2002-06-27 06:26:51 +00:00
leo
4fdfe6f24c Exclude the Atari/Milan floppy driver from being a RAID capable device. 2002-06-27 05:13:33 +00:00
simonb
a441a7dffa Remove some clocktick debug code. 2002-06-27 04:09:15 +00:00
simonb
7471732325 Add the 20Kc processor ID. 2002-06-27 03:43:45 +00:00
briggs
bea68a808c Change a 'continue' to a 'break' in switch configuring 64-bit devices.
Add a little more debugging code.
2002-06-27 00:59:21 +00:00
christos
71dcc987cd PR/17402: Add wsmoused support by providing get/set char and events. 2002-06-26 23:05:33 +00:00
matt
cd85109523 Make traps even smaller by noticing the checking of privilege mode and
use of curpcb/USPACE is common and move that into the common trap processing.
2002-06-26 20:00:17 +00:00
drochner
6aa49848cf 2 fixes:
-Don't assume fonts to start with character 0, load at the
 right offset. Now we can use eg wsfont/bold8x16.h which
 starts with chr(1).
-Don't touch the hardware if a font is set for a screen which is
 not active.
2002-06-26 16:33:18 +00:00
drochner
8e82746524 avoid assembler warning 2002-06-26 12:20:29 +00:00
cjs
6f2291b427 Match newer NetGear GA302T cards. 2002-06-26 10:48:18 +00:00
cjs
f4ba5fb7fc Regenerate. 2002-06-26 10:09:16 +00:00
cjs
c3d906554c Add Altima AC9100 Gigabit Ethernet ID. This may not be the correct name.
However, it's the chip on the NetGear GA302T card.
2002-06-26 10:03:58 +00:00
simonb
8c2c311f56 Add evbmips to the list of platforms supported by this driver. 2002-06-26 09:47:08 +00:00
cjs
79a06f07ff Regenerate. 2002-06-26 09:42:44 +00:00
simonb
be77ae0cf5 Whitespace KNF. 2002-06-26 09:38:37 +00:00
cjs
0ef3b7e33b Add a couple more TI IEEE 1394 host controllers. 2002-06-26 09:33:50 +00:00
yamt
175fe41cad stack frames can be overwrapped for eg. softintr. 2002-06-26 08:18:01 +00:00
matt
1a5c0cf685 When not using the OLD pmap, bump kernel KVA space to 512MB (OLD pmap stays
at 256MB).
2002-06-26 01:16:22 +00:00
matt
7a12a9737c Revamp how SR(s) are loaded on the user/kernel boundary. We now load all
16 SR registers when transitioning between kernel and user.  Also, don't
reload the kernel SR(s) on every trap but only on traps from user space.
Instead of loading magic SRs for the kernel, load the kernel SRs from the
kernel_pmap_.  This makes trap_subr.S completely ignorant of SR uses and
so they can change with having to change trap_subr.S.  Also note that
since the user and kernel get complete SR sets, user VA space can now be
increased to 4GB if desired.
2002-06-26 01:14:45 +00:00
matt
7c77963b01 Set SR_PRKEY for user pmaps. For the kernel SR(s) set SR_SUKEY|SR_PRKEY.
Note that we never use a PTE PP of 0 or 1 (supervisor protection) so the
"key" is basically unused.  However, use SR_PRKEY for user space is
conceptionally the right thing to do.  Currently the kernel_pmap SR(s) are
ignored but that is going to be fixed shortly.
2002-06-26 01:10:20 +00:00
thorpej
a572f8f4a5 Report stray interrupts. 2002-06-26 01:06:44 +00:00
drochner
a548b203d4 use PCI_ID_CODE instead of a local macro (cosmetics) 2002-06-25 21:18:32 +00:00
drochner
f9d6718ab9 allow to overwrite the builtin VGA font if necessary,
make the number of available font slots variable,
set up a "quirk" mechanism to tell the generic vga code about crippled
VGA adapters which ignore the "fontsel" TS register,
initiate the quirk table with an ATI chip which happened to be on a board
I tested with.
Afaik quite a number of ATI chips suffers from the "loaded fonts don't
work" problem - these should be added.
Bad side effect of my change: The builtin font will be kicked out
always if a VGA_CONSOLE_SCREENTYPE is specified which needs a loaded
font. In early console initialization, we don't know much about the
graphics card, so we have to assume the worst (ie ATI:-).
2002-06-25 21:07:42 +00:00
thorpej
7704072be3 Correct a comment. 2002-06-25 19:41:08 +00:00
thorpej
fea38885e8 * Interrupt status is in cp13.4, not cp13.1 (D'oh!)
* Fix an inverted test.
2002-06-25 19:40:46 +00:00
thorpej
f2bff71e47 Interrupt steering register is cp13.8, not cp13.2 (D'oh!). 2002-06-25 19:39:51 +00:00
eeh
debc8b26aa Fix ktrace call for 32-bit kernels. 2002-06-25 17:37:03 +00:00
itojun
d2fb91c184 tabify 2002-06-25 16:31:43 +00:00
drochner
8d07c19c5e regen 2002-06-25 12:26:28 +00:00
drochner
4ded79cbb4 After I found a press release of 1998 which states that AMD sold
Davicom PHY chips, merge the identical entries for DM9101 and Am79c873
into one.
Should also fix PR kern/17369 by Dave Huang.
2002-06-25 12:25:56 +00:00
enami
6aad1636a8 If we need to fix up ar_hrd field, we must do it before using ar_tpa/tha. 2002-06-25 04:16:31 +00:00
itojun
a5b52729e6 in arprequest(), fill ar_hrd only for IEEE1394. for other cases,
ifp->if_output will fill it for us.
2002-06-25 04:04:53 +00:00
onoe
b00ef6acdd Fill ar_hrd for AF_ARP. 2002-06-25 03:42:28 +00:00
lukem
214a01678d - replace all "scsibus* at XXXX" with a single "scsibus* at scsi?"
- replace all "atapibus* at XXXX" with a single "atapibus* at atapi?"
- replace all "audio* at XXXX" with a single "audio* at audiobus?"
- replace all "midi* at XXXX" (except "midi* at pcppi?") with a single
  "midi* at midibus?"
2002-06-25 03:12:04 +00:00
enami
96fe4d7666 No need to include same file twice. 2002-06-25 02:55:14 +00:00
enami
4b27343d39 Use if_addrlen macro rather than if_data.ifi_addrlen. 2002-06-25 02:53:27 +00:00
thorpej
e09f5065d0 During signal delivery, arrange to have the signal handler invoked
directly, using the trampoline only for the return path.
2002-06-25 01:24:49 +00:00
nathanw
2a6f9ddc2a Add the now-tested 3Com 3C460B Pegasus-II adapter (Currently US$5 from
cheap web vendors).
2002-06-25 01:07:38 +00:00
itojun
4aac356c0e fwnode* has idhi/idlo locator 2002-06-25 00:32:24 +00:00
itojun
92f9b53eea sync firewire scsi config to the latest reality 2002-06-25 00:29:20 +00:00
enami
37f335b28b The ieee1394 arp reply should be broadcast. 2002-06-24 21:25:34 +00:00
nathanw
4ce40595e2 Pass through the PCI configuration ioctls, like vga_pci.c does. 2002-06-24 21:08:37 +00:00
eeh
691c4d1179 Fix compilation problems in DEBUG code. 2002-06-24 18:48:13 +00:00
bouyer
b2533a4c3e Typo fix 2002-06-24 16:55:17 +00:00
lukem
e3b23eaafd Switch from pccons to wscons, so that USB keyboards have a chance of
working.  From Grant Beattie <grant@netbsd.org>, with changes by me.
2002-06-24 16:14:13 +00:00
mrg
383ef0f9dc make booting from FS_RAID work. tested on vs4000/90. 2002-06-24 14:53:16 +00:00
enami
92912a1744 Actually inject the arp packet into softintr queue. 2002-06-24 12:00:49 +00:00
enami
36f1c19838 Don't use a pointer before it is initialized. 2002-06-24 10:52:15 +00:00
itojun
9f911945d5 handle IDT-less case just as linux does 2002-06-24 10:10:17 +00:00
itojun
fe3778040b tabify 2002-06-24 10:10:16 +00:00
itojun
241389f5d8 make it at least compile/link - copy change to i386/locore.s (1.255 -> 1.256)
not sure if it is correct
2002-06-24 10:05:54 +00:00
pk
cc3f5791ea Comments update: indicate which counters are being incremented. 2002-06-24 09:26:47 +00:00
pk
0e8ea4f752 `fdcio_intrcnt.ev_count' is a 64-bit variable. 2002-06-24 09:24:37 +00:00
itojun
570a3e1f3d set ar_hrd for RFC-defined cases 2002-06-24 08:42:33 +00:00
itojun
e03a874f74 set ia as well 2002-06-24 08:11:30 +00:00
itojun
0143dfc42f integrate IEEE1394 ARP into generic ARP logic.
XXX there's no check at all in ar_hrd, and we don't set ar_hrd on outgoing.
it seems like a bad thing.
2002-06-24 08:06:20 +00:00