Ruslan Ermilov [Thu, 18 Jul 2002 12:54:55 +0000 (12:54 +0000)]
To force install(1) to always compare files before installing, one
now needs to set COPY=-C as -C is no longer compatible with the -d
option. It is also likely to be renamed to INSTALL_COPY soon.
Update documentation to reflect this change.
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.
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.
Peter Wemm [Thu, 18 Jul 2002 10:28:00 +0000 (10:28 +0000)]
(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.
Tim J. Robbins [Thu, 18 Jul 2002 10:22:42 +0000 (10:22 +0000)]
Avoid using ints or shorts to store process id's, use pid_t instead.
The pgrp member of struct job was declared as a short and could not store
every possible process group ID value, the rest of them were benign because
pid_t happens to be an int.
Warner Losh [Thu, 18 Jul 2002 08:13:45 +0000 (08:13 +0000)]
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.
Warner Losh [Thu, 18 Jul 2002 08:05:00 +0000 (08:05 +0000)]
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).
Warner Losh [Thu, 18 Jul 2002 06:01:35 +0000 (06:01 +0000)]
The Compaq WL200 is a CL-PD6729 based pci card with a prism 2 pcmcia
card behind it (without the pcmcia form factor). This entry gets to
the point of attaching, but there's something wrong with the '29
support, so it doesn't quite work yet.
Alan Cox [Thu, 18 Jul 2002 04:08:10 +0000 (04:08 +0000)]
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.
Peter Wemm [Wed, 17 Jul 2002 23:43:55 +0000 (23:43 +0000)]
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.
Peter Wemm [Wed, 17 Jul 2002 23:21:59 +0000 (23:21 +0000)]
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.
Peter Wemm [Wed, 17 Jul 2002 23:17:49 +0000 (23:17 +0000)]
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.
Peter Wemm [Wed, 17 Jul 2002 21:47:05 +0000 (21:47 +0000)]
Avoid trying to set PG_G on the first 4MB when we set up the 4MB page.
This solves the SMP panic for at least one system. I'd still like to know
why my xeon works though.
Fix setting parameters for getipnodebyaddr(3):
o "struct addrinfo" contains a pointer to "struct sockaddr,"
not "struct sockaddr" itself
o the function takes a pointer to "struct in*_addr", not to
"struct sockaddr," so the address length must be corresponding
Warner Losh [Wed, 17 Jul 2002 06:02:07 +0000 (06:02 +0000)]
o Remove workaround that I put in to mask the BadVcc problem.
o Add preliminary support for Cirrus Logic CL-PD6729 using PCI
interrupts. To use it you you need to set hw.pcic.pd6729_intr_path
to 2. This is allow us to still default to ISA intrrupt path for
this part (which is found much more often in laptops using ISA IRQs).
But some PCI cards have this part on them and this should allow them
to be used. It is untested on PCI, but it seems to not break the ISA
case.
o Better sysctl descriptions (I hope).
Warner Losh [Wed, 17 Jul 2002 05:50:06 +0000 (05:50 +0000)]
Be more conservative about the address ranges we assign. Some
machines don't like the more liberal default, so be more conservative
about what we do by default.
Matthew Dillon [Wed, 17 Jul 2002 05:41:43 +0000 (05:41 +0000)]
Qualify comment on machdep.cpu_idle_hlt. Turning this on on a SMP
machine will result in approximately a 4.2% loss of performance (buildworld)
and approximately a 5% reduction in power consumption (when idle). Add XXX
note on how to really make hlt work (send an IPI to wakeup HLTed cpus on
a thread-schedule event? Generate an interrupt somehow?).
Warner Losh [Wed, 17 Jul 2002 05:20:43 +0000 (05:20 +0000)]
Eliminate the need for pccard_common.c by moving the function inline
in the .h file. Make it static __inline to make sure that it doesn't
wind up defined in any files.
Also, fix a typo that said null_do_attach instead of null_do_probe.
Mike Heffner [Wed, 17 Jul 2002 04:58:09 +0000 (04:58 +0000)]
Update glob(3) to add all the POSIX required options, specifically:
- add GLOB_NOMATCH return value and use it when we don't get a match
- rename GLOB_ABEND to GLOB_ABORTED and use it instead of returning 1
in some places
- add GLOB_NOESCAPE flag and retire GLOB_QUOTE to compatibility
section
Suggestions/advice on correct usage of POSIX defines: wollman
Warner Losh [Wed, 17 Jul 2002 04:01:57 +0000 (04:01 +0000)]
MFOpenBSD:
1.93; henning; MA401RA wi card
1.92; millert; elsa XI-325 wi card
1.91; fgsch; gemplus cpr400 smartcard reader
1.90; mickey; Nokia c110/c111 is prism2 card
1.89-1.86 (similar to what we do already)
John Baldwin [Wed, 17 Jul 2002 02:52:01 +0000 (02:52 +0000)]
- Use more correct values to initialize the AGP controller during setup.
The value we use is still questionable for 440BX chipsets.
- When flushing the TLB just toggle the bit in question instead of writing
a magic value that could trash other unrelated bits.
John Baldwin [Wed, 17 Jul 2002 02:48:43 +0000 (02:48 +0000)]
Preallocate a struct file as the first thing in falloc() before we lock
the filelist_lock and check nfiles. This closes a race where we had to
unlock the filedesc to re-lock the filelist_lock.
Andrew Gallatin [Wed, 17 Jul 2002 02:23:44 +0000 (02:23 +0000)]
Allow alphas to do crashdumps: Refuse to run anything in choosethread()
after a panic which is not an interrupt thread, or the thread which
caused the panic. Also, remove panicstr checks from msleep() and from
cv_wait() in order to allow threads to go to sleep and yeild the cpu
to the panicing thread, or to an interrupt thread which might
be doing the crashdump.
Change utimes to set the file creation time (for filesystems that
support creation times such as UFS2) to the value of the
modification time if the value of the modification time is older
than the current creation time. See utimes(2) for further details.
Introduce the DEVFS "rule" subsystem. DEVFS rules permit the
administrator to define certain properties of new devfs nodes before
they become visible to the userland. Both static (e.g., /dev/speaker)
and dynamic (e.g., /dev/bpf*, some removable devices) nodes are
supported. Each DEVFS mount may have a different ruleset assigned to
it, permitting different policies to be implemented for things like
jails.
Matthew Dillon [Wed, 17 Jul 2002 01:07:08 +0000 (01:07 +0000)]
'recm' was not being unconditionally cleared for each loop, leading to
system lockups (infinite loops) when a zero-length RPC is received.
Linux clients will sometimes send zero-length RPC requests.
Reorganize the use of recm in the loop.
Cc: security@freebsd.org
Submitted by: Mike Junk <junk@isilon.com>
MFC after: 3 days
The new implementation of 'lpc topq' is intended to be upwardly compatible
with the previous implementation. One noticeable difference is the order
in which messages are printed. In the previous implementation, the
command "lpc topq lp 1 20 300" might print:
lp:
moved cfA300some.host.org
moved cfA020some.host.org
moved cfA001some.host.org
while in the new implementation you'll see:
lp:
moved cfA001some.host.org
moved cfA020some.host.org
moved cfA300some.host.org
The final order of jobs in the queue is exactly the same, it's just
that the jobs are now moved in the same order they were specified,
instead of being moved (and thus listed) in the reverse order.
The new implementation also supports more options for how to select
which jobs should be moved. The previous topq allowed the user to
select jobs based on a job number, or based on a userid:
topq lp 17
topq lp drosehn
The new one also allows for a range of job numbers, or a hostname
(matching jobs that were sent from that hostname). To specify a
hostname, you must prefix it with an '@'-sign:
topq lp 17
topq lp 15-25
topq lp drosehn
topq lp @some.host.com
or a combination of those things:
topq lp drosehn:17
topq lp 15-25:drosehn
topq lp 15-25@some.host.edu
topq lp gad:15-25@some.host.edu
Futhermore, in the new implementation the user can also use
filename-style pattern-matching on the userid or hostname fields:
topq lp dros[ie]hn
topq lp @samba*
topq lp gad@*freebsd.org
(although the user should probably include those in quotes when they
are specifying the topq command as part of the 'lpc' command, just
to make sure the pattern-matching characters are not expanded by
whatever shell they are typing the command into)
The operator can still specify several of these job-specifiers in a
single command:
topq lp 17 22 27 drosihn:23 gad@*freebsd.org 97
If a job is matched by multiple job-specifiers on a single command,
then its final position in the queue is based on the first job-specifer
which matched it.
The previous implementation also recognized a jobnumber followed by
a hostname (with no separator), or a hostname:jobnumber, although
neither of these options were documented. Eg:
topq lp 42some.host.org
topq lp some.host.org:42
The new version allows the first one, and will also recognize the
second one *iff* the hostname includes a period (otherwise it is
assumed to be a userid followed by a job number). Both remain
undocumented, and are only provided in case there were some users
who did know about those options, and are used to typing them in.
The new implementation also fixes a few subtle security issues in
the old one (mainly just making sure all error-messages are printed
while the process is "not-priv"), avoids integer-overflow issues on
bad user input, and prints out more descriptive messages in a number
of circumstances.
The new bottomq command accepts all the same arguments as topq, but
moves the selected jobs to the bottom of the queue instead of the top.
Changes which rewrite 'lpc topq', and which add 'lpc bottomq'. These
reflect much valuable feedback from wollman. More details on the new
'lpc topq' are in the log message for revision 1.2 of lpc/movejobs.c.
The previous implementation of 'lpc topq' is available as 'lpc xtopq',
in case there are any problems noticed in the new implementation. If
there are no problems with this version, a later update will remove the
'lpc xtopq' command.
Reviewed by: freebsd-print@bostonradio.org
MFC after: 6 days
Bruce Evans [Tue, 16 Jul 2002 23:18:29 +0000 (23:18 +0000)]
Fixed some print format errors. Avoid some warnings about possible
(but not actual) alignment problems. Both of these bugs were detected
on ia64's and were fatal on ia64's due to premature setting of WARNS
to 4.
A little bit more thought has resulted in a generic script which can
implement any of the useless POSIX-required ``regular shell builtin''
utilities, saving one frag and one inode each. The script moves to
usr.bin/alias which is alphabetically the first of these commands.
POSIX requires these shell builtins to also exist as totally pointless
external commands. Since they serve no useful purpose, it's OK that their
implementation is not the most efficient possible.
Matthew Dillon [Tue, 16 Jul 2002 19:43:59 +0000 (19:43 +0000)]
Fix a bug nfs_write() related to ^C'ing during a file write on an
interruptable mount. We were returning from inside the loop without
releasing the rslock.
Submitted by: Mike Junk <junk@isilon.com>
MFC after: 3 days
Alan Cox [Tue, 16 Jul 2002 19:39:40 +0000 (19:39 +0000)]
o Use vm_pageq_remove_nowakeup() and vm_pageq_enqueue() in
vm_page_zero_idle() instead of partially duplicated implementations.
In particular, this change guarantees that the number of free pages
in the free queue(s) matches the global free page count when Giant
is released.
Thomas Moestl [Tue, 16 Jul 2002 18:17:03 +0000 (18:17 +0000)]
When multiple IOMMUs are present in a system, use a single TSB for all
of them, and couple them by always performing all operations on all
present IOMMUs. This is required because with the current API there
is no way to determine on which bus a busdma operation is performed.
While being there, clean up the iommu code a bit.
This should be a step in the direction of allow some of larger machines
to work; tests have shown that there still seem to be problems left.
- Use IO mode to reset the controller (82544 and beyond)
- Read the Mac address only once during attach.
(This fixes the failover issue observed using the bonding driver)
Replace the awkward hackery about strtok(3)
by conventional one-way parsing of ftphosts(5).
Don't let NULL hostname pointers into virtual
host records as well.