Commit Graph

33551 Commits

Author SHA1 Message Date
Peter Wemm
1c4f51fde0 ebus is not a 'count' device. There are no NEBUS references. 2002-07-20 08:16:51 +00:00
Peter Wemm
0493901bdc Change the max IRQ from 63 to 255. I realize we have to block some out
still for the IPI vectors, but 63 isn't enough.  There is an fxp at IRQ 86
on the Itanium2 box I have.
2002-07-20 06:25:47 +00:00
Alan Cox
bda441aa04 o Lock page queue accesses by vm_page_cache() in vm_contig_launder().
o Micro-optimize the control flow in vm_contig_launder().
2002-07-20 06:11:16 +00:00
Alan Cox
6fd77192b2 o Remove dead and/or unused code. 2002-07-20 05:06:20 +00:00
Benno Rice
683eac8dbb Add a missing argument to the stub for softdep_setup_freeblocks.
Forgotten by:	mckusick
2002-07-20 04:07:15 +00:00
Peter Wemm
789f1dee60 Turn on -Wformat 2002-07-20 03:52:37 +00:00
Peter Wemm
e89db70811 Fix printf format errors 2002-07-20 03:52:18 +00:00
Peter Wemm
914ecdc8ea Work around some nasty bugs on the [beta] Itanium2's E1000 UNDI driver.
Bug#1: The GetStatus() function returns radically different pointers that
do not match any packets we transmitted.  I think it might be pointing to
a copy of the packet or something.  Since we do not transmit more than
one packet at a time, just wait for "anything".

Bug#2: The Receive() function takes a pointer and a length.  However, it
either ignores the length or otherwise does bad things and writes outside
of ptr[0] through ptr[len-1].  This is bad and causes massive stack
corruption for us since we are receiving packets into small buffers on
the stack.  Instead, Receive() into a large enough buffer and bcopy the
data to the requested area.
2002-07-20 03:51:53 +00:00
Peter Wemm
296c758b66 Disable loader ufs support. It causes the loader to crash on the Itanium2
box that I have.  We have no EFI disk drivers yet anyway (maybe that is the
problem).
2002-07-20 03:46:43 +00:00
Peter Wemm
df0e0b8823 Fix printf format errors 2002-07-20 03:44:01 +00:00
Peter Wemm
db27052e18 Regenerate 2002-07-20 02:56:34 +00:00
Peter Wemm
3ebc124838 Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable
handler in the kernel at the same time.  Also, allow for the
exec_new_vmspace() code to build a different sized vmspace depending on
the executable environment.  This is a big help for execing i386 binaries
on ia64.   The ELF exec code grows the ability to map partial pages when
there is a page size difference, eg: emulating 4K pages on 8K or 16K
hardware pages.

Flesh out the i386 emulation support for ia64.  At this point, the only
binary that I know of that fails is cvsup, because the cvsup runtime
tries to execute code in pages not marked executable.

Obtained from:  dfr (mostly, many tweaks from me).
2002-07-20 02:56:12 +00:00
Peter Wemm
382f95d332 Fix a warning:
ffs_softdep.c:1630: warning: int format, different type arg (arg 2)
2002-07-20 01:09:35 +00:00
John Baldwin
d6ac80d12f Add PCI IDs for the A, B, and C UHCI controllers in the ICH4.
Sponsored by:	The Weather Channel
2002-07-19 22:17:02 +00:00
John Baldwin
c584bd8f63 Add PCI ID for the ICH4 ATA100 controller.
Sponsored by:	The Weather Channel
2002-07-19 22:14:54 +00:00
Peter Wemm
16e12eab5a Set P_NOLOAD on the pagezero kthread so that it doesn't artificially skew
the loadav.  This is not real load.  If you have a nice process running in
the background, pagezero may sit in the run queue for ages and add one to
the loadav, and thereby affecting other scheduling decisions.
2002-07-19 21:06:01 +00:00
Alan Cox
4aca0b1510 o Use vm_page_alloc(... | VM_ALLOC_WIRED) in place of vm_page_wire(). 2002-07-19 19:35:06 +00:00
Andrew Gallatin
f76ec8facd Add support for probing secondary buses on the ServerWorks Grand Champion
chipset used for P4-Xeon machines

