Commit graph

56943 commits

Author SHA1 Message Date
Pawel Jakub Dawidek 70665fda32 Fix watch address truncation. The address was truncated when it was passed to
amd64_set_watch() as 'unsigned int' and 'unsigned int' is 32bit long on amd64.

Even with that fix hardware watchpoint don't work for me on amd64, ie. when
I set the watchpoint and write a byte there, nothing happens.
2005-12-27 23:23:47 +00:00
Warner Losh 0e6e3c1384 Ensure that we're aligned at leas tto the size of the resource being requested.
When cbb_debug is on, print the windows that we're mapping.
2005-12-27 19:18:11 +00:00
Warner Losh 0780312f3d nits 2005-12-27 18:55:21 +00:00
Søren Schmidt 7af3abd894 Change the probes in ATA to return a negative value on success.
This allows other driver to take over if needed during probe, and allows
me to distribute new drivers as modules.
2005-12-27 18:22:11 +00:00
Søren Schmidt 091bb42ceb Update the last commit to also take 48Bit access functions. 2005-12-27 17:13:11 +00:00
Søren Schmidt 4b55f0c7c7 Add initial support for the Marvell 88SX[56]0[48][01] series of SATA chips.
Hardware donated by: Matthew Jacob
Hardware donated by: Y!
2005-12-27 17:09:52 +00:00
Søren Schmidt 8ec96d7b8d Fix rebuilds of arrays that got stuck.
Misc minor fixes.

Bughunting and initial fixes by Pav@ and Anton.
2005-12-27 16:49:33 +00:00
Stefan Farfeleder c14284a637 Try to unbreak the tinderbox: Cast a time_t argument to long before printing
it with %ld.
2005-12-27 12:33:18 +00:00
David Xu 9f8eb3cb52 Use variable i instead of variable cpus as an index to get correct kseq. 2005-12-27 12:02:03 +00:00
Gleb Smirnoff 3c6160327d Add \n to log() message.
Submitted by:	Stanislaw Halik <weirdo tehran.lain.pl>
2005-12-27 00:17:11 +00:00
Maxim Sobolev d49b21093c Fix breakage introduced in the previous commit. 2005-12-26 22:32:52 +00:00
Olivier Houchard 81e5864f2e Fix typo in comment. 2005-12-26 22:09:09 +00:00
Maxim Sobolev 900b28f9f6 Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structure
with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually
allow executing elf dynamic binaries (aka shared libraries). When it is
requested to execute ET_DYN elf image check if this flag is on after we
know the elf brand allowing execution if so.

PR:		kern/87615
Submitted by:	Marcin Koziej <creep@desk.pl>
2005-12-26 21:23:57 +00:00
Joseph Koshy ba8ae2de36 - Plug a memory leak: free up per-cpu sample buffers at module unload time.
- Correct a few style nits.
2005-12-26 16:10:00 +00:00
Yoshihiro Takahashi 3b52aaddac MFi386: revision 1.621 2005-12-26 12:46:36 +00:00
Gleb Smirnoff 0b6169c0fa Add simple suspend and resume methods. We call em_stop() on suspend and
em_init() on resume. With this change the network is ready right after
resume, without half minute lag.

Tested by:	Jacques Garrigue
2005-12-26 10:39:21 +00:00
Joseph Koshy 06490ba975 Wrap comment lines to be under 80 characters wide.
MFC after:	3 days
2005-12-26 09:27:24 +00:00
David Xu 1bfa910843 Move global variable private_tss into per-cpu area.
Reviewed by: jhb
2005-12-26 00:07:19 +00:00
Max Laier 6ae8d74a9e Only decrement the max-src-conn counter for tcp connections that reached
"established" state.

Similar to OpenBSD's rev. 1.499 by joel but not breaking ABI.

Obtained from:	OpenBSD (with changes)
Reported by:	Bruno Afonso
MFC after:	3 days
X-MFC:		together with local_flags
2005-12-25 23:52:00 +00:00
Sam Leffler a8af2cc7ce add a sysctl to turn debug msgs on/off when built with IFMEDIA_DEBUG 2005-12-25 23:28:23 +00:00
Max Laier 8d13037cda Fix build after timeval.tv_sec changed from long to time_t. 2005-12-25 22:57:08 +00:00
Ariff Abdullah 88a50509af Add suspend and resume support. 2005-12-25 00:43:03 +00:00
Tom Rhodes 09c00166e4 Make tv_sec a time_t on all platforms but alpha. Brings us more in line with
POSIX.  This also makes the struct correct we ever implement an i386-time64
architecture.  Not that we need too.

