Commit Graph

28826 Commits

Author SHA1 Message Date
Warner Losh
99b8465544 Introduce the concept of "default" voltage. Have pccard layer use this
value (-1) in lue of 50 (which assumes a 5.0V card).  The rest of the
pccard system doesn't detect the proper voltage for the card, so we have
to do it on powerup.  Many (all?) 3.3V cards can tolerate 5.0V for reading
the CIS, but may fail to operate properly when so powered.

Idea from: Chiharu Shibata-san <chi@bd.mbn.or.jp> in bsd-nomads:15867
2001-11-11 06:58:43 +00:00
Warner Losh
b668d9a14a Do not assume that a I/O based bridge is a 6729. Intel made a funky chip
that I have the datasheet on the way for that also does this.
2001-11-11 06:55:15 +00:00
Warner Losh
f73dc36fa2 add note about why I used d_thread_t in the prototypes. 2001-11-11 06:32:48 +00:00
Warner Losh
4e8764288f Move all: target to kern.pre.mk so it matters less where you include
kern.post.mk.

# this should allow us to move kern.post.mk to the last line of the makefiles,
# but I'll do that slowly as I verify that one can do that w/o breaking things.

Submitted by: naddy
2001-11-11 06:16:53 +00:00
Marcel Moolenaar
7b9cc19934 Append to SYSTEM_OBJS and CLEAN before including kern.post.mk.
Any modifications to SYSTEM_OBJS after including kern.post.mk
will not make it to SYSTEM_DEP and consequently any dependency
rules. This caused __{div|rem}* to not be built...
2001-11-11 05:26:14 +00:00
Andrew R. Reiter
b49c67f03f - No need for resetting values to 0 when M_ZERO flag is used.
Approved: jhb
2001-11-10 21:36:56 +00:00
Marcel Moolenaar
da995dc92b Avoid using the .align directive to skip to the next vector offset.
It doesn't help us catch overflowing vector entries at compile time.
Instead use the .org directive. The last entry in the IVT doesn't
strictly need to be limited to 256 bytes, but doing so allows the
the VHPT to be placed immediately following the IVT without wasting
any space due to alignment.
2001-11-10 07:24:09 +00:00
Ian Dowse
cca8f9808b Properly sanity-check the old msgbuf structure before we accept it
as being valid. Previously only the magic number and the virtual
address were checked, but it makes little sense to require that
the virtual address is the same (the message buffer is located at
the end of physical memory), and checks on the msg_bufx and msg_bufr
indices were missing.

Submitted by:	Bodo Rueskamp <br@clabsms.de>
Tripped over during a kernel debugging tutorial given by: grog
Reviewed by:	grog, dwmalone
MFC after:	1 week
2001-11-09 23:58:07 +00:00
Matthew Dillon
fe8e0238cc Fix deadlock introduced in 1.73 (Jan 1998). The paging-in-progress count
on a vnode-backed object must be incremented *after* obtaining the vnode
lock.  If it is bumped before obtaining the vnode lock we can deadlock
against vtruncbuf().

Submitted by:	peter, ps
MFC after:	3 days
2001-11-09 21:34:45 +00:00
Thomas Moestl
79327ed19c Add entries for the recently committed code. 2001-11-09 20:44:44 +00:00
Thomas Moestl
a1dc822112 Add a file forgotten in the previous commit (a kobj interface that
defines methods that need to be implemented by sparc64 host bridge drivers).
2001-11-09 20:43:44 +00:00
Thomas Moestl
94542806de Add EBus support code, ported from NetBSD. 2001-11-09 20:23:38 +00:00
Thomas Moestl
ebaf8798e9 Add ISA support code for sparc64. 2001-11-09 20:21:21 +00:00
Thomas Moestl
9d69e46260 Add support for the Sun psycho/sabre UPA-PCI bridge, some OpenFirmware
PCI support code, and a driver for the Sun APB PCI-PCI bridge.
Partly ported from NetBSD.
2001-11-09 20:19:58 +00:00
Thomas Moestl
606d0094b2 Support for the UltraSpac DVMA MMU (IOMMU), ported from NetBSD. 2001-11-09 20:14:41 +00:00
Thomas Moestl
785fad4c2b Add some OpenFirmware bus support code and definitions. 2001-11-09 20:10:55 +00:00
Thomas Moestl
11dd9255e9 Add bus_space and busdma support for sparc64. 2001-11-09 20:05:53 +00:00
Thomas Moestl
d1994ead81 Add a nexus device for sparc64, which uses the OpenFirmware to attach UPA
devices (mostly host bridges) and handles interrupt allocation and setup.
2001-11-09 20:01:25 +00:00
Thomas Moestl
7478d2e8b2 Header file updates needed for the cache code: add/correct some ASI
definitions and add PAGE_*_MIN and -_MAX macros.
2001-11-09 19:37:52 +00:00
Thomas Moestl
3c78eb652c Add cache handling code for sparc64. 2001-11-09 19:12:06 +00:00
Doug Rabson
3fc4a53e7a * Make sure we increment pm_stats.resident_count in pmap_enter_quick
* Re-organise RID allocation so that we don't accidentally give a RID
  to two different processes. Also randomise the order to try to reduce
  collisions in VHPT and TLB. Don't allocate RIDs for regions which are
  unused.
