peter [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 [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 [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
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).
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.
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?).
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.
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
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)
- 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.
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.
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.
'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
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.
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
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.
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.
If we get a receive error in nfs_receive() and then get an error trying to
obtain the send lock, we would bogusly try to unlock the send lock before
returning resulting in a panic. Instead, only unlock the send lock if
nfs_sndlock() succeeds and nfs_reconnect() fails.
MFC after: 3 days
Sponsored by: The Weather Channel
The main reason for this is to reduce diffs between all the crt1.c's.
Assembler macros are tidied up and made as similar as sanely possible.
The macros are translated into C (__inline static) functions for lint.
Declaration orders are made the same.
Declarations are all ISOfied and tidied up.
Comment contents have gratuitous diffs removed.
The net result is a bunch of crt1.c's that are 90% the same.
It may be possible to now encapsulate the differences in one
MD header, and have only one MI crt1.c file (although the macros
to do this may be ugly).
peter [Mon, 15 Jul 2002 23:11:49 +0000 (23:11 +0000)]
The pmap_invalidate_all() here is definately not a good idea. We are
running with interrupts disabled, other cpus locked down, and only
making a temporary local mapping that we immediately back out again.
Assume that my bug report against 1003.1-2001 will be resolved my way,
and make 64-bit architectures use the LP64_OFF64 environment instead
of the LPBIG_OFFBIG one.
All of the things that confstr() returns are compile-time constants.
It's silly to call sysctl() to get the value of _PATH_STDPATH from
<paths.h> when we can just use it directly. This greatly simplifies
the implementation. (This is also part of my grand scheme to get
rid of sysctl's `user' category, which should never have been created.)
Use strlcpy() instead of strncpy() as it has the exact semantics we want.
Define _POSIX_FSYNC unconditionally. (The standard has enough weasel-words
to allow us to claim compliance.) Define a few other nearby feature tests
in the way required by 1003.1-2001.
Fix visibility:
- symlink() is from 1003.1-2001 and XPG4.2
- fchown() is from 1003.1-2001
- fsync() is from ISO/IEC 9945-1:1995
- confstr() is from 1003.2-1992
Clean up some of the rather strange structure and ordering of this
file. Correct visibility conditions and order blocks of declarations
in order of increasing inclusiveness. Note that [v]snprintf() is now
in ISO C and f{seek,tell}o() are now in POSIX. Deprecated getw() and
putw() are no longer visible in XSH6 namespace (and should probably
be removed from BSD namespace as well).
- fixed a bug that we can't send a packet to ipv4mapped ipv6 address
using a udp6 socket without bind(2)ing.
- fbsd4/430 reported from the FreeBSD team.
- this fix is different from the fix reported in the above PR. i think
this better, but we need some test.
Add a new VM options section. Move KSTACK_PAGES there from the MI NOTES
file and better document it. Add better documentation for the DISABLE_PSE
option. Add the missing DISABLE_PG_G option and document it.
The hardware bus configuration section is now empty, so axe it. The
architecture specific NOTES files define which hardware busses each
architecture supports.