Reviewed by:	imp, brooks
Approved by:	njl (acpica), des (no objects, touches procfs)
Tested with:	make universe
2005-12-24 22:22:17 +00:00
Peter Grehan 4ca162b6c4 Forward-declare struct trapframe to allow the aic module to compile. 2005-12-24 08:27:45 +00:00
Alan Cox 60bb39431a Maintain the lock on the vnode for most of exec_elfN_imgact().
Specifically, it is required for the I/O that may be performed by
elfN_load_section().

Avoid an obscure deadlock in the a.out, elf, and gzip image
activators.  Add a comment describing why the deadlock does not occur
in the common case and how it might occur in less usual circumstances.

Eliminate an unused variable from exec_aout_imgact().

In collaboration with: tegge
2005-12-24 04:57:50 +00:00
David Xu d7bc12b096 Avoid kernel panic when attaching a process which may not be stopped
by debugger, e.g process is dumping core. Only access p_xthread if
P_STOPPED_TRACE is set, this means thread is ready to exchange signal
with debugger, print a warning if P_STOPPED_TRACE is not set due to
some bugs in other code, if there is.

The patch has been tested by Anish Mistry mistry.7 at osu dot edu, and
is slightly adjusted.
2005-12-24 02:59:29 +00:00
Warner Losh 8abb0189ca Build ed on amd64. The pci attachment works with qemu on amd64.
I'm holding off on building on sparc64 and others because I don't know
if this driver has had all the inb/outb removed (I think it has).  Nor
do I know if there are byte ordering issues.  There are very few word
operations on an NE2000, but I've not had time to audit them all.

Suggested by: Daniel O'Connor
2005-12-23 21:54:56 +00:00
Jeff Roberson 660002d398 - Improve the INKERNEL macro such that it can no longer give false positives.
This fixes the stack(9) functionality.

Submitted by:	Antoine Brodin <antoine.brodin@laposte.net>
2005-12-23 21:33:55 +00:00
Jeff Roberson 49bdcff518 - Remove and unused include.
Submitted by:	Antoine Brodin <antoine.brodin@laposte.net>
2005-12-23 21:32:40 +00:00
Ruslan Ermilov bebb4536ce Regen. 2005-12-23 20:06:50 +00:00
Ruslan Ermilov c647318411 Fix build. 2005-12-23 20:06:14 +00:00
Gleb Smirnoff 7223585771 Implement an upper limit for packets per second sent by node. 2005-12-23 19:14:38 +00:00
Xin LI cd34c8b6a2 Typo. 2005-12-23 15:50:57 +00:00
Peter Grehan 78cb82148f Mark the return address of the call to ast() in the generic trap
handling code so the stack trace unwinders don't start trying to
go into user-space.

Found by trying to create core dumps with a KTR_COMPILE/KTR_GEOM
kernel, which results in a stack_save() call in the ast() coredump
path - this created a panic, and then calling 'trace' in ddb resulted
in the black screen of death after printing out most of the backtrace.
2005-12-23 13:05:27 +00:00
Yoshihiro Takahashi d0873c5d1d Fix build error. 2005-12-23 12:14:55 +00:00
Poul-Henning Kamp 25f6e35a05 Regenerate sysent with new abort2 system call.
Implement abort2(const char *reason, int narg, void **args);

Submitted by:	"Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
2005-12-23 11:58:42 +00:00
Poul-Henning Kamp fe322ece24 Add missing 455-462 syscalls as unimplemented 2005-12-23 11:56:39 +00:00
Poul-Henning Kamp 5a56b437ec Add abort2() systemcall. 2005-12-23 11:54:11 +00:00
Poul-Henning Kamp 49091c48d5 Make sbuf_copyin() return the number of bytes copied on success.
Submitted by:	"Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
2005-12-23 11:49:53 +00:00
Scott Long d2a401cb70 Create the taskqueue_fast handler with INTR_MPSAFE so that it doesn't run
with Giant.