* Allocate space for VHPT based on the size of physical memory. More
  tuning is needed here.
* Add sysctl instrumentation for VHPT - see sysctl vm.stats.vhpt
* Fix a bug in pmap_prefault() which prevented it from actually adding
  pages to the pmap.
* Remove ancient dead debugging code.
* Add DDB commands for examining translation registers and region
  registers.

The first change fixes the 'free/cache page %p was dirty' panic which I
have been seeing when the system is put under moderate load. It also
fixes the negative RSS values in ps which have been confusing me for a
while.

With this set of changes the ia64 port is reliable enough to build its
own kernels, even with a 20-way parallel build. Next stop buildworld.
2001-11-09 13:25:14 +00:00
Doug Rabson
412fcd9856 Raise SIGILL for General Exceptions - its closer to the correct meaning. 2001-11-09 13:11:17 +00:00
Doug Rabson
3930f05aca Reserve more space for phys_avail. Really need to be more careful about
overflowing phys_avail.
2001-11-09 13:09:57 +00:00
Doug Rabson
22cbbdd047 Teach DDB about branch registers. 2001-11-09 13:08:25 +00:00
Doug Rabson
06d0801163 Define PS and VE fields of region register correctly. 2001-11-09 13:07:44 +00:00
Warner Losh
93da209126 o Try to do 3.3V support better for the 6722 and 6729/30.
o Bite the bullet and create controller types for the 6729 and also for
  the 673x.  Rename the 672x to 6722.
o Define minimal extended register info (just register 0xa for reading VS[12]).

# I think the last version may have broken 673x controllers, but this should
# fix them.

Tested on the 6722, but not the 6729.

Ideas from: Chiharu Shibata-san's article in bsd-nomads:15866
2001-11-09 07:33:54 +00:00
Warner Losh
3761b249c9 Fix the 3.3V support for Cirrus Logic CL-PD6710. This appears to work
on my CL-PD6722, but won't work on the CL-PD6729.  The latter two need
more sophisticated detection of 3.3V cards than I'm up to at the
moment.  Also, only a few of the ISA chipsets that support 3.3V will
likely work at the moment.

It appears that for 3.3V cards we must detect them and adjust the
pwr.vcc value from 50 to 33.  Give a strong hint to automatically
power up the card for PD_POWER cards.

This makes my SMC 2602W (the 3.3V version of the 2632W) work on my
Fujitsu Stylistic 500.

SMC 3.3V card donated by: Ryan Losh
Thanks to: bsd-nomads for reviews of past 3.3V code
2001-11-09 06:26:57 +00:00
Marcel Moolenaar
d761b0550a Implement os_boot_rendez. Application processors are initialized
and brought to a point where kernel specific initializations can
be done. That will be the next step...
2001-11-09 05:18:45 +00:00
Matthew Dillon
8ba1f55b49 Placemark an interrupt race in -current which is currently protected by
Giant.  -stable will get spl*() fixes for the race.

Reported by: Rob Anderson <rob@isilon.com>
MFC after:	0 days
2001-11-08 18:09:18 +00:00
Jun Kuriyama
6183dc49fb Add support for Intel's i820/i840/i845/i850/i860 chipset.
Submitted by:	nork@cityfujisawa.ne.jp (Norikatsu Shigemura)
PR:		kern/31559, kern/31825
MFC after:	1 week
2001-11-08 16:03:23 +00:00
Robert Watson
eacb362f8a o General style improvemnts.
Submitted by:	bde
2001-11-08 15:31:19 +00:00
Robert Watson
44a280a67e o Trim trailing whitespace from kern_mib.c, as suggested by bde. Good
grief.
2001-11-08 15:20:00 +00:00
Alfred Perlstein
d25c683ad5 Switch behavior of fifos to more closely match what goes on in other OSes.
Basically FIFOs become a real pain to abuse as a rendevous point without
this change because you can't really select(2) on them because they always
return ready even though there is no writer (to signal EOF).

