Commit Graph

644 Commits

Author SHA1 Message Date
n_hibma
c98f016084 Align the interfaces for the various watchdogs and make the interface
behave as expected.

Also:
- Return an error if WD_PASSIVE is passed in to the ioctl as only
  WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an
  explanation of the difference between WD_ACTIVE and WD_PASSIVE.
- Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've
  lost your sense of humor, than don't add a define.

Specific changes:

i80321_wdog.c
  Don't roll your own passive watchdog tickle as this would defeat the
  purpose of an active (userland) watchdog tickle.

ichwd.c / ipmi.c:
  WD_ACTIVE means active patting of the watchdog by a userland process,
  not whether the watchdog is active. See sys/watchdog.h.

kern_clock.c:
  (software watchdog) Remove a check for WD_ACTIVE as this does not make
  sense here. This reverts r1.181.
2006-12-15 21:44:49 +00:00
sam
fee97a223b Handle a missing NPE firmware file better; if it's missing print a
(somewhat) meaningful message and terminate the build.  It'd be
nice to print a proper URL from which to fetch the file but that
seems problematic.  Leave a suggested starting point in this file
(TBD: add it to the man page).

Submitted by:	ru
2006-12-07 00:49:33 +00:00
cognet
ae543684d0 Unbreak build for Skyeye: do not attempt to do any DMA, as Skyeye doesn't
emulate it.

Reported by:	ru
2006-12-07 00:24:15 +00:00
julian
396ed947f6 Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent..
Specifically, remove:
Any reference of the ksegrp structure. This feature was
never fully utilised and made things overly complicated.
All code in the scheduler that tried to make threaded programs
fair to unthreaded programs.  Libpthread processes will already
do this to some extent and libthr processes already disable it.

Also:
Since this makes such a big change to the scheduler(s), take the opportunity
to rename some structures and elements that had to be moved anyhow.
This makes the code a lot more readable.

The ULE scheduler compiles again but I have no idea if it works.

The 4bsd scheduler still reqires a little cleaning and some functions that now do
ALMOST nothing will go away, but I thought I'd do that as a separate commit.

Tested by David Xu, and Dan Eischen using libthr and libpthread.
2006-12-06 06:34:57 +00:00
cognet
f302efe50d Do not forget to call pmap_free_l2_bucket() in pmap_remove_pages().
This can fix the pmap-related panics reported on arm.

MFC After:	3 days
2006-12-04 12:55:00 +00:00
cognet
9b1d13ab09 Provide stream operations. 2006-12-02 13:37:29 +00:00
cognet
496475aa1f We can have no PV entry here if the previous mapping was unmanaged, and the new
one is unmanaged too, so update the KASSERT to reflect this.
2006-12-01 12:29:55 +00:00
cognet
644eaab03a In pmap_ts_referenced(), don't attempt to do anything if the page is
fictitious, and just return 0.
2006-11-30 23:35:34 +00:00
cognet
195024caef First bits of Xscale core 3 support (the VM bits are far from being optimal
yet).
2006-11-30 23:34:07 +00:00
cognet
126947ef1e Introduce CPU_XSCALE_CORE3, as XScale Core 3 is significally different than
regular Xscale (it has no mini data cache, has armv6-style 16MB
supersections, and can address 36bits).
Define it for i81342.
2006-11-30 23:30:40 +00:00
kevlo
da6b91f11c Better i2c bit definitions.
Approved by: cognet
2006-11-30 06:30:01 +00:00
jb
da35e3e55f Turn console printf buffering into a kernel option and only on
by default for sun4v where it is absolutely required.

This change moves the buffer from struct pcpu to the stack to avoid
using the critical section which created a LOR in a couple of cases
due to interaction with the tty code and kqueue. The LOR can't be
fixed with the critical section and the pcpu buffer can't be used
without the critical section.

Putting the buffer on the stack was my initial solution, but it was
pointed out that the stress on the stack might cause problems
depending on the call path. We don't have a way of creating tests
for those possible cases, so it's best to leave this as an option
for the time being. In time we may get enough data to enable this
option more generally.
2006-11-30 04:17:05 +00:00
imp
a4a3a2c4c4 MFp4:
formatting nit
2006-11-29 08:17:40 +00:00
imp
befbd3a3bb Make this work a lot better:
Remove a lot of older cruft not needed.
	Improve ISR support, but it is still unused since polling is faster
	Properly initalize the speed register to get 90kb/s, not 400b/s.
	Try to catch NACK
	Allow 0 length read transfers to generate start/top pairs.
