Staticized it in userconfig. The one in pcvt is unused.
Removed bogus unused arg to getchar(). This should not have compiled
in the USERCONFIG_BOOT case, but the getchar() was also non-prototyped
and defined in K&R style.
Staticized the badly named global variable `next'. Even static variables
should have a unique module-specific prefix so that they can be referenced
easily in debuggers, etc.
Major: When blocking occurs in allocbuf() for VMIO files,
excess wire counts could accumulate.
Major: Pages are incorrectly accumulated into the physical
buffer for clustered reads. This happens when bogus
page is needed.
Minor: When reclaiming buffers, the async flag on the buffer
needs to be zero, or the reclaim is not optimal.
Minor: The age flag should be cleared, if a buffer is wanted.
First, change sysinstall and the Makefile rules to not build the kernel
nlist directly into sysinstall now. Instead, spit it out as an ascii
file in /stand and parse it from sysinstall later. This solves the chicken-n-
egg problem of building sysinstall into the fsimage before BOOTMFS is built
and can have its symbols extracted. Now we generate the symbol file in
release.8.
Second, add Poul-Henning's USERCONFIG_BOOT changes. These have two
effects:
1. Userconfig is always entered, rather than only after a -c
(don't scream yet, it's not as bad as it sounds).
2. Userconfig reads a message string which can optionally be
written just past the boot blocks. This string "preloads"
the userconfig input buffer and is parsed as user input.
If the first command is not "USERCONFIG", userconfig will
treat this as an implied "quit" (which is why you don't need
to scream - you never even know you went through userconfig
and back out again if you don't specifically ask for it),
otherwise it will read and execute the following commands
until a "quit" is seen or the end is reached, in which case
the normal userconfig command prompt will then be presented.
How to create your own startup sequences, using any boot.flp image
from the next snap forward (not yet, but soon):
% dd of=/dev/rfd0 seek=1 bs=512 count=1 conv=sync <<WAKKA_WAKKA_DOO
USERCONFIG
irq ed0 10
iomem ed0 0xcc000
disable ed1
quit
WAKKA_WAKKA_DOO
Third, add an intro screen to UserConfig so that users aren't just thrown
into this strange screen if userconfig is auto-launched. The default
boot.flp startup sequence is now, in fact, this:
USERCONFIG
intro
visual
(Since visual never returns, we don't need a following "quit").
Submitted-By: phk & jkh
1/ session leader
2/ Have a console device vnode (/dev/console)
3/ have NULL pointer for a consoel tty struct.
fix the only case where the tty struct is referenced without a prior
check for existance.
certain error conditions, it is possible for pages to be left allocated
in the object beyond it's end. It is generally bad practice to allocate
pages beyond the end of an object.
support LD_HINTS_VERSION_2 that has the ldconfig pathname stored in the
ld.so.hints file (ie: a new library can be installed and used without
needing to run ldconfig -m first)
Reviewed by: nate, jdp
Obtained from: NetBSD (mostly)
divisor latch registers if the registers wouldn't change.
Use the default console cfcr setting while setting the divisor
latch registers for console i/o. Input may be messed up by
transiently changing the cfcr.
Use a usual cfcr setting while setting the divisor latch registers
in the probe. This shouldn't matter, but this is not the place to
test the UART's handling of 5 bit words.
Removed a stale devfs comment.
was always disabled because "pci.h" wasn't included. Now the configured
pci devices are listed and you can edit bogus flags for them.
Fixed bitrot in the disabled code. A used #include was removed and const
poisoning wasn't fixed.
Removed unused #include.
not resuming the NIC as required for transmit. Thanks to Alan Cox
<alc@cs.rice.edu> for noticing this.
Added another performance optimization to compensate. :-)
Changed crscdt to 1...strange, but this seems to be needed for some reason
despite what the manual says.
dependent operation, and not really a correct name. invltlb and invlpg
are more descriptive, and in the case of invlpg, a real opcode.
Additionally, fix the tlb management code for 386 machines.
- kern.maxproc and kern.maxprocperuid were read-only (and thus essentially
useless. Apparently no one uses them).
- all the user sysctls were read-write (and thus it was possible for them
to be inconsistent with the authoritative fixed values in the library).
Removed unused #include.
for headers in the compile directory work unsurprisingly. Without
-I-, the search for "foo.h" begins in the directory of the file
that includes it, and the compile directory is only searched because
`-I.' is in ${INCLUDES}.
Removed -I$S/sys from ${INCLUDES}. It was once necessary to find
things like "param.h" in $S/sys. Now <sys/param.h> is found in $S.
lcall 7,0 (ie: ldt slot 0) and lcall 0x87,0 (ldt slot 16, it's shifted
three bits to the left). I was fiddling with this so long ago, I don't
recall the specifics.
with this quite a while ago when somebody reported a BSD/OS 2.1 binary
that wouldn't run. I'm pretty sure they tried it and I'm pretty sure
they mentioned to me that the patch worked.
comparisons in the inb() and outb() macros. I decided that int args
are OK here. Any type that can hold a u_int16_t without overflow
is correct, and 32-bit types are optimal.
Introduced a few tens of warnings (100 in LINT) for use of pessimized
(short) types for the port arg. Only a few drivers are affected by
this. u_short pessimizations aren't detected.
Added `__extension__' before the statement-expression in inb() so
that it can be compiled without warnings by gcc -pedantic.
ring that caused wrong things to happen sometimes.
Doubled the number of transmit descriptors to 128 so that the internal
FIFO in the NIC can be fully filled when dealing with small packets.
Several minor performance improvements.
- don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h>
instead. This was already done in 4.4Lite for the most important
ioctl headers. Header spam currently increases kernel build
times by 10-20%. There are more than 30000 #includes (not counting
duplicates) for compiling LINT.
- include <sys/types.h> if and only it is necessary to make the header
almost self-sufficient (some ioctl headers still need structs from
elsewhere).
- uniformized idempotency ifdefs. Copied the style in the 4.4Lite
ioctl headers.
drop the oldest entry in the queue.
There was a fair bit of discussion as to whether or not the
proper action is to drop a random entry in the queue. It's
my conclusion that a random drop is better than a head drop,
however profiling this section of code (done by John Capo)
shows that a head-drop results in a significant performance
increase.
There are scenarios where a random drop is more appropriate.
If I find one in reality, I'll add the random drop code under
a conditional.
Obtained from: discussions and code done by Vernon Schryver (vjs@sgi.com).
It is needed for implementation details but very little of it is
needed for the interface. Include it in the few places that didn't
already include it.
Include <sys/ioccom.h> in <sys/disklabel.h> (as already in
<sys/diskslice.h>) so that all the disk-related headers are almost
self-sufficient.
the prototype.
Put the jump table for i486_bzero() in the data section. This
speeds up i486_bzero() a little on Pentiums without significantly
affecting its speed on 486's.
Don't waste time falling through 14 nop's to return from do1 in
i486_bzero().
Use fastmove() for counts >= 1024 (was > 1024). Cosmetic.
Fixed profiling of fastmove().
Restored meaningful labels from the pre-1.1 version in fastmove().
Local labels are evil.
Fixed (high resolution non-) profiling of __bb_init_func().
comma expression has no effect" in the MAKE_SET() macro. This also
fixes compiling with -O3 (which removes static functions unless
there is a suitable reference to them). Declaring all the static
symbols as __unused would also fix the warning, but would be bogus
(they are used) and wouldn't fix -O3. However, the dummy pointers
for the references waste about 1.5K text and 20K symbol space for
GENERIC. This wastage hasn't changed - the dummy pointers are just
nonzero now.
to deal with the fact that we relied on devconf to do the shutdown
callouts in various drivers. The changes in this commit are to add support
for device shutdown in this driver via the new at_shutdown() mechanism.
Similar changes need to be made to all of the other drivers that need
a shutdown routine called (if_de.c comes to mind immediately).
incorrect, and correct the support for B_ORDERED. The spl window
fix was from Peter Wemm, and his questions led me to find the problem with
the interrupt time page manipulation.
data pointed at in a ktrace file, if this process is being ktrace'ed.
I'm using this to profile malloc usage.
The advantage is that there is no context around this call, ie, no
open file or socket, so it will work in any process, and you can
decide if you want it to collect data or not.
/*
* Structure defined by POSIX.4 to be like a timeval.
*/
struct timespec {
time_t ts_sec; /* seconds */
long ts_nsec; /* and nanoseconds */
};
The correct names of the fields are tv_sec and tv_nsec.
Reminded by: James Drobina <jdrobina@infinet.com>
I maintain that it saves more power to simply "hlt" the CPU than to
spend tons of time trying to tell the APM bios to do the same.
In particular if you do it 100 times a second...
changes. This version should fix a number of bugs such as with auto-
speed sensing and at least one known panic.
Submitted by: Matt Thomas (matt@3am-software.com)
bsd.obj.mk. Also, a make target called objwarn checks to see
if ${.OBJDIR} != ${.CURDIR} and ${.OBJDIR} != ${CANONICALOBJDIR}
and outputs a warning. (No warning for the latter if MAKEOBJDIR or MAKEOBJDIRP
REFIX is set). objwarn is called from all targets in bsd.prog.mk, bsd.kmod.mk,
and bsd.lib.mk.
Reviewed by: bde
is that it doesn't say _what_ did it! (the core dumped console message
is very useful for listing the process name and pid). This adds similar
information.
`show vmopag', `show page' and `show pageq'. Moved all vm ddb stuff
to the ends of the vm source files.
Changed printf() to db_printf(), `indent' to db_indent, and iprintf()
to db_iprintf() in ddb commands. Moved db_indent and db_iprintf()
from vm to ddb.
vm_page.c:
Don't use __pure. Staticized.
db_output.c:
Reduced page width from 80 to 79 to inhibit double spacing for long
lines (there are still some problems if words are printed across
column 79).
The details are hidden in the DB_COMMAND(cmd_name, func_name) and
DB_SHOW_COMMAND(cmd_name, func_name) macros. DB_COMMAND() adds to
the top-level ddb command table and DB_SHOW_COMMAND adds to the
`show' subtable. Most external commands will probably be `show'
commands with no side effects. They should check their pointer
args more carefully than `show map' :-), or ddb should trap internal
faults better (like it does for memory accesses).
The vm ddb commands are temporarily unattached.
ddb.h:
Also declare `db_indent' and db_iprintf() which will replace vm's
`indent' and iprintf().
Saved a few bytes by copying `dosdev' and/or `name' to local variables.
This optimization (for dosdev) was done in one place before but this
was lost in the devread() cleanup. This optimization (for dosdev)
can almost be done by bogusly declaring dosdev as const, but gcc still
often space-pessimizes code like the following:
extern const int dosdev; ... foo(dosdev); bar(dosdev);
gcc often doesn't bother to copy dosdev to a temporary local because
the local would have to be preserved in memory across the call to
foo(). OTOH, for
extern int dosdev; ... auto int dosdev_copy = dosdev; ...
foo(dosdev_copy); bar(dosdev_copy);
the copy must be made because foo() might alter dosdev.
the pointer to the string "/kernel". This pointer was once only
statically to once save space, but it has had to be dynamically
initialized for some time, so the static initialization just wastes
space. The string gets moved to the text section, so the actual
savings may be negative due to padding.
instead of 0 if there is no input.
pcvt_drv.c:
Partially fixed pccncheckc(). It returned a boolean value instead of
the character that it fetches from the input fifo (if any). I think
it still discards characters after the first for multi-char input.
instead of 0 if there is no input.
syscons.c:
Added missing spl locking in sccncheckc(). Return the same value as
sccngetc() would. It is wrong for sccngetc() to return non-ASCII, but
stripping the non-ASCII bits doesn't help.
still being used just to support printing of the device name in the
probe. Restored the method used in rev.1.6 and changed it to print
the same strings as the previous revision.
Reviewed by: Paul Richards
time, in seconds, that state for non-established TCP sessions stays about)
a sysctl modifyable variable.
[part 1 of two commits, I just realized I can't play with the indices as
I was typing this commit message.]
to "keepidle". this should not occur unless the connection has
been established via the 3-way handshake which requires an ACK
Submitted by: jmb
Obtained from: problem discussed in Stevens vol. 3
B_ASYNC flag broke things pretty bad (freeing buffer already on
queue or other wierd buffer queue errors.) The broken code is
left in commented out, but this makes the problem go away for
now.
(1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic
(2) Move PC98 specific code out of cpufunc.h (to pc98.h)
(3) Let the boot subtrees look more alike
Submitted by: The FreeBSD(98) Development Team
<freebsd98-hackers@jp.freebsd.org>
modified. Pages that are removed by the pageout daemon were
the worst affected. Additionally, numerous minor cleanups,
including better handling of busy page table pages. This
commit fixes the worst of the pmap problems recently introduced.
biosextmem > 65536, but biosextmem is a 16-bit quantity so it is
guaranteed to be < 65536. Related cruft for biosbasemem was
mostly cleaned up in rev.1.26.
It worked because it is spelled correctly in LINT.
Added old obscure syscons options MAXCONS, SLOW_VGA and XT_KEYBOARD.
This file should be sorted both alphabetically and on the module
name by using a consistent prefix for each module, but there is no
consistency in the old options. E.g., MAXCONS is spelled PCVT_NSCREENS
for pcvt.
and xdm, possibly in general.
What was happening was that the server was doing a tcsetattr(.. TCSADRAIN)
on the mouse fd after a write. Since /dev/sysmouse had a null t_oproc,
the drain failed with EIO. Somehow this spammed XFree86 (!@&^#%*& binary
release!!), and the driver was left in a bogus state (ie: switch_in_progress
permanently TRUE).
The simplest way out was to implement a dummy scmousestart() routine to
accept any characters from the tty system and toss them into the void.
It would probably be more correct to intercept scwrite()'s to the mouse
device, but that's executed for every single write to the screen.
Supplying a start routine to eat the characters is only executed for the
mouse port during startup/shutdown, so it should be faster.
-I- to CFLAGS. <sb.h> must currently be used to give the version
of sb.h in the current directory, while "sb.h" in the buggy version
gave the (wrong) version in the source directory. Searching in the
source directory first is normal, but is the reverse of the order
suggested by the 4.4Lite2 #include style. -I- will remove the
ambiguities.
Sorry if this makes it harder to merge in lite2 stuff but hey..
At least I can figure out what is going on whenever I end up going through those
files again..
do we have a policy regarding commenting existing code?
This enables other consumers of the mouse, to get it info via
moused/syscons.
In order to use it run moused (from sysconfig), and then tell
your Xserver that it should use /dev/sysmouse (mknod sysmouse c 12 128)
and it a mousesystems mouse. Everybody will be happy then :)
Remember that moused still needs to know what kind of mouse you
have..
Comments welcome, as is test results...
The default level works with minimal overhead, but one can also enable
full, efficient use of a 512K cache. (Parameters can be generated
to support arbitrary cache sizes also.)
(A pointer to a const was misused to avoid loading loading the same
value twice, but gcc does exactly the same optimization automatically.
It can see that the value hasn't changed.)
- avoiding strcmp("?" saved 12 bytes. gcc inlined the strcmp()
but this takes as much or more code as a function call. The
inlining was bogus because the strcmp() in the bootstrap isn't
standard.
- using a char instead of an int for the boolean `last_only' saved 8
bytes. Booleans should usually be represented as chars on the i386.
- simplifying the return tests saved 9 bytes.
- using putc instead of printf to print a newline saved 3 bytes of code
and 2 bytes of const data.
- avoiding `else's by always doing the else clause and fixing it up
saved 4+8 bytes.
gcc always generates large code for accesses to globals. For locals
it only generates large code if there are more than 128 bytes of
locals. It sorts scalar locals after array locals to pessimize for
space in the usual case when there are more (static) references to
scalars than to arrays.
Saved another 16 bytes (13 before padding) by adding a `continue'.
Fall-through tests normally save space, but here one of them made
gcc do space-unoptimal register allocation (it allocates ch in %bl
because preserving this register across function calls is "free",
but comparisions with %bl take one byte fewer than comparsions with
%bl).
for entire SYS5 SHM segments. This is totally unnecessary, and so the
correct allocation of VM objects has been substituted. (The vm_mmap
was misused -- vm_object_allocate is more appropriate.)
If you define this, it means your keyboard is actually probable using the
brain-dammaged probe routine in syscons, and if the keyboard is NOT found,
then you don't want syscons to activate itself further.
This makes life sane for those of us who use serial consoles most of the
time and want "the right thing" to happen when we plug a keyboard in.
Bowrite guarantees that buffers queued after a call to bowrite will
be written after the specified buffer (on a particular device).
Bowrite does this either by taking advantage of hardware ordering support
(e.g. tagged queueing on SCSI devices) or resorting to a synchronous write.
Bowrite guarantees that buffers queued after a call to bowrite will
be written after the specified buffer (to a particular device).
Bowrite does this either by taking advantage of hardware ordering support
(e.g. tagged queueing on SCSI devices) or by resorting to a synchronous write.
not depend on bootverbose being true.
Include only register specifications for those chip sets that apply to
a cpu that might boot this a particular kernel (ie. make the Saturn code
depend on I486_CPU being defined, the Pentium chip sets on I586_CPU ...)
I just couldn't get the code to be as small as it should have gotten..
atill a LITTLE bigger than before as I need to allow the
default string to have options as well
1/ Makefile: the maximum size for boot2 is 7.5K not 7K,
so don't complain until it reaches THAT size..
newfs leaves 8K and boot 1 is 512k. leaving 7.5K becasue the disklabel
is considered to part of the boot2 file.
[512 boot1][512 disklabel][ 7K boot2 code ]
[boot1 file][ boot2 file ]
2/ Boot2.S: move the soring of the default name read from block 2 to AFTER
clearing the BSS.
3/ boot.c:
Move the parsing of the command line into the
place it's called for clarity.. alsoi comment it a bit and clean it
up a bit.. for some reason this seems ot have made it a little
larger, but I can't work out why.. maybe bruce might have ideas?
compensated for by shrinkage elsewhere..
the practical result of this is htat the default string can now contain args
e.g. if you change the default string to have -gd
then the machine will boot to the dgb debugger stub by default..
this is mostly useful with the nextboot utility..
as it now allows you to remotely force a machine to reboot into
the debugger.
(1) Remove mk30line (moved to /usr/sbin, but not in our source tree yet)
(2) Delete unneeded (well, harmful now :) code to prohibit #including
of isa_device.h from PC98 sources.
(3) Remove files now equal to their ISA/PC-AT counterparts.
Submitted by: The FreeBSD(98) Development Team
so that the compiler can see that it is OK to use const strings in
NDINIT(). Some emulators want to use paths of the form "/compat/foo".
Removed the casts that hid the non-problem. Didn't fix the missing
consts in syscalls.master that hid the non-problem.
were declared as non-const. This is backwards (_lkm_exec() changes the
pointers but all the target `struct execsw's are const). Fixed this
and poisoned related declarations to match and removed the bogus casts
that hid the bug.
the file access time update on reads and can be useful in reducing
filesystem overhead in cases where the access time is not important (like
Usenet news spools).
way it attaches multiple PCI buses directly to the CPU, instead of having
them hanging off from PCI to PCI bridges. This code is a hack, and will
be obsoleted by the planned rework of the PCI code, which will change the
dealing with PCI to PCI bridges and other special devices significantly.
The patch also adds a kern_devconf entry for PCI bus 0 which is assumed
to be a child of cpu0. The new PCI code will make it possible to hand out
the kern_devconf structure to a pci device being attached, since this is
(regretably, IMHO) required by a few ISA devices.
Finally there are new PCI ids for some Intel chip set devices, which had
already been known to 2.1.5R, but did not make it into -current. This closes
"kern/1558: PCI probe seems to have lost a device in -current".
is non-null before trying to delete it in rt_setgate(), which then
allows removal of the special-case code from the RTM_ADD case.
This should fix the panics that joerg and Phil Karn have been seeing.
returned by the RTC, use the bootblock supplied value. Also, map the
'stolen by BIOS' memory in the same manner as the ISA-hole memory, since
it is really an extenstion of the BIOS. This is necessary for 32-bit
BIOS functions such as APM support on laptops, and the loss of memory
for non-necessary functions seems to be at most 4k.
Reviewed by: phk
Obtained from: email conversation with jtk@atria.com
Subnets are represented in the routing table as a set of
binary routing nets using the standard netmask algorythm.
The code produces the minimum possible set of standard netmasks and
net addresses to be able to represent a given netrange.
and fix some bugs..
also fix a bug in aarp.c that didn't take netranges into account.
default routes now work with appletalk, which is a poor-man's
way of being able to access netranges if you only have one network :)
Hopefully the full netranges fix will happen soon.
the end of that sstructure to make evolution easier.
Add definitions for the 802.3/Ethernet MIB. To implement this, simply
add a `struct ifmib_iso_8802_3' somewhere in your interface's softc,
point if_linkmib to it, set if_linkmiblen, and fill in the statistics
with appropriate values. (I didn't want to create Yet Another Ethernet-
related header file, otherwise this would have been separated out.)
with an inconsistent state. I think the return actually "can't happen".
Cleaned up style of recent changes.
I only fiddled with this because of bugs in recent changes.
The only excuse this had for becoming misordered was that some drivers
were sorted on the driver name field, but the ffs versus mfs ordering
shows that this is not a consistent order.
The only case that I know of where simple sorting is wrong is for files
that must be compiled without profiling if profiling is configured and
normally otherwise. Then the line with `profiling-routine' must appear
first to get the file compiled with ${PROFILE_C}.
logic clock signal, which had been erroneously commented out by the
previous commit. This will re-enable support for sync. transfer negotiation,
which depends on one of those values.
calculate an optimum value from (constant) parameters.
This should set the SCNTL3 register of the 53c860 and 53c875 to twice
the divider it used to be, since cards based on those chips seem to use
an 80MHz clock instead of the Clock Doubler feature and a 40MHz clock.
the primary and secondary return codes, causing it to not behave as
documented. This probably originates from the ancient BSD kernels that
had pipe(2) implemented by socketpair(2), there are no binaries left that
we can run that do this.
Pointed out by: Robert Withrow <witr@rwwa.com>, PR#731
like it does elsewhere. This is probably only happens when incorrect
args are given to route(8), or when running with non-IPv4 stacks but
incorrect args to the route command is no excuse for panicing!
Submitted by: Michael Clay <mclay@weareb.org>, PR#1532
note that at_shutdown has a new parameter to indicate When
during a shutdown the callout should be made. also
add a RB_POWEROFF flag to reboot "howto" parameter..
tells the reboot code in our at_shutdown module to turn off the UPS
and kill the power. bound to be useful eventually on laptops
The interface into the "VMIO" system has changed to be more consistant
and robust. Essentially, it is now no longer necessary to call vn_open
to get merged VM/Buffer cache operation, and exceptional conditions
such as merged operation of VBLK devices is simpler and more correct.
This code corrects a potentially large set of problems including the
problems with ktrace output and loaded systems, file create/deletes,
etc.
Most of the changes to NFS are cosmetic and name changes, eliminating
a layer of subroutine calls. The direct calls to vput/vrele have
been re-instituted for better cross platform compatibility.
Reviewed by: davidg
half way through the range rather than possibly colliding with
fixed elements. Increase the size of the arrays to take this into account..
remember that each element in the array is now only 1 ponter so this
isn't that much..
also note a possible bug in debugging code in uipc_socket2.c (add XXX)
I've been meaning to do this for AGES as I keep having to patch those routines
whenever I write a proprietary package or similar..
any module that assigns resources to processes needs to know when
these events occur. there are existsing modules that should be modified
to take advantage of these.. e.g. SYSV IPC primatives
presently have #ifdef entries in exit()
this also helps with making LKMs out of such things..
(see the man pages at_exit(9) and at_fork(9))
called kern_shutdown.c
note: I couldn't see anything machine dependant in the
functions boot() and dumpsys() which were in machdep.c
I have left a prototype for cpu_boot() which would go in
machdep.c, but I have nothing to put in it. Iexpect others will
let me know in no uncertain ways that this or that is machine dependant
and should be there, but I'll way for that to happen.. :)
I haven't actually taken the functions OUT of machdep
or anywhere else yet.. I'm checking in this file so others can have a look
at it and comment. SO PLEASE DO COMMENT!
I am also (in another checkin) addinf a man(9) page for the new
at_shotdown().. er freudian slip there.. at_shutdown() call
so have a look at that (and at_exit and at_fork as well)
and feed me comments..
I'll heck in the changes to make these (shutdown) changes active tomorrow
if no-one objects too strongly..
gcc-2.7 has __attribute__((unused)) as a postfix operator on function
arguments to prevent -Wunused from complaining about them. gcc < 2.7
doesn't have anything like this (and doesn't care about it either).
eg:
int foo(bar, baz)
int bar __unused; /* needed because of function pointer typing */
char *baz __unused;
{
return (1);
}
during phk's staticize/cleanup commits. pstat needs it, the MAXCONS
option is not visible anywhere else, and pstat uses it to find the bounds
of the sccons[MAXCONS] array, which varies.
Fixes unp_externalize panic which occurs when a process is at it's
ulimit for file descriptors and tries to receive a file descriptor from
another process.
Reviewed by: wollman
cleaning up some of the vnode usage..
(I'm sure it still needs more..)
where can one find out what each vfs call expects to be locked
on completion, and how can one find out what each layer expects
to be freed on error.?
it only barely works so don't get too carried away..
I noticed that teh symlink is length 0..
I guess I'll fix that tomorrow..
it also sometimes panics with "cleaned vnode isn't" but it's not more
broken than it was before.. I really want to go over it with someone
who understands the lifecycle of a vnode better than I do..
terry?
kirk?
david?
john?
. preserve a multi-char sequence in a small static buffer inside
pccngetc(), so it won't be clobbered later (used to happen when
breaking into DDB user Ctrl-Alt-ESC), and
. simplify the ``keystroke is present'' determination in sgetc(), thus
making pccncheck() actually working without waiting for a keystroke.
for work regardless of whether there was an interrupt. This needs more
work, it should be able to run better when there are more than 3 host
cards present, ie: all cards in polling-only mode with no IRQ. (The
host cards have a choice of 3 irq's, 11, 12, or 15, or just polling)
IPPORT_RESERVED that is used for selection when bind() is told to allocate
a reserved port.
Also, implement simple sanity checking for all the addresses set, to make
it a little harder for a user/sysadmin to shoot themselves in the feet.
little more reliably. So far I've received a couple of positive
responses and no objections to these changes.
There are two one-line changes:
- In wdprobe(), when testing the error status of drives, don't
unconditionally decide that there is no controller present if we
read back a value of 0x81 (drive 0 okay, drive 1 failed) twice
in a row. This may be caused by having an ATAPI CD-ROM jumpered
as a master on the controller with no slave.
- In wdgetctlr(), when checking for a status of WDCS_READY, check the
value twice. The first time may be bogus. This stops a phantom wd2
device from being detected when an ATAPI CD-ROM is attached to the
secondary controller alone as a slave. (This can cause installation to
fail when sysinstall attempts to open the phantom device and wedges the
system as a result. This has bitten me a couple of times on some
Gateway 2000 machines.)
. make pccncheck() work even when interrupts are disabled, so the
``Press a key on the console...'' procedure will work,
. make kernel colors #ifndef, so they can be overridden from the
config file,
. use shutdown_nice() instead of cpu_reset() if Ctrl-Alt-Del is
enabled,
. allow pccngetc() to return more than a single character, so the
arrow keys will work (and thus visual UserConfig!),
. fix a warning.
This closes all know PRs related to pcvt, in particular #845, #1236,
and #1265. PR #991 is a duplicate for 845, and PR #1283 has already
been fixed earlier in rev 1.11 of pcvt_conf.h.
Submitted by: Ulf Kieber (kieber@sax.de), for the kernel color fix
Emacs-style line editing has already been there (did anybody ever
notice this? :), so i `only' had to add ^P and ^N. The approach is
fairly minimalistic, with the advantage of keeping the bloat as small
as 864 bytes of .text and 16 bytes of .bss, plus 10*120 bytes
malloc'ed history buffer at the first use.
nearest .01 Mhz rather than simply truncating it downwards.
This hack makes this 89.999928 Mhz clock correctly round to the closer
90.00-MHz rather than 89.99-MHz:
> i586 clock: 89999928 Hz, i8254 clock: 1193152 Hz
> CPU: Pentium (90.00-MHz 586-class CPU)
allow a tunnel interface to be openned even if it has no remote address yet.
this may be needed if you have used
route add default -interface tun0
where the remote end might not even HAVE a number (e.g. netcom links)
This is a patch to sys/net/if.c. What it does is patch the algorithm
for finding an IP address on an interface which most closely matches
a given IP address. The problem with it is when no address matches,
and you have to just pick one at random. Then the code ends up picking
the last IP address in the list. This patch changes things so it
picks up the first address instead.
Usually the first address is more useful as the later ones are aliases.
buffer in certain error conditions. Sync up the code to that in NetBSD
where applicable.
Reviewed by: Gary Jennejohn <garyj@munich.netsurf.de>
Submitted by: Michael Smith <msmith@atrad.adelaide.edu.au>
Obtained from: NetBSD sources
Changed i586_ctr_bias from long long to u_int. Only the low 32 bits
are used now that microtime uses a multiplication to do the scaling.
Previously the high 32 bits had to match those of rdtsc() to prevent
overflow traps and invalid timeval adjustments.
block number.. (assuming Debugger() returned). The disk drivers assume
that dscheck() sets both error markers (bp->b_error and set B_ERROR in
bp->b_flags) if it fails.
does) before calling dscheck(). dscheck() doesn't appreciate this and
calls Debugger() and returns without setting bp->b_error.
This can happen when there is a casting error and offsets > 2G are
converted to negative off_t's in the disk tools. (dumpfs used to do this).
early enough when the dump device is specified in the config file.
Removed stale comment about configuration root and swap devices.
Don't bother clearing dumplo when dumpdev is set to NODEV. Everything
is controlled by dumpdev.
Fixed the kern.dumpdev sysctl. Writes were handle bogusly.
interfaces. This creates two new tables in the net.link.generic branch
of the MIB; one contains (essentially) `ifdata' structures, and the other
contains a blob provided by the interface (and presumably used to
implement link-layer-specific MIB variables). A number of things
have been moved around in the `ifnet' and `ifdata' structures, so
NEW VERSIONS OF ifconfig(8) AND routed(8) ARE REQUIRED. (A simple
recompile is all that's necessary.)
I have a sample program which uses this interface for those interested
in making use of it.
problem with the 'shell scripts' was found, but there was a 'strange'
problem found with a 486 laptop that we could not find. This commit
backs the code back to 25-jul, and will be re-entered after the snapshot
in smaller (more easily tested) chunks.
is little or no reason to create a swap pager for small mmap's. The
vm_map_insert code will automatically create a swap pager if the object
becomes too large. This fix, per a request from phk.
and then never accept for sending packet from upper layer anymore
(i.e. ping -f )
Reviewed by: David Greenman <dg@root.com>
Submitted by: amurai@spec.co.jp
performance issues.
1) The pmap module has had too many inlines, and so the
object file is simply bigger than it needs to be.
Some common code is also merged into subroutines.
2) Removal of some *evil* PHYS_TO_VM_PAGE macro calls.
Unfortunately, a few have needed to be added also.
The removal caused the need for more vm_page_lookups.
I added lookup hints to minimize the need for the
page table lookup operations.
3) Removal of some bogus performance improvements, that
mostly made the code more complex (tracking individual
page table page updates unnecessarily). Those improvements
actually hurt 386 processors perf (not that people who
worry about perf use 386 processors anymore :-)).
4) Changed pv queue manipulations/structures to be TAILQ's.
5) The pv queue code has had some performance problems since
day one. Some significant scalability issues are resolved
by threading the pv entries from the pmap AND the physical
address instead of just the physical address. This makes
certain pmap operations run much faster. This does
not affect most micro-benchmarks, but should help loaded system
performance *significantly*. DG helped and came up with most
of the solution for this one.
6) Most if not all pmap bit operations follow the pattern:
pmap_test_bit();
pmap_clear_bit();
That made for twice the necessary pv list traversal. The
pmap interface now supports only pmap_tc_bit type operations:
pmap_[test/clear]_modified, pmap_[test/clear]_referenced.
Additionally, the modified routine now takes a vm_page_t arg
instead of a phys address. This eliminates a PHYS_TO_VM_PAGE
operation.
7) Several rewrites of routines that contain redundant code to
use common routines, so that there is a greater likelihood of
keeping the cache footprint smaller.
blocked in a write() while waiting for the output to drain, sleep only
for tp->t_timeout, not forever. This only seems to happen when there is
either a modem lockup holding the hardware flow control down, or due to
some problem in the driver with processes attempting to write after the
modem has hung up (eg: elm, tf).