Obtained from: BSD/os
2001-11-08 10:28:32 +00:00
Robert Watson
ce17880650 o Replace reference to 'struct proc' with 'struct thread' in 'struct
sysctl_req', which describes in-progress sysctl requests.  This permits
  sysctl handlers to have access to the current thread, permitting work
  on implementing td->td_ucred, migration of suser() to using struct
  thread to derive the appropriate ucred, and allowing struct thread to be
  passed down to other code, such as network code where td is not currently
  available (and curproc is used).

o Note: netncp and netsmb are not updated to reflect this change, as they
  are not currently KSE-adapted.

Reviewed by:		julian
Obtained from:	TrustedBSD Project
2001-11-08 02:13:18 +00:00
David E. O'Brien
fd471588f4 We need to operate on struct thread now, not struct proc.
Submitted by:	rwatson
2001-11-08 01:49:06 +00:00
Peter Wemm
c3699b5f63 For what its worth, sync up the type of ps_arg_cache_max (unsigned long)
with the sysctl type (signed long).
2001-11-08 00:24:48 +00:00
Kelly Yancey
9bf4b82fc9 Add quirk for Minolta 2330 Zoom digital camera.
Submitted by:	Jan Stocker <Jan.Stocker@t-online.de>
2001-11-07 23:11:13 +00:00
Kelly Yancey
66eb895778 Add quirk for Nikon Coolpix 995.
Submitted by:	Jos Vissers <jos@tunix.nl>
2001-11-07 21:47:49 +00:00
David E. O'Brien
de5fe5d53b rcsid[]->__FBSDID 2001-11-07 19:55:16 +00:00
Bill Fenner
ce20386909 Initialize first to -1; this will create a (nearly) empty file on failure,
instead of looping until the disk is full.  This kind of failure can
especially happen when a version of awk that doesn't support POSIX
character classes is used.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-07 17:53:25 +00:00
Peter Wemm
4ff021c699 Fix printf format bugs introduced in rev 1.34 for printing times.
quad_t cannot be printed with %lld on 64 bit systems.

Dont waste cpu to round user and system times up to long long, it is
highly improbable that a process will have accumulated 68 years of
user or system cpu time (not wall clock time) before a reboot or
process restart.
2001-11-07 02:51:25 +00:00
John Baldwin
6a50ba658c Remove a few more debugging bits and turn on twiddle output while reading
from the CD.  This turns off the dual console output to COM1.
2001-11-07 01:20:33 +00:00
Kelly Yancey
33b6e7aabe Fix bug in scsi_read_write() where it might use 6-byte commands when
10/12-byte-specific flags where specified.

Reviewed by:	ken
MFC after:	1 day
2001-11-06 23:50:33 +00:00
Peter Wemm
da73fe05e1 Add AMD766 OHCI USB controller. Remove unused VENDORID lists. 2001-11-06 23:44:03 +00:00
Hajimu UMEMOTO
e9d3164d29 Fixed the behavior when there is no inbound policy for the ipsec
tunneled packet.
When there is no suitable inbound policy for the packet of the ipsec
tunnel mode, the kernel never decapsulate the tunneled packet
as the ipsec tunnel mode even when the system wide policy is "none".
Then the kernel leaves the generic tunnel module to process this
packet.  If there is no rule of the generic tunnel, the packet
is rejected and the statistics will be counted up.

Obtained from:	KAME
MFC after:	1 week
2001-11-06 22:45:29 +00:00
Thomas Moestl
7bd6ef7d4d Add emul.c and in_cksum.c, make the OpenFirmware console driver optional,
reorder a bit.
2001-11-06 20:25:44 +00:00
Thomas Moestl
4f14099d5f Add a special OpenFirmware entry point for terminating the kernel (in
this case, the firmware trap table needs to be restored). Make use of
it in cpu_halt() and cpu_reset(), and make cpu_reset() reboot the kernel
that was used previously insead of behaving like cpu_halt().
Add a shutdown_final event handler that turns the power off if requested.
2001-11-06 20:22:18 +00:00
Thomas Moestl
9b3b51bcab Add code to emulate unimplemented (non-fp) instructions and to fixup
unaligned accesses, and instr.h, which contrains definitions for the
sparc64 instruction set (partly from NetBSD).
Make use of some definitions from instr.h in db_disasm.c.
2001-11-06 20:13:44 +00:00
Robert Watson
d3c9fa0463 o Cache the process's struct prison so as to create a more visually
appealing code structure.  In particular, s/req->p->p_ucred->cr_prison/pr/

Requested by:	imp, jhb, jake, other hangers on
2001-11-06 20:09:33 +00:00
Thomas Moestl
cd785cc1e7 Add optimized implementations of in_cksum_skip() and related functions
for sparc64.
2001-11-06 20:05:01 +00:00