PR: kern/38894
Tested-by: "Marc G. Fournier" <scrappy@hub.org>
Submitted-by: Mark Tinguely (partially)
2002-07-19 18:35:08 +00:00
Matthew Dillon
d65bf08af3 Add the tcps_sndrexmitbad statistic, keep track of late acks that caused
unnecessary retransmissions.
2002-07-19 18:29:38 +00:00
Maxime Henrion
0f3b0aa87c Wrap a line longer than 80 characters. 2002-07-19 17:44:44 +00:00
Maxime Henrion
72fda5bc50 - Merge the mount options at MNT_UPDATE time with vfs_mergeopts().
- Sanity check the mount options list (remove duplicates) with
  vfs_sanitizeopts().
- Fix some malloc(0)/free(NULL) bugs.

Reviewed by:	rwatson (some time ago)
2002-07-19 16:05:31 +00:00
David E. O'Brien
5959d16036 Add the ebus sio attachment. 2002-07-19 08:03:14 +00:00
Kirk McKusick
7aca6291e3 Add support to UFS2 to provide storage for extended attributes.
As this code is not actually used by any of the existing
interfaces, it seems unlikely to break anything (famous
last words).

The internal kernel interface to manipulate these attributes
is invoked using two new IO_ flags: IO_NORMAL and IO_EXT.
These flags may be specified in the ioflags word of VOP_READ,
VOP_WRITE, and VOP_TRUNCATE. Specifying IO_NORMAL means that
you want to do I/O to the normal data part of the file and
IO_EXT means that you want to do I/O to the extended attributes
part of the file. IO_NORMAL and IO_EXT are mutually exclusive
for VOP_READ and VOP_WRITE, but may be specified individually
or together in the case of VOP_TRUNCATE. For example, when
removing a file, VOP_TRUNCATE is called with both IO_NORMAL
and IO_EXT set. For backward compatibility, if neither IO_NORMAL
nor IO_EXT is set, then IO_NORMAL is assumed.

