difference, but might later on when we implement some sort of multi-head
console mode. Select a console after probing them all.
Don't strdup a potentially NULL return from getenv().
If we don't select an active console, choose the first regardless.
Call the console init function, at startup time and on a manual change.
The env_setenv() function needs EV_VOLATILE because it's pointing to
data that isn't malloc'ed and will cause a fault if it's freed later.
Cosmetic change to the init-time character eater (like, make it increment
the index counter - if there's a problem, it would sit there in an infinite
loop instead of only running 10 times).
Also, make sure we set %dx each time around otherwise the commands
suddenly start trying to work on things like com92 instead of com1.
Make sure comc_init() is only run once.
Cosmetic change to init-time character eater.
fxp_stop is called as the first thing in fxp_init, and if the tx desc
list has junk in it, the system may panic. This bug showed up as a side
effect of the changes in rev 1.56, but has been in the code since the
beginning.
Linux and FreeBSD signal numbers. Also, check signal numbers passed
in from application programs for validity. Without these checks,
it is trivial to panic the system from a Linux program.
be converted to fixed-sized integers when they are passed across the
binary interface to the kernel.
Didn't fix rotted bits (including not passing dosdev to the kernel and
serious out of dateness when initially committed).
this myself for ages, but wasn't able to get any feedback from the people
that I sent it to for testing.
Guy Helmer <ghelmer@scl.ameslab.gov> has given it a shot (before getting on
a plane, thanks!) and it appears to stop his reproducable page fault panic
in the testing he was able to do.
o For bt and aha only probe the one I/O range if a specific I/O is specified
in the config file.
o Don't even try to probe I/O ranges that have been seen already.
o If we conflict with an IRQ or DRQ, then fail the probe.
Requested by: bde, gibbs
Approved by: jkh
Implement preloading in a fairly MI way, assuming the information is
prepared.
DDB interface helpers.. Provide some support for db_kld.c so that we
don't have to export too much detail.
Debugging and cosmetic nits left in from development..
The other half of the containing file hack so modules can associate
themselves with their "file".
but I can't think of another (relatively) easy way of getting the info
since the boot-time initialization is not done immediately after "loading".
XXX module_register() gained an extra arg. This might break the alpha
compile, if so, just add a zero to get the old behavior.
should probably be moved to i386/i386/link_machdep.c (and the same for the
alpha).
Implement "deleting" a preloaded module by destroying it's tags. This is a
hack. We cannot reuse the data, it's been destroyed by relocation,
statically initialized variables have been modified, etc. Note that to
reclaim the load space is going to be more machine-dependent work.
Implement a relocate hook for machdep.c to call so that the physical
addresses get converted to the equivalent KVM addresses.
- seperate unload for preloaded linker objects.
- Don't build a kernel object if running as an a.out kernel.
- extract the real kernel name rather than hardwiring "kernel" for kldstat.
(sysctl kern.bootfile getst the full name via bootinfo)
- use real addresses on the kernel "module" rather than fictitious ones.
- preloaded module support
- search module path for file modules.
- symbols are checked to see if they are in the right containing file
before using their indexes into string tables. This is to help ddb
since it only supplies a pointer to an opaque symbol and there is no
telling which file/object/module/whatever it came from.
- symbol_values checks that the symbol is indeed belonging to the
correct symbol and string table pairs before looking up. (since there
could be many pairs, and KLD/DDB need to find out).
- different ops for files versus preload modules - the unload mechanism
is different. (a preloaded module has to be deleted on unload since
the in-core image is tainted by relocation and variables used)
- Do not build an a.out kernel module if we're running on an elf
kernel. :-) Note that it should theoretically be possible to
mix a.out and elf KLD modules providing -mno-underscores was used
to compile it, or some other symbol conversion takes place.
- Support preload modules (even though /boot/loader doesn't yet)
- Search the module path when loading files.
check off SYSINIT entries as they are run, and when more arrive, we re-sort
and restart (skipping the already-run entries).
This can *only* be done after KMEM (and malloc) is up and running - this is
fine because KLD is the only consumer of this and it's done after that.
The nice thing about this is that the SYSINIT's within preloaded KLD modules
are executed in their natural order. It should be possible to register
devices for the probes which follow, etc. (soon.. several key things
prevent this, such as use of linker sets for things like pci devices).
trying to do it in locore. We also walk through the module table
and relocate any MODINFO_ADDR pointers so that they become KVM relative
rather than physical addresses. This means that hacks for adding
0xf0000000 in places like MFS go away.
get to all the symbol tables for all modules, not just the core kernel
symbol table. Yes, DDB can see KLD module symbols with this, both by
lookup and in tracebacks. No more references to _end from tracebacks
within an LKM. :-)
because the alpha boot loader hasn't been converted yet, and because
it needs the full symbol tables with local symbols in order to make sense
of stack tracebacks. KLD will implement this (using full sybmol table
rather than the globals only) shortly.
case it's possible to compile in something like ECOFF)
The three db_xxx.c symbol interfaces are "standard" because config isn't
flexible enough without forcing the user to know about it.
should be MD code since one day we'll have to recover pages from deleted
preload data. MI code can't be expected to know how to deal with pmap
internals, assuming it gets done via pmap that is. :-)
- get dependency info from PT_DYNAMIC's DT_NEEDED tags.
- store MODINFOMD_DYNAMIC for the kernel's later use
setenv kernelname when we have it
Fix firstaddr/lastaddr calculation (duh! :-)
Explicitly skip string table with section names in it.
KLD modules are *not* PIC. (Shared libs are pic to avoid relocations
causing copy-on-write, that's irrelevant here).
setenv kernelname when we load it.
Use MODINFO_SSYM/ESYM for each symbol section when (if) there are
more than one being loaded.
Remove Mike's explicit data structures for dependency info. This is
done via DT_NEEDED etc in the dynamic section for now. This may need
to be revisited later on.
Change symbol_values return type to int, on the chance that we've
been given the wrong symbol table. Symbols have a string index that
must be relative to the correct string table.
Add prototypes for better kld support for ddb.
First part of support for merging SYSINIT sets.
This, and the following KLD commits have been OK'ed by jkh and msmith
based on my assertion that it works here (barring merge errors :-).
is a work-around from an LRAM access bug on the 940UA. In a future
microcode revision, the high 16bits of residual information will be moved
to a safe location and we'll return to 32bit residuals. Since we only
allow 64KB I/O, 16bits is enough.
Do a much better job of DWIM with partial device specifications.
Fix the module metadata build process, which was completely broken.
Use a larger read buffer when copying large objects in; this
improves performance marginally and will avoid flushning any small caches
we might choose to implement.
Remove debugging in command_read().
Correctly strip leading controls on script commands.
Make 'ls' more DWIM in regard to pathnames. We can still do better.
This is a 100BaseFX board with SC fiber media connectors. I don't actually
have one of these but I've been told it works with the xl driver.
Submitted by: Jason Wright from the openbsd group
simple-lock.
The reviewer raises the following caveat: "I believe these changes
open a non-critical race condition when adding memory to the pool
for the zone. I think what will happen is that you could have two
threads that are simultaneously adding additional memory when the
pool runs out. This appears to not be a problem, however, since
the re-aquisition of the lock will protect the list pointers."
The submitter agrees that the race is non-critical, and points out
that it already existed for the non-SMP case. He suggests that
perhaps a sleep lock (using the lock manager) should be used to
close that race. This might be worth revisiting after 3.0 is
released.
Reviewed by: dg (David Greenman)
Submitted by: tegge (Tor Egge)
DEB macro). There are probably quite a few other messages that warrant
a similar treatment, and many more that should be converted to plain
log messages (e.g. "WARNING: wrintr but write DMA inactive!"). Now
that I think of it, same goes for the CAM code (e.g. the famed "tagged
openings" message)
command on drives that don't like it. Right now, there's just a bogus
quirk entry in the table that doesn't do anything, but that should be
changed once we get actual inquiry data for drives that don't like the
synchronize cache command.
Also, add a shutdown hook that runs through all direct access peripherals
and runs a synchronize cache on them if they're still open, and if
synchronize cache isn't disabled via a quirk entry.
Add a synchronize cache call at the end of dadump() (again, conditionalized
on the quirk entry), so we can insure that the disk cache contents get
flushed to physical media after a dump.
Check the new quirk entry in daclose() to decide whether or not to
synchronize the cache for a disk at final close.
Reviewed by: gibbs
to convert the timeval into a tick count.
Suggested by: bde
Reviewed by: bde
Handle hz > 1000 in BIOCGRTIMEOUT.
Pointed out by: bde
Reviewed by: bde
Obtained from: OpenBSD
As a side effect, a few wakeup() calls are added, which might fix some of the
missing vm_page wakeups people have been seeing.
Reviewed by: Doug Rabson <dfr@nlsystems.com>
Disable DPARCKEN in the DSCOMMAND0 register on the aic7890/91/96/97.
Parity checking is broken for some chip/MB combinations and this
is the work around recommended by Adaptec.
dpt_pci.c:
Remove a superflous '{' that prevented DPT_ALLOW_MEMIO from working.
pcireg.h:
Add a definition for Parity Error Reponse bit in the PCI Space
command register.
Enable optimization for nobounce_dmamap clients by setting the map
held by the client to NULL. This allows the macros in bus.h to check
against a constant to avoid function calls.
Don't attempt to 'free()' contigmalloced pages in bus_dmamem_free().
We currently leak these pages, which is not ideal, but is better than
a panic. The leak will be fixed when contigmalloc is merged into the
bus dma framework after 3.0R.