MFC After: 3 days
2005-12-23 06:18:33 +00:00
Pyun YongHyeon fe806fda54 Use device_printf() and if_printf() rather than printf() and axe
bge_unit from the softc.

Requested by:	marius
2005-12-23 02:04:41 +00:00
John Baldwin b439e431bf Tweak how the MD code calls the fooclock() methods some. Instead of
passing a pointer to an opaque clockframe structure and requiring the
MD code to supply CLKF_FOO() macros to extract needed values out of the
opaque structure, just pass the needed values directly.  In practice this
means passing the pair (usermode, pc) to hardclock() and profclock() and
passing the boolean (usermode) to hardclock_cpu() and hardclock_process().
Other details:
- Axe clockframe and CLKF_FOO() macros on all architectures.  Basically,
  all the archs were taking a trapframe and converting it into a clockframe
  one way or another.  Now they can just extract the PC and usermode values
  directly out of the trapframe and pass it to fooclock().
- Renamed hardclock_process() to hardclock_cpu() as the latter is more
  accurate.
- On Alpha, we now run profclock() at hz (profhz == hz) rather than at
  the slower stathz.
- On Alpha, for the TurboLaser machines that don't have an 8254
  timecounter, call hardclock() directly.  This removes an extra
  conditional check from every clock interrupt on Alpha on the BSP.
  There is probably room for even further pruning here by changing Alpha
  to use the simplified timecounter we use on x86 with the lapic timer
  since we don't get interrupts from the 8254 on Alpha anyway.
- On x86, clkintr() shouldn't ever be called now unless using_lapic_timer
  is false, so add a KASSERT() to that affect and remove a condition
  to slightly optimize the non-lapic case.
- Change prototypeof  arm_handler_execute() so that it's first arg is a
  trapframe pointer rather than a void pointer for clarity.
- Use KCOUNT macro in profclock() to lookup the kernel profiling bucket.

Tested on:	alpha, amd64, arm, i386, ia64, sparc64
Reviewed by:	bde (mostly)
2005-12-22 22:16:09 +00:00
John Baldwin be7ccc4ba3 Return BUS_PROBE_GENERIC rather than 0 in the probe routine.
Requested by:	marius
2005-12-22 16:25:22 +00:00
John Baldwin 2a3d3a660b Use the copy of the card's MAC address saved in tulip_enaddr() in the softc
if we need a valid MAC address (for probing the media for example) before
ether_ifattach() has been called since IF_LLADDR() is NULL then.

Tested by:	tisco
2005-12-22 16:18:23 +00:00
Yoshihiro Takahashi 6a901529f5 Enable the cs and disable the amdsmb and nfsmb on pc98. 2005-12-22 16:16:42 +00:00
Gleb Smirnoff d375e52490 - All bge(4) supported hardware is known to support RX/TX checksum offloading,
except for BGE_CHIPID_BCM5700_B0, which is buggy.
- All bge(4) supported hardware, has a bug that produces incorrect checksums
  on Ethernet runts. However, in case of a transmitted packet, the latter can
  be padded with zeroes, and the checksum would be correct. (Probably chip
  includes the pad data into checksum). In case of receive, we just don't
  trust checksum data in received runts.

Obtained from:	NetBSD (jonathan) via Mihail Balikov
2005-12-22 15:14:42 +00:00
Oleg Bulyzhin c54c76cc2f 1) remove useless check of loop_copy - corresponding code was removed in
rev. 1.70 five years ago.
2) convert loop_copy to "non-negative" flag

Approved by:	glebius (mentor)
MFC after:	2 weeks
2005-12-22 12:16:20 +00:00
Gleb Smirnoff 0014abfcc4 Add a quirk to fix resume on some laptops.
Reported by:	joe
Reported by:	Huang wen hui <huang gddsn.org.cn>
Reported by:	Jacques Garrigue <garrigue math.nagoya-u.ac.jp>
PR:		kern/89825
2005-12-22 09:09:39 +00:00
Pyun YongHyeon f6789fba46 Fix bge_eeprom_getbyte() to return 1 when timeout happens.
Previously it always returned 0 which means success regardless of
EEPROM status.

While here, add a check whether EEPROM read is successful.

Submitted by:   jkim
2005-12-22 02:03:57 +00:00
Pyun YongHyeon 57b183e13c Uncomment bge(4) as it's now working. 2005-12-22 01:46:28 +00:00