Note that the BA_ and IO_ flags have been `merged' so that they
may both be used in the same flags word. This merger is possible
by assigning the IO_ flags to the low sixteen bits and the BA_
flags the high sixteen bits. This works because the high sixteen
bits of the IO_ word is reserved for read-ahead and help with
write clustering so will never be used for flags. This merge
lets us get away from code of the form:

        if (ioflags & IO_SYNC)
                flags |= BA_SYNC;

For the future, I have considered adding a new field to the
vattr structure, va_extsize. This addition could then be
exported through the stat structure to allow applications to
find out the size of the extended attribute storage and also
would provide a more standard interface for truncating them
(via VOP_SETATTR rather than VOP_TRUNCATE).

I am also contemplating adding a pathconf parameter (for
concreteness, lets call it _PC_MAX_EXTSIZE) which would
let an application determine the maximum size of the extended
atribute storage.

Sponsored by:	DARPA & NAI Labs.
2002-07-19 07:29:39 +00:00
Alan Cox
eeeaf0fdd1 o Duplicate an odd side-effect of vm_page_wire() in vm_page_allocate()
when VM_ALLOC_WIRED is specified: set the PG_MAPPED bit in flags.
 o In both vm_page_wire() and vm_page_allocate() add a comment saying
   that setting PG_MAPPED does not belong there.
2002-07-19 03:33:04 +00:00
Julian Elischer
9f189ade99 Clear up confusion in ugly code. ^T gave wrong results for RSS.
I misinterpretted this code when changing it to handle threads.
(there are still issues here)
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
2002-07-18 21:19:56 +00:00
Matthew Dillon
701bec5a38 Introduce two new sysctl's:
net.inet.tcp.rexmit_min (default 3 ticks equiv)

    This sysctl is the retransmit timer RTO minimum,
    specified in milliseconds.  This value is
    designed for algorithmic stability only.

net.inet.tcp.rexmit_slop (default 200ms)

    This sysctl is the retransmit timer RTO slop
    which is added to every retransmit timeout and
    is designed to handle protocol stack overheads
    and delayed ack issues.

Note that the *original* code applied a 1-second
RTO minimum but never applied real slop to the RTO
calculation, so any RTO calculation over one second
would have no slop and thus not account for
protocol stack overheads (TCP timestamps are not
a measure of protocol turnaround!).  Essentially,
the original code made the RTO calculation almost
completely irrelevant.

Please note that the 200ms slop is debateable.
This commit is not meant to be a line in the sand,
and if the community winds up deciding that increasing
it is the correct solution then it's easy to do.
Note that larger values will destroy performance
on lossy networks while smaller values may result in
a greater number of unnecessary retransmits.
2002-07-18 19:06:12 +00:00
Alan Cox
f23050633f o Remove the acquisition and release of Giant from the idle priority thread
that pre-zeroes free pages.
 o Remove GIANT_REQUIRED from some low-level page queue functions.  (Instead
   assertions on the page queue lock are being added to the higher-level
   functions, like vm_page_wire(), etc.)

In collaboration with:	peter
2002-07-18 17:40:07 +00:00
Mark Murray
4c5aee92a7 Beautify. This has the side effect of improving portability and
making lint work cleaner.

Inspired to do this by:	jhb
2002-07-18 15:56:46 +00:00
Mark Murray
f6e34b823a Void functions cannot return values. 2002-07-18 15:53:11 +00:00
Yoshihiro Takahashi
cc3526f4d4 Remove boot2 temporarily. 2002-07-18 14:50:41 +00:00
Poul-Henning Kamp
61658cf6a1 Add initialization code for the AMD Elan sc520 which maps the MMCR
into KVM and sets the i8254 frequency to the correct value.
2002-07-18 12:56:54 +00:00
Benno Rice
aa39961e37 Remove the statically allocated array that holds OpenFirmware memory mappings
during pmap_bootstrap.  Instead, temporarily help ourselves to some memory
from phys_avail since we won't need it post-boostrap.
2002-07-18 12:43:08 +00:00
Benno Rice
8e465298e2 Major rework of how we copy data into kernel space.
We now talk to the memory and mmu instances directly rather than using the
OpenFirmware "claim" method.
2002-07-18 12:39:02 +00:00
Ruslan Ermilov
7f3c93b7de s/install -c/${INSTALL} ${COPY}/ 2002-07-18 12:02:20 +00:00
Poul-Henning Kamp
3ae87b7ec6 Add an entry for the AMD Elan SC520 hostbridge. I do not belive we can
identify this gadget on the CPUID result alone, so I intend to activate
the necessary magic (i8254 frequency for instance) for it based on the
precense of the on-chip host to PCI bridge.
2002-07-18 10:57:20 +00:00
Peter Wemm
9e7c1bce60 (VM_MAX_KERNEL_ADDRESS - KERNBASE) / PAGE_SIZE may not fit in an integer.
Use lmin(long, long), not min(u_int, u_int).  This is a problem here on
ia64 which has *way* more than 2^32 pages of KVA.  281474976710655 pages
to be precice.
2002-07-18 10:28:00 +00:00
Warner Losh
1aa3e5415e Integrate the hw.pcic.pd6722_vsense tunable from the nomads list.
This allows one to select the method of 3.3V card detection from the
three possible choices (none (0), the "6710 way" (1) and the "6729
way" (2)).  The default is the 6710 way, since it works in the most
cases.  The datasheets for the 6722 suggest that the '29 way is more
correct, but experience has shown this method to cause some laptops to
hang solid.  See source code for details until I update the man page.

Submitted by: shibata-san (chiharu shibata <chi@bd.mbn.or.jp>)
2002-07-18 08:13:45 +00:00
Warner Losh
80a97bd996 Some strange hacks for the clpd6729:
o It needs to have pcic_isa_intr intrrupt handler
o for pci interrupts, in the func interrupt handler it needs to check the isa
  registers rather than the pci ones for card present.
o better commentary for some of the strangeness of the 6729 on pci
o fix some crunchy comments to better reflect reality.

With this I almost have the WL200 working, but an interrupt storm
after attach is causing problems for reasons unknown.  This code
doesn't seem to break the normal clpd6729 case, and I'd like others
with 6729 cards to try to test it (there were some that were used for
external pccard slots in pci only systems).
2002-07-18 08:05:00 +00:00
Luigi Rizzo
90780c4b05 Move IPFW2 definition before including ip_fw.h
Make indentation of new parts consistent with the style used for this file.
2002-07-18 05:18:41 +00:00
Hajimu UMEMOTO
90171c93bb fixed to make mbuf chain.
Obtained from:	KAME
MFC after:	1 week
2002-07-18 04:18:56 +00:00
Alan Cox
827b2fa091 o Introduce an argument, VM_ALLOC_WIRED, that requests vm_page_alloc()
to return a wired page.
 o Use VM_ALLOC_WIRED within Alpha's pmap_growkernel().  Also, because
   Alpha's pmap_growkernel() calls vm_page_alloc() from within a critical
   section, specify VM_ALLOC_INTERRUPT instead of VM_ALLOC_SYSTEM.  (Only
   VM_ALLOC_INTERRUPT is implemented entirely with a spin mutex.)
 o Assert that the page queues mutex is held in vm_page_wire()
   on Alpha, just like the other platforms.
2002-07-18 04:08:10 +00:00
Peter Wemm
a9aa1a970f Use pmap_kenter() rather than vtopte() and bashing the page tables
directly.
2002-07-18 00:42:53 +00:00
Peter Wemm
e257592281 Fix a transcription typo. s/ACPI_PTR/ACPI_POINTER/ 2002-07-17 23:49:55 +00:00
Peter Wemm
02fb42b0a8 ia64 does not have the same degree of stealth include file nesting,
so it needs an explicit #include <machine/frame.h> to get 'struct
trapframe'.  The fact that it needs this at this level is rather bogus
but it will not compile without it.
2002-07-17 23:43:55 +00:00
Peter Wemm
8a2bd34560 Pacify gcc on ia64 2002-07-17 23:32:13 +00:00
Matthew Dillon
22fd54d461 I don't know how the minimum retransmit timeout managed to get set to
one second but it badly breaks throughput on networks with minor packet
loss.

Complaints by: at least two people tracked down to this.
MFC after:	3 days
2002-07-17 23:32:03 +00:00
Peter Wemm
3aabf3e27d Fix some typos in 1.68 from over a week ago. 2002-07-17 23:22:50 +00:00
Peter Wemm
6ae7b9cb2b Cap the initial PV and PTE table preallocations. Otherwise we explode
on the Itanium2 system I have when we use up *all* of the initial 256MB
direct mapped region before we are ready to dynamically expand it.

The machine that I have has 4 cpus and a very big hole in the middle.
This makes the bogus '(last_address - first_address) / PAGE_SIZE'
calculations especially dangerous and caused many millions of initial
PV/PTE's to be preallocated.
2002-07-17 23:21:59 +00:00
Peter Wemm
5e6ce035f1 Be sure to use a logical address for the SAL table. For some reason the
phsysical address is still mapped at this stage of boot on the Itanium1
SDV boxes we have.  But Itanium2 does *not* let us get away with this.
2002-07-17 23:17:49 +00:00
Peter Wemm
d63a55f418 Update for new ACPICA import. Gah. 2002-07-17 23:14:41 +00:00