Commit Graph

46739 Commits

Author SHA1 Message Date
imp
1ce6d00b26 Move fdc from isa/fd.c to dev/fdc/fdc.c. The old files were
repocopied.  Soon there will be additional bus attachments and
specialization for isa, acpi and pccard (and maybe pc98's cbus).

This was approved by nate, joerg and myself.  bde dissented on the new
location, but appeared to be OK after some discussion.
2004-05-17 05:46:16 +00:00
imp
63d917d994 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
a3184b6832 Oops, use the generic ELF_ST_BIND() macro instead of ELF64_ST_BIND.
Submitted by:  marks
2004-05-17 00:51:34 +00:00
ru
798b8fc1f1 Markup fixes. 2004-05-16 22:51:36 +00:00
peter
46c21c1d0f 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
6608d88559 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
2f7a9bd786 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
18c16d4152 Converge some more with i386. 2004-05-16 21:27:29 +00:00
peter
5426233754 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
198efd7b01 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
ffd627dcdb 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
9b17cc19bb 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
8f324db8ef MFi386: add rue and twa 2004-05-16 20:57:01 +00:00
peter
73d133e57f MFi386: avoid partial register references, for what its worth. 2004-05-16 20:46:13 +00:00
peter
22573e6b41 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
76e2b057ec MFi386: numerous interrupt and acpi updates 2004-05-16 20:30:47 +00:00
peter
a7e68731b2 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
29f2cef3b2 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
ffb6541b3f 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
nyan
c5a0bf7dba - Initialize uart_bus_space_io and uart_bus_space_mem.
- Fix wrong comment.
2004-05-16 14:12:05 +00:00
ru
bfc1ed12cc Fixed the disordering from rev. 1.371. 2004-05-16 13:58:27 +00:00
dfr
9ec5a738e8 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
cognet
17fff6c3e1 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
cperciva
77ddd4dd00 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
scottl
9836a8de56 Remove twa_intrhook prototype.
Submitted by:	cperciva
2004-05-15 15:41:59 +00:00
scottl
66a505c741 Set the cpi.hba_inquiry field to something useful. 2004-05-15 05:18:05 +00:00
scottl
7c9c07bb95 Remove the config_intrhook as it is not needed. 2004-05-15 05:17:42 +00:00
des
58138cf934 Remove some debugging printf()s and a pointless device_set_desc() call. 2004-05-15 00:07:23 +00:00
cognet
940af716ac Remove libkern/mem* 2004-05-14 23:42:54 +00:00
cognet
2b91573aea Implement bcopy, memcpy and memcmp in support.S. 2004-05-14 23:42:30 +00:00
cognet
f21a818016 Remove libkern/bzero.S and libkern/memset.S. 2004-05-14 23:31:36 +00:00
cognet
a21619da96 Implement bzero et memset in support.S 2004-05-14 23:31:10 +00:00
kensmith
253e82ddb2 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
bde
06bfd498d3 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
ru
3b740c8904 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
ru
0f55d8e496 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
sanpei
8b1c1ab8a0 MFNetBSD (umodem.c 1.46):
URL updates
2004-05-14 15:16:09 +00:00
cognet
7c8348cf80 This is FreeBSD/arm, not FreeBSD/i386
Submitted by:	ru
2004-05-14 14:52:32 +00:00
cognet
d0cadd4171 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
cognet
80990c1ba8 Define INLINE_LIMIT for arm. 2004-05-14 13:35:46 +00:00
cognet
4e59635f3d Do not attempt to build anything in sys/boot for arm. 2004-05-14 13:34:53 +00:00
cognet
c7efba8262 Implement enough of an uart driver to get serial console working. 2004-05-14 13:26:52 +00:00
cognet
28d4cf09a1 Import libkern arm specific bits. 2004-05-14 12:28:31 +00:00
cognet
23d9a62030 Add config magic for arm. 2004-05-14 11:49:40 +00:00
cognet
0eff817ca2 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
njl
3fa4734a7d 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
wpaul
bc59a88bac 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
jdp
c7b32428e5 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
jhb
30499f45c6 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
jhb
f3ceb63567 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