Commit Graph

46660 Commits

Author SHA1 Message Date
Warner Losh
734e3cc5fd Update to reflect new location in the tree. This has been repo copied
from sys/isa/fd.c in preparation for specialization of attachments for
different busses.
2004-05-17 05:42:04 +00:00
Peter Wemm
872e9216d0 Oops, use the generic ELF_ST_BIND() macro instead of ELF64_ST_BIND.
Submitted by:  marks
2004-05-17 00:51:34 +00:00
Ruslan Ermilov
f8aa392b11 Markup fixes. 2004-05-16 22:51:36 +00:00
Peter Wemm
df4fd27737 Checkpoint some of what I was starting to tinker with for having some
different context support for 32 vs 64 bit processes.  This simply omits
the save/restore of the segment selector registers for non 32 bit
processes.  This avoids the rdmsr/rwmsr juggling when restoring %gs
clobbers the kernel msr that holds the gsbase.

However, I suspect it might be better to conditionally do this at
user<->kernel transition where we wouldn't need to do the juggling in the
first place.  Or have per-thread extended context save/restore hooks.
2004-05-16 22:43:57 +00:00
Peter Wemm
1c4a1c34b7 Disable ndis module on amd64. It doesn't compile. For example,
hal_raise_irql(void) doesn't take an argument, but it is called with one.
eg: irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL);
This is hidden by the macros on i386, but becomes a compile error on amd64
since the arguments are actually checked.
2004-05-16 22:24:57 +00:00
Peter Wemm
12c1418ccf Kill the LAZYPMAP ifdefs. While they worked, they didn't do anything
to help the AMD cpus (which have a hardware tlb flush filter).  I held
off to see what the 64 bit Intel cpus did, but it doesn't seem to help
much there either.  Oh well, store it in the Attic.
2004-05-16 22:11:50 +00:00
Peter Wemm
7be2e3e26d Converge some more with i386. 2004-05-16 21:27:29 +00:00
Peter Wemm
dbfcb6b2db Remove "register_t eflags; eflags = read_eflags();" because 1) it wasn't
subsequently used in the code, and 2) it doesn't compile on !i386.
2004-05-16 21:22:45 +00:00
Joerg Wunsch
69271da461 Another candidate that didn't use copyin/copyout for user<->kernel
transfers.

MFC after:	1 month
2004-05-16 21:19:59 +00:00
Joerg Wunsch
add37e1e86 You wouldn't believe a driver could survive doing userland IO without
properly using copyin/copyout for more than 5 years?  This one did. :-)

Properly encapsulate all user<->kernel data transfers using copy{in,out}.

MFC after:	1 month
2004-05-16 21:18:45 +00:00
Joerg Wunsch
c2d85eaa93 After successfully attaching an iicbus instance, instead of using a
NULL name in device_add_child(), explicitly name all of our known
child drivers in order to give them a chance to attach to us.
Otherwise, only the first one present would be probed and attached.

Reviewed by:	nsouch
MFC after:	1 month
2004-05-16 21:11:46 +00:00
Peter Wemm
2a779082bb MFi386: add rue and twa 2004-05-16 20:57:01 +00:00
Peter Wemm
5119532b56 MFi386: avoid partial register references, for what its worth. 2004-05-16 20:46:13 +00:00
Peter Wemm
792e29ba26 For consistency with i386, have pmap_kenter_temporary() take a vm_paddr_t
argument.  It is actually the same type on amd64 (vm_paddr_t = vm_offset_t)
but this reduces the i386<->amd64 diffs a little.
2004-05-16 20:44:41 +00:00
Peter Wemm
463e5aa66e MFi386: numerous interrupt and acpi updates 2004-05-16 20:30:47 +00:00
Peter Wemm
4d6bcc8306 Enable first part of kld's on amd64. This is known to not work right
yet, but building kld's is OK now and they can be loaded by kldload(2).
(but the machine will likely crash soon afterwards, a "minor" problem :-)

Brought to you by:  my injured knee (from moving)
2004-05-16 20:11:38 +00:00
Peter Wemm
e8855d4f97 Make a small revision to the api between the elf linker core and the
elf_reloc() backends for two reasons.  First, to support the possibility
of there being two elf linkers in the kernel (eg: amd64), and second, to
pass the relocbase explicitly (for relocating .o format kld files).
2004-05-16 20:00:28 +00:00
Archie Cobbs
1a292b8015 Allow ng_ether "lower" and "orphans" hooks to be connected at the same time.
Reviewed by:	julian
PR:		kern/63317
2004-05-16 19:31:35 +00:00
Yoshihiro Takahashi
d385ba7313 - Initialize uart_bus_space_io and uart_bus_space_mem.
- Fix wrong comment.
2004-05-16 14:12:05 +00:00
Ruslan Ermilov
278d864be2 Fixed the disordering from rev. 1.371. 2004-05-16 13:58:27 +00:00
Doug Rabson
c59285296e Don't use the node id as an index into the topology map. This breaks
if a node on the bus has more than three ports (like my cheapo six
port hub).
2004-05-16 11:26:39 +00:00
Olivier Houchard
9049715ff9 Try harder not to compile anything in sys/boot for arm.
I wonder how buildworld ever worked for me...
2004-05-16 00:19:12 +00:00
Colin Percival
2b8b4f37be Remove dead code. (This loop counted the number of rules, but the count
was never used.)

Reported by:	pjd
Approved by:	rwatson
2004-05-15 20:55:19 +00:00
Scott Long
f3a537ca3f Remove twa_intrhook prototype.
Submitted by:	cperciva
2004-05-15 15:41:59 +00:00
Scott Long
e25b7fccd4 Set the cpi.hba_inquiry field to something useful. 2004-05-15 05:18:05 +00:00
Scott Long
bd4c922777 Remove the config_intrhook as it is not needed. 2004-05-15 05:17:42 +00:00
Dag-Erling Smørgrav
0f126ea09f Remove some debugging printf()s and a pointless device_set_desc() call. 2004-05-15 00:07:23 +00:00
Olivier Houchard
045ec6ce2f Remove libkern/mem* 2004-05-14 23:42:54 +00:00
Olivier Houchard
46bed5089f Implement bcopy, memcpy and memcmp in support.S. 2004-05-14 23:42:30 +00:00
Olivier Houchard
8c412454dd Remove libkern/bzero.S and libkern/memset.S. 2004-05-14 23:31:36 +00:00
Olivier Houchard
c8d8367098 Implement bzero et memset in support.S 2004-05-14 23:31:10 +00:00
Ken Smith
f7dd67d801 Change ffs_realloccg() to set the valid bits for the extended part of the
fragment to zero the valid parts of a VM_IO buffer.

RE would like this to be part of 4.10-RC3 so this will be MFC-ed immediately.

