(This code is as yet untested; to come after man page is written.)
This also adds inlines to cpufunc.h for the RDTSC, RDMSR, WRMSR, and RDPMC
instructions. The user-mode interface is via a subdevice of mem.c;
there is also a kernel-size interface which might be used to aid
profiling.
determine if the interface had been assigned an IP address.
This code prevented the interface from receiving ethernet
broadcasts if it had no IP address assigned, and appeared
to be an optimization that is not completely needed.
Add support for LKM operation.
Change M_NOWAIT on buffer memory allocation to M_WAIT in hopes we'll be
able to get ourselves a nice fat buffer from the kernel if we suspend.
Note: The LKM support looks kinda screwy in two areas, where I found
problems with the kernel proper. First, calling dev_attach()
at module load time will cause a panic. I haven't investigated.
Secondly, I had to manually call qcam_drvinit() to register the
device softc structure by hand at module load time. This seems
bogus, it should be called as a core part of the module load
process for character/block device drivers.
vm_offset_t is currently unsigned long but should probably be plain
unsigned for i386's to match the choice of minimal types to represent
for fixed-width types in Lite2. Anyway, it shouldn't be assumed
to be unsigned long.
I only fixed the type mismatches that were detected when I changed
vm_offset_t to unsigned. Only pointer type mismatches were detected.
isn't supplying all the proper header info here! Last commit of fe0
entry should have had the following Submitted by line also).
Submitted-by: Masahiro SEKIGUCHI <seki@sysrap.cs.fujitsu.co.jp>
1. Create 2 x 8k transmit buffer blocks in place of the 16k block previously.
With this change the speed as tested with ttcp on a 2Mbit link went up
from 206kbyte/s to 236kbyte/s.
2. Change the rest of the functions to also have the definition of the
return value on a sepperate line.
3. Remove some unused variables.
4. Add code to recover from DMA underruns.
5. Reorder ar_get_packets() to handle errors better.
6. Only allocate a mbuf cluster if the data is more than the mbuf.
(and in a second diff in addition to the above)
7. Stops the occasional DMA underruns that occurred when 2 channels
are running at 2Mbit/s.
Submitted by: John Hay <jhay@mikom.csir.co.za>
loader is also present in the coff loader. It was possible to get one
more page allocated than needed, which would cause brk()/malloc()/etc
to fail with ENOMEM when it tried to re-allocate the space.
Also, change a bcopy() from kernel to user space to a copyout().
just in case a connection already existed.
Also, a minor optimization in the code which determins if a APM BIOS exists.
Reviewed by: phk
This is based on the APM-0.5 patch for Linux, but written entirely by me.
To complete this, some extra state has to be kept somewhere so that the
B38400 flag in Linux can be correctly translated to/from either 38400,
57600 or 115200.
Submitted by: Robert Sanders <rsanders@mindspring.com>
this code was not quite right (linux has a readdir and getdents syscall,
with the same args. readdir only returns one entry and uses a mutant
dirent structure. This code was also returning the mutant form for
getdents as well. My fault for missing this before.)
Compile and link a new kernel, that will give native ELF support, and
provide the hooks for other ELF interpreters as well.
To make native ELF binaries use John Polstras elf-kit-1.0.1..
For the time being also use his ld-elf.so.1 and put it in
/usr/libexec.
The Linux emulator has been enhanced to also run ELF binaries, it
is however in its very first incarnation.
Just get some Linux ELF libs (Slackware-3.0) and put them in the
prober place (/compat/linux/...).
I've ben able to run all the Slackware-3.0 binaries I've tried
so far.
(No it won't run quake yet :)
Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
Use the system defined *_t types instead.
aic7xxx.c:
Fix the reset code.
Instead of queing up all of the SCBs that timeout during timeout
processing, we take the first and have it champion the effort.
Any other scbs that timeout during timeout handling are given
another lifetime to complete in the hopes that once timeout
handing is finished, they will complete normally. If one of
these SCBs times out a second time, we panic and Justin tries
again.
The other major change is to queue flag aborted SCBs during timeout
handling, and "ahc_done" them all at once as soon as we have the
controller back into a sane state. Calling ahc_done any earlier
will cause the SCSI subsystem to toss the command right back at
us and the attempt to queue the command will conflict with what
the timeout routine is trying to accomplish.
The aic7xxx driver will now respond to bus resets initiated by
other devices.
Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
Use the system defined *_t types instead.
eisaconf.c:
Cosmetic formatting chagnes.
iterations of 30uS so that really fast systems stop getting
timeout messages from the Riscom driver.
Reviewed by: ache, peter@nmti.com (Peter da Silva)
handled correctly. Fix some incorrect code that was included
to improve performance. Significantly simplify the pmap_use_pt and
pmap_unuse_pt subroutines. Add some more diagnostic code.
is defined and FORCE_COMCONSOLE isn't defined.
Don't compile any keyboard probing code if PROBE_KEYBOARD isn't defined.
Makefile:
Removed -I paths. They weren't used, and the one to /sys hasn't worked
since the source directory was moved down one level.
counter instead of the BIOS time call to save space.
Reworked the anti-noise timeout to avoid duplicating code. The timeout
in the outer loop is now restarted after every noise timeout, so it is
now possible for the total timeout to be infinite; previously, the maximum
total timeout was 150000 seconds.
must have limit 0xffff and attribute G = 0 (byte granularity) as well
as other properties that they already had (see e.g., the Intel i486
manual section 22.5). Not restoring them broke Ctrl-Alt-Del in the
bootstrap for my ASUS P55TP4XE system, probably because the Award BIOS
does anti-tracing stuff involving inaccessible %esp's.
asm.S:
Don't use lret in prot_to_real(). This reduces the risk of using an
incompletely intialized stack segment and saves space.
Submitted by: "K.Higashino" <a00303@cc.hc.keio.ac.jp> (on 13 Jan 1995!)
reworked by me
Also, LINUX_POSIX_VDISABLE is \0, FreeBSD's is 0xff. Convert between them.
This enables some more programs to run, including the Livingston Portmaster
utilities (PMtools).
Submitted by: Robert Sanders <rsanders@mindspring.com>
since that's the only other USER_LDT using code that I know of.
Submitted by: Gary Jennejohn <Gary.Jennejohn@munich.netsurf.de>
Obtained from: {Origin of diffs may be someone else - I only rec'd them from
Gary}
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
the S-Video input. It also has code in the driver for the meteor RGB support
and some other bug fixes. I don't have a meteor RGB but I have been told
that it works.
Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
- split driver into FreeBSD specific and camera specific portions
(qcamio.c can run in user mode, with a Linux "driver top" etc,
and qcam.c should be trivial to port to NetBSD and BSDI.)
- support for 4bppand bidirectional transfers working better
- start of interleaved data-transfers byte-stream decodes (some of this
stuff has been pulled out for the moment to make it easier to debug)
At this point, anyone who wants to port it to other platforms should feel
free to do so. Please feed changes directly back to me so that I can produce
a unified distribution.
doesn't break support for the older models (tested with my 3C589B).
Reviewed by: Joshua Gahm <jgahm@BBN.COM>
Submitted by: hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi)
prevent it from conflicting with other drivers (like the aic7xxx driver).
Most of the work was in spliting out common portions of the driver and
making them generic enough to be called from the eisaconf probe.
The eisaconf probe for the 3Com 3c579 and the 3c509 when in eisa
configuration mode.
aha1742.c aic7770.c bt74x.c:
Only call eisa_registerdev after the probe is successfully.
eisaconf.c:
Increase kdc->kdc_datalen during the eisa_reg* functions instead of
in the eisa_add* functions since eisa_registerdev has already been
called and we have a kdc to manipulate.
Close the ip-fragment hole.
Waste less memory.
Rewrite to contemporary more readable style.
Kill separate IPACCT facility, use "accept" rules in IPFIREWALL.
Filter incoming >and< outgoing packets.
Replace "policy" by sticky "deny all" rule.
Rules have numbers used for ordering and deletion.
Remove "rerorder" code entirely.
Count packet & bytecount matches for rules.
Code in -current & -stable is now the same.
- Optimise the linux a.out loading and uselib system calls so they
take advantage of some of John's recent interface improvements.
Basically, this means they make far less map changes than before.
- Attempt to plug some potentially nasty kernel_map memory leaks..
- Improve support for QMAGIC libs (I only use QMAGIC (ie: a.out libraries from
the slackware 3.0 dist) but this depends on other changes to enhance
the /compat/linux support)
- uselib goes out through a single exit as part of the resource tracking
that I did when closing the resource leaks on errors. This could be
cleaner than what I did, but making a 30-deep nested if/else was not my
idea of fun, neither did I want to repeat the same code 30 times over for
each failure possibility. I guess this function needs to be split into
smaller functions to solve this.
I've been running the Linux Netscape-2.0 (with Java) to test this, and apart
from the long-standing problem with the missing scrollbars, it appears to
still work as before with ZMAGIC libs (and the leaks).. However, I've
been using it with mods for the signal trampoline code for native linux stack
frames on signals and exterminated the blasted sigreturn printf() problem,
so I can't be certain that there is not a dependency on something else.
- Clean up the access to our ifnet structure by caching a pointer
to it instead of always digging through our softc structure.
Submitted by: Watchdog fixes by Serge A. Babkin <babkin@hq.icb.chel.su>
- fill in and use ifp->if_softc
- use if_bpf rather than private cookie variables
- change bpf interface to take advantage of this
- call ether_ifattach() directly from Ethernet drivers
- delete kludge in if_attach() that did this indirectly
pmap_activate since it's not used anymore. Changed cpu_fork so that
it uses one line of inline assembly rather than calling mvesp() to
get the current stack pointer. Removed mvesp() since it is no longer
being used.
for me, but has gotten a bit flakey in bidirectional parallel port mode.
Fix a bug in bidirectional parallel port transfers, more work is still
needed here (testers welcome).
Minor cleanup.
vs unidirectional transfer modes. The kernel handles hardware, user mode
programs shouldn't get in the way.
This cleans up some really ugly grots that I hated too. :-)
Suggested by: Sujal Patel <smpatel@wam.umd.edu>
* this is my unoptimized driver, it works fine, it's not as fast as it
* could be (yet) -- I have yet to merge in ideas from other QuickCam
* developers.
* warning: this user interface is still in flux pending negotiations
* with other quickcam driver authors. It is _not_ compatible with the
* original linux interface due to the fact that it was too restrictive.
- Call eisa_registerdev as soon as we have a device match. This allows the
"eisa_add_*" routines to tweak kdc_datalen as the kdc grows and shrinks.
eisaconf.c
- externalize the linked lists that hold our ioaddrs and maddrs.
clock interrupts.
Keep a 1-in-16 smoothed average of the length of each tick. If the
CPU speed is correctly diagnosed, this should give experienced users
enough information to figure out a more suitable value for `tick'.
fstat() syscall, rather than panic("linux newfstat").
(Note: I've extracted this from a larger set of diffs, I'm confident I've
not missed any dependencies but can't modload it to test it on my system)
chipset. This does not attempt to do anything special with the timing
on the hope that the BIOS will have done the right thing already. The
actual interface from the wd driver to the new facility is not
implemented yet (this commit being an attempt at prodding someone else
to do it because looking at the wd driver always confuses the h*** out of me).
quite work yet, so the heart of it is disabled.
Added bdev and cdev args to dsopen().
drivers:
Fixed device names, links, minor numbers and modes.
wd.c:
Started actually supporting devfs.
diskslice.h:
Added devfs tokens to structs (currently 576 of them per disk! :-().
subr_diskslice.c:
Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times. DEVFS is #undefed at the start so
that this shouldn't cause problems.
fd and wt drivers need bounce buffers, so this normally saves 32K-1K
of kernel memory.
Keep track of which DMA channels are busy. isa_dmadone() must now be
called when DMA has finished or been aborted.
Panic for unallocated and too-small (required) bounce buffers.
fd.c:
There will be new warnings about isa_dmadone() not being called after
DMA has been aborted.
sound/dmabuf.c:
isa_dmadone() needs more parameters than are available, so temporarily
use a new interface isa_dmadone_nobounce() to avoid having to worry
about panics for fake parameters. Untested.
overrun by 2 pages.
Fixed the (unused) values returned from device attach functions.
Fixed checking of unit number in device open functions - don't load bad
pointers or print error messages about the contents of bad pointers.
Removed unused #includes.
asc.c:
Fixed premature setting of flags in ascopen() - copied the better order
in gscopen().
gsc.c:
Fixed conflict handling for drq:
- fail the probe if the configured drq doesn't match the actual drq.
- set the configured drq to match the actual drq in the autoconfig case.
Reviewed by: Nobody; authors didn't respond to mail.
- cpuclass should be cpu_class
- CPUCLASS_I386 should be CPUCLASS_386
(^^ those only show up if you compile for i386)
- two missing prototypes on new functions
- one missing static
Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish
overhead for merged cache.
Efficiency improvement for vfs_cluster. It used to do alot of redundant
calls to cluster_rbuild.
Correct the ordering for vrele of .text and release of credentials.
Use the selective tlb update for 486/586/P6.
Numerous fixes to the size of objects allocated for files. Additionally,
fixes in the various pagers.
Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs.
Fixes in the swap pager for exhausted resources. The pageout code
will not as readily thrash.
Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into
page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE),
thereby improving efficiency of several routines.
Eliminate even more unnecessary vm_page_protect operations.
Significantly speed up process forks.
Make vm_object_page_clean more efficient, thereby eliminating the pause
that happens every 30seconds.
Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the
case of filesystems mounted async.
Fix a panic with busy pages when write clustering is done for non-VMIO
buffers.
Save 112K for SB, 64K for PAS and 64K for MSS.
Since PAS use SB emulation, 176K normally saved for it.
Few minor optimizations added like in Linux driver.
When you start tracker and produce some heavy disk activity,
output interrupts becomes lost and I don't know how to solve it
finally. Newly added code at least allows recovery after timeout.
2) Use CURSIG(curproc) in PROCESS_ABORTING instead of junk code was there.
3) Reanimate timeout code in DO_SLEEP by setting WK_TIMEOUT flag
which is never set in old code.
4) DO_SLEEP: set aborting flag on interrupting singnals as supposed, not
on signals which do nothing as in old code.
5) Cleanup WAKE_UP macro, WK_WAKEUP not used.
6) Remove wrong typecasts in sleep/wakeup code.
This random address can be matched (with some probability) with another
sleep addresses from other drivers, which can cause strange sleep/wakeup
sequence. Rewrite this ugly code to do the right thing.
Add more features to the one remaining to handle the job:
+ signed quantity.
# alternate format
- left padding
* read width as next arg.
n numeric in (argument specified) default radix.
Fix the DDB debugger to use these.
Use vprintf in debug routine in pcvt.
The warnings from gcc may become more wrong and intolerable because
of this.
Warning: I have not checked the entire source for unsupported or
changed constructs, but generally belive that there are only a few.
Suggested by: bde
it out fixes my problem but hoses the GUS MAX probe messages. Check what
device we have and print things appropriately for each.
Pointed out by: Jim Lowe <james@miller.cs.uwm.edu>
variants, idea taken from NetBSD clock.c.
At least year calculation was wrong, pointed by Bruce.
Use different strategy to store year for BIOS without RTC_CENTURY
are about to go in. This is to fix the problem with the ibcs2 and linux
lkm's not being able to call the sysv ipc functions unless the build is
modified.
in the future, these drivers won't need to maintain an array of
configured units. They still need to because ISA interrupt handlers
take a unit number. :(
Pass "softc" pointers instead of unit numbers to many functions that
did a conversion of unit->softc anyway.
this driver no longer needs to maintain an array of configured units.
Pass "softc" pointers instead of unit numbers to many functions that
did a conversion for unit->softc anyway.
whether of not to automatically #define EXCLUDE_AUDIO; MSS is a real
audio device and we should not #define EXCLUDE_AUDIO if we have one.
(And I want it because it's the only mixer-capable audio driver that I
can use with my crummy Packard Bell (nee Aztech) audio board.)
This fixes the very confusing condition where having all of this:
mss0 at 0x530 irq 10 drq 1 on isa
gus0: <MS Sound System (CS4231)>
opl0 at 0x388 on isa
opl0: <Yamaha OPL-3 FM>
mpu0 at 0x300 irq 9 drq 0 on isa
mpu0: <MPU-401 MIDI Interface 0.0 >
will still give you this:
% cat /dev/sndstat
SoundCard Error: The soundcard system has not been configured
Also remove an unnecessary newline in the printf() message for the
'gus0' device shown above so that we don't wind up printing a blank
line between mss0 and gus0.
was overlapping with another file, and making some undesirable behavior a
little worse - it's triggering a bug in config that appears to have been
there for some time (before the options files, anyway.)
to enable IP forwarding, use sysctl(8). Also did the same for IPX,
which involved inventing a completely new MIB from whole cloth (which
I may not quite have correct); be aware of this if you use IPX forwarding.
(The two should never have been controlled by the same option anyway.)
Simplify the initialization of adapters by pulling all card specific
initialization to the card specific modules.
Update comments and fix formating.
Pass struct ahc_data*'s to functions instead of unit numbers.
Take advantage of the quad word alignment of SCB fields.
Adapt to new sequencer changes:
1) Waiting scb list no longer has a tail.
2) Fill the message buffer as appropriate during a parity error.
3) Count all of the SGs involved in a residual instead of just
the current one.
The reset/abort code still needs a lot of work.
Reviewed by: David Greenman <davidg@FreeBSd.org>
aic7770.c:
Simplify the initialization of adapters by pulling all card specific
initialization to the card specific modules.
eisaconf.c:
outb 0x80 instead of 0xc80. The top byte is truncated anyway, and 0x80
was what was intended.
enough nodes for the number of ports on the last module, not the number
of ports _total_ that the driver is managing...
Submitted by: Robert Sanders <rsanders@mindspring.com>
Nobody in our regular source tree, or in the non-distfile part of the
ports tree does use /dev/io anyway, so this might be replaced by
another scenario some day.
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches. The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.
gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes. Does anyone
disagree?
gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header. This
hack will do until then. (Use gprof4 -u to examine the results
of non-statistical profiling.)
config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.
kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'. `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.
we can see if it's a small distance beyond the end, or way out. This may
give some clues as to whether it is being caused by something coalescing
the transfers in spite of the bounce buffers, or simply because of buffer
corruption. (The BT driver seems to occasionally get hit by from this too,
except that it does not trap the transfer, and the system panics later
with vm_bounce_page_free.) This "event" usually happens to me during a
savecore (on the rare occasion that a kernel coredump is actually taken
after a crash - the lack of kernel core dumps is another problem...).