2006-11-29 08:15:59 +00:00
imp
85a0be372b MFp4:
correct data counts so that we clock enough data for the spi
	transaction.  This allows complete spi transactions to happen.
2006-11-29 07:57:02 +00:00
kevlo
31440a920a Bring in status led support for /dev/led/gpioled on Avila.
Approved by: cognet
2006-11-22 12:57:17 +00:00
imp
ceddc20728 MFp4: Make it work :-)
o Don't delay when checking the done bits.  There's no gain other
	  than a small performance hit.
	o calculate the clock divisors better (things are still way slow,
	  so maybe there's more here?)
	o don't always fail reset.  Always succeed instead.
	o fix inverted logic around at91_twi_wait() return value
	o remove debug code
	o remove unneeded, unworking junk
2006-11-22 06:51:59 +00:00
kevlo
b38795bee6 Match bus space unmap prototype.
Approved by: cognet
2006-11-20 13:21:02 +00:00
imp
5df82d7e99 MFp4: Tweak descriptions in preparation for porting to other members of
the AT91 arm9 family.
2006-11-20 06:27:15 +00:00
sam
9eab840888 config for Gateworks Avila board booting with NFS-mounted root on npe0
Reviewed by:	cognet, imp
MFC after:	1 month
2006-11-19 23:58:12 +00:00
sam
ea8c3a2c48 Gateworks Avila board support:
o ixp425 support
o NPE network driver (requires Intel microcode)
o h/w qmgr support
o True IDE compact flash over expansion bus
o pci (ath and hifn795x parts tested)
o xscale watchdog timer
o ds1672 RTC on i2c bus
o ad7418 voltage + temp monitoring on i2c bus
o uart

Work done together with cognet, kevlo, and jmg.  Parts of
the ixp425 support obtaine/derived from netbsd.

Reviewed by:	cognet, imp
MFC after:	1 month
2006-11-19 23:55:23 +00:00
sam
023ec0dcbf change bus space unmap protoype
Reviewed by:	cognet, imp
MFC After:	1 month
2006-11-19 23:47:51 +00:00
sam
6f04d0fe06 correct bus space unmap prototype
Reviewed by:	cognet, imp
MFC after:	1 month
2006-11-19 23:46:50 +00:00
sam
958a76563e elaborate on stepping names; add intel terminology to help
people cross-referencing intel docs

Reviewed by:	imp, cognet
MFC after:	1 month
2006-11-19 23:45:33 +00:00
cognet
c1bbb4897d Erm we really want to mask all interrupts in the range, just not the first
one.

Submitted by:	ru
2006-11-17 11:56:56 +00:00
kevlo
a75c025373 Compile -- remove an unused global variable avail_end.
Approved by: cognet
2006-11-17 00:53:39 +00:00
ru
8beeb4382c Fix a comment. 2006-11-13 06:26:57 +00:00
alc
6093953d36 Make pmap_enter() responsible for setting PG_WRITEABLE instead
of its caller.  (As a beneficial side-effect, a high-contention
acquisition of the page queues lock in vm_fault() is eliminated.)
2006-11-12 21:48:34 +00:00
alc
760248140c Eliminate unused global variables. 2006-11-11 20:57:52 +00:00
alc
917d191eab MFamd64/ia64/i386/sun4v
Use cnt.v_page_count, the actual count of available physical pages,
  instead of vm_page_array_size to compute the maximum number of pv
  entries.
2006-11-08 06:31:28 +00:00
cognet
d64324b021 Increate cnt.v_intr on interrupt. 2006-11-08 01:32:24 +00:00
cognet
6c634eded7 Identify the xscale 81342. 2006-11-07 22:36:57 +00:00
cognet
d086fc78af In the ARM_USE_SMALL_ALLOC case, vm_page_t may have an address < KERNBASE,
so adjust the KASSERT to reflect this.
2006-11-07 22:35:30 +00:00
cognet
d9c8d94a60 Add atomic_cmpset_acq_32. 2006-11-07 11:53:44 +00:00
imp
bac59c3a27 MFp4:
o Fix the packet statistics
	o Make sure we set the FD bit when in full duplex
	o Improve TX side efficency by eliminating a data copy for
	  unfragmented mbufs (the hardware can't do s/g).
	o Minor busdma pedantry
	o better comments in some places, more XXX in others
	o Minor style nits.

This solves a problem I was seeing where I'd get no ethernet when not
booting with a NFS root.  Well, unless I unplugged the cable and
plugged it back in first so I'd get the same up down up messages I get
for NFS root...

Thanks to sam and scottl for suggestions on making this driver more
efficient through better use of approrpiate APIs.
2006-11-03 07:39:37 +00:00
cognet
87614bd3fe Do not include both <sys/types.h> and <sys/param.h>, it is a style bug as
sys/types.h is included in sys/param.h, so instead just move the
#include <sys/param.h> before the headers that need it.

Spotted out by:	bde
2006-11-01 12:41:43 +00:00
jb
d2bd807356 Add a cnputs() function to write a string to the console with
a lock to prevent interspersed strings written from different CPUs
at the same time.

To avoid putting a buffer on the stack or having to malloc one,
space is incorporated in the per-cpu structure. The buffer
size if 128 bytes; chosen because it's the next power of 2 size
up from 80 characters.

String writes to the console are buffered up the end of the line
or until the buffer fills. Then the buffer is flushed to all
console devices.

Existing low level console output via cnputc() is unaffected by
this change. ithread calls to log() are also unaffected to avoid
blocking those threads.

A minor change to the behaviour in a panic situation is that
console output will still be buffered, but won't be written to
a tty as before. This should prevent interspersed panic output
as a number of CPUs panic before we end up single threaded
running ddb.

Reviewed by:	scottl, jhb
MFC after:	2 weeks
2006-11-01 04:54:51 +00:00
cognet
b52ff25a92 Include <sys/types.h>, to get definition for uint32_t.
Submitted by:	David Sharp
2006-10-30 23:23:00 +00:00
jb
d20db01f97 Remove the KSE option now that it's in DEFAULTS on these arches/machines.
The 'nooption' kernel config entry has to be used to turn KSE off now.
This isn't my preferred way of dealing with this, but I'll defer to
scottl's experience with the io/mem kernel option change and the grief
experienced over that.

Submitted by:	scottl@
2006-10-26 22:11:35 +00:00
jb
f82c799735 Make KSE a kernel option, turned on by default in all GENERIC
kernel configs except sun4v (which doesn't process signals properly
with KSE).

Reviewed by:	davidxu@
2006-10-26 21:42:22 +00:00
cognet
012f0cc576 Let allow to teardown multiple irqs as well. 2006-10-25 21:11:46 +00:00
cognet
1716b74849 Setup multiple interrupts if needed. 2006-10-25 21:00:08 +00:00
imp
d7da10161e MFp4: Move the parameters that are basically dictated by the AT91
organization to that file.
2006-10-25 08:00:11 +00:00
imp
d7e5c47a91 MFp4: Status register bits 2006-10-25 07:58:18 +00:00
cognet
3c4525479b Ooops, dump_avail[i] can be 0 if the RAM starts at 0x00000000, so check that
dump_avail[i + 1] is == 0 as a stop condition instead.
MFC after: 3 days
2006-10-24 23:27:52 +00:00
kevlo
8659159398 style(9) cleanup.
Approved by: cognet
2006-10-21 04:25:00 +00:00
cognet
b4b85ee027 Ok I am an idiot. On 32 bits big-endian systems, it is needed to handle the
syscalls using __syscall but only actually returning 32bits, such as mmap(),
specially : they set the return value in td->td_retval[0], but the userland
functions will expect this in r1, and not in r0 as it is normally done, as it
is the LSB. So add a special case for all these syscalls (all except lseek,
which truly returns 64bits).

Many thanks to Peter Grehan for his patience while explaining me the issue.
2006-10-21 00:46:56 +00:00
cognet
35034161dd Use __QUAD_LOWWORD for __syscall, to always use the good word, whatever the
endianness is.
2006-10-20 22:40:31 +00:00
cognet
e9b25c9592 There's no need to special-case lseek for arm/big-endian. 2006-10-20 11:00:03 +00:00
imp
c24d0dcbc6 MFp4: Working SPI driver. 2006-10-20 07:10:13 +00:00