Reviewed by:	alc, tegge
2004-05-14 22:00:08 +00:00
Bruce Evans
a13ec35b05 Fixed some common printf format errors. Don't assume that "struct foo *"
is "void *" (it isn't) or that the default promotion of pid_t is int.
Instead, assume that casting "struct foo *" to "void *" and printing the
result with %p is useful, and that all pid_t's are representable as longs.

Fixed some minor style bugs (mainly spelling errors in comments).
2004-05-14 20:51:42 +00:00
Ruslan Ermilov
237266b2e6 Back out last revision that unnecessarily changed valid assembler
line comments and damaged the CVS history.

Prompted by:	bde, jhb
2004-05-14 20:29:30 +00:00
Ruslan Ermilov
b09ce52594 Partly back out last revision that unnecessarily changed valid
assembler line comments and damaged the CVS history.

Prompted by:	bde, jhb
2004-05-14 20:28:31 +00:00
MIHIRA Sanpei Yoshiro
e68f2db9a3 MFNetBSD (umodem.c 1.46):
URL updates
2004-05-14 15:16:09 +00:00
Olivier Houchard
a43fa5c730 This is FreeBSD/arm, not FreeBSD/i386
Submitted by:	ru
2004-05-14 14:52:32 +00:00
Olivier Houchard
fffcd6531e Define uart_sa1110_ops and uart_sa1110_classe in .c files instead of spamming
uart_cpu.h
2004-05-14 13:42:50 +00:00
Olivier Houchard
d6301dcdbb Define INLINE_LIMIT for arm. 2004-05-14 13:35:46 +00:00
Olivier Houchard
b791f3fb91 Do not attempt to build anything in sys/boot for arm. 2004-05-14 13:34:53 +00:00
Olivier Houchard
dfc9776e84 Implement enough of an uart driver to get serial console working. 2004-05-14 13:26:52 +00:00
Olivier Houchard
03f110294b Import libkern arm specific bits. 2004-05-14 12:28:31 +00:00
Olivier Houchard
78b36e3ca5 Add config magic for arm. 2004-05-14 11:49:40 +00:00
Olivier Houchard
6fc729af63 Import FreeBSD/arm kernel bits.
It only supports sa1110 (on simics) right now, but xscale support should come
soon.
Some of the initial work has been provided by :
Stephane Potvin <sepotvin at videotron.ca>
Most of this comes from NetBSD.
2004-05-14 11:46:45 +00:00
Nate Lawson
0025fb0f4f Add support for GPE being a package of { reference, gpe bit }.
Rework the ECDT probe to pass all the parameters in a temporary struct.
Note why we are mostly ok evaluating _GLK so early.
2004-05-14 04:17:56 +00:00
Bill Paul
6f8aee2268 Fix a bug which I discovered recently while doing IPv6 testing at
Wind River. In the IPv4 output path, one of the tests in ip_output()
checks how many slots are actually available in the interface output
queue before attempting to send a packet. If, for example, we need
to transmit a packet of 32K bytes over an interface with an MTU of
1500, we know it's going to take about 21 fragments to do it. If
there's less than 21 slots left in the output queue, there's no point
in transmitting anything at all: IP does not do retransmission, so
sending only some of the fragments would just be a waste of bandwidth.
(In an extreme case, if you're sending a heavy stream of fragmented
packets, you might find yourself sending nothing by the first fragment
of all your packets.) So if ip_output() notices there's not enough
room in the output queue to send the frame, it just dumps the packet
and returns ENOBUFS to the app.

It turns out ip6_output() lacks this code. Consequently, this caused
the netperf UDPIPV6_STREAM test to produce very poor results with large
write sizes. This commit adds code to check the remaining space in the
output queue and junk fragmented packets if they're too big to be
sent, just like with IPv4. (I can't imagine anyone's running an NFS
server using UDP over IPv6, but if they are, this will likely make them
a lot happier. :)
2004-05-14 03:57:17 +00:00
John Polstra
15a3ddef19 Fix a potential stack buffer overflow on systems whose ACPI OEMID
fills its field (6 characters).  In that case the OEMID is not
null-terminated, and the sprintf that was used would copy up to the
next null byte, which could be pretty far away.
2004-05-14 01:29:21 +00:00
John Baldwin
92cb9c9b67 Different VIA host bridges use different offsets to their AGP config
registers, so add a register offset array to the softc.  We key off the
device ID to determine which set of register offsets.  Currently the 8385
host bridge used on amd64 is the only bridge to use the AGP3_VIA_*
register offsets and all other bridges use the AGP_VIA_* offsets.  It is
currently unclear if the AGP3_VIA_* offsets are for VIA bridges that
implement AGP 3.0 bridges or just for amd64 bridges.

Submitted by:	Kenneth Culver culverk at sweetdreamsracing dot biz
2004-05-13 20:05:42 +00:00
John Baldwin
3335671ddd Split sleepq_wakeup_thread() into two functions. sleepq_remove_thread()
removes a specific thread from a sleep queue.  sleepq_resume_thread()
resumes scheduling of a thread that has been previously removed from a
sleep queue.
- sleepq_catch_signals() just removes a thread from the queue it was just
  added to when a pending signal is found.
- sleepq_signal() and sleepq_broadcast() remove threads from a queue,
  drop the queue lock, and then resume all the previously removed threads.
  This doesn't completely fix the sched_lock <-> sleepq chain LOR, but it
  makes it a little better as we no longer call setrunnble() with a sleep
  queue lock held meaning if setrunnable() tries to wakeup the swapper we
  don't try to lock two sleep queue chains at the same time.
2004-05-13 20:00:43 +00:00
Dag-Erling Smørgrav
7cec30e791 Unbreak the build. 2004-05-13 19:15